${p.flash.msg}
` : ""}
${p.flash?.err
? html`${p.flash.err}${p.flash.reasons?.length ? html`
`
: ""}
${p.body}
- ${p.flash.reasons.map((r) => html`
- ${r} `)}
import { html, type Html } from "./html.ts"; export interface Flash { msg?: string; err?: string; reasons?: string[]; } const nav: [string, string][] = [ ["/", "Overview"], ["/site", "Site pages"], ["/launch", "Before launch"], ["/review", "Review"], ["/inbox", "Inbox"], ["/notes", "Notes"], ["/drafts", "Drafts"], ["/posts", "Posts"], ["/images", "Images"], ["/capture", "Capture"], ["/store", "Store"], ["/problems", "Problems"], ]; export function layout(p: { title: string; path: string; held: number; inbox?: number; flash?: Flash; body: Html }): Html { const current = (href: string) => (href === "/" ? p.path === "/" : p.path.startsWith(href)); return html`