Fix page parity: images on even (left) pages, text on odd (right) pages

Add a section-title page ("Die Geschichten") as page 3 so all stories
begin on page 4. Image and text for each scene now land on the same
facing spread (even=left image, odd=right text). Page count: 99 → 100.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-03 19:14:43 +02:00
parent 2abcda73e8
commit 6b61cf206a
4 changed files with 50 additions and 2 deletions
+2 -2
View File
@@ -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),
+23
View File
@@ -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);
+16
View File
@@ -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);
+9
View File
@@ -28,6 +28,15 @@
</ol>
</div>
{# ── Section title — keeps stories starting on an even (left) page ── #}
<div class="page page--section">
<div class="section-title-inner">
<span class="section-ornament"></span>
<h2 class="section-title">Die Geschichten</h2>
<span class="section-rule"></span>
</div>
</div>
{# ── Stories ── #}
{% for story in stories %}
{% include "story-spread.html" %}