diff --git a/ui/src/routes/books/[slug]/chapters/[n]/+page.svelte b/ui/src/routes/books/[slug]/chapters/[n]/+page.svelte index e36d4a1..424baf9 100644 --- a/ui/src/routes/books/[slug]/chapters/[n]/+page.svelte +++ b/ui/src/routes/books/[slug]/chapters/[n]/+page.svelte @@ -68,9 +68,10 @@ focusMode: boolean; playerStyle: PlayerStyle; pageLines: PageLines; + showSidebar: boolean; } - const LAYOUT_KEY = 'reader_layout_v2'; + const LAYOUT_KEY = 'reader_layout_v3'; const LINE_HEIGHTS: Record = { compact: 1.55, normal: 1.85, relaxed: 2.2 }; const READ_WIDTHS: Record = { narrow: '58ch', normal: '72ch', wide: 'min(90ch, 100%)' }; /** @@ -79,7 +80,7 @@ * shorter so fewer lines fit per page; More (+4rem) grows it for more lines. */ const PAGE_LINES_OFFSET: Record = { less: '4rem', normal: '0rem', more: '-4rem' }; - const DEFAULT_LAYOUT: LayoutPrefs = { readMode: 'scroll', lineSpacing: 'normal', readWidth: 'normal', paraStyle: 'spaced', focusMode: false, playerStyle: 'standard', pageLines: 'normal' }; + const DEFAULT_LAYOUT: LayoutPrefs = { readMode: 'scroll', lineSpacing: 'normal', readWidth: 'normal', paraStyle: 'spaced', focusMode: false, playerStyle: 'standard', pageLines: 'normal', showSidebar: true }; function loadLayout(): LayoutPrefs { if (!browser) return DEFAULT_LAYOUT; @@ -466,6 +467,12 @@
{/if} + +
+ + +
+ {#if !layout.focusMode}
@@ -864,6 +871,169 @@
{/if} +
+ + +{#if layout.showSidebar && !layout.focusMode} + +{/if} + +
+ {#if layout.readMode === 'scroll' && !layout.focusMode} {@const atTop = scrollProgress <= 0.01} @@ -1227,6 +1397,17 @@ {layout.focusMode ? 'On — audio & nav hidden' : 'Off'} + +