Bootstrap 5 Blog Layout with Hover Cards
A three-column blog grid of article cards with a cover photo, category badge, date, headline, excerpt, author and reading time, with a lift and image zoom on hover.
<section class="wdw-stage">
<div class="container" style="max-width:1120px">
<div class="d-flex flex-wrap align-items-end justify-content-between gap-3 mb-3">
<div>
<span class="wdw-eyebrow">The journal</span>
<h2 class="wdw-heading h2 mb-0">Latest from the blog</h2>
</div>
<a href="#" class="btn btn-outline-primary rounded-pill">View all posts</a>
</div>
<div class="d-flex flex-wrap gap-2 mb-4" role="group" aria-label="Filter posts by category" id="post-filters">
<button type="button" class="btn btn-sm rounded-pill btn-primary" data-filter="all" aria-pressed="true">All</button>
<button type="button" class="btn btn-sm rounded-pill btn-outline-primary" data-filter="Learning" aria-pressed="false">Learning</button>
<button type="button" class="btn btn-sm rounded-pill btn-outline-primary" data-filter="Live music" aria-pressed="false">Live music</button>
<button type="button" class="btn btn-sm rounded-pill btn-outline-primary" data-filter="Festivals" aria-pressed="false">Festivals</button>
<button type="button" class="btn btn-sm rounded-pill btn-outline-primary" data-filter="Gear" aria-pressed="false">Gear</button>
</div>
<div class="row g-4" id="post-grid">
<div class="col-lg-8" data-cat="Live music">
<article class="post post-feature card h-100 border-0 wdw-card-sm overflow-hidden text-white">
<img class="post-feature-img" src="https://images.unsplash.com/photo-1493225457124-a3eb161ffa5f?auto=format&fit=crop&w=1200&q=70" alt="Performer with a raised arm in stage smoke and lights" loading="lazy">
<div class="scrim"></div>
<time class="date-chip" datetime="2026-10-21">Oct 21, 2026</time>
<div class="post-feature-body p-4 p-lg-5 d-flex flex-column justify-content-end">
<span class="badge rounded-pill text-bg-light align-self-start mb-3">Live music</span>
<h3 class="h3 fw-bold mb-2"><a href="#" class="stretched-link text-white text-decoration-none">How to pick a small venue that sounds great</a></h3>
<p class="mb-3 opacity-75 line-clamp-2">Room shape, stage height and a decent sound engineer matter more than capacity. Here is the checklist we use before booking any room.</p>
<div class="d-flex align-items-center justify-content-between small">
<span class="fw-semibold">Mira Kapoor · 7 min read</span>
<span class="more d-inline-flex align-items-center gap-1 fw-semibold">Read more <svg class="more-arrow" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M5 12h14M13 6l6 6-6 6"/></svg></span>
</div>
</div>
</article>
</div>
<div class="col-md-6 col-lg-4" data-cat="Learning">
<article class="post card h-100 border-0 wdw-card-sm overflow-hidden">
<div class="position-relative">
<div class="post-media ratio ratio-16x9">
<img src="https://images.unsplash.com/photo-1510915361894-db8b60106cb1?auto=format&fit=crop&w=800&q=70" alt="Guitar player strumming an acoustic guitar" loading="lazy">
</div>
<time class="date-chip" datetime="2026-10-14">Oct 14, 2026</time>
</div>
<div class="card-body p-4 d-flex flex-column">
<span class="badge rounded-pill bg-primary-subtle text-primary-emphasis align-self-start mb-3">Learning</span>
<h3 class="h5 fw-bold mb-2"><a href="#" class="stretched-link text-body-emphasis text-decoration-none">Why learn guitar as an adult?</a></h3>
<p class="wdw-muted line-clamp-3 mb-4">Starting late is an advantage: you know what you want to play and you practise with purpose.</p>
<div class="d-flex align-items-center justify-content-between mt-auto pt-3 border-top">
<div class="d-flex align-items-center gap-2">
<span class="avatar" aria-hidden="true">VP</span>
<span class="small fw-semibold">Vishvjeet Patel</span>
</div>
<span class="more text-primary d-inline-flex align-items-center gap-1 small fw-semibold">5 min read <svg class="more-arrow" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M5 12h14M13 6l6 6-6 6"/></svg></span>
</div>
</div>
</article>
</div>
<div class="col-md-6 col-lg-4" data-cat="Festivals">
<article class="post card h-100 border-0 wdw-card-sm overflow-hidden">
<div class="position-relative">
<div class="post-media ratio ratio-16x9">
<img src="https://images.unsplash.com/photo-1470229722913-7c0e2dbbafd3?auto=format&fit=crop&w=800&q=70" alt="Crowd with raised hands at a festival" loading="lazy">
</div>
<time class="date-chip" datetime="2026-10-02">Oct 02, 2026</time>
</div>
<div class="card-body p-4 d-flex flex-column">
<span class="badge rounded-pill bg-primary-subtle text-primary-emphasis align-self-start mb-3">Festivals</span>
<h3 class="h5 fw-bold mb-2"><a href="#" class="stretched-link text-body-emphasis text-decoration-none">What festival crowds teach you about timing</a></h3>
<p class="wdw-muted line-clamp-3 mb-4">Watch how a set builds and releases energy, then borrow the pacing for your own shows.</p>
<div class="d-flex align-items-center justify-content-between mt-auto pt-3 border-top">
<div class="d-flex align-items-center gap-2">
<span class="avatar" aria-hidden="true">JW</span>
<span class="small fw-semibold">Jonas Weber</span>
</div>
<span class="more text-primary d-inline-flex align-items-center gap-1 small fw-semibold">4 min read <svg class="more-arrow" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M5 12h14M13 6l6 6-6 6"/></svg></span>
</div>
</div>
</article>
</div>
<div class="col-md-6 col-lg-4" data-cat="Gear">
<article class="post card h-100 border-0 wdw-card-sm overflow-hidden">
<div class="position-relative">
<div class="post-media ratio ratio-16x9">
<img src="https://images.unsplash.com/photo-1511671782779-c97d3d27a1d4?auto=format&fit=crop&w=800&q=70" alt="Condenser microphone in a home recording studio" loading="lazy">
</div>
<time class="date-chip" datetime="2026-09-24">Sep 24, 2026</time>
</div>
<div class="card-body p-4 d-flex flex-column">
<span class="badge rounded-pill bg-primary-subtle text-primary-emphasis align-self-start mb-3">Gear</span>
<h3 class="h5 fw-bold mb-2"><a href="#" class="stretched-link text-body-emphasis text-decoration-none">A home studio you can build in a weekend</a></h3>
<p class="wdw-muted line-clamp-3 mb-4">One microphone, one interface and a few blankets get you further than a rack of gear you never learn.</p>
<div class="d-flex align-items-center justify-content-between mt-auto pt-3 border-top">
<div class="d-flex align-items-center gap-2">
<span class="avatar" aria-hidden="true">AL</span>
<span class="small fw-semibold">Ana Lopes</span>
</div>
<span class="more text-primary d-inline-flex align-items-center gap-1 small fw-semibold">6 min read <svg class="more-arrow" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M5 12h14M13 6l6 6-6 6"/></svg></span>
</div>
</div>
</article>
</div>
<div class="col-md-6 col-lg-4" data-cat="Live music">
<article class="post card h-100 border-0 wdw-card-sm overflow-hidden">
<div class="position-relative">
<div class="post-media ratio ratio-16x9">
<img src="https://images.unsplash.com/photo-1514320291840-2e0a9bf2a9ae?auto=format&fit=crop&w=800&q=70" alt="Concert crowd facing a lit stage" loading="lazy">
</div>
<time class="date-chip" datetime="2026-09-12">Sep 12, 2026</time>
</div>
<div class="card-body p-4 d-flex flex-column">
<span class="badge rounded-pill bg-primary-subtle text-primary-emphasis align-self-start mb-3">Live music</span>
<h3 class="h5 fw-bold mb-2"><a href="#" class="stretched-link text-body-emphasis text-decoration-none">Three habits of bands that sell out locally</a></h3>
<p class="wdw-muted line-clamp-3 mb-4">They announce early, share rehearsals and treat every support slot like a headline show.</p>
<div class="d-flex align-items-center justify-content-between mt-auto pt-3 border-top">
<div class="d-flex align-items-center gap-2">
<span class="avatar" aria-hidden="true">JW</span>
<span class="small fw-semibold">Jonas Weber</span>
</div>
<span class="more text-primary d-inline-flex align-items-center gap-1 small fw-semibold">5 min read <svg class="more-arrow" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M5 12h14M13 6l6 6-6 6"/></svg></span>
</div>
</div>
</article>
</div>
</div>
</div>
</section>
/* Web Designer Wall library style — shared base for every Bootstrap 5 snippet.
Indigo accent, Plus Jakarta Sans, soft cards, pill buttons. Works in light and dark. */
@import url("https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap");
:root,
[data-bs-theme="light"] {
--wdw-font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
--bs-body-font-family: var(--wdw-font);
--bs-primary: #4f46e5;
--bs-primary-rgb: 79, 70, 229;
--bs-primary-text-emphasis: #3730a3;
--bs-primary-bg-subtle: #eef2ff;
--bs-primary-border-subtle: #c7d2fe;
--bs-link-color: #4f46e5;
--bs-link-color-rgb: 79, 70, 229;
--bs-link-hover-color: #4338ca;
--bs-link-hover-color-rgb: 67, 56, 202;
--bs-focus-ring-color: rgba(79, 70, 229, 0.25);
--bs-border-radius: 0.75rem;
--bs-border-radius-lg: 1rem;
--bs-border-radius-xl: 1.25rem;
--wdw-radius-card: 1.25rem;
--wdw-shadow: 0 1px 2px rgba(16, 24, 40, 0.05), 0 16px 40px -16px rgba(16, 24, 40, 0.22);
--wdw-shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.06), 0 4px 12px -4px rgba(16, 24, 40, 0.12);
--wdw-stage: #f5f6fb;
}
[data-bs-theme="dark"] {
--bs-primary: #818cf8;
--bs-primary-rgb: 129, 140, 248;
--bs-primary-text-emphasis: #c7d2fe;
--bs-primary-bg-subtle: rgba(129, 140, 248, 0.14);
--bs-primary-border-subtle: rgba(129, 140, 248, 0.35);
--bs-link-color: #a5b4fc;
--bs-link-color-rgb: 165, 180, 252;
--bs-link-hover-color: #c7d2fe;
--bs-link-hover-color-rgb: 199, 210, 254;
--bs-focus-ring-color: rgba(129, 140, 248, 0.35);
--wdw-shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 16px 40px -16px rgba(0, 0, 0, 0.7);
--wdw-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4), 0 4px 12px -4px rgba(0, 0, 0, 0.5);
--wdw-stage: #0f1117;
}
body { font-family: var(--wdw-font); -webkit-font-smoothing: antialiased; }
/* Bootstrap compiles its blue into these components; point them at the accent. */
.btn-primary {
--bs-btn-bg: var(--bs-primary); --bs-btn-border-color: var(--bs-primary);
--bs-btn-hover-bg: #4338ca; --bs-btn-hover-border-color: #4338ca;
--bs-btn-active-bg: #3730a3; --bs-btn-active-border-color: #3730a3;
--bs-btn-disabled-bg: var(--bs-primary); --bs-btn-disabled-border-color: var(--bs-primary);
--bs-btn-focus-shadow-rgb: var(--bs-primary-rgb);
}
[data-bs-theme="dark"] .btn-primary { --bs-btn-color: #0f1117; --bs-btn-hover-bg: #a5b4fc; --bs-btn-hover-border-color: #a5b4fc; --bs-btn-hover-color: #0f1117; --bs-btn-active-color: #0f1117; }
.btn-outline-primary {
--bs-btn-color: var(--bs-primary); --bs-btn-border-color: var(--bs-primary);
--bs-btn-hover-bg: var(--bs-primary); --bs-btn-hover-border-color: var(--bs-primary);
--bs-btn-active-bg: var(--bs-primary); --bs-btn-active-border-color: var(--bs-primary);
--bs-btn-focus-shadow-rgb: var(--bs-primary-rgb);
}
.btn { --bs-btn-font-weight: 600; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: .5rem; }
.btn-sm { min-height: 36px; }
.form-control, .form-select { min-height: 44px; border-radius: .75rem; }
.form-control:focus, .form-select:focus, .form-check-input:focus { border-color: rgba(var(--bs-primary-rgb), .6); box-shadow: 0 0 0 .25rem var(--bs-focus-ring-color); }
.form-check-input:checked { background-color: var(--bs-primary); border-color: var(--bs-primary); }
.nav-pills { --bs-nav-pills-link-active-bg: var(--bs-primary); }
.nav { --bs-nav-link-color: var(--bs-secondary-color); --bs-nav-link-hover-color: var(--bs-emphasis-color); }
.pagination { --bs-pagination-active-bg: var(--bs-primary); --bs-pagination-active-border-color: var(--bs-primary); --bs-pagination-color: var(--bs-body-color); --bs-pagination-focus-box-shadow: 0 0 0 .25rem var(--bs-focus-ring-color); }
.progress, .progress-stacked { --bs-progress-bar-bg: var(--bs-primary); }
.list-group { --bs-list-group-active-bg: var(--bs-primary); --bs-list-group-active-border-color: var(--bs-primary); }
.dropdown-menu { --bs-dropdown-link-active-bg: var(--bs-primary); border-radius: .875rem; box-shadow: var(--wdw-shadow-sm); }
.accordion { --bs-accordion-active-bg: var(--bs-primary-bg-subtle); --bs-accordion-active-color: var(--bs-primary-text-emphasis); --bs-accordion-btn-focus-box-shadow: 0 0 0 .25rem var(--bs-focus-ring-color); }
.badge { font-weight: 600; }
/* Library building blocks — use these instead of re-inventing them per snippet. */
.wdw-stage { min-height: 100vh; display: flex; align-items: center; background: var(--wdw-stage); padding-block: 3rem; }
.wdw-card { background: var(--bs-body-bg); border: 1px solid var(--bs-border-color-translucent); border-radius: var(--wdw-radius-card); box-shadow: var(--wdw-shadow); }
.wdw-card-sm { background: var(--bs-body-bg); border: 1px solid var(--bs-border-color-translucent); border-radius: 1rem; box-shadow: var(--wdw-shadow-sm); }
.wdw-aurora { position: relative; color: #fff; background: radial-gradient(60% 55% at 100% 0, #818cf8 0, transparent 70%), radial-gradient(65% 60% at 0 100%, #ec4899 0, transparent 65%), #1e1b4b; }
.wdw-eyebrow { display: inline-block; font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--bs-primary); }
.wdw-heading { font-weight: 800; letter-spacing: -.02em; color: var(--bs-emphasis-color); }
.wdw-muted { color: var(--bs-secondary-color); }
.wdw-icon { width: 2.75rem; height: 2.75rem; flex: none; display: inline-flex; align-items: center; justify-content: center; border-radius: .875rem; background: var(--bs-primary-bg-subtle); color: var(--bs-primary); }
/* Component */
.post { transition: transform .25s ease, box-shadow .25s ease; position: relative; }
.post:hover, .post:focus-within { transform: translateY(-4px); box-shadow: var(--wdw-shadow); }
.post:focus-within { outline: 2px solid var(--bs-primary); outline-offset: 3px; }
.post-media { overflow: hidden; }
.post-media img { object-fit: cover; transition: transform .5s ease; }
.post:hover .post-media img { transform: scale(1.05); }
.post .avatar { width: 2rem; height: 2rem; border-radius: 50%; display: inline-grid; place-items: center; font-size: .7rem; font-weight: 700; background: var(--bs-primary-bg-subtle); color: var(--bs-primary); }
.date-chip { position: absolute; top: .875rem; left: .875rem; z-index: 2; padding: .3rem .7rem; border-radius: 999px; font-size: .75rem; font-weight: 700; background: rgba(255, 255, 255, .92); color: #1e1b4b; box-shadow: var(--wdw-shadow-sm); }
.line-clamp-3, .line-clamp-2 { display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; }
.line-clamp-3 { -webkit-line-clamp: 3; line-clamp: 3; }
.line-clamp-2 { -webkit-line-clamp: 2; line-clamp: 2; }
.more .more-arrow, .more.text-primary svg { transition: transform .2s ease, opacity .2s ease; }
.post .more svg { opacity: 0; transform: translateX(-6px); }
.post:hover .more svg, .post:focus-within .more svg { opacity: 1; transform: none; }
.post-feature { min-height: 420px; }
.post-feature-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.post-feature:hover .post-feature-img { transform: scale(1.04); }
.post-feature .scrim { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(15, 17, 23, 0) 25%, rgba(15, 17, 23, .85) 100%); }
.post-feature-body { position: relative; flex: 1; z-index: 1; }
#post-filters .btn { min-height: 40px; }
@media (prefers-reduced-motion: reduce) { .post, .post-media img, .post-feature-img, .more svg { transition: none; } }
(function () {
function initPostFilters() {
var bar = document.getElementById('post-filters');
var grid = document.getElementById('post-grid');
if (!bar || !grid) return;
bar.addEventListener('click', function (e) {
var btn = e.target.closest('[data-filter]');
if (!btn) return;
var f = btn.getAttribute('data-filter');
bar.querySelectorAll('[data-filter]').forEach(function (b) {
var on = b === btn;
b.setAttribute('aria-pressed', String(on));
b.classList.toggle('btn-primary', on);
b.classList.toggle('btn-outline-primary', !on);
});
grid.querySelectorAll('[data-cat]').forEach(function (c) {
c.classList.toggle('d-none', f !== 'all' && c.getAttribute('data-cat') !== f);
});
});
}
initPostFilters();
})();
Built on Bootstrap 5.3.8 with plain JavaScript — no jQuery. Supports light and dark mode via data-bs-theme.