Files
website/src/routes/+layout.ts
Stan Runge bc58e97776
All checks were successful
Deploy production / deploy (push) Successful in 2m36s
start: show the normal site header on /start (with the owner dashboard button, highlighted there); no footer on the new-tab page
/start is no longer immersive, so it loads the lazily imported SiteChrome like other pages.
Only the book reader still skips the chrome. hidesFooter() keeps the footer off /start.
2026-10-24 16:03:06 +00:00

13 lines
511 B
TypeScript

import { isImmersive } from '#lib/chrome.js';
import type { LayoutLoad } from './$types';
// The site header/footer (icon libraries, dropdowns, the bits-ui Sheet) live in SiteChrome,
// imported only for pages that show them. Immersive pages (the book reader) never
// download that code. Universal loads may return components.
export const load: LayoutLoad = async ({ data, url }) => ({
...data,
Chrome: isImmersive(url.pathname)
? null
: (await import('#lib/components/SiteChrome.svelte')).default
});