Let a blog post be downloaded as a PDF

Download PDF beside the byline opens the browser's print dialog (Save
as PDF) with a print layout: the site's header, footer and notices
hidden, the contents column dropped, the light palette whatever the
screen shows, and at the bottom the post's link and a QR code of it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Zaldimmar 2026-09-29 15:34:43 -05:00
parent c03914a210
commit 5dceeb5860
4 changed files with 61 additions and 7 deletions

View file

@ -175,7 +175,7 @@ export default function Layout() {
{/* ── NAV ─────────────────────────────────────────────── */}
<header
ref={headerRef}
className="fixed top-0 left-0 right-0 z-50 backdrop-blur-md"
className="fixed top-0 left-0 right-0 z-50 backdrop-blur-md print:hidden"
inert={mobileMenuOpen}
>
@ -273,7 +273,7 @@ export default function Layout() {
</header>
{/* Keeps page content clear of the fixed header */}
<div aria-hidden style={{ height: headerHeight }} />
<div aria-hidden className="print:hidden" style={{ height: headerHeight }} />
{/* Page content */}
<main id="main" tabIndex={-1} className="outline-none" inert={mobileMenuOpen}>
@ -283,7 +283,7 @@ export default function Layout() {
</main>
{/*Site Footer applied to every page*/}
<div inert={mobileMenuOpen}>
<div inert={mobileMenuOpen} className="print:hidden">
<Footer />
<PrivacyNotice />
</div>