/* ═══════════════════════════════════════════════════════════════ PAGE SHELL Just the chrome that makes pages look alike: a page header, then sections with a thin accent banner between them, alternating backgrounds, and a left-aligned heading with a blurb and rule. Whatever goes inside a section is passed as `content`, the shell doesn't care what it is. No
and no footer here, Layout provides both, so a page using this shell drops straight into the router's Outlet. Usage: , // optional, right of the heading content: , }, ]} /> ═══════════════════════════════════════════════════════════════ */ import { useEffect, type ReactNode } from "react"; import { documentTitle } from "../lib/site.ts"; import { accentText } from '../lib/color.ts' const TEAL = "#0f7183"; export type ShellSection = { id: string; title: string; blurb?: string; accent: string; background: string; actions?: ReactNode; content: ReactNode; }; type PageShellProps = { title: ReactNode; intro?: ReactNode; sections: ShellSection[]; }; export function Section({ section }: { section: ShellSection }) { const { id, title, blurb, accent, background, // Optional action bar for this section's heading row, a view // toggle, a filter, a link. Whatever the section needs; the // shell just gives it a place to sit. actions, content, } = section; return (
{/* Heading, left aligned, optional actions on the right */}

{title}

{blurb &&

{blurb}

}
{actions}
{content}
); } export default function PageShell({ title, intro, sections }: PageShellProps) { // The tab's title as the visitor moves around. The first load's // comes from the server (pageMeta.js), which also sets the page's // description and preview for search and link sharing. useEffect(() => { if (typeof title === "string") document.title = documentTitle(title); }, [title]); return ( <> {/* Page header */}

{title}

{intro &&

{intro}

}
{sections.map((section, i) => (
{/* Thin solid banner between sections */}
{i === sections.length - 1 && (
)}
))} ); }