All checks were successful
Deploy production / deploy (push) Successful in 2m36s
/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.
13 lines
511 B
TypeScript
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
|
|
});
|