Unlock every premium block and template with All-Access from $20 / 3 months, cancel anytime. Get All-Access
All blocks
Free Navbar

Oleandra Navbar

A navbar block extracted from the Oleandra template, available in Tailwind CSS.

0 3
Oleandra Navbar preview

Download Codebase

Commercial License

Free download · up to 5 blocks per day. Unlimited with All-Access

oleandra.html
<!DOCTYPE html>
<html lang="en">
<head>
  <script>
    window.FontAwesomeConfig = { autoReplaceSvg: 'nest' };
  </script>
  <script src="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/js/all.min.js" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Oleandra Navbar | Tailwind CSS UI Block</title>
  <meta name="description" content="A navbar block extracted from the Oleandra template, available in Tailwind CSS.">
  <meta name="keywords" content="Oleandra, Tailwind CSS template, HTML website template, ecommerce template, skincare store, natural cosmetics shop, beauty brand website, serum product page, skin quiz, shopping cart">
  <meta name="author" content="Let's templates">
  <link rel="canonical" href="">

  <meta property="og:type" content="product">
  <meta property="og:site_name" content="Let's templates">
  <meta property="og:locale" content="en_US">
  <meta property="og:url" content="">
  <meta property="og:title" content="Oleandra | Tailwind CSS Ecommerce Template">
  <meta property="og:description" content="A lush Tailwind CSS ecommerce template for natural skincare, with floating product cards, a ritual builder, an ingredient map and a skin quiz.">
  <meta property="og:image" content="">
  <meta property="og:image:alt" content="Oleandra template preview">

  <meta name="twitter:card" content="summary_large_image">
  <meta name="twitter:url" content="">
  <meta name="twitter:title" content="Oleandra | Tailwind CSS Ecommerce Template">
  <meta name="twitter:description" content="A lush Tailwind CSS ecommerce template for natural skincare, with floating product cards, a ritual builder, an ingredient map and a skin quiz.">
  <meta name="twitter:image" content="">
  <meta name="twitter:image:alt" content="Oleandra template preview">
  <script src="https://cdn.tailwindcss.com/3.4.17"></script>
  <link rel="preconnect" href="https://fonts.googleapis.com">
  <link href="https://fonts.googleapis.com/css2?family=Instrument+Serif&family=Inter:wght@400;500;600&display=swap" rel="stylesheet">
  <script>
    tailwind.config = {
      theme: {
        extend: {
          colors: { forest: { DEFAULT: '#0e3a22', deep: '#0a2c19', soft: '#155232' }, lime: { DEFAULT: '#b9f45e', soft: '#dcfaa8' }, cream: { DEFAULT: '#f2eed6', deep: '#e6e0bd' } },
          fontFamily: { sans: ['Inter', 'sans-serif'], serif: ['"Instrument Serif"', 'serif'] }
        }
      }
    }
  </script>
  <style>
    @view-transition { navigation: auto; }
    ::view-transition-old(root) { animation: 180ms ease-out both page-fade-out; }
    ::view-transition-new(root) { animation: 220ms ease-in both page-fade-in; }
    @keyframes page-fade-out { to { opacity: 0; } }
    @keyframes page-fade-in { from { opacity: 0; } }
    html { scroll-behavior: smooth; }
    [hidden] { display: none !important; }
    .display { font-family: "Instrument Serif", serif; text-transform: uppercase; letter-spacing: -.02em; line-height: .9; }
    .hotspot::after { content: ""; position: absolute; inset: -6px; border-radius: 999px; border: 2px solid #b9f45e; animation: ping 2s ease-out infinite; }
    @keyframes ping { 70%, 100% { transform: scale(1.6); opacity: 0; } }
    .reveal-ready [data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; transition-delay: var(--reveal-delay, 0ms); }
    .reveal-ready [data-reveal].is-visible { opacity: 1; transform: none; }
    @media (prefers-reduced-motion: reduce) {
      html { scroll-behavior: auto; }
      .hotspot::after { animation: none; }
      ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
    }
  </style>
</head>
<body class="bg-forest font-sans text-cream antialiased">
<!-- block:start navbar -->
  <header class="relative z-40 border-b border-white/10">
    <nav class="mx-auto flex max-w-[90rem] items-stretch" aria-label="Main">
      <a href="index.html" class="flex items-center gap-3 border-r border-white/10 px-5 py-5 font-serif text-3xl uppercase md:px-10"><i class="fa-solid fa-asterisk text-2xl text-lime" aria-hidden="true"></i>Oleandra</a>
      <ul class="hidden flex-1 items-center gap-10 px-10 text-sm lg:flex">
          <li><a href="shop.html"  class="transition hover:text-lime">Shop</a></li>
          <li><a href="rituals.html"  class="transition hover:text-lime">Rituals</a></li>
        <li class="relative" data-dropdown>
          <button type="button" aria-expanded="false" aria-controls="ingredients-menu" class="flex items-center gap-2 transition hover:text-lime " data-dropdown-toggle>Ingredients<i class="fa-solid fa-chevron-down text-xs" aria-hidden="true"></i></button>
          <div id="ingredients-menu" hidden class="absolute left-0 top-full mt-4 w-72 border border-white/10 bg-forest-deep p-3 shadow-2xl">
            <ul class="grid gap-1">
                <li><a href="ingredients.html" class="block px-3 py-2 transition hover:bg-white/5"><span class="block font-serif text-xl">Rose geranium</span><span class="text-xs text-cream/60">Balances and calms</span></a></li>
                <li><a href="ingredients.html" class="block px-3 py-2 transition hover:bg-white/5"><span class="block font-serif text-xl">Squalane</span><span class="text-xs text-cream/60">Locks in moisture</span></a></li>
                <li><a href="ingredients.html" class="block px-3 py-2 transition hover:bg-white/5"><span class="block font-serif text-xl">Green tea</span><span class="text-xs text-cream/60">Shields from stress</span></a></li>
                <li><a href="ingredients.html" class="block px-3 py-2 transition hover:bg-white/5"><span class="block font-serif text-xl">Sea fennel</span><span class="text-xs text-cream/60">Smooths and brightens</span></a></li>
              <li><a href="ingredients.html" class="mt-1 block border-t border-white/10 px-3 pt-3 text-sm text-lime underline-offset-4 hover:underline">See every ingredient</a></li>
            </ul>
          </div>
        </li>
          <li><a href="skin-quiz.html"  class="transition hover:text-lime">Skin Quiz</a></li>
          <li><a href="journal.html"  class="transition hover:text-lime">Journal</a></li>
      </ul>
      <div class="ml-auto flex items-center gap-2 border-l border-white/10 px-5 md:gap-4 md:px-10">
        <a href="shop.html" class="grid h-10 w-10 place-items-center text-lg transition hover:text-lime" aria-label="Search the shop"><i class="fa-solid fa-magnifying-glass" aria-hidden="true"></i></a>
        <a href="cart.html" class="relative grid h-10 w-10 place-items-center text-lg transition hover:text-lime" aria-label="Bag"><i class="fa-solid fa-bag-shopping" aria-hidden="true"></i><span class="absolute -right-1 -top-1 grid h-5 min-w-5 place-items-center rounded-full bg-lime px-1 text-[10px] font-semibold text-forest" data-bag-count>0</span></a>
        <a href="shop.html" class="hidden border border-cream/80 px-8 py-3 font-serif text-2xl transition hover:bg-lime hover:text-forest sm:block">Shop now</a>
        <button type="button" data-menu-toggle aria-controls="mobile-menu" aria-expanded="false" class="grid h-10 w-10 place-items-center border border-white/20 lg:hidden" aria-label="Open menu"><i class="fa-solid fa-bars" aria-hidden="true"></i></button>
      </div>
    </nav>
    <div id="mobile-menu" class="hidden border-t border-white/10 px-5 py-5 lg:hidden">
      <ul class="grid gap-1 font-serif text-4xl">
          <li><a href="index.html" aria-current="page" class="block py-1 text-lime">Home</a></li>
          <li><a href="shop.html"  class="block py-1 hover:text-lime">Shop</a></li>
          <li><a href="rituals.html"  class="block py-1 hover:text-lime">Rituals</a></li>
          <li><a href="skin-quiz.html"  class="block py-1 hover:text-lime">Skin Quiz</a></li>
          <li><a href="journal.html"  class="block py-1 hover:text-lime">Journal</a></li>
          <li><a href="ingredients.html"  class="block py-1 hover:text-lime">Ingredients</a></li>
          <li><a href="cart.html"  class="block py-1 hover:text-lime">Bag</a></li>
      </ul>
    </div>
  </header>
  <!-- block:end navbar -->
<script>
    const reducedMotion = matchMedia('(prefers-reduced-motion: reduce)').matches;
    const watchMotion = !reducedMotion && !navigator.webdriver && 'IntersectionObserver' in window;
    const bag = { get: () => { try { return Number(localStorage.getItem('oleandra-bag')) || 0; } catch (error) { return 0; } }, add: (n) => { try { localStorage.setItem('oleandra-bag', String(bag.get() + n)); } catch (error) { /* storage unavailable */ } document.querySelectorAll('[data-bag-count]').forEach((el) => { el.textContent = bag.get(); }); } };
    document.querySelectorAll('[data-bag-count]').forEach((el) => { el.textContent = bag.get(); });

    document.querySelectorAll('[data-menu-toggle]').forEach((button) => {
      const menu = document.getElementById(button.getAttribute('aria-controls'));
      button.addEventListener('click', () => {
        const open = button.getAttribute('aria-expanded') === 'true';
        button.setAttribute('aria-expanded', String(!open));
        menu.classList.toggle('hidden', open);
      });
    });

    document.querySelectorAll('[data-dropdown]').forEach((root) => {
      const toggle = root.querySelector('[data-dropdown-toggle]');
      const menu = document.getElementById(toggle.getAttribute('aria-controls'));
      const set = (open) => { menu.hidden = !open; toggle.setAttribute('aria-expanded', String(open)); };
      toggle.addEventListener('click', () => set(menu.hidden));
      document.addEventListener('click', (event) => { if (!root.contains(event.target)) set(false); });
      root.addEventListener('keydown', (event) => { if (event.key === 'Escape') { set(false); toggle.focus(); } });
    });

    document.querySelectorAll('[data-add-bag]').forEach((button) => button.addEventListener('click', () => {
      bag.add(1);
      const label = button.innerHTML;
      button.textContent = 'Added ✓';
      setTimeout(() => { button.innerHTML = label; }, 1500);
    }));

    document.querySelectorAll('[data-builder]').forEach((root) => {
      const catalog = {
        cleanse: { dry: ['Milk Cleanser', 24], oily: ['Clay Gel Wash', 22], combo: ['Balancing Gel', 22], sensitive: ['Oat Cream Wash', 24] },
        treat: { dull: ['Vitamin Glow Serum', 38], lines: ['Night Renewal Serum', 35], breakouts: ['Willow Clear Drops', 32], redness: ['Calm Green Serum', 34] },
        seal: { dry: ['Rose Geranium Oil', 85], oily: ['Cloud Water Cream', 42], combo: ['Cloud Water Cream', 42], sensitive: ['Barrier Balm', 39] }
      };
      const paint = () => {
        const skin = root.querySelector('[name="skin"]:checked').value;
        const concern = root.querySelector('[name="concern"]:checked').value;
        const picks = [catalog.cleanse[skin], catalog.treat[concern], catalog.seal[skin]];
        picks.forEach(([name, price], i) => { root.querySelector(`[data-step-name="${i}"]`).textContent = name; root.querySelector(`[data-step-price="${i}"]`).textContent = `$${price}`; });
        const full = picks.reduce((sum, [, price]) => sum + price, 0);
        root.querySelector('[data-builder-total]').textContent = Math.round(full * 0.85);
        root.querySelector('[data-builder-saving]').textContent = `save $${full - Math.round(full * 0.85)}`;
        root.querySelector('[data-builder-status]').textContent = '';
      };
      root.addEventListener('change', paint);
      root.querySelector('[data-builder-add]').addEventListener('click', () => { bag.add(3); root.querySelector('[data-builder-status]').textContent = 'Your three-step ritual is in the bag.'; });
      paint();
    });

    document.querySelectorAll('[data-hotspots]').forEach((root) => {
      const spots = [...root.querySelectorAll('[data-spot]')];
      spots.forEach((spot) => spot.addEventListener('click', () => {
        spots.forEach((other) => other.setAttribute('aria-pressed', String(other === spot)));
        root.querySelector('[data-spot-name]').textContent = spot.dataset.name;
        root.querySelector('[data-spot-text]').textContent = spot.dataset.text;
      }));
    });

    document.querySelectorAll('[data-newsletter]').forEach((form) => {
      const status = form.querySelector('[data-form-status]');
      form.addEventListener('submit', (event) => {
        event.preventDefault();
        if (!form.elements.email.checkValidity()) { status.textContent = 'Please enter a valid email address.'; form.elements.email.focus(); return; }
        const topics = [...form.querySelectorAll('[name="topics"]:checked')].map((box) => box.value.toLowerCase());
        status.textContent = `Welcome! Expect notes on ${topics.join(', ') || 'everything'} — and your 10% code.`;
        form.reset();
      });
    });

    if (watchMotion) {
      document.documentElement.classList.add('reveal-ready');
      const observer = new IntersectionObserver((entries) => entries.forEach((entry) => {
        if (entry.isIntersecting) { entry.target.classList.add('is-visible'); observer.unobserve(entry.target); }
      }), { threshold: 0.15 });
      document.querySelectorAll('[data-reveal]').forEach((el) => observer.observe(el));
    }
  </script>
<!-- Optional credit — delete this block if you prefer a clean footer -->
<p class="lt-built-with" style="margin:0;padding:12px 16px;text-align:center;font:500 11px/1.4 system-ui,-apple-system,sans-serif;color:#9ca3af;">Built with <a href="https://letstemplates.com" style="color:#059669;text-decoration:none;">Let's templates</a></p>
</body>
</html>

From this template

Oleandra screenshot Premium

E-commerce

Oleandra

Unlimited access to all products

Unlock the entire library of premium templates and blocks. Renews automatically, cancel anytime.

$20 / 3 months or $60 / year
Get Unlimited Access