import { html } from "hono/html"; import type { HtmlEscapedString } from "hono/utils/html"; import type { Session } from "../../lib/session"; interface LayoutOptions { title?: string; session?: Session; csrfToken?: string; } type Content = string | HtmlEscapedString | Promise; export function layout(content: Content, options: LayoutOptions = {}) { const { title = "sitebase", session } = options; return html` ${title}
${content}
`; }