A warm, dark personal blog homepage built with Bootstrap 6 for a fictional writer, Mara Ellison, and her blog Slow Notes. It combines a featured essay hero, filterable post cards, a start-here series, reader letters and a newsletter signup, and suits lifestyle, travel, food or writing blogs.
How it works
The page lives inside .sn-page, which pins data-bs-theme="dark" and re-maps the Bootstrap 6 primary role (--bs-primary-bg, --bs-primary-contrast, --bs-control-checked-bg) to apricot, so btn-solid theme-primary, badges and chips share the brand color.
- Navbar:
navbar lg:navbar-expandwith a<dialog class="drawer drawer-end">. Below 1024px the toggler opens the drawer; wider, the links sit centred in one row. The script syncsaria-expandedand closes the drawer after an in-page link. - Hero: an intro with an
avatar, a DM Serif Display headline, two calls to action and anavatar-stackof readers, next to.sn-featured, a featured essay card with astretched-link. - Latest posts:
chip theme-primarybuttons withdata-sn-filterfilter the.sn-postcards bydata-sn-topic; the active chip gets.activeandaria-pressed, and a live region announces the count. Each bookmark button uses the Bootstrap 6 Toggler (data-bs-toggle="toggler") to add.sn-saved, and the script keepsaria-pressedin sync. - Dates: every
<time data-sn-ago="5">is turned into a real date relative to today, so post dates never go stale. - Start here: a
stepper sm:stepper-horizontalinside.contains-inline, aprogressbar and an About card. - Letters: reader quotes as tilted note cards plus a
<dl>of stats. - Sunday letter: a
<form data-bs-validate novalidate>with twoform-fields and a.check. Invalid fields get.is-invalid; a valid submit shows a spinner, simulates the request and opens.sn-toastwithToast.getOrCreateInstance().
Customization
- Change
--sn-apricot,--sn-sageand--sn-bgon.sn-pageinstyle.css; update the--bs-primary-*overrides beside them. - Swap fonts through
--sn-displayand--sn-body(and the Google Fonts link). - Add a post by copying an
.sn-postarticle; setdata-sn-topicto match a chip'sdata-sn-filter, anddata-sn-agoto its age in days. - Mark series steps as read by adding
.activeto.stepper-itemand changing the.sn-w50width. - Replace the
setTimeoutin the.sn-formsubmit handler withfetch()to your newsletter provider. - Remove
.sn-letter-tiltto keep all reader cards straight.
The photos come from Unsplash; replace them with your own images.
Use cases
- Personal blogs: a featured essay hero introduces the writer and the latest post
- Lifestyle, travel and food blogs: topic chips filter post cards and a live region announces the count
- Reader engagement: bookmark buttons save posts, and reader letters appear as note cards
- Newsletter growth: a start-here stepper and a Sunday letter signup guide new readers
Accessibility
A skip link jumps to #sn-main. The drawer is a native <dialog> with a labelled title, filter chips and bookmarks expose aria-pressed, icon buttons have aria-label, and the toast uses role="status". Focus rings use the brand apricot, and motion is disabled under prefers-reduced-motion.
Bootstrap 6 notes
Built on Bootstrap 6.0.0-alpha.1 (alpha APIs can still change). lg:navbar-expand with a Drawer replaces navbar-expand-lg and navbar-collapse, btn-solid theme-primary replaces btn-primary, .chip, .stepper, .avatar and Toggler are new v6 components, and data-bs-validate replaces the old needs-validation script.