diff --git a/scripts/build.js b/scripts/build.js index 4d465ef..c3b2a47 100644 --- a/scripts/build.js +++ b/scripts/build.js @@ -69,8 +69,8 @@ async function build() { const outPath = join(root, 'output', 'book.html'); await writeFile(outPath, html, 'utf-8'); - // copyright + TOC + (4 scenes × 2 pages per story) + finale - const pageCount = 2 + stories.reduce((acc, s) => acc + s.scenes.length * 2, 0) + 1; + // imprint + TOC + section-title + (4 scenes × 2 pages per story) + finale + const pageCount = 3 + stories.reduce((acc, s) => acc + s.scenes.length * 2, 0) + 1; await writeFile( join(root, 'output', 'book-meta.json'), JSON.stringify({ pageCount, storyCount: stories.length, builtAt: new Date().toISOString() }, null, 2), diff --git a/styles/layout.css b/styles/layout.css index 84bd583..d22a555 100644 --- a/styles/layout.css +++ b/styles/layout.css @@ -102,6 +102,29 @@ flex-shrink: 0; } +/* ── Section title page ── */ +.page--section { + background: var(--cream, #faf8f2); + display: flex; + align-items: center; + justify-content: center; +} + +.section-title-inner { + display: flex; + flex-direction: column; + align-items: center; + gap: 0.8rem; + text-align: center; +} + +.section-rule { + display: block; + width: 3rem; + height: 1px; + background: rgba(30, 27, 24, 0.25); +} + /* ── Finale page ── */ .page--finale { background: var(--midnight, #0d0d2b); diff --git a/styles/typography.css b/styles/typography.css index 25c049a..ac8a7b1 100644 --- a/styles/typography.css +++ b/styles/typography.css @@ -155,6 +155,22 @@ body { padding-top: 0.5rem; } +/* ── Section title page ── */ +.section-ornament { + font-family: var(--font-display); + font-size: 1.8rem; + color: var(--ink-muted); +} + +.section-title { + font-family: var(--font-display); + font-style: italic; + font-weight: 300; + font-size: 2.2rem; + color: var(--ink); + letter-spacing: 0.03em; +} + /* ── Finale overlay ── */ .finale-overlay h2 { font-family: var(--font-display); diff --git a/templates/book.html b/templates/book.html index 9a5161e..e025578 100644 --- a/templates/book.html +++ b/templates/book.html @@ -28,6 +28,15 @@ + {# ── Section title — keeps stories starting on an even (left) page ── #} +