Desbloquea todos los bloques y plantillas premium con All-Access desde 20 € / 3 meses, cancela cuando quieras. Consigue All-Access
Todos los bloques
Gratis Menú de navegación

Maravel Navbar

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

0 7
Maravel Navbar preview

Descargar el código

Licencia comercial

Descarga gratis · hasta 5 bloques al día. Ilimitado con All-Access

maravel.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>Maravel Navbar | Tailwind CSS UI Block</title>
  <meta name="description" content="A navbar block extracted from the Maravel template, available in Tailwind CSS.">
  <meta name="keywords" content="Maravel, Tailwind CSS template, HTML website template, fashion ecommerce, clothing store, online boutique, apparel shop, responsive storefront design">
  <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="Maravel | Tailwind CSS Fashion Ecommerce Template">
  <meta property="og:description" content="An airy Tailwind CSS fashion ecommerce template for clothing boutiques, slow-fashion labels, and online apparel stores selling womenswear, menswear, and kidswear.">
  <meta property="og:image" content="">
  <meta property="og:image:alt" content="Maravel template preview">

  <meta name="twitter:card" content="summary_large_image">
  <meta name="twitter:url" content="">
  <meta name="twitter:title" content="Maravel | Tailwind CSS Fashion Ecommerce Template">
  <meta name="twitter:description" content="An airy Tailwind CSS fashion ecommerce template for clothing boutiques, slow-fashion labels, and online apparel stores selling womenswear, menswear, and kidswear.">
  <meta name="twitter:image" content="">
  <meta name="twitter:image:alt" content="Maravel template preview">
  <script src="https://cdn.tailwindcss.com/3.4.17"></script>
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
  <link rel="preconnect" href="https://fonts.googleapis.com">
  <link href="https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,200..700;1,9..40,200..700&display=swap" rel="stylesheet">
  <script>
    tailwind.config = {
      theme: {
        extend: {
          colors: {
            ink: '#111111',
            graphite: '#1f1f1f',
            coal: '#151515',
            mist: '#f4f3f1',
            muted: '#6f6f6f'
          },
          fontFamily: {
            sans: ['"DM Sans"', 'ui-sans-serif', 'system-ui', 'sans-serif']
          },
          maxWidth: {
            shell: '1440px'
          }
        }
      }
    };
  </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; } }
    @media (prefers-reduced-motion: reduce) {
      ::view-transition-old(root),
      ::view-transition-new(root) { animation: none; }
    }
    .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; }
  </style>
</head>
<body class="bg-white font-sans text-ink antialiased overflow-x-hidden">
<!-- block:start navbar -->
  <header id="top" class="relative z-30 bg-white">
    <nav class="mx-auto flex h-[72px] max-w-shell items-center justify-between gap-6 px-4 sm:px-6 lg:h-[100px] lg:px-[34px]" aria-label="Main">
      <a href="index.html" aria-current="page" class="text-[26px] italic tracking-[-0.02em] lg:text-[30px]">Maravel</a>
      <div class="hidden items-center gap-10 text-[15px] font-medium lg:flex">
          <a href="new-arrivals.html" class="transition-colors hover:text-muted">New Arrivals</a>
          <a href="women.html" class="transition-colors hover:text-muted">Women</a>
          <a href="men.html" class="transition-colors hover:text-muted">Men</a>
          <a href="kids.html" class="transition-colors hover:text-muted">Kids</a>
          <a href="sale.html" class="transition-colors hover:text-muted">Sale</a>
          <a href="collections.html" class="transition-colors hover:text-muted">Collections</a>
      </div>
      <div class="flex items-center gap-5 text-[19px] lg:gap-6">
        <a href="shop.html" class="relative" aria-label="Wishlist">
          <i class="fa-regular fa-heart"></i>
          <span data-wishlist-count class="absolute -right-2 -top-1.5 hidden h-4 min-w-4 items-center justify-center rounded-full bg-ink px-1 text-[10px] font-semibold text-white">0</span>
        </a>
        <a href="contact.html" class="hidden sm:inline" aria-label="Account and help">
          <i class="fa-regular fa-user"></i>
        </a>
        <a href="cart.html" class="relative" aria-label="Shopping bag">
          <i class="fa-solid fa-basket-shopping"></i>
          <span data-cart-count class="absolute -right-2 -top-1.5 flex h-4 min-w-4 items-center justify-center rounded-full bg-ink px-1 text-[10px] font-semibold text-white">3</span>
        </a>
        <button type="button" data-menu-toggle aria-controls="mobile-menu" aria-expanded="false" class="-mr-1 flex h-10 w-10 items-center justify-center lg:hidden" aria-label="Open menu">
          <i class="fa-solid fa-bars text-xl"></i>
        </button>
      </div>
    </nav>
    <div id="mobile-menu" class="hidden border-t border-black/5 bg-white px-4 pb-6 sm:px-6 lg:hidden">
      <div class="flex flex-col divide-y divide-black/5 text-lg">
          <a href="new-arrivals.html" class="flex items-center justify-between py-4">New Arrivals <i class="fa-solid fa-chevron-right text-xs text-muted"></i></a>
          <a href="women.html" class="flex items-center justify-between py-4">Women <i class="fa-solid fa-chevron-right text-xs text-muted"></i></a>
          <a href="men.html" class="flex items-center justify-between py-4">Men <i class="fa-solid fa-chevron-right text-xs text-muted"></i></a>
          <a href="kids.html" class="flex items-center justify-between py-4">Kids <i class="fa-solid fa-chevron-right text-xs text-muted"></i></a>
          <a href="sale.html" class="flex items-center justify-between py-4">Sale <i class="fa-solid fa-chevron-right text-xs text-muted"></i></a>
          <a href="collections.html" class="flex items-center justify-between py-4">Collections <i class="fa-solid fa-chevron-right text-xs text-muted"></i></a>
          <a href="contact.html" class="flex items-center justify-between py-4">Contact <i class="fa-solid fa-chevron-right text-xs text-muted"></i></a>
      </div>
    </div>
  </header>
  <!-- block:end navbar -->
<script>
    (() => {
      const store = {
        get(key, fallback) {
          try { const value = localStorage.getItem(key); return value === null ? fallback : JSON.parse(value); } catch (error) { return fallback; }
        },
        set(key, value) {
          try { localStorage.setItem(key, JSON.stringify(value)); } catch (error) {}
        }
      };

      const toastEl = document.getElementById("toast");
      let toastTimer;
      const toast = (message) => {
        if (!toastEl) return;
        toastEl.textContent = message;
        toastEl.classList.remove("opacity-0", "translate-y-4");
        clearTimeout(toastTimer);
        toastTimer = setTimeout(() => toastEl.classList.add("opacity-0", "translate-y-4"), 2200);
      };

      document.querySelectorAll("[data-menu-toggle]").forEach((button) => {
        const menu = document.getElementById(button.getAttribute("aria-controls"));
        if (!menu) return;
        button.addEventListener("click", () => {
          const open = button.getAttribute("aria-expanded") === "true";
          button.setAttribute("aria-expanded", String(!open));
          button.setAttribute("aria-label", open ? "Open menu" : "Close menu");
          menu.classList.toggle("hidden", open);
        });
      });

      const cartBadges = document.querySelectorAll("[data-cart-count]");
      let cartCount = store.get("maravel-cart-count", Number(cartBadges[0]?.textContent) || 0);
      const renderCart = () => cartBadges.forEach((badge) => { badge.textContent = cartCount; badge.classList.toggle("hidden", cartCount < 1); badge.classList.toggle("flex", cartCount > 0); });
      renderCart();
      document.querySelectorAll("[data-add-to-cart]").forEach((button) => {
        button.addEventListener("click", () => {
          cartCount += 1;
          store.set("maravel-cart-count", cartCount);
          renderCart();
          toast(`${button.dataset.addToCart} added to your bag`);
        });
      });

      const liked = new Set(store.get("maravel-wishlist", []));
      const wishBadges = document.querySelectorAll("[data-wishlist-count]");
      const renderWishlist = () => {
        wishBadges.forEach((badge) => { badge.textContent = liked.size; badge.classList.toggle("hidden", liked.size === 0); badge.classList.toggle("flex", liked.size > 0); });
        document.querySelectorAll("[data-wishlist]").forEach((button) => button.setAttribute("aria-pressed", String(liked.has(button.dataset.wishlist))));
      };
      document.querySelectorAll("[data-wishlist]").forEach((button) => {
        button.addEventListener("click", () => {
          const id = button.dataset.wishlist;
          const saved = !liked.has(id);
          saved ? liked.add(id) : liked.delete(id);
          store.set("maravel-wishlist", [...liked]);
          renderWishlist();
          toast(saved ? "Saved to your wishlist" : "Removed from your wishlist");
        });
      });
      renderWishlist();

      const calm = navigator.webdriver || matchMedia("(prefers-reduced-motion: reduce)").matches;
      document.querySelectorAll("[data-slider]").forEach((slider) => {
        const slides = [...slider.querySelectorAll("[data-slide]")];
        if (slides.length < 2) return;
        let index = 0;
        const show = (next) => {
          index = (next + slides.length) % slides.length;
          slides.forEach((slide, i) => {
            const active = i === index;
            slide.classList.toggle("opacity-0", !active);
            slide.classList.toggle("pointer-events-none", !active);
            slide.setAttribute("aria-hidden", String(!active));
            slide.querySelectorAll("a, button").forEach((el) => (active ? el.removeAttribute("tabindex") : el.setAttribute("tabindex", "-1")));
          });
        };
        slider.querySelector("[data-slider-prev]")?.addEventListener("click", () => show(index - 1));
        slider.querySelector("[data-slider-next]")?.addEventListener("click", () => show(index + 1));
        slider.addEventListener("keydown", (event) => {
          if (event.key === "ArrowLeft") show(index - 1);
          if (event.key === "ArrowRight") show(index + 1);
        });
      });

      document.querySelectorAll("[data-newsletter]").forEach((form) => {
        form.addEventListener("submit", (event) => {
          event.preventDefault();
          const message = form.closest("section")?.querySelector("[data-newsletter-message]");
          if (message) {
            message.textContent = "Thanks for joining. Your welcome note is on its way.";
            message.classList.remove("hidden");
          }
          form.reset();
        });
      });

      const items = document.querySelectorAll("[data-reveal]");
      const skip = calm || !("IntersectionObserver" in window);
      if (items.length && !skip) {
        document.documentElement.classList.add("reveal-ready");
        const observer = new IntersectionObserver((entries) => {
          entries.forEach((entry) => {
            if (!entry.isIntersecting) return;
            entry.target.classList.add("is-visible");
            observer.unobserve(entry.target);
          });
        }, { rootMargin: "0px 0px -10% 0px" });
        items.forEach((item) => observer.observe(item));
      }
    })();
  </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>

De esta plantilla

Maravel screenshot Premium

Tienda online

Maravel

Acceso ilimitado a todos los productos

Desbloquea toda la biblioteca de plantillas y bloques premium. Se renueva automáticamente, cancela cuando quieras.

20 € / 3 meses o 60 € / año
Conseguir acceso ilimitado