site: owner-only dashboard link in header, mobile menu and homepage (g then d from any page); /start skips the site chrome JS
All checks were successful
Deploy production / deploy (push) Successful in 2m56s
All checks were successful
Deploy production / deploy (push) Successful in 2m56s
- Header/footer moved to #lib/components/SiteChrome.svelte, returned by a universal +layout.ts load only for non-immersive pages, so /start and the book reader never download icon libraries, dropdowns or the bits-ui Sheet. /start: 36 -> 18 JS files, 133 -> 78 KB gzip. - Header logo is a hashed asset (inlined), so it is cached with the build. - inlineStyleThreshold 4096: tiny page/component CSS is inlined into the HTML. - Umami is not loaded on /start.
This commit is contained in:
13
src/lib/chrome.test.ts
Normal file
13
src/lib/chrome.test.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
import { describe, expect, it } from 'vitest';
|
||||
import { isImmersive } from './chrome';
|
||||
|
||||
describe('immersive pages', () => {
|
||||
it('skips the site chrome on /start and the book reader only', () => {
|
||||
expect(isImmersive('/start')).toBe(true);
|
||||
expect(isImmersive('/start/')).toBe(true);
|
||||
expect(isImmersive('/trackers/books/12/read')).toBe(true);
|
||||
expect(isImmersive('/')).toBe(false);
|
||||
expect(isImmersive('/starter')).toBe(false);
|
||||
expect(isImmersive('/trackers/books/12')).toBe(false);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user