Remove finale page from book interior
The cover PDF serves this purpose. Removes the page--finale template block, the finale data loading path in build.js, and all finale CSS. Page count: 100 → 99 (imprint + title + TOC + 96 scene pages). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,6 +0,0 @@
|
||||
---
|
||||
type: finale
|
||||
title: "Das Kaleidoskop"
|
||||
subtitle: "Alle zwölf Welten auf einen Blick"
|
||||
image: images/cover/finale.png
|
||||
---
|
||||
+5
-11
@@ -20,7 +20,6 @@ async function loadStories() {
|
||||
const files = (await readdir(contentDir)).filter(f => f.endsWith('.md')).sort();
|
||||
|
||||
const stories = [];
|
||||
let finale = null;
|
||||
|
||||
for (const file of files) {
|
||||
const raw = await readFile(join(contentDir, file), 'utf-8');
|
||||
@@ -28,11 +27,6 @@ async function loadStories() {
|
||||
|
||||
if (data.type === 'front-matter') continue;
|
||||
|
||||
if (data.type === 'finale') {
|
||||
finale = data;
|
||||
continue;
|
||||
}
|
||||
|
||||
// Split body by --- into individual scene texts
|
||||
const sceneTexts = content.split(/\n---\n/).map(t => t.trim()).filter(Boolean);
|
||||
|
||||
@@ -53,7 +47,7 @@ async function loadStories() {
|
||||
stories.push({ ...data, scenes });
|
||||
}
|
||||
|
||||
return { stories, finale: finale || {} };
|
||||
return stories;
|
||||
}
|
||||
|
||||
async function loadFrontMatter() {
|
||||
@@ -62,15 +56,15 @@ async function loadFrontMatter() {
|
||||
}
|
||||
|
||||
async function build() {
|
||||
const [{ stories, finale }, frontMatter] = await Promise.all([loadStories(), loadFrontMatter()]);
|
||||
const [stories, frontMatter] = await Promise.all([loadStories(), loadFrontMatter()]);
|
||||
|
||||
const html = env.render('book.html', { stories, finale, frontMatter });
|
||||
const html = env.render('book.html', { stories, frontMatter });
|
||||
|
||||
const outPath = join(root, 'output', 'book.html');
|
||||
await writeFile(outPath, html, 'utf-8');
|
||||
|
||||
// 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;
|
||||
// imprint + title page + TOC + (4 scenes × 2 pages per story)
|
||||
const pageCount = 3 + stories.reduce((acc, s) => acc + s.scenes.length * 2, 0);
|
||||
await writeFile(
|
||||
join(root, 'output', 'book-meta.json'),
|
||||
JSON.stringify({ pageCount, storyCount: stories.length, builtAt: new Date().toISOString() }, null, 2),
|
||||
|
||||
@@ -119,26 +119,3 @@
|
||||
padding: 0 0.8in;
|
||||
}
|
||||
|
||||
/* ── Finale page ── */
|
||||
.page--finale {
|
||||
background: var(--midnight, #0d0d2b);
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.finale-image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: cover;
|
||||
}
|
||||
|
||||
.finale-overlay {
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
padding-bottom: 1in;
|
||||
text-align: center;
|
||||
background: linear-gradient(to top, rgba(13, 13, 43, 0.75) 0%, transparent 55%);
|
||||
}
|
||||
|
||||
@@ -188,22 +188,3 @@ body {
|
||||
margin-top: 0.5rem;
|
||||
}
|
||||
|
||||
/* ── Finale overlay ── */
|
||||
.finale-overlay h2 {
|
||||
font-family: var(--font-display);
|
||||
font-style: italic;
|
||||
font-weight: 300;
|
||||
font-size: 2.6rem;
|
||||
color: white;
|
||||
text-shadow: 0 2px 16px rgba(0, 0, 0, 0.7);
|
||||
letter-spacing: 0.02em;
|
||||
}
|
||||
|
||||
.finale-overlay p {
|
||||
font-family: var(--font-display);
|
||||
font-style: italic;
|
||||
font-size: 0.95rem;
|
||||
color: rgba(255, 255, 255, 0.7);
|
||||
letter-spacing: 0.12em;
|
||||
margin-top: 0.6rem;
|
||||
}
|
||||
|
||||
@@ -43,22 +43,6 @@
|
||||
{% include "story-spread.html" %}
|
||||
{% endfor %}
|
||||
|
||||
{# ── Finale page ── #}
|
||||
<div class="page page--finale">
|
||||
{% if finale.image %}
|
||||
<img class="finale-image" src="{{ finale.image }}" alt="Das Kaleidoskop – alle zwölf Welten">
|
||||
{% else %}
|
||||
<div class="placeholder-image" style="background: #0d0d2b; width:100%; height:100%;">
|
||||
<div class="placeholder-label">
|
||||
<span class="placeholder-scene">Finale-Illustration (alle 12 Welten)</span>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="finale-overlay">
|
||||
<h2>Das Kaleidoskop</h2>
|
||||
<p>Alle zwölf Welten auf einen Blick</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user