Commit Graph

5 Commits

Author SHA1 Message Date
valknar 35c76656e9 feat: add cover-image task to export cover PDF as 300 DPI PNG
Runs Ghostscript on output/cover.pdf to produce output/cover-300dpi.png
for visual QC and sharing. Also wired into the `pnpm all` pipeline.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-12 21:42:39 +02:00
valknar 475bbf0a19 fix: resize images to 2550 px (300 DPI) at build time to prevent WSL2 OOM crash
4096×4096 source images decoded simultaneously by Chromium consumed ~3.2 GB,
exhausting WSL2 RAM. Build now uses sharp to downsize to 2550×2550 (8.5 in ×
300 DPI) into output/resized/ before Puppeteer loads them, cutting in-memory
footprint to ~1.25 GB. Also adds all story images (01–12) to the repository.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-04 21:37:56 +02:00
valknar 87a3925c3e Redesign book interior: Illuminated Nocturne aesthetic
Replaces Georgia + per-story color theming with a unified premium
fairytale look: Cormorant Garamond (display/titles) + Lora (body),
warm cream text pages (#faf8f2 with paper noise texture), deep ink
typography (#1e1b18) throughout — no per-story text color variation.

- fonts/: committed WOFF2 files via @fontsource packages; auto-copied
  by scripts/setup-fonts.js (runs as postinstall)
- Typography: story number in small caps, hairline rule, ❧ ornament
- Layout: cream background replaces per-story bg, radial glow on title
- build.js: passes frontMatter (author, year) to templates
- Templates: author byline on title page, cleaner imprint page

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-03 18:39:42 +02:00
valknar 1037b84eaa Add KDP cover PDF generator
scripts/cover.js computes the exact cover canvas dimensions from the
page count in book-meta.json (written by build.js), using the KDP
Premium Color spine formula (0.002347 in/page), and renders a
Nunjucks template to a single PDF containing back cover, spine, and
front cover with bleed (0.125 in) and safe-zone overlay guides.

- `pnpm cover`  — generate output/cover.pdf
- `pnpm all`    — build interior + both PDFs in one command
- Cover artwork slots: images/cover/front.png, images/cover/back.png

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-03 17:29:10 +02:00
valknar a8ade90ffb Set up book project: Markdown→CSS→PDF pipeline for KDP
Adds the full authoring and build toolchain for "Das Kaleidoskop der
Schlummerwelten" — all 12 story content files in Markdown, Nunjucks
HTML templates, CSS print layout, and Puppeteer-based PDF generation
targeting Amazon KDP (8.5×8.5 in, 0.125in bleed).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-03 15:38:07 +02:00