Free
Navbar
Hoopla Navbar
A navbar block extracted from the Hoopla template, available in Tailwind CSS.
0
0
A navbar block extracted from the Hoopla template, available in Tailwind CSS.
Free download · up to 5 blocks per day. Unlimited with All-Access
<!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>Hoopla Navbar | Tailwind CSS UI Block</title>
<meta name="description" content="A navbar block extracted from the Hoopla template, available in Tailwind CSS.">
<meta name="keywords" content="Hoopla, Tailwind CSS template, HTML website template, doughnut shop template, bakery website, brunch cafe template, restaurant menu page, table booking form, food template">
<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="Hoopla | Tailwind CSS Food & Restaurant Template">
<meta property="og:description" content="A playful Tailwind CSS template for doughnut shops, bakeries and brunch cafes, with sticker badges on speckled paper, a build-your-box picker, a weekly board, a menu, table booking and a contact form.">
<meta property="og:image" content="">
<meta property="og:image:alt" content="Hoopla template preview">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:url" content="">
<meta name="twitter:title" content="Hoopla | Tailwind CSS Food & Restaurant Template">
<meta name="twitter:description" content="A playful Tailwind CSS template for doughnut shops, bakeries and brunch cafes, with sticker badges on speckled paper, a build-your-box picker, a weekly board, a menu, table booking and a contact form.">
<meta name="twitter:image" content="">
<meta name="twitter:image:alt" content="Hoopla 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=Fredoka:wght@500;600;700&family=Josefin+Sans:wght@300;400;600&family=Nunito:wght@400;600;700&display=swap" rel="stylesheet">
<script>
tailwind.config = {
theme: {
extend: {
colors: {
paper: { DEFAULT: '#f4f0e4', deep: '#e9e3d2', card: '#fffdf7' },
ink: { DEFAULT: '#3f4347', soft: '#5d6165', deep: '#2b2d2f' },
teal: { DEFAULT: '#2aa6b8', deep: '#14707e', pale: '#a8d8d4' },
olive: { DEFAULT: '#7b8530', deep: '#565e1d' },
tangerine: { DEFAULT: '#e2603a', deep: '#b03f1c' },
sun: '#f2c230',
leaf: '#6fae3c'
},
fontFamily: {
sans: ['Nunito', 'sans-serif'],
display: ['"Josefin Sans"', 'sans-serif'],
chunky: ['Fredoka', 'sans-serif']
}
}
}
}
</script>
<style>
@view-transition { navigation: auto; }
html { scroll-behavior: smooth; }
[hidden] { display: none !important; }
body { background-color: #f4f0e4; background-image: radial-gradient(rgba(63, 67, 71, .09) 1px, transparent 1.4px), radial-gradient(rgba(255, 255, 255, .7) 1px, transparent 1.6px); background-size: 23px 23px, 31px 31px; background-position: 0 0, 11px 17px; }
.rainbow { font-family: 'Fredoka', sans-serif; font-weight: 700; text-transform: lowercase; letter-spacing: -.01em; color: #14707e; background: linear-gradient(90deg, #2aa6b8 0 30%, #f2c230 30% 44%, #e2603a 44% 62%, #6fae3c 62% 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.thin-caps { font-family: 'Josefin Sans', sans-serif; font-weight: 300; text-transform: uppercase; letter-spacing: .02em; }
.sticker { display: block; filter: drop-shadow(0 6px 5px rgba(63, 67, 71, .22)); transition: transform .35s ease; }
.sticker:hover { transform: rotate(0deg) scale(1.04) !important; }
.sticker text { font-family: 'Fredoka', sans-serif; font-weight: 600; }
.strip-card { overflow: hidden; border-radius: 1.1rem; background: #fffdf7; box-shadow: 0 10px 22px -12px rgba(63, 67, 71, .45); }
.strip { display: block; padding: .55rem 1rem .5rem; text-align: center; color: #fff; font-family: 'Josefin Sans', sans-serif; font-size: 1.15rem; letter-spacing: .03em; }
.pill { display: inline-flex; align-items: center; gap: .6rem; border-radius: 9999px; padding: .8rem 1.6rem; font-family: 'Fredoka', sans-serif; font-weight: 600; transition: transform .2s ease, background-color .2s ease; }
.pill:hover { transform: translateY(-2px); }
.pill-solid { background: #14707e; color: #fff; }
.pill-solid:hover { background: #0f5a66; }
.pill-line { border: 2px solid #3f4347; color: #2b2d2f; }
.pill-line:hover { background: #2b2d2f; color: #fff; }
.chip { border-radius: 9999px; border: 2px solid #3f4347; padding: .45rem 1.1rem; font-weight: 700; color: #2b2d2f; background: #fffdf7; transition: background-color .2s ease, color .2s ease; }
.chip[aria-pressed="true"] { background: #2b2d2f; color: #fff; }
.ring { display: grid; place-items: center; aspect-ratio: 1; border-radius: 9999px; border: 2px dashed rgba(63, 67, 71, .35); background: transparent; }
.ring.is-filled { border: 0; background: radial-gradient(circle, #fffdf7 0 20%, var(--glaze, #f2c230) 21% 100%); box-shadow: inset 0 -6px 0 rgba(0, 0, 0, .12), 0 6px 8px -4px rgba(63, 67, 71, .5); }
.marquee { display: flex; overflow: hidden; gap: 2.5rem; }
.marquee-track { display: flex; align-items: center; gap: 2.5rem; flex-shrink: 0; animation: marquee 38s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(calc(-100% - 2.5rem)); } }
[data-week] .is-today { background: #fffdf7; box-shadow: 0 10px 22px -14px rgba(63, 67, 71, .5); }
[data-week] .is-today [data-today-tag] { display: inline-block; }
.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) { .marquee { overflow-x: auto; } .marquee-track { animation: none; } .sticker, .pill { transition: none; } }
</style>
</head>
<body class="font-sans text-ink-soft antialiased">
<!-- block:start navbar -->
<header class="relative z-40">
<div class="mx-auto flex max-w-[1380px] items-center justify-between gap-6 px-5 py-5 md:px-10 md:py-7">
<a href="index.html" class="rainbow text-4xl leading-none">Hoopla</a>
<nav aria-label="Main" class="hidden items-center gap-8 lg:flex">
<a href="menu.html" class="thin-caps text-xl font-normal text-ink hover:text-teal-deep">Menu</a>
<a href="about.html" class="thin-caps text-xl font-normal text-ink hover:text-teal-deep">About</a>
<a href="contact.html" class="thin-caps text-xl font-normal text-ink hover:text-teal-deep">Contact</a>
<a href="reservations.html" class="pill pill-solid">Book a table</a>
</nav>
<button type="button" data-menu-toggle aria-controls="mobile-menu" aria-expanded="false" class="grid h-12 w-12 place-items-center rounded-full border-2 border-ink text-ink-deep lg:hidden" aria-label="Open menu"><i class="fa-solid fa-bars"></i></button>
</div>
<div id="mobile-menu" class="hidden border-y-2 border-ink/15 bg-paper-card px-5 py-6 lg:hidden">
<nav aria-label="Mobile" class="flex flex-col gap-4">
<a href="index.html" aria-current="page" class="thin-caps text-2xl font-normal text-teal-deep">Home</a>
<a href="menu.html" class="thin-caps text-2xl font-normal text-ink">Menu</a>
<a href="reservations.html" class="thin-caps text-2xl font-normal text-ink">Book a table</a>
<a href="about.html" class="thin-caps text-2xl font-normal text-ink">About</a>
<a href="contact.html" class="thin-caps text-2xl font-normal text-ink">Contact</a>
</nav>
</div>
</header>
<!-- block:end navbar -->
<script>
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));
menu.classList.toggle("hidden", open);
});
});
(() => {
const items = document.querySelectorAll("[data-reveal]");
const skip = navigator.webdriver || !("IntersectionObserver" in window) || matchMedia("(prefers-reduced-motion: reduce)").matches;
if (!items.length || skip) return;
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));
})();
document.querySelectorAll("[data-box]").forEach((root) => {
const flavours = [...root.querySelectorAll("[data-flavour]")];
const slots = [...root.querySelectorAll("[data-box-slot]")];
const sizes = [...root.querySelectorAll("[data-box-size]")];
const link = root.querySelector("[data-box-link]");
const summary = root.querySelector("[data-box-summary]");
const hint = summary.textContent;
const nameOf = (key) => root.querySelector(`[data-flavour="${key}"] [data-flavour-name]`).textContent.trim();
let capacity = 6;
let box = [];
const render = () => {
slots.forEach((slot, index) => {
const key = box[index];
slot.hidden = index >= capacity;
slot.classList.toggle("is-filled", Boolean(key));
slot.setAttribute("aria-pressed", String(Boolean(key)));
if (key) slot.style.setProperty("--glaze", root.querySelector(`[data-flavour="${key}"]`).dataset.glaze);
});
const counts = {};
box.forEach((key) => { counts[key] = (counts[key] || 0) + 1; });
const lines = Object.entries(counts).map(([key, count]) => `${count} × ${nameOf(key)}`);
summary.textContent = lines.length ? lines.join(", ") : hint;
root.querySelector("[data-box-count]").textContent = box.length;
root.querySelector("[data-box-capacity]").textContent = capacity;
root.querySelector("[data-box-total]").textContent = sizes.find((size) => Number(size.dataset.boxSize) === capacity).dataset.price;
if (link) link.href = link.getAttribute("href").split("?")[0] + (lines.length ? `?box=${encodeURIComponent(`Box of ${capacity}: ${lines.join(", ")}`)}` : "");
};
flavours.forEach((flavour) => flavour.querySelector("[data-box-add]").addEventListener("click", () => {
if (box.length < capacity) box.push(flavour.dataset.flavour);
render();
}));
slots.forEach((slot, index) => slot.addEventListener("click", () => {
if (index < box.length) box.splice(index, 1);
render();
}));
sizes.forEach((size) => size.addEventListener("click", () => {
capacity = Number(size.dataset.boxSize);
box = box.slice(0, capacity);
sizes.forEach((item) => item.setAttribute("aria-pressed", String(item === size)));
render();
}));
root.querySelector("[data-box-fill]").addEventListener("click", () => {
let next = box.length;
while (box.length < capacity) box.push(flavours[next++ % flavours.length].dataset.flavour);
render();
});
root.querySelector("[data-box-clear]").addEventListener("click", () => { box = []; render(); });
box = flavours.slice(0, 3).map((flavour) => flavour.dataset.flavour);
render();
});
document.querySelectorAll("[data-week]").forEach((list) => {
const row = list.querySelector(`[data-day="${new Date().getDay()}"]`);
if (row) row.classList.add("is-today");
});
</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>
Premium
Food & Restaurant
Unlock the entire library of premium templates and blocks. Renews automatically, cancel anytime.