start: show the normal site header on /start (with the owner dashboard button, highlighted there); no footer on the new-tab page
All checks were successful
Deploy production / deploy (push) Successful in 2m36s
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.
This commit is contained in:
@@ -1,10 +1,15 @@
|
||||
/**
|
||||
* Full-screen pages that render without the site header and footer: the /start new-tab
|
||||
* dashboard and the book reader. They also skip loading the header's JS (icons, menus,
|
||||
* the mobile Sheet): src/routes/+layout.ts only imports SiteChrome for other pages.
|
||||
* Full-screen pages that render without the site header and footer (the book reader). They
|
||||
* also skip loading the header's JS (icons, menus, the mobile Sheet): src/routes/+layout.ts
|
||||
* only imports SiteChrome for other pages.
|
||||
*/
|
||||
export function isImmersive(pathname: string): boolean {
|
||||
return /^\/start\/?$/.test(pathname) || /^\/trackers\/books\/\d+\/read\/?$/.test(pathname);
|
||||
return /^\/trackers\/books\/\d+\/read\/?$/.test(pathname);
|
||||
}
|
||||
|
||||
/** Pages that show the site header but no footer: the /start new-tab dashboard. */
|
||||
export function hidesFooter(pathname: string): boolean {
|
||||
return /^\/start\/?$/.test(pathname);
|
||||
}
|
||||
|
||||
/** True when a keyboard shortcut should not fire because the user is typing. */
|
||||
|
||||
Reference in New Issue
Block a user