Gratis
Productos
Kestrel Products
A products block extracted from the Kestrel template, available in Tailwind CSS.
0
16
A products block extracted from the Kestrel template, available in Tailwind CSS.
Descarga gratis · hasta 5 bloques al día. Ilimitado con 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>Kestrel Products | Tailwind CSS UI Block</title>
<meta name="description" content="A products block extracted from the Kestrel template, available in Tailwind CSS.">
<meta name="keywords" content="Kestrel, Tailwind CSS template, HTML website template, streetwear ecommerce, fashion store template, clothing shop, product catalog filters, responsive online store 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="Kestrel | Tailwind CSS Streetwear Ecommerce Template">
<meta property="og:description" content="A bold Tailwind CSS streetwear ecommerce template with brutalist typography, filterable product catalog, lookbook banners, and cart pages for independent fashion labels.">
<meta property="og:image" content="">
<meta property="og:image:alt" content="Kestrel template preview">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:url" content="">
<meta name="twitter:title" content="Kestrel | Tailwind CSS Streetwear Ecommerce Template">
<meta name="twitter:description" content="A bold Tailwind CSS streetwear ecommerce template with brutalist typography, filterable product catalog, lookbook banners, and cart pages for independent fashion labels.">
<meta name="twitter:image" content="">
<meta name="twitter:image:alt" content="Kestrel 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 rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Dela+Gothic+One&family=Inter+Tight:wght@400;500;600;700;800;900&display=swap" rel="stylesheet">
<script>
tailwind.config = {
theme: {
extend: {
colors: {
ink: '#0b0b0b',
bone: '#f1f1ef',
frost: '#9fcbe3'
},
fontFamily: {
sans: ['"Inter Tight"', 'sans-serif'],
brand: ['"Dela Gothic One"', 'sans-serif']
}
}
}
};
</script>
<style>
@view-transition { navigation: auto; }
body { font-family: 'Inter Tight', sans-serif; }
.font-brand { font-family: 'Dela Gothic One', sans-serif; }
.hero-frame { min-height: 640px; }
[hidden] { display: none !important; }
.hero-word { font-size: 32vw; line-height: 0.74; letter-spacing: -0.075em; }
.footer-word { font-size: 15.6vw; line-height: 0.82; letter-spacing: -0.04em; }
.marquee { overflow: hidden; }
.marquee-track { display: flex; width: max-content; animation: marquee var(--marquee-speed, 42s) linear infinite; }
.marquee-reverse .marquee-track { animation-direction: reverse; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }
.barcode { display: inline-block; height: 0.75rem; background: repeating-linear-gradient(90deg, currentColor 0 1px, transparent 1px 3px, currentColor 3px 4px, transparent 4px 5px, currentColor 5px 7px, transparent 7px 8px, currentColor 8px 9px, transparent 9px 11px); }
.barcode-v { display: inline-block; width: 0.75rem; background: repeating-linear-gradient(180deg, currentColor 0 1px, transparent 1px 3px, currentColor 3px 4px, transparent 4px 5px, currentColor 5px 7px, transparent 7px 8px); }
.motion-frame img { transition: transform 700ms ease; }
.motion-frame.is-playing img { animation: slow-pan 14s ease-in-out infinite alternate; }
@keyframes slow-pan { from { transform: scale(1.02) translateX(0); } to { transform: scale(1.12) translateX(-2%); } }
.filter-check { accent-color: #9fcbe3; }
.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 (min-width: 1024px) {
.hero-frame { height: min(69vw, 1080px); }
}
@media (prefers-reduced-motion: reduce) {
.marquee-track, .motion-frame.is-playing img { animation: none; }
}
</style>
</head>
<body class="bg-white text-ink antialiased overflow-x-hidden">
<!-- block:start products -->
<section id="catalog" class="bg-white px-5 pb-20 pt-24 md:px-8 lg:pt-28" data-catalog data-per-page="8">
<div class="mx-auto max-w-[1600px]">
<div class="grid gap-6 lg:grid-cols-12 lg:items-center">
<p class="text-[13px] font-medium uppercase leading-tight lg:col-span-2">// Picked for<br>daily wear.</p>
<h2 class="text-4xl font-extrabold uppercase tracking-[-0.05em] sm:text-6xl lg:col-span-7 lg:text-[76px] lg:leading-none">Daily // rotation</h2>
<label class="flex items-center gap-4 text-[12px] font-medium uppercase lg:col-span-3 lg:justify-end">
Sort by
<span class="relative">
<select data-sort class="appearance-none border border-ink bg-white py-3 pl-4 pr-10 text-[13px] font-medium uppercase focus:outline-none focus:ring-2 focus:ring-frost">
<option value="popular">Popularity</option>
<option value="newest">Newest</option>
<option value="price-asc">Price: low to high</option>
<option value="price-desc">Price: high to low</option>
</select>
<i class="fa-solid fa-chevron-down pointer-events-none absolute right-4 top-1/2 -translate-y-1/2 text-[10px]"></i>
</span>
</label>
</div>
<div class="mt-10 grid gap-6 lg:grid-cols-[228px_1fr] lg:gap-4">
<aside class="grid grid-cols-2 self-start border border-ink text-[13px] font-medium uppercase lg:grid-cols-1" aria-label="Product filters">
<details open class="group border-b border-r border-ink p-4 lg:border-r-0">
<summary class="flex cursor-pointer list-none items-center justify-between text-[12px]">// Category <i class="fa-solid fa-chevron-up text-[9px] transition-transform group-open:rotate-0 rotate-180"></i></summary>
<div class="mt-4 space-y-2.5">
<label class="flex cursor-pointer items-center gap-2.5">
<input type="checkbox" name="category" value="tops" data-label="Tops" class="filter-check h-3.5 w-3.5">
Tops
<span class="rounded-full bg-frost px-1.5 text-[9px] leading-4">2</span>
</label>
<label class="flex cursor-pointer items-center gap-2.5">
<input type="checkbox" name="category" value="bottoms" data-label="Bottoms" class="filter-check h-3.5 w-3.5">
Bottoms
<span class="rounded-full bg-frost px-1.5 text-[9px] leading-4">2</span>
</label>
<label class="flex cursor-pointer items-center gap-2.5">
<input type="checkbox" name="category" value="outerwear" data-label="Outerwear" class="filter-check h-3.5 w-3.5">
Outerwear
<span class="rounded-full bg-frost px-1.5 text-[9px] leading-4">4</span>
</label>
<label class="flex cursor-pointer items-center gap-2.5">
<input type="checkbox" name="category" value="shoes" data-label="Shoes" class="filter-check h-3.5 w-3.5">
Shoes
<span class="rounded-full bg-frost px-1.5 text-[9px] leading-4">1</span>
</label>
<label class="flex cursor-pointer items-center gap-2.5">
<input type="checkbox" name="category" value="accessories" data-label="Accessories" class="filter-check h-3.5 w-3.5">
Accessories
<span class="rounded-full bg-frost px-1.5 text-[9px] leading-4">3</span>
</label>
</div>
</details>
<details open class="group border-b border-ink p-4">
<summary class="flex cursor-pointer list-none items-center justify-between text-[12px]">// Size <i class="fa-solid fa-chevron-up text-[9px] transition-transform group-open:rotate-0 rotate-180"></i></summary>
<div class="mt-4 space-y-2.5">
<label class="flex cursor-pointer items-center gap-2.5">
<input type="checkbox" name="size" value="S" class="filter-check h-3.5 w-3.5">
S
</label>
<label class="flex cursor-pointer items-center gap-2.5">
<input type="checkbox" name="size" value="M" class="filter-check h-3.5 w-3.5">
M
</label>
<label class="flex cursor-pointer items-center gap-2.5">
<input type="checkbox" name="size" value="L" class="filter-check h-3.5 w-3.5">
L
</label>
<label class="flex cursor-pointer items-center gap-2.5">
<input type="checkbox" name="size" value="XL" class="filter-check h-3.5 w-3.5">
XL
</label>
<label class="flex cursor-pointer items-center gap-2.5">
<input type="checkbox" name="size" value="XXL" class="filter-check h-3.5 w-3.5">
XXL
</label>
</div>
</details>
<details open class="group border-r border-ink p-4 lg:border-b lg:border-r-0">
<summary class="flex cursor-pointer list-none items-center justify-between text-[12px]">// Availability <i class="fa-solid fa-chevron-up text-[9px] transition-transform group-open:rotate-0 rotate-180"></i></summary>
<div class="mt-4 space-y-2.5">
<label class="flex cursor-pointer items-center gap-2.5">
<input type="checkbox" name="availability" value="all" data-label="All" class="filter-check h-3.5 w-3.5" checked>
All
</label>
<label class="flex cursor-pointer items-center gap-2.5">
<input type="checkbox" name="availability" value="in-stock" data-label="In stock" class="filter-check h-3.5 w-3.5" >
In stock
</label>
<label class="flex cursor-pointer items-center gap-2.5">
<input type="checkbox" name="availability" value="discount" data-label="Discount" class="filter-check h-3.5 w-3.5" >
Discount
</label>
<label class="flex cursor-pointer items-center gap-2.5">
<input type="checkbox" name="availability" value="limited" data-label="Limited" class="filter-check h-3.5 w-3.5" >
Limited
</label>
<label class="flex cursor-pointer items-center gap-2.5">
<input type="checkbox" name="availability" value="archived" data-label="Archived" class="filter-check h-3.5 w-3.5" >
Archived
</label>
</div>
</details>
<details open class="group p-4">
<summary class="flex cursor-pointer list-none items-center justify-between text-[12px]">// Price <i class="fa-solid fa-chevron-up text-[9px] transition-transform group-open:rotate-0 rotate-180"></i></summary>
<div class="mt-4 flex items-center gap-2 text-[12px]">
<select data-price-min aria-label="Minimum price" class="w-full border border-ink/20 bg-white px-2 py-1.5">
<option value="0" >$0</option>
<option value="50" selected>$50</option>
<option value="100" >$100</option>
<option value="150" >$150</option>
</select>
<span>–</span>
<select data-price-max aria-label="Maximum price" class="w-full border border-ink/20 bg-white px-2 py-1.5">
<option value="100" >$100</option>
<option value="150" >$150</option>
<option value="200" >$200</option>
<option value="250" selected>$250</option>
</select>
</div>
<button type="button" data-apply class="mt-4 flex w-full items-center justify-center gap-2 bg-ink py-3 text-[12px] font-bold uppercase text-white transition-colors hover:bg-ink/80">Search <i class="fa-solid fa-arrow-up rotate-45 text-[10px]"></i></button>
</details>
</aside>
<div class="min-w-0">
<div class="flex flex-wrap items-center justify-between gap-4">
<div class="flex flex-wrap items-center gap-2 text-[12px] font-medium uppercase">
<span class="mr-2">Applied filters :</span>
<div data-applied class="flex flex-wrap gap-2">
<span class="flex items-center gap-3 border border-ink px-3 py-2">All <i class="fa-solid fa-xmark text-[10px]"></i></span>
<span class="flex items-center gap-3 border border-ink px-3 py-2">$50 - $250 <i class="fa-solid fa-xmark text-[10px]"></i></span>
</div>
</div>
<nav data-pager class="flex items-center gap-1 text-[13px] font-medium" aria-label="Catalog pages">
<span class="flex h-9 w-9 items-center justify-center border border-ink">1</span>
<span class="flex h-9 w-9 items-center justify-center">2</span>
</nav>
</div>
<div data-catalog-grid class="mt-6 grid grid-cols-2 gap-x-3 gap-y-8 md:grid-cols-3 xl:grid-cols-4">
<article data-product data-category="outerwear" data-price="189" data-sizes="S M L XL" data-tags="in-stock limited" data-rank="1" data-date="2026-09-12">
<a href="drift-down-puffer.html" class="group block">
<div class="relative overflow-hidden bg-bone">
<img src="https://images.unsplash.com/photo-1706765779494-2705542ebe74?auto=format&fit=crop&w=700&q=80" alt="White box-quilted puffer jacket on a hanger" loading="lazy" class="aspect-[5/6] w-full object-cover transition-transform duration-500 group-hover:scale-105">
<span class="absolute left-2 top-2 bg-ink px-2 py-1 text-[10px] font-semibold uppercase text-white">Limited</span>
</div>
<div class="mt-3 flex items-start justify-between gap-3 text-[13px] font-medium uppercase tracking-tight sm:text-[15px]">
<h3>Drift Down Puffer</h3>
<span class="font-bold">$189</span>
</div>
</a>
</article>
<article data-product data-category="accessories" data-price="139" data-sizes="OS" data-tags="in-stock" data-rank="2" data-date="2026-08-30">
<a href="grid-utility-pack.html" class="group block">
<div class="relative overflow-hidden bg-bone">
<img src="https://images.unsplash.com/photo-1594299447935-e5b840f54b9b?auto=format&fit=crop&w=700&q=80" alt="Black structured backpack resting on a white stool" loading="lazy" class="aspect-[5/6] w-full object-cover transition-transform duration-500 group-hover:scale-105">
</div>
<div class="mt-3 flex items-start justify-between gap-3 text-[13px] font-medium uppercase tracking-tight sm:text-[15px]">
<h3>Grid Utility Pack</h3>
<span class="font-bold">$139</span>
</div>
</a>
</article>
<article data-product data-category="outerwear" data-price="169" data-sizes="S M L XL XXL" data-tags="in-stock discount" data-rank="5" data-date="2026-07-18">
<a href="arc-bomber-jacket.html" class="group block">
<div class="relative overflow-hidden bg-bone">
<img src="https://images.unsplash.com/photo-1591047139829-d91aecb6caea?auto=format&fit=crop&w=700&q=80" alt="Rust nylon bomber jacket held up on a hanger" loading="lazy" class="aspect-[5/6] w-full object-cover transition-transform duration-500 group-hover:scale-105">
<span class="absolute left-2 top-2 bg-frost px-2 py-1 text-[10px] font-semibold uppercase">-20%</span>
</div>
<div class="mt-3 flex items-start justify-between gap-3 text-[13px] font-medium uppercase tracking-tight sm:text-[15px]">
<h3>Arc Bomber Jacket</h3>
<span class="font-bold">$169</span>
</div>
</a>
</article>
<article data-product data-category="tops" data-price="119" data-sizes="S M L XL" data-tags="in-stock" data-rank="4" data-date="2026-09-05">
<a href="selvedge-overshirt.html" class="group block">
<div class="relative overflow-hidden bg-bone">
<img src="https://images.unsplash.com/photo-1740711152088-88a009e877bb?auto=format&fit=crop&w=700&q=80" alt="Indigo button overshirt on a wooden hanger" loading="lazy" class="aspect-[5/6] w-full object-cover transition-transform duration-500 group-hover:scale-105">
</div>
<div class="mt-3 flex items-start justify-between gap-3 text-[13px] font-medium uppercase tracking-tight sm:text-[15px]">
<h3>Selvedge Overshirt</h3>
<span class="font-bold">$119</span>
</div>
</a>
</article>
<article data-product data-category="accessories" data-price="89" data-sizes="OS" data-tags="limited" data-rank="6" data-date="2026-09-18">
<a href="pleat-sling-bag.html" class="group block">
<div class="relative overflow-hidden bg-bone">
<img src="https://images.unsplash.com/photo-1761646238175-5d25cf3566f7?auto=format&fit=crop&w=700&q=80" alt="Sculptural black pleated sling bag on a pale backdrop" loading="lazy" class="aspect-[5/6] w-full object-cover transition-transform duration-500 group-hover:scale-105">
<span class="absolute left-2 top-2 bg-ink px-2 py-1 text-[10px] font-semibold uppercase text-white">Limited</span>
</div>
<div class="mt-3 flex items-start justify-between gap-3 text-[13px] font-medium uppercase tracking-tight sm:text-[15px]">
<h3>Pleat Sling Bag</h3>
<span class="font-bold">$89</span>
</div>
</a>
</article>
<article data-product data-category="bottoms" data-price="129" data-sizes="S M L XL" data-tags="in-stock" data-rank="3" data-date="2026-08-22">
<a href="field-cargo-pant.html" class="group block">
<div class="relative overflow-hidden bg-bone">
<img src="https://images.unsplash.com/photo-1548883354-7622d03aca27?auto=format&fit=crop&w=700&q=80" alt="Close-up of black cargo trousers with side pockets" loading="lazy" class="aspect-[5/6] w-full object-cover transition-transform duration-500 group-hover:scale-105">
</div>
<div class="mt-3 flex items-start justify-between gap-3 text-[13px] font-medium uppercase tracking-tight sm:text-[15px]">
<h3>Field Cargo Pant</h3>
<span class="font-bold">$129</span>
</div>
</a>
</article>
<article data-product data-category="outerwear" data-price="149" data-sizes="M L XL" data-tags="discount" data-rank="8" data-date="2026-06-02">
<a href="faded-trucker-jacket.html" class="group block">
<div class="relative overflow-hidden bg-bone">
<img src="https://images.unsplash.com/photo-1543076447-215ad9ba6923?auto=format&fit=crop&w=700&q=80" alt="Washed denim trucker jacket hanging on a white wall" loading="lazy" class="aspect-[5/6] w-full object-cover transition-transform duration-500 group-hover:scale-105">
<span class="absolute left-2 top-2 bg-frost px-2 py-1 text-[10px] font-semibold uppercase">-20%</span>
</div>
<div class="mt-3 flex items-start justify-between gap-3 text-[13px] font-medium uppercase tracking-tight sm:text-[15px]">
<h3>Faded Trucker Jacket</h3>
<span class="font-bold">$149</span>
</div>
</a>
</article>
<article data-product data-category="shoes" data-price="159" data-sizes="S M L XL" data-tags="in-stock" data-rank="7" data-date="2026-09-20">
<a href="glide-runner.html" class="group block">
<div class="relative overflow-hidden bg-bone">
<img src="https://images.unsplash.com/photo-1491553895911-0055eca6402d?auto=format&fit=crop&w=700&q=80" alt="Black knit running shoe floating on white" loading="lazy" class="aspect-[5/6] w-full object-cover transition-transform duration-500 group-hover:scale-105">
</div>
<div class="mt-3 flex items-start justify-between gap-3 text-[13px] font-medium uppercase tracking-tight sm:text-[15px]">
<h3>Glide Runner</h3>
<span class="font-bold">$159</span>
</div>
</a>
</article>
<article data-product data-category="tops" data-price="59" data-sizes="S M L XL XXL" data-tags="in-stock" data-rank="9" data-date="2026-08-10">
<a href="mark-heavy-tee.html" class="group block">
<div class="relative overflow-hidden bg-bone">
<img src="https://images.unsplash.com/photo-1618354691373-d851c5c3a990?auto=format&fit=crop&w=700&q=80" alt="Heavyweight black t-shirt with a chest emblem on a hanger" loading="lazy" class="aspect-[5/6] w-full object-cover transition-transform duration-500 group-hover:scale-105">
</div>
<div class="mt-3 flex items-start justify-between gap-3 text-[13px] font-medium uppercase tracking-tight sm:text-[15px]">
<h3>Mark Heavy Tee</h3>
<span class="font-bold">$59</span>
</div>
</a>
</article>
<article data-product data-category="accessories" data-price="99" data-sizes="OS" data-tags="archived" data-rank="11" data-date="2025-11-14">
<a href="transit-daypack.html" class="group block">
<div class="relative overflow-hidden bg-bone">
<img src="https://images.unsplash.com/photo-1553062407-98eeb64c6a62?auto=format&fit=crop&w=700&q=80" alt="Navy daypack standing on a light floor" loading="lazy" class="aspect-[5/6] w-full object-cover transition-transform duration-500 group-hover:scale-105">
</div>
<div class="mt-3 flex items-start justify-between gap-3 text-[13px] font-medium uppercase tracking-tight sm:text-[15px]">
<h3>Transit Daypack</h3>
<span class="font-bold">$99</span>
</div>
</a>
</article>
<article data-product data-category="bottoms" data-price="109" data-sizes="S M L XL" data-tags="in-stock discount" data-rank="10" data-date="2026-05-28">
<a href="straight-black-denim.html" class="group block">
<div class="relative overflow-hidden bg-bone">
<img src="https://images.unsplash.com/photo-1624378439575-d8705ad7ae80?auto=format&fit=crop&w=700&q=80" alt="Straight-leg black jeans laid flat on white" loading="lazy" class="aspect-[5/6] w-full object-cover transition-transform duration-500 group-hover:scale-105">
<span class="absolute left-2 top-2 bg-frost px-2 py-1 text-[10px] font-semibold uppercase">-20%</span>
</div>
<div class="mt-3 flex items-start justify-between gap-3 text-[13px] font-medium uppercase tracking-tight sm:text-[15px]">
<h3>Straight Black Denim</h3>
<span class="font-bold">$109</span>
</div>
</a>
</article>
<article data-product data-category="outerwear" data-price="240" data-sizes="M L XL" data-tags="limited" data-rank="12" data-date="2026-09-22">
<a href="raw-leather-rider.html" class="group block">
<div class="relative overflow-hidden bg-bone">
<img src="https://images.unsplash.com/photo-1727515546577-f7d82a47b51d?auto=format&fit=crop&w=700&q=80" alt="Black leather rider jacket laid on dark fabric" loading="lazy" class="aspect-[5/6] w-full object-cover transition-transform duration-500 group-hover:scale-105">
<span class="absolute left-2 top-2 bg-ink px-2 py-1 text-[10px] font-semibold uppercase text-white">Limited</span>
</div>
<div class="mt-3 flex items-start justify-between gap-3 text-[13px] font-medium uppercase tracking-tight sm:text-[15px]">
<h3>Raw Leather Rider</h3>
<span class="font-bold">$240</span>
</div>
</a>
</article>
</div>
<p data-empty hidden class="mt-10 border border-dashed border-ink/30 p-10 text-center text-[13px] font-medium uppercase">Nothing matches those filters yet. Try widening the price range.</p>
</div>
</div>
</div>
</section>
<!-- block:end products -->
<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 count = Number(localStorage.getItem("kestrel-cart-count") || 0);
document.querySelectorAll("[data-cart-count]").forEach((node) => { node.textContent = count; });
})();
(() => {
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-motion]").forEach((frame) => {
const toggle = frame.querySelector("[data-motion-toggle]");
const label = frame.querySelector("[data-motion-label]");
toggle?.addEventListener("click", () => {
const playing = toggle.getAttribute("aria-pressed") !== "true";
toggle.setAttribute("aria-pressed", String(playing));
frame.classList.toggle("is-playing", playing);
if (label) label.textContent = playing ? "Pause reel" : "Play reel";
});
});
document.querySelectorAll("[data-catalog]").forEach((root) => {
const grid = root.querySelector("[data-catalog-grid]");
const cards = [...grid.querySelectorAll("[data-product]")];
const perPage = Number(root.dataset.perPage || 8);
const sort = root.querySelector("[data-sort]");
const minPrice = root.querySelector("[data-price-min]");
const maxPrice = root.querySelector("[data-price-max]");
const applied = root.querySelector("[data-applied]");
const pager = root.querySelector("[data-pager]");
const empty = root.querySelector("[data-empty]");
const defaults = { min: minPrice.value, max: maxPrice.value };
let page = 1;
const checked = (name) => [...root.querySelectorAll(`input[name="${name}"]:checked`)];
const chip = (label, onRemove) => {
const button = document.createElement("button");
button.type = "button";
button.className = "flex items-center gap-3 border border-ink px-3 py-2 uppercase hover:bg-ink hover:text-white";
button.innerHTML = `${label} <i class="fa-solid fa-xmark text-[10px]"></i>`;
button.setAttribute("aria-label", `Remove filter ${label}`);
button.addEventListener("click", () => { onRemove(); page = 1; update(); });
return button;
};
const pagerButton = (label, target, active, aria) => {
const button = document.createElement("button");
button.type = "button";
button.className = `flex h-9 w-9 items-center justify-center ${active ? "border border-ink" : "hover:bg-bone"}`;
button.innerHTML = label;
if (aria) button.setAttribute("aria-label", aria);
if (active) button.setAttribute("aria-current", "page");
button.addEventListener("click", () => { page = target; update(); grid.scrollIntoView({ behavior: "smooth", block: "start" }); });
return button;
};
const update = () => {
const cats = checked("category").map((input) => input.value);
const sizes = checked("size").map((input) => input.value);
const avail = checked("availability").map((input) => input.value).filter((value) => value !== "all");
const min = Number(minPrice.value);
const max = Number(maxPrice.value);
const list = cards.filter(({ dataset }) => {
if (cats.length && !cats.includes(dataset.category)) return false;
if (sizes.length && !dataset.sizes.split(" ").some((size) => sizes.includes(size))) return false;
if (avail.length && !dataset.tags.split(" ").some((tag) => avail.includes(tag))) return false;
const price = Number(dataset.price);
return price >= min && price <= max;
});
const compare = {
popular: (a, b) => a.dataset.rank - b.dataset.rank,
newest: (a, b) => b.dataset.date.localeCompare(a.dataset.date),
"price-asc": (a, b) => a.dataset.price - b.dataset.price,
"price-desc": (a, b) => b.dataset.price - a.dataset.price
}[sort.value];
list.sort(compare);
const pages = Math.max(1, Math.ceil(list.length / perPage));
page = Math.min(page, pages);
const visible = list.slice((page - 1) * perPage, page * perPage);
cards.forEach((card) => { card.hidden = !visible.includes(card); });
list.forEach((card) => grid.append(card));
empty.hidden = list.length > 0;
applied.innerHTML = "";
checked("category").concat(checked("size"), checked("availability")).forEach((input) => {
const label = input.dataset.label || input.value;
applied.append(chip(label, () => {
input.checked = false;
if (input.name === "availability" && !checked("availability").length) root.querySelector('input[name="availability"][value="all"]').checked = true;
}));
});
applied.append(chip(`$${min} - $${max}`, () => { minPrice.value = defaults.min; maxPrice.value = defaults.max; }));
pager.innerHTML = "";
for (let i = 1; i <= pages; i++) pager.append(pagerButton(String(i), i, i === page, `Page ${i}`));
pager.append(pagerButton('<i class="fa-solid fa-chevron-right text-[10px]"></i>', page >= pages ? 1 : page + 1, false, "Next page"));
pager.lastChild.classList.add("border", "border-ink");
};
root.querySelectorAll('input[name="availability"]').forEach((input) => {
input.addEventListener("change", () => {
const all = root.querySelector('input[name="availability"][value="all"]');
if (input === all && all.checked) checked("availability").forEach((other) => { if (other !== all) other.checked = false; });
if (input !== all && input.checked) all.checked = false;
if (!checked("availability").length) all.checked = true;
});
});
root.querySelectorAll('input[type="checkbox"], [data-sort], [data-price-min], [data-price-max]').forEach((control) => {
control.addEventListener("change", () => { page = 1; update(); });
});
root.querySelector("[data-apply]")?.addEventListener("click", () => { page = 1; update(); });
update();
});
document.querySelectorAll("[data-review-carousel]").forEach((carousel) => {
const pages = [...carousel.querySelectorAll("[data-review-page]")];
const current = carousel.querySelector("[data-review-current]");
let index = 0;
const go = (next) => {
index = (next + pages.length) % pages.length;
pages.forEach((page, i) => { page.hidden = i !== index; });
if (current) current.textContent = String(index + 1).padStart(2, "0");
};
carousel.querySelector("[data-review-prev]")?.addEventListener("click", () => go(index - 1));
carousel.querySelector("[data-review-next]")?.addEventListener("click", () => go(index + 1));
});
document.querySelectorAll("[data-newsletter]").forEach((form) => {
form.addEventListener("submit", (event) => {
event.preventDefault();
form.reset();
const note = form.parentElement.querySelector("[data-newsletter-note]");
if (note) note.hidden = false;
});
});
</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
Tienda online
Desbloquea toda la biblioteca de plantillas y bloques premium. Se renueva automáticamente, cancela cuando quieras.
Tailwind CSS · HTML download
Si no empieza, haz clic aquí.
¿Te gustan nuestras plantillas gratis?
Una pequeña propina nos ayuda a seguir añadiendo nuevas cada semana.
Invítanos a un café