Something went wrong. Try again.
My website. cameron.stream
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110import { raw } from "hono/html";
export type ShellChild = | import("hono/utils/html").HtmlEscapedString | Promise<import("hono/utils/html").HtmlEscapedString>;
// Applies stored appearance, theme and motion settings before first paint.// Ink is the default theme; only a stored "prism" choice removes it.const themeInitScript = `(function(){try{var d=document.documentElement,t=localStorage.getItem("theme");if(t==="dark"||t==="light")d.setAttribute("data-theme",t);if(localStorage.getItem("style")==="prism")d.removeAttribute("data-style");if(localStorage.getItem("marks")==="black")d.setAttribute("data-marks","black");if(localStorage.getItem("motion")==="reduce")d.setAttribute("data-motion","reduce");var f=localStorage.getItem("font");if(f==="serif"||f==="mono")d.setAttribute("data-font",f);else if(f&&f!=="sans"&&/^[A-Za-z0-9 ]{1,60}$/.test(f)){var w=localStorage.getItem("font-weights")||"400";if(!/^[0-9;]{3,40}$/.test(w))w="400";var b=localStorage.getItem("font-fallback");if(["sans-serif","serif","monospace","system-ui"].indexOf(b)<0)b="sans-serif";var l=document.createElement("link");l.rel="stylesheet";l.id="site-font-link";l.href="https://fonts.bunny.net/css2?family="+f.split(" ").join("+")+":wght@"+w+"&display=swap";document.head.appendChild(l);d.setAttribute("data-font","custom");d.style.setProperty("--site-font-body",'"'+f+'", '+b)}}catch(e){}})()`;// Cross-page view transitions are reserved for moving into or out of the// homepage; between inner pages the transition is skipped so navigation stays// instant. Runs inline in the head so the listener exists before first render.const homeTransitionScript = `addEventListener("pagereveal",function(e){if(!e.viewTransition)return;try{var a=window.navigation&&navigation.activation,f=a&&a.from&&a.from.url;if(location.pathname!=="/"&&!(f&&new URL(f).pathname==="/"))e.viewTransition.skipTransition()}catch(_){e.viewTransition.skipTransition()}})`;const aroundFontUrl = "/public/fonts/around-regular.woff2?v=20260712-12";
export function Shell({ children, title, description, wide = false, noIndex = false, preloadAround = true, stylesheets = [], recordLinks = {}, social, appViewport = false,}: { children: ShellChild; title?: string; description?: string; wide?: boolean; noIndex?: boolean; preloadAround?: boolean; stylesheets?: string[]; recordLinks?: { publication?: string; document?: string }; /** Open Graph / Twitter card metadata for link previews. */ social?: { url?: string; image?: string; largeImage?: boolean; type?: "website" | "article" }; /** An app-like page (/chat): draw under the phone's bars and resize for the keyboard. */ appViewport?: boolean;}) { const pageTitle = title ? `${title} — Cameron's website` : "Cameron's website"; return ( <html lang="en" data-style="ink"> <head> <meta charset="utf-8" /> <meta name="viewport" content={appViewport ? "width=device-width, initial-scale=1, viewport-fit=cover, interactive-widget=resizes-content" : "width=device-width, initial-scale=1"} /> {description && <meta name="description" content={description} />} {noIndex && <meta name="robots" content="noindex, nofollow, noarchive" />} {recordLinks.publication && <link rel="site.standard.publication" href={recordLinks.publication} />} {recordLinks.document && <link rel="site.standard.document" href={recordLinks.document} />} <title>{pageTitle}</title> {social && ( <> <meta property="og:site_name" content="Cameron's website" /> <meta property="og:type" content={social.type ?? "website"} /> <meta property="og:title" content={title ?? "Cameron's website"} /> {description && <meta property="og:description" content={description} />} {social.url && <meta property="og:url" content={social.url} />} {social.image && <meta property="og:image" content={social.image} />} <meta name="twitter:card" content={social.image && social.largeImage ? "summary_large_image" : "summary"} /> </> )} <link rel="preconnect" href="https://fonts.googleapis.com" /> <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin="anonymous" /> {preloadAround && <link rel="preload" href={aroundFontUrl} as="font" type="font/woff2" crossorigin="anonymous" />} <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap" /> <link rel="icon" href="/public/favicon.svg" type="image/svg+xml" /> <link rel="icon" href="/public/favicon-32x32.png" type="image/png" sizes="32x32" /> <link rel="icon" href="/public/favicon-16x16.png" type="image/png" sizes="16x16" /> <link rel="shortcut icon" href="/favicon.ico" /> <link rel="apple-touch-icon" href="/apple-touch-icon.png" sizes="180x180" /> <link rel="manifest" href="/public/manifest.webmanifest" /> <meta name="theme-color" content="#fbfaf7" media="(prefers-color-scheme: light)" /> <meta name="theme-color" content="#0d0c0a" media="(prefers-color-scheme: dark)" /> <link rel="stylesheet" href="/public/host-primitives.css" /> <link rel="stylesheet" href="/public/host-theme.css" /> <link rel="stylesheet" href="/public/site.css" /> <link rel="stylesheet" href="/public/type.css" /> <link rel="stylesheet" href="/public/artifacts.css" /> {stylesheets.map((href) => <link rel="stylesheet" href={href} />)} {raw(`<script>${themeInitScript}</script>`)} {raw(`<script>${homeTransitionScript}</script>`)} {raw(`<style> .page-container { max-width: var(--site-max-width); margin: 0 auto; padding: 0 1.25em 3em; } </style>`)} </head> <body> <div class={wide ? "page-container page-container-wide" : "page-container"}>{children}</div> {raw(`<button class="theme-toggle" id="theme-toggle" type="button" aria-label="Use dark theme"></button> <div class="theme-preferences" aria-labelledby="theme-preferences-label" data-nosnippet> <span class="theme-preferences-label" id="theme-preferences-label">Appearance</span> <div class="theme-choice-group" role="group" aria-labelledby="theme-preferences-label"> <button class="theme-choice" type="button" data-theme-choice="system" aria-pressed="false">System</button> <button class="theme-choice" type="button" data-theme-choice="light" aria-pressed="false">Light</button> <button class="theme-choice" type="button" data-theme-choice="dark" aria-pressed="false">Dark</button> </div> </div>`)} <script async src="https://embed.bsky.app/static/embed.js" charset="utf-8"></script> <script src="/public/theme.js"></script> <script src="/public/settings.js"></script> <script src="/public/auth.js"></script> </body> </html> );}