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>
This commit is contained in:
+8
-3
@@ -56,10 +56,15 @@ async function loadStories() {
|
||||
return { stories, finale: finale || {} };
|
||||
}
|
||||
|
||||
async function build() {
|
||||
const { stories, finale } = await loadStories();
|
||||
async function loadFrontMatter() {
|
||||
const raw = await readFile(join(root, 'content', '00-front-matter.md'), 'utf-8');
|
||||
return matter(raw).data;
|
||||
}
|
||||
|
||||
const html = env.render('book.html', { stories, finale });
|
||||
async function build() {
|
||||
const [{ stories, finale }, frontMatter] = await Promise.all([loadStories(), loadFrontMatter()]);
|
||||
|
||||
const html = env.render('book.html', { stories, finale, frontMatter });
|
||||
|
||||
const outPath = join(root, 'output', 'book.html');
|
||||
await writeFile(outPath, html, 'utf-8');
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
import { copyFile, mkdir } from 'fs/promises';
|
||||
import { resolve, dirname } from 'path';
|
||||
import { fileURLToPath } from 'url';
|
||||
|
||||
const __dir = dirname(fileURLToPath(import.meta.url));
|
||||
const root = resolve(__dir, '..');
|
||||
const dest = resolve(root, 'fonts');
|
||||
const nm = resolve(root, 'node_modules');
|
||||
|
||||
const files = [
|
||||
['@fontsource/cormorant-garamond/files/cormorant-garamond-latin-300-italic.woff2', 'cormorant-garamond-300-italic.woff2'],
|
||||
['@fontsource/cormorant-garamond/files/cormorant-garamond-latin-400-normal.woff2', 'cormorant-garamond-400-normal.woff2'],
|
||||
['@fontsource/cormorant-garamond/files/cormorant-garamond-latin-400-italic.woff2', 'cormorant-garamond-400-italic.woff2'],
|
||||
['@fontsource/cormorant-garamond/files/cormorant-garamond-latin-600-italic.woff2', 'cormorant-garamond-600-italic.woff2'],
|
||||
['@fontsource/lora/files/lora-latin-400-normal.woff2', 'lora-400-normal.woff2'],
|
||||
['@fontsource/lora/files/lora-latin-400-italic.woff2', 'lora-400-italic.woff2'],
|
||||
['@fontsource/lora/files/lora-latin-500-normal.woff2', 'lora-500-normal.woff2'],
|
||||
];
|
||||
|
||||
await mkdir(dest, { recursive: true });
|
||||
|
||||
for (const [src, name] of files) {
|
||||
await copyFile(resolve(nm, src), resolve(dest, name));
|
||||
}
|
||||
|
||||
console.log(`Fonts copied to fonts/ (${files.length} files)`);
|
||||
Reference in New Issue
Block a user