diff --git a/ui/src/app.css b/ui/src/app.css index 0aa4cd6..bbe88a1 100644 --- a/ui/src/app.css +++ b/ui/src/app.css @@ -106,12 +106,14 @@ html { :root { --reading-font: system-ui, -apple-system, sans-serif; --reading-size: 1.05rem; + --reading-line-height: 1.85; + --reading-max-width: 72ch; } /* ── Chapter prose ─────────────────────────────────────────────────── */ .prose-chapter { - max-width: 72ch; - line-height: 1.85; + max-width: var(--reading-max-width, 72ch); + line-height: var(--reading-line-height, 1.85); font-family: var(--reading-font); font-size: var(--reading-size); color: var(--color-muted); @@ -134,6 +136,12 @@ html { margin-bottom: 1.2em; } +/* Indented paragraph style — book-like, no gap, indent instead */ +.prose-chapter.para-indented p { + text-indent: 2em; + margin-bottom: 0.35em; +} + .prose-chapter em { color: var(--color-muted); } @@ -147,6 +155,31 @@ html { margin: 2em 0; } +/* ── Reading progress bar ───────────────────────────────────────────── */ +.reading-progress { + position: fixed; + top: 0; + left: 0; + height: 2px; + z-index: 100; + background: var(--color-brand); + pointer-events: none; + transition: width 0.1s linear; +} + +/* ── Paginated reader ───────────────────────────────────────────────── */ +.paginated-container { + overflow: hidden; + cursor: pointer; + user-select: none; + -webkit-user-select: none; +} + +.paginated-container .prose-chapter { + transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1); + will-change: transform; +} + /* ── Hide scrollbars (used on horizontal carousels) ────────────────── */ .scrollbar-none { scrollbar-width: none; /* Firefox */ diff --git a/ui/src/routes/books/[slug]/chapters/[n]/+page.svelte b/ui/src/routes/books/[slug]/chapters/[n]/+page.svelte index f3714aa..114d318 100644 --- a/ui/src/routes/books/[slug]/chapters/[n]/+page.svelte +++ b/ui/src/routes/books/[slug]/chapters/[n]/+page.svelte @@ -1,5 +1,6 @@