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:
+2
-2
@@ -69,8 +69,8 @@ async function build() {
|
|||||||
const outPath = join(root, 'output', 'book.html');
|
const outPath = join(root, 'output', 'book.html');
|
||||||
await writeFile(outPath, html, 'utf-8');
|
await writeFile(outPath, html, 'utf-8');
|
||||||
|
|
||||||
// copyright + TOC + (4 scenes × 2 pages per story) + finale
|
// imprint + TOC + section-title + (4 scenes × 2 pages per story) + finale
|
||||||
const pageCount = 2 + stories.reduce((acc, s) => acc + s.scenes.length * 2, 0) + 1;
|
const pageCount = 3 + stories.reduce((acc, s) => acc + s.scenes.length * 2, 0) + 1;
|
||||||
await writeFile(
|
await writeFile(
|
||||||
join(root, 'output', 'book-meta.json'),
|
join(root, 'output', 'book-meta.json'),
|
||||||
JSON.stringify({ pageCount, storyCount: stories.length, builtAt: new Date().toISOString() }, null, 2),
|
JSON.stringify({ pageCount, storyCount: stories.length, builtAt: new Date().toISOString() }, null, 2),
|
||||||
|
|||||||
@@ -102,6 +102,29 @@
|
|||||||
flex-shrink: 0;
|
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 ── */
|
/* ── Finale page ── */
|
||||||
.page--finale {
|
.page--finale {
|
||||||
background: var(--midnight, #0d0d2b);
|
background: var(--midnight, #0d0d2b);
|
||||||
|
|||||||
@@ -155,6 +155,22 @@ body {
|
|||||||
padding-top: 0.5rem;
|
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 ── */
|
||||||
.finale-overlay h2 {
|
.finale-overlay h2 {
|
||||||
font-family: var(--font-display);
|
font-family: var(--font-display);
|
||||||
|
|||||||
@@ -28,6 +28,15 @@
|
|||||||
</ol>
|
</ol>
|
||||||
</div>
|
</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 ── #}
|
{# ── Stories ── #}
|
||||||
{% for story in stories %}
|
{% for story in stories %}
|
||||||
{% include "story-spread.html" %}
|
{% include "story-spread.html" %}
|
||||||
|
|||||||
Reference in New Issue
Block a user