feat(studio): 71 more designed pages and five new styles, each with a theme of its own

Every style now has four covers and five double spreads, 108 in all, and the
spreads of each style take different photo counts, from a words-only page to
eight photos, so a book can be laid on them without an empty frame. The five
new styles come with their own themes: Riso (overprinted spot inks), Magazine
(a travel magazine), Retro travel (vintage posters), Midnight (a dark film
look) and Field notes (a traveller's notebook). Each new style has a cover
composer for the design engine and a recipe for the assistant, and its chip,
theme and template names are translated into every language.
This commit is contained in:
Maurice
2026-10-24 19:17:56 +02:00
parent 06a1dcd730
commit 8ce3b24a01
90 changed files with 23566 additions and 32 deletions
@@ -53,6 +53,11 @@ export const BOOK_THEME_IDS = [
'nordic',
'alpine',
'india-stamp',
'riso',
'magazine',
'retro-travel',
'midnight',
'field-notes',
] as const;
export type BookThemeId = (typeof BOOK_THEME_IDS)[number];
+2 -2
View File
@@ -27,9 +27,9 @@ import { describe, expect, it } from 'vitest';
// BKTHEME-001 to BKTHEME-010
describe('the built-in themes', () => {
it('BKTHEME-001: are twelve, one per id, in the order of the ids', () => {
it('BKTHEME-001: are seventeen, one per id, in the order of the ids', () => {
expect(BOOK_THEME_PRESETS.map((p) => p.id)).toEqual([...BOOK_THEME_IDS]);
expect(BOOK_THEME_IDS).toHaveLength(12);
expect(BOOK_THEME_IDS).toHaveLength(17);
for (const id of BOOK_THEME_IDS) expect(bookThemeOf(id).id).toBe(id);
expect(bookThemePreset('nope')).toBeUndefined();
expect(() => bookThemeOf('nope' as never)).toThrow();
+87 -1
View File
@@ -8,7 +8,7 @@ import type {
} from './book-theme.schema';
/**
* The twelve built-in themes, each a look of its own rather than a recolour:
* The seventeen built-in themes, each a look of its own rather than a recolour:
* a paper and an ink that read together, three accents that belong to the
* same place, a display face for the cover, a heading and a body face that
* pair, a script for the words laid over a photo, and the motifs that suit.
@@ -253,4 +253,90 @@ export const BOOK_THEME_PRESETS: readonly BookThemePreset[] = [
frameStyle: 'white',
tilt: 2,
},
{
id: 'riso',
labelKey: 'studio.theme.name.riso',
descrKey: 'studio.theme.descr.riso',
descr: 'Riso print: cream paper, riso blue, fluo pink, yellow and teal inks overprinted, a bold grotesque.',
palette: { paper: '#f4efe4', ink: '#23306b', accent: '#ed4981', accent2: '#ffd23f', accent3: '#00a39a' },
fonts: {
display: { font: 'bricolage', weight: 800 },
heading: { font: 'montserrat', weight: 700 },
body: { font: 'inter' },
script: { font: 'marker', weight: 400 },
},
motifs: ['doodles', 'paper'],
decoration: 'rich',
frameStyle: 'none',
tilt: 2,
},
{
id: 'magazine',
labelKey: 'studio.theme.name.magazine',
descrKey: 'studio.theme.descr.magazine',
descr: 'Travel magazine: off white paper, black ink, one signal red, a huge Bodoni masthead over Garamond.',
palette: { paper: '#f7f4ee', ink: '#111111', accent: '#d7261e', accent2: '#e9e2d6', accent3: '#6b6b6b' },
fonts: {
display: { font: 'bodoni', weight: 800 },
heading: { font: 'montserrat', weight: 600 },
body: { font: 'garamond' },
script: null,
},
motifs: ['ornaments'],
decoration: 'light',
frameStyle: 'none',
tilt: 0,
},
{
id: 'retro-travel',
labelKey: 'studio.theme.name.retroTravel',
descrKey: 'studio.theme.descr.retroTravel',
descr:
'Retro travel poster: aged cream paper, brown ink, orange, teal and mustard, a slab title over condensed caps.',
palette: { paper: '#f3e7cf', ink: '#3b2a1e', accent: '#d56129', accent2: '#2f7f7a', accent3: '#f2b33d' },
fonts: {
display: { font: 'alfa', weight: 400 },
heading: { font: 'oswald', weight: 500 },
body: { font: 'serif' },
script: { font: 'yellowtail', weight: 400 },
},
motifs: ['mountains', 'mediterranean', 'landmarks'],
decoration: 'rich',
frameStyle: 'white',
tilt: 0,
},
{
id: 'midnight',
labelKey: 'studio.theme.name.midnight',
descrKey: 'studio.theme.descr.midnight',
descr: 'Midnight film: near black paper, warm white ink, neon orange and cyan, tall condensed capitals.',
palette: { paper: '#121417', ink: '#f2efe8', accent: '#ff6b3d', accent2: '#39d0c4', accent3: '#8a8f98' },
fonts: {
display: { font: 'league', weight: 400 },
heading: { font: 'oswald', weight: 500 },
body: { font: 'inter' },
script: { font: 'satisfy', weight: 400 },
},
motifs: ['doodles'],
decoration: 'light',
frameStyle: 'none',
tilt: 0,
},
{
id: 'field-notes',
labelKey: 'studio.theme.name.fieldNotes',
descrKey: 'studio.theme.descr.fieldNotes',
descr: 'Field notes: kraft paper, moss green ink, rust and sage, a soft serif title, handwriting, tape and leaves.',
palette: { paper: '#e9dcc3', ink: '#2f3a2b', accent: '#b5532c', accent2: '#f8f2e4', accent3: '#6f8a5a' },
fonts: {
display: { font: 'fraunces', weight: 700 },
heading: { font: 'montserrat', weight: 600 },
body: { font: 'serif' },
script: { font: 'caveat', weight: 400 },
},
motifs: ['paper', 'mountains', 'nordic'],
decoration: 'rich',
frameStyle: 'polaroid',
tilt: 3,
},
];