Gratis
Portada
Vinylo Hero
A hero block extracted from the Vinylo template, available in Tailwind CSS.
0
14
A hero block extracted from the Vinylo 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>Vinylo Hero | Tailwind CSS UI Block</title>
<meta name="description" content="A hero block extracted from the Vinylo template, available in Tailwind CSS.">
<meta name="keywords" content="Vinylo, Tailwind CSS template, HTML website template, ecommerce template, toy shop website, collectible toys store, designer toys, online shop template, product page, 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="Vinylo | Tailwind CSS Ecommerce Template">
<meta property="og:description" content="A playful Tailwind CSS ecommerce template for collectible toy shops, with a size scale viewer, a filterable catalogue and a working cart.">
<meta property="og:image" content="">
<meta property="og:image:alt" content="Vinylo template preview">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:url" content="">
<meta name="twitter:title" content="Vinylo | Tailwind CSS Ecommerce Template">
<meta name="twitter:description" content="A playful Tailwind CSS ecommerce template for collectible toy shops, with a size scale viewer, a filterable catalogue and a working cart.">
<meta name="twitter:image" content="">
<meta name="twitter:image:alt" content="Vinylo 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=Caveat:wght@600&family=Outfit:wght@300;400;500;600&display=swap" rel="stylesheet">
<script>
tailwind.config = {
theme: {
extend: {
colors: { ink: '#0d0d0d', paper: '#f4f2ee', blush: '#f6dde2', mint: '#dcece4', lime: '#d8e64b', cobalt: '#2147a6', grape: '#9b5bc0' },
fontFamily: { sans: ['Outfit', 'sans-serif'], hand: ['Caveat', 'cursive'] }
}
}
}
</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; }
.glow { background: radial-gradient(60% 50% at 30% 0%, #f6dde2 0%, transparent 70%), radial-gradient(50% 60% at 70% 70%, #dcece4 0%, transparent 70%), #f4f2ee; }
.maze { background-color: #0d0d0d; background-image: repeating-radial-gradient(circle at 30% 40%, transparent 0 6px, #f4f2ee 6px 8px), repeating-radial-gradient(circle at 70% 70%, transparent 0 7px, #f4f2ee 7px 9px); background-blend-mode: difference; }
.slide-fig { transition: opacity .6s ease, transform .6s ease; }
.slide-fig:not(.is-active) { opacity: 0; transform: translateY(16px) scale(.97); }
.float-a { animation: float 7s ease-in-out infinite; }
.float-b { animation: float 9s ease-in-out infinite reverse; }
@keyframes float { 50% { transform: translateY(-10px) rotate(var(--r, 0deg)); } }
.scale-fig { transition: height .6s cubic-bezier(.2,.8,.2,1); }
.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; }
.float-a, .float-b { animation: none; }
.slide-fig, .scale-fig { transition: none; }
::view-transition-old(root), ::view-transition-new(root) { animation: none; }
}
</style>
</head>
<body class="bg-paper font-sans text-ink antialiased">
<!-- block:start hero -->
<section class="glow relative -mt-[5.75rem] overflow-hidden pt-[5.75rem]" data-hero-slider>
<div class="mx-auto grid max-w-7xl items-end gap-10 px-5 pb-14 md:px-10 lg:min-h-[44rem] lg:grid-cols-[1fr_1.05fr]">
<div class="order-2 lg:order-1 lg:pb-10">
<p class="text-sm font-medium uppercase tracking-wide underline underline-offset-4 md:text-base">The home of collectible art toys</p>
<p class="relative -ml-5 mt-6 inline-flex items-center gap-4 bg-gradient-to-r from-transparent via-ink/80 to-ink py-2 pl-5 pr-5 text-6xl font-medium text-paper md:-ml-10 md:pl-10 md:text-7xl" aria-hidden="true"><i class="fa-solid fa-robot text-5xl md:text-6xl"></i>vinylo</p>
<h1 class="mt-3 text-6xl font-medium leading-[0.95] tracking-tight md:text-7xl lg:text-[5.4rem]">toy collection<br>by makers<sup class="ml-1 text-2xl align-super">®</sup></h1>
<ul class="mt-10 flex flex-wrap gap-6 text-lg md:text-xl">
<li class="flex items-center gap-3 border-b-2 border-ink pb-3 pr-8"><i class="fa-solid fa-asterisk" aria-hidden="true"></i>Worldwide shipping</li>
<li class="flex items-center gap-3 border-b-2 border-ink pb-3 sm:border-l-2 sm:pl-8"><i class="fa-solid fa-certificate" aria-hidden="true"></i>98.8% positive reviews</li>
</ul>
</div>
<div class="relative order-1 h-[30rem] md:h-[38rem] lg:order-2 lg:h-[44rem]">
<svg class="absolute left-[8%] top-[52%] w-[84%] text-ink/15" viewBox="0 0 400 80" aria-hidden="true"><ellipse cx="200" cy="40" rx="198" ry="36" fill="none" stroke="currentColor"/></svg>
<div class="maze float-a absolute left-[2%] top-[22%] z-10 grid h-40 w-32 place-items-center border border-ink/40 shadow-xl [--r:-5deg] [transform:rotate(-5deg)] md:h-56 md:w-44" aria-hidden="true">
<div class="grid gap-2"><span class="grid h-10 w-24 place-items-center rounded-[50%] bg-paper text-xl font-semibold md:h-14 md:w-32">× ×</span><span class="h-6 w-24 rounded-[50%] bg-paper md:w-32"></span><span class="h-6 w-24 rounded-[50%] bg-paper md:w-32"></span></div>
</div>
<img src="https://images.unsplash.com/photo-1546776310-eef45dd6d63c?auto=format&fit=crop&w=900&q=80" alt="Vintage tin robot with dials on its chest" data-hero-slide class="slide-fig absolute inset-x-[16%] bottom-6 top-6 h-[calc(100%-3rem)] w-[68%] object-cover mix-blend-multiply is-active" >
<img src="https://images.unsplash.com/photo-1530325553241-4f6e7690cf36?auto=format&fit=crop&crop=focalpoint&fp-x=0.66&fp-y=0.5&fp-z=1.7&h=1100&w=900&q=80" alt="Brown plush bear wearing aviator goggles" data-hero-slide class="slide-fig absolute inset-x-[16%] bottom-6 top-6 h-[calc(100%-3rem)] w-[68%] object-cover mix-blend-multiply " aria-hidden="true">
<img src="https://images.unsplash.com/photo-1581235720704-06d3acfcb36f?auto=format&fit=crop&w=900&q=80" alt="Small white die-cast coupe on a yellow backdrop" data-hero-slide class="slide-fig absolute inset-x-[16%] bottom-6 top-6 h-[calc(100%-3rem)] w-[68%] object-cover mix-blend-multiply " aria-hidden="true">
<img src="https://images.unsplash.com/photo-1563396983906-b3795482a59a?auto=format&fit=crop&w=900&q=80" alt="Green wind-up robot beside two tiny figures" data-hero-slide class="slide-fig absolute inset-x-[16%] bottom-6 top-6 h-[calc(100%-3rem)] w-[68%] object-cover mix-blend-multiply " aria-hidden="true">
<figure class="float-b absolute right-0 top-[4%] z-10 w-32 [--r:4deg] [transform:rotate(4deg)] md:w-44">
<div class="relative overflow-hidden border border-ink/20 shadow-xl">
<img src="https://images.unsplash.com/photo-1618331835717-801e976710b2?auto=format&fit=crop&w=400&q=70" alt="" class="absolute inset-0 h-full w-full object-cover">
<img src="https://images.unsplash.com/photo-1506794778202-cad84cf45f1d?auto=format&fit=crop&w=400&q=80" alt="Portrait of featured artist Mara Voss" class="relative aspect-[4/5] w-full object-cover mix-blend-luminosity">
</div>
<figcaption class="mt-2 text-center text-xs font-semibold uppercase" data-hero-artist>Mara Voss <span class="block text-[9px] font-normal text-ink/50">toy maker, Berlin</span></figcaption>
</figure>
<a href="robot-no-7.html" class="absolute bottom-[14%] right-[4%] z-10 grid h-44 w-36 overflow-hidden border border-ink/10 bg-gradient-to-br from-white to-paper shadow-xl [transform:rotate(-4deg)] md:h-56 md:w-48">
<span class="absolute -right-8 -top-6 h-28 w-28 rounded-full bg-lime" aria-hidden="true"></span>
<span class="absolute -left-6 bottom-0 h-16 w-16 rotate-45 bg-cobalt" aria-hidden="true"></span>
<span class="absolute right-6 top-10 h-24 w-3 rounded-full bg-grape" aria-hidden="true"></span>
<span class="relative self-end p-5 font-hand text-4xl md:text-5xl">get it</span>
<span class="absolute left-3 top-3 grid h-6 w-6 place-items-center rounded-full border border-ink text-xs" aria-hidden="true">+</span>
</a>
<div class="absolute bottom-0 left-1/2 z-20 flex -translate-x-1/2 items-center gap-3" role="group" aria-label="Featured toys">
<button type="button" data-hero-dot="0" aria-pressed="true" aria-label="Show Tin Robot No. 7" class="h-2.5 w-2.5 rounded-full bg-ink/20 transition aria-pressed:h-4 aria-pressed:w-4 aria-pressed:border-2 aria-pressed:border-ink aria-pressed:bg-transparent"></button>
<button type="button" data-hero-dot="1" aria-pressed="false" aria-label="Show Aviator Bear" class="h-2.5 w-2.5 rounded-full bg-ink/20 transition aria-pressed:h-4 aria-pressed:w-4 aria-pressed:border-2 aria-pressed:border-ink aria-pressed:bg-transparent"></button>
<button type="button" data-hero-dot="2" aria-pressed="false" aria-label="Show Coupe 600" class="h-2.5 w-2.5 rounded-full bg-ink/20 transition aria-pressed:h-4 aria-pressed:w-4 aria-pressed:border-2 aria-pressed:border-ink aria-pressed:bg-transparent"></button>
<button type="button" data-hero-dot="3" aria-pressed="false" aria-label="Show Rusty Explorer" class="h-2.5 w-2.5 rounded-full bg-ink/20 transition aria-pressed:h-4 aria-pressed:w-4 aria-pressed:border-2 aria-pressed:border-ink aria-pressed:bg-transparent"></button>
</div>
</div>
</div>
<a href="#scale" class="absolute bottom-6 right-6 hidden text-4xl transition hover:translate-y-1 md:block" aria-label="Scroll to the size guide"><i class="fa-solid fa-arrow-down-long" aria-hidden="true"></i></a>
</section>
<!-- block:end hero -->
<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);
});
});
document.querySelectorAll('[data-hero-slider]').forEach((hero) => {
const slides = [...hero.querySelectorAll('[data-hero-slide]')];
const dots = [...hero.querySelectorAll('[data-hero-dot]')];
let current = 0;
let timer;
const show = (index) => {
current = (index + slides.length) % slides.length;
slides.forEach((slide, i) => { slide.classList.toggle('is-active', i === current); slide.toggleAttribute('aria-hidden', i !== current); });
dots.forEach((dot, i) => dot.setAttribute('aria-pressed', String(i === current)));
};
const restart = () => { clearInterval(timer); if (!matchMedia('(prefers-reduced-motion: reduce)').matches) timer = setInterval(() => show(current + 1), 5000); };
dots.forEach((dot, i) => dot.addEventListener('click', () => { show(i); restart(); }));
restart();
});
document.querySelectorAll('[data-scale-viewer]').forEach((viewer) => {
const figure = viewer.querySelector('[data-scale-figure]');
viewer.querySelectorAll('[data-scale]').forEach((button) => {
button.addEventListener('click', () => {
const data = viewer.querySelector(`[data-scale-value="${button.dataset.scale}"]`);
viewer.querySelectorAll('[data-scale]').forEach((other) => other.setAttribute('aria-checked', String(other === button)));
figure.style.height = `${data.dataset.percent}%`;
viewer.querySelector('[data-scale-height]').textContent = data.dataset.height;
viewer.querySelector('[data-scale-note]').textContent = data.dataset.note;
});
});
});
document.querySelectorAll('[data-filter-group]').forEach((group) => {
const items = document.querySelectorAll(group.dataset.filterGroup);
group.querySelectorAll('[data-filter]').forEach((chip) => {
chip.addEventListener('click', () => {
group.querySelectorAll('[data-filter]').forEach((other) => other.setAttribute('aria-pressed', String(other === chip)));
items.forEach((item) => { item.hidden = chip.dataset.filter !== 'all' && item.dataset.category !== chip.dataset.filter; });
});
});
});
const cartCount = () => document.querySelectorAll('[data-cart-count]');
document.querySelectorAll('[data-add-to-cart]').forEach((button) => {
button.addEventListener('click', () => {
cartCount().forEach((badge) => { badge.textContent = Number(badge.textContent) + 1; });
const label = button.textContent;
button.textContent = 'added ✓';
setTimeout(() => { button.textContent = label; }, 1400);
});
});
document.querySelectorAll('[data-switcher]').forEach((root) => {
root.addEventListener('click', (event) => {
const button = event.target.closest('[data-switch]');
if (!button) return;
root.querySelectorAll('[data-switch]').forEach((other) => other.setAttribute('aria-selected', String(other === button)));
root.querySelectorAll('[data-switch-panel]').forEach((panel) => { panel.hidden = panel.dataset.switchPanel !== button.dataset.switch; });
});
});
document.querySelectorAll('[data-review-filter]').forEach((root) => {
const items = [...root.querySelectorAll('[data-stars]')];
const count = root.querySelector('[data-review-count]');
root.querySelectorAll('[data-stars-filter]').forEach((button) => {
button.addEventListener('click', () => {
const value = button.dataset.starsFilter;
root.querySelectorAll('[data-stars-filter]').forEach((other) => other.setAttribute('aria-pressed', String(other === button && value !== 'all')));
items.forEach((item) => { item.hidden = value !== 'all' && item.dataset.stars !== value; });
count.textContent = items.filter((item) => !item.hidden).length;
});
});
});
document.querySelectorAll('[data-facets]').forEach((facets) => {
const grid = document.querySelector(facets.dataset.facets);
const count = document.querySelector('[data-facet-count]');
const price = facets.querySelector('[data-price-max]');
const priceLabel = facets.querySelector('[data-price-label]');
const apply = () => {
const types = [...facets.querySelectorAll('[name="type"]')].filter((box) => box.checked).map((box) => box.value);
const inStock = facets.querySelector('[name="stock"]')?.checked;
const max = Number(price.value);
if (priceLabel) priceLabel.textContent = `$${max}`;
let shown = 0;
grid.querySelectorAll('[data-product]').forEach((item) => {
const match = (!types.length || types.includes(item.dataset.type)) && Number(item.dataset.price) <= max && (!inStock || item.dataset.stock === 'true');
item.hidden = !match;
if (match) shown += 1;
});
count.textContent = shown;
};
facets.addEventListener('input', apply);
facets.addEventListener('change', apply);
facets.querySelector('[data-facets-reset]')?.addEventListener('click', () => { facets.reset(); setTimeout(apply); });
apply();
});
document.querySelectorAll('[data-product-page]').forEach((product) => {
const main = product.querySelector('[data-main-image]');
product.querySelectorAll('[data-thumb]').forEach((thumb) => {
thumb.addEventListener('click', () => {
main.src = thumb.dataset.thumb;
main.alt = thumb.querySelector('img').alt;
product.querySelectorAll('[data-thumb]').forEach((other) => other.setAttribute('aria-pressed', String(other === thumb)));
});
});
const priceLabel = product.querySelector('[data-product-price]');
product.addEventListener('change', (event) => {
if (event.target.name === 'size') priceLabel.textContent = event.target.dataset.price;
});
});
document.querySelectorAll('[data-qty-stepper]').forEach((stepper) => {
const input = stepper.querySelector('[data-qty-input]');
stepper.addEventListener('click', (event) => {
const button = event.target.closest('[data-qty-step]');
if (!button) return;
input.value = Math.max(Number(input.min || 0), Math.min(Number(input.max || 99), Number(input.value) + Number(button.dataset.qtyStep)));
input.dispatchEvent(new Event('input', { bubbles: true }));
});
});
document.querySelectorAll('[data-add-form]').forEach((form) => {
form.addEventListener('submit', (event) => {
event.preventDefault();
const qty = Number(form.querySelector('[data-qty-input]')?.value || 1);
cartCount().forEach((badge) => { badge.textContent = Number(badge.textContent) + qty; });
form.querySelector('[data-form-status]').textContent = `Added ${qty} to your cart.`;
});
});
document.querySelectorAll('[data-cart]').forEach((cart) => {
const money = (value) => `$${value.toFixed(2)}`;
let discount = 0;
const update = () => {
let subtotal = 0;
let pieces = 0;
cart.querySelectorAll('[data-cart-item]').forEach((item) => {
const qty = Number(item.querySelector('[data-qty-input]').value);
const line = qty * Number(item.dataset.price);
item.querySelector('[data-line-total]').textContent = money(line);
subtotal += line;
pieces += qty;
});
const shipping = subtotal === 0 || subtotal >= 150 ? 0 : 9;
const off = subtotal * discount;
cart.querySelector('[data-subtotal]').textContent = money(subtotal);
cart.querySelector('[data-shipping]').textContent = shipping ? money(shipping) : 'free';
cart.querySelector('[data-discount]').textContent = off ? `−${money(off)}` : '—';
cart.querySelector('[data-total]').textContent = money(subtotal - off + shipping);
cartCount().forEach((badge) => { badge.textContent = pieces; });
cart.querySelector('[data-cart-empty]').hidden = pieces > 0;
};
cart.addEventListener('input', update);
cart.addEventListener('click', (event) => {
const remove = event.target.closest('[data-remove]');
if (!remove) return;
remove.closest('[data-cart-item]').remove();
update();
});
cart.querySelector('[data-promo]')?.addEventListener('submit', (event) => {
event.preventDefault();
const code = String(event.target.querySelector('[name="promo"]').value || '').trim().toUpperCase();
const status = event.target.querySelector('[data-form-status]');
discount = code === 'FIRSTDROP' ? 0.1 : 0;
status.textContent = discount ? 'Code applied: 10% off.' : 'That code does not exist. Try FIRSTDROP.';
update();
});
update();
});
document.querySelectorAll('[data-orbit]').forEach((orbit) => {
const detail = orbit.querySelector('[data-orbit-detail]');
orbit.querySelectorAll('[data-orbit-step]').forEach((step) => {
step.addEventListener('click', () => {
orbit.querySelectorAll('[data-orbit-step]').forEach((other) => other.setAttribute('aria-pressed', String(other === step)));
detail.querySelector('[data-orbit-title]').textContent = step.dataset.title;
detail.querySelector('[data-orbit-text]').textContent = step.dataset.text;
});
});
});
document.querySelectorAll('[data-scrollspy]').forEach((nav) => {
const links = [...nav.querySelectorAll('a[href^="#"]')];
const sections = links.map((link) => document.querySelector(link.getAttribute('href'))).filter(Boolean);
if (!('IntersectionObserver' in window)) return;
const observer = new IntersectionObserver((entries) => {
entries.forEach((entry) => {
if (!entry.isIntersecting) return;
links.forEach((link) => link.toggleAttribute('aria-current', link.getAttribute('href') === `#${entry.target.id}`));
});
}, { rootMargin: '-30% 0px -60% 0px' });
sections.forEach((section) => observer.observe(section));
});
document.querySelectorAll('[data-tabs]').forEach((tablist) => {
const tabs = [...tablist.querySelectorAll('[role="tab"]')];
const select = (tab) => tabs.forEach((other) => {
const active = other === tab;
other.setAttribute('aria-selected', String(active));
other.tabIndex = active ? 0 : -1;
document.getElementById(other.getAttribute('aria-controls')).hidden = !active;
});
tabs.forEach((tab, index) => {
tab.addEventListener('click', () => select(tab));
tab.addEventListener('keydown', (event) => {
const step = { ArrowRight: 1, ArrowDown: 1, ArrowLeft: -1, ArrowUp: -1 }[event.key];
if (!step) return;
event.preventDefault();
const next = tabs[(index + step + tabs.length) % tabs.length];
next.focus();
select(next);
});
});
});
document.querySelectorAll('[data-contact-form]').forEach((form) => {
form.addEventListener('submit', (event) => {
event.preventDefault();
const status = form.querySelector('[data-form-status]');
if (!form.checkValidity()) {
status.textContent = form.dataset.error;
form.querySelector(':invalid')?.focus();
return;
}
status.textContent = form.dataset.success;
form.reset();
});
});
document.querySelectorAll('[data-current-year]').forEach((el) => { el.textContent = new Date().getFullYear(); });
(() => {
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));
})();
</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é