mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-12-03 17:41:51 +00:00
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:
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* The seven cover archetypes a decorated book starts from: the Studio's cover
|
||||
* The twelve cover archetypes a decorated book starts from: the Studio's cover
|
||||
* templates are drawn in them, and the assistant's art direction names one.
|
||||
*
|
||||
* - spine-band: a bleed photo with a coloured band on the binding side.
|
||||
@@ -9,6 +9,11 @@
|
||||
* - grid-badge: a two by two photo grid with a round title badge at its centre.
|
||||
* - minimal-serif: a white page, a large photo with a hairline, a very large thin serif title.
|
||||
* - stamp-collage: photos in arches and stamps over a checker band, with a round postmark.
|
||||
* - riso: a risograph print, spot inks overprinted a little out of register, halftone dots, bold type.
|
||||
* - editorial: a travel magazine, a huge masthead, thin rules, an issue line, a photo edge to edge.
|
||||
* - vintage-poster: a 1950s travel poster, flat layered mountains under a sun, a stacked title, a thin frame.
|
||||
* - night-film: a dark cinematic page, a letterboxed photo, a film strip with sprocket holes, a neon accent.
|
||||
* - field-notes: a traveller's notebook, squared paper, prints taped in at an angle, pressed leaves.
|
||||
*/
|
||||
export const BOOK_COVER_ARCHETYPES = [
|
||||
'spine-band',
|
||||
@@ -18,5 +23,10 @@ export const BOOK_COVER_ARCHETYPES = [
|
||||
'grid-badge',
|
||||
'minimal-serif',
|
||||
'stamp-collage',
|
||||
'riso',
|
||||
'editorial',
|
||||
'vintage-poster',
|
||||
'night-film',
|
||||
'field-notes',
|
||||
] as const;
|
||||
export type BookCoverArchetype = (typeof BOOK_COVER_ARCHETYPES)[number];
|
||||
|
||||
@@ -32,6 +32,11 @@ export const BOOK_COVER_ARCHETYPE_LINES: Readonly<Record<BookCoverArchetype, str
|
||||
'grid-badge': 'four photos in a grid with a white cross, a round title badge at its centre',
|
||||
'minimal-serif': 'a white page, a large photo with a hairline, a very large thin serif title and a sun ornament',
|
||||
'stamp-collage': 'photos in arches and stamps over a checker band, a round postmark',
|
||||
riso: 'spot inks overprinted out of register, halftone dots, a duotone photo, a heavy title with an ink shadow',
|
||||
editorial: 'a magazine cover: a huge masthead, a thin rule and an issue line, a photo edge to edge',
|
||||
'vintage-poster': 'a retro travel poster: flat mountains under a sun, a photo in an arch, a stacked title',
|
||||
'night-film': 'a near black page, a letterboxed photo, a film strip with sprocket holes, neon capitals',
|
||||
'field-notes': 'squared notebook paper, prints taped in at an angle, pressed leaves, a script line',
|
||||
};
|
||||
|
||||
/** The pages a lively or loud book is made of besides the calm ones (design-lively.ts). */
|
||||
|
||||
@@ -56,7 +56,7 @@ describe('the art direction of design_book', () => {
|
||||
for (const theme of BOOK_THEME_IDS) expect(bookDesignBriefSchema.safeParse({ theme }).success, theme).toBe(true);
|
||||
});
|
||||
|
||||
it('DSNBRF-003: the cover takes an archetype of the seven and a lockup of the Text styles shelf', () => {
|
||||
it('DSNBRF-003: the cover takes an archetype of the twelve and a lockup of the Text styles shelf', () => {
|
||||
for (const archetype of BOOK_COVER_ARCHETYPES) expect(ok({ cover: { archetype } }), archetype).toBe(true);
|
||||
for (const lockup of BOOK_LOCKUPS) expect(ok({ cover: { lockup: lockup.id } }), lockup.id).toBe(true);
|
||||
expect(ok({ cover: { archetype: 'collage' } })).toBe(false);
|
||||
|
||||
@@ -0,0 +1,108 @@
|
||||
import type { BookElement, BookFrame, BookPhotoElement, BookTextElement } from '../book.schema';
|
||||
import { frameOf } from './design-compose';
|
||||
import {
|
||||
addLockup,
|
||||
bandPhoto,
|
||||
coverText,
|
||||
deepened,
|
||||
inkOn,
|
||||
mmOn,
|
||||
mmToPt,
|
||||
shapeEl,
|
||||
spacedLine,
|
||||
standOut,
|
||||
titleText,
|
||||
type CoverDraft,
|
||||
type CoverKit,
|
||||
} from './design-cover-kit';
|
||||
|
||||
/**
|
||||
* Editorial: the cover of a travel magazine. The title as a huge masthead
|
||||
* across the top of the paper, a thin rule under it with the issue line (the
|
||||
* month on the left, the place on the right), the cover photo edge to edge
|
||||
* below (a field of colour without one), and the subtitle as the cover line
|
||||
* on a block of the accent in a lower corner, off the picture's detail.
|
||||
*/
|
||||
|
||||
const holds = (b: BookFrame, x: number, y: number) => x >= b.x && x <= b.x + b.w && y >= b.y && y <= b.y + b.h;
|
||||
|
||||
/** A short line of spaced capitals set flush to one side. */
|
||||
function issueLine(
|
||||
k: CoverKit,
|
||||
words: string,
|
||||
frame: BookFrame,
|
||||
color: string,
|
||||
align: 'left' | 'right',
|
||||
): BookTextElement {
|
||||
return { ...spacedLine(k, words, frame, color, 8), align };
|
||||
}
|
||||
|
||||
/** Where the cover line's block may lie: the lower left corner, else the lower right, clear of the photo's detail. */
|
||||
function coverLineBox(k: CoverKit, print: BookPhotoElement | null, w: number, h: number): BookFrame | null {
|
||||
const { W, H, m } = k;
|
||||
const corners = [frameOf(m, H - m - h, w, h), frameOf(W - m - w, H - m - h, w, h)];
|
||||
if (!print) return corners[0] ?? null;
|
||||
const fx = print.frame.x + print.focalX * print.frame.w;
|
||||
const fy = print.frame.y + print.focalY * print.frame.h;
|
||||
return corners.find((b) => !holds(frameOf(b.x - 3, b.y - 3, b.w + 6, b.h + 6), fx, fy)) ?? null;
|
||||
}
|
||||
|
||||
export function editorial(k: CoverKit): CoverDraft {
|
||||
const { c, W, H, b, m } = k;
|
||||
const draft: CoverDraft = { elements: [], groups: [] };
|
||||
const ground = c.look.paper;
|
||||
const ink = inkOn(c, ground);
|
||||
const mast = H * k.rng.range(0.24, 0.28);
|
||||
const zone = frameOf(m, m, W - m * 2, mast - m);
|
||||
const ruleY = mast + mmOn(k, 1.5);
|
||||
const lineY = ruleY + mmOn(k, 2);
|
||||
const lineH = mmOn(k, 6);
|
||||
const top = lineY + lineH + mmOn(k, 3);
|
||||
const photo = k.photos[0];
|
||||
const print = photo ? bandPhoto(k, photo, frameOf(-b, top, W + b * 2, H - top + b)) : null;
|
||||
// Without a photo its place is a field of colour, as a magazine prints a cover of type alone.
|
||||
draft.elements.push(print ?? shapeEl(k, 'rect', frameOf(-b, top, W + b * 2, H - top + b), standOut(c, ground)));
|
||||
const head: BookElement[] = [];
|
||||
const asked = addLockup(k, draft, { box: zone, ground });
|
||||
if (!asked.length && k.title.words.trim()) {
|
||||
head.push(
|
||||
titleText(k, zone, {
|
||||
max: mmToPt(zone.h * 0.82),
|
||||
color: ink,
|
||||
transform: 'upper',
|
||||
leading: 0.9,
|
||||
weight: 800,
|
||||
}),
|
||||
);
|
||||
}
|
||||
const thin = Math.max(0.3, mmOn(k, 0.4));
|
||||
head.push(shapeEl(k, 'rect', frameOf(m, ruleY, W - m * 2, thin), ink));
|
||||
const half = (W - m * 2) / 2 - mmOn(k, 2);
|
||||
const left = k.words.dates || k.words.year || '';
|
||||
const place = k.words.place ?? '';
|
||||
if (left) head.push(issueLine(k, left, frameOf(m, lineY, half, lineH), ink, 'left'));
|
||||
if (place && place !== left) head.push(issueLine(k, place, frameOf(W - m - half, lineY, half, lineH), ink, 'right'));
|
||||
draft.elements.push(...head);
|
||||
if (head.length > 1) draft.groups.push(head.map((e) => e.id));
|
||||
// The cover line: the subtitle on a block of the accent over the photo, or on the paper without one.
|
||||
const sub = k.sub.words.trim();
|
||||
if (!sub || asked.length) return draft;
|
||||
const bw = W * k.rng.range(0.42, 0.5);
|
||||
const bh = Math.min(mmOn(k, 30), (H - top) * 0.36);
|
||||
const box = coverLineBox(k, print, bw, bh);
|
||||
if (!box) return draft;
|
||||
const block = deepened(print ? standOut(c, ground) : inkOn(c, ground));
|
||||
const pad = mmOn(k, 4);
|
||||
const words = coverText(k, sub, frameOf(box.x + pad, box.y + pad, box.w - pad * 2, box.h - pad * 2), {
|
||||
slot: 'heading',
|
||||
max: 16,
|
||||
color: inkOn(c, block),
|
||||
align: 'left',
|
||||
leading: 1.1,
|
||||
});
|
||||
const line = k.sub.bound ? { ...words, binding: { source: 'journey.subtitle' as const } } : words;
|
||||
const parts = [shapeEl(k, 'rect', box, block), line];
|
||||
draft.elements.push(...parts);
|
||||
draft.groups.push(parts.map((e) => e.id));
|
||||
return draft;
|
||||
}
|
||||
@@ -0,0 +1,155 @@
|
||||
import { deltaE, luminance, parseHex } from '../book-colour';
|
||||
import { solveBookTextFit } from '../book-text-fit';
|
||||
import type { BookElement, BookFrame, BookPhotoElement, BookShapeId, BookTextElement } from '../book.schema';
|
||||
import { mixHex } from '../theme/book-theme';
|
||||
import { CALM_ART } from './design-art';
|
||||
import { frameOf } from './design-compose';
|
||||
import {
|
||||
accentOn,
|
||||
addLockup,
|
||||
clearOfTrim,
|
||||
coverText,
|
||||
inkOn,
|
||||
keptTurn,
|
||||
mmOn,
|
||||
mmToPt,
|
||||
printEl,
|
||||
shapeEl,
|
||||
titleText,
|
||||
type CoverDraft,
|
||||
type CoverKit,
|
||||
} from './design-cover-kit';
|
||||
import { placeStickers, sharedArea, turnedBox } from './design-stickers';
|
||||
|
||||
/**
|
||||
* Field notes: a page of a traveller's notebook. A sheet of squared paper
|
||||
* laid a little askew on the kraft, the photos taped in as prints turned a
|
||||
* few degrees each way with a strip of tape over their top edge, pressed
|
||||
* leaves beside them, and under them the title in the display face, the
|
||||
* subtitle (or the place) in the script, and the dates in mono.
|
||||
*/
|
||||
|
||||
const WHITE = '#ffffff';
|
||||
const lum = (hex: string) => luminance(parseHex(hex) ?? { r: 255, g: 255, b: 255 });
|
||||
|
||||
/** The sheet's paper: a light colour of the palette apart from the page, else the page lightened. */
|
||||
function sheetOf(paper: string, accent2: string): string {
|
||||
const tried = [accent2, mixHex(paper, WHITE, 0.6), '#f8f4ea'];
|
||||
return tried.find((h) => lum(h) >= 0.72 && deltaE(h, paper) > 6) ?? '#f8f4ea';
|
||||
}
|
||||
|
||||
/** Where the prints go, as shares of the page: a large one, one beside it and a small one under that. */
|
||||
const SPOTS: readonly [number, number, number, number][] = [
|
||||
[0.1, 0.1, 0.48, 0.4],
|
||||
[0.62, 0.17, 0.28, 0.27],
|
||||
[0.6, 0.5, 0.3, 0.22],
|
||||
];
|
||||
|
||||
const LEAVES: readonly BookShapeId[] = ['leaf-long', 'leaf-oak', 'leaf'];
|
||||
|
||||
export function fieldNotes(k: CoverKit): CoverDraft {
|
||||
const { c, W, H, m } = k;
|
||||
const p = c.look.theme.palette;
|
||||
const draft: CoverDraft = { elements: [], groups: [] };
|
||||
const sheet = sheetOf(c.look.paper, p.accent2);
|
||||
const ink = inkOn(c, sheet);
|
||||
const tilt = -k.rng.range(1, 2.5);
|
||||
const inset = m * 0.55;
|
||||
const sheetFrame = clearOfTrim(k, frameOf(inset, inset, W - inset * 2, H - inset * 2), tilt);
|
||||
const lines = mixHex(ink, sheet, 0.86);
|
||||
const scale = Math.round(k.rng.range(0.55, 0.7) * 100) / 100;
|
||||
draft.elements.push({
|
||||
...shapeEl(k, 'rect', sheetFrame, sheet, tilt),
|
||||
paint: { type: 'pattern', pattern: 'grid', fg: lines, bg: sheet, scale, angle: 0 },
|
||||
});
|
||||
// The words take the foot of the sheet, left of the small print.
|
||||
const top = H * 0.62;
|
||||
const zone = frameOf(m, top, W * 0.54 - m, H - m - top);
|
||||
const leaf = p.accent3;
|
||||
const placed: BookFrame[] = [];
|
||||
const prints: BookPhotoElement[] = [];
|
||||
k.photos.slice(0, SPOTS.length).forEach((photo, i) => {
|
||||
const [x, y, w, h] = SPOTS[i] as [number, number, number, number];
|
||||
const turn = keptTurn(k, (i % 2 === 0 ? -1 : 1) * k.rng.range(2, 4));
|
||||
const print = printEl(k, photo, frameOf(W * x, H * y, W * w, H * h), {
|
||||
turn,
|
||||
border: { width: mmOn(k, 2.6), color: WHITE },
|
||||
shadow: true,
|
||||
});
|
||||
const box = turnedBox(print.frame, print.rotation);
|
||||
if (placed.some((o) => sharedArea(o, box) > 0) || sharedArea(box, zone) > 0) return;
|
||||
placed.push(box);
|
||||
prints.push(print);
|
||||
});
|
||||
// Pressed leaves on the sheet, behind the prints and clear of the words.
|
||||
const leaves: BookElement[] = [];
|
||||
const spots: [number, number][] = [
|
||||
[W * 0.07, H * 0.5],
|
||||
[W * 0.9, H * 0.86],
|
||||
];
|
||||
k.rng
|
||||
.shuffle(LEAVES)
|
||||
.slice(0, spots.length)
|
||||
.forEach((shape, i) => {
|
||||
const [cx, cy] = spots[i] as [number, number];
|
||||
const size = Math.min(W, H) * k.rng.range(0.16, 0.22);
|
||||
const turn = k.rng.range(-40, 40);
|
||||
const frame = clearOfTrim(k, frameOf(cx - size / 2, cy - size / 2, size, size), turn);
|
||||
if (sharedArea(turnedBox(frame, turn), zone) > 0) return;
|
||||
leaves.push({ ...shapeEl(k, shape, frame, leaf, turn), opacity: 0.9 });
|
||||
});
|
||||
draft.elements.push(...leaves);
|
||||
// Each print with its strip of tape over the top edge, the tape see-through so the picture shows under it.
|
||||
const tape = mixHex(sheet, c.look.accent, 0.22);
|
||||
for (const print of prints) {
|
||||
const tw = print.frame.w * 0.4;
|
||||
const th = mmOn(k, 7);
|
||||
const frame = frameOf(print.frame.x + (print.frame.w - tw) / 2, print.frame.y - th / 2, tw, th);
|
||||
const strip = { ...shapeEl(k, 'rect', frame, tape, print.rotation + k.rng.range(-7, 7)), opacity: 0.72 };
|
||||
const parts = [print, { ...strip, edge: 'zigzag' as const, edgeSize: mmOn(k, 1) }];
|
||||
draft.elements.push(...parts);
|
||||
draft.groups.push(parts.map((e) => e.id));
|
||||
}
|
||||
if (!addLockup(k, draft, { box: zone, ground: sheet }).length) notes(k, draft, zone, sheet, ink);
|
||||
const count = (c.art ?? CALM_ART).bare ? 0 : k.rng.int(1, 3);
|
||||
draft.elements.push(
|
||||
...placeStickers(c, draft.elements, {
|
||||
count,
|
||||
size: [0.1, 0.15],
|
||||
sides: ['single'],
|
||||
key: 'cover:field-notes',
|
||||
avoid: [zone],
|
||||
used: c.art?.used,
|
||||
}),
|
||||
);
|
||||
return draft;
|
||||
}
|
||||
|
||||
/** The notebook's own words in a box: the title, a line in the script, the dates in mono at the foot. */
|
||||
function notes(k: CoverKit, draft: CoverDraft, zone: BookFrame, sheet: string, ink: string): void {
|
||||
const words: BookTextElement[] = [];
|
||||
const script = k.sub.words.trim() || k.words.place || '';
|
||||
const dates = k.words.dates || k.words.year || '';
|
||||
const scriptH = script ? Math.min(mmOn(k, 14), zone.h * 0.26) : 0;
|
||||
const datesH = dates ? mmOn(k, 6) : 0;
|
||||
const titleH = zone.h - scriptH - datesH - mmOn(k, 2);
|
||||
if (k.title.words.trim()) {
|
||||
const frame = frameOf(zone.x, zone.y, zone.w, titleH);
|
||||
words.push(titleText(k, frame, { max: mmToPt(titleH * 0.6), color: ink, align: 'left', leading: 0.95 }));
|
||||
}
|
||||
if (script) {
|
||||
const frame = frameOf(zone.x, zone.y + titleH, zone.w, scriptH);
|
||||
const max = k.c.look.theme.fonts.script ? 26 : 14;
|
||||
const line = coverText(k, script, frame, { slot: 'script', max, color: accentOn(k.c, sheet), align: 'left' });
|
||||
const bound = script === k.sub.words.trim() && k.sub.bound;
|
||||
words.push(bound ? { ...line, binding: { source: 'journey.subtitle' } } : line);
|
||||
}
|
||||
if (dates) {
|
||||
const frame = frameOf(zone.x, zone.y + zone.h - datesH, zone.w, datesH);
|
||||
const line = coverText(k, dates, frame, { slot: 'heading', max: 8, color: ink, align: 'left', tracking: 0.12 });
|
||||
const mono: BookTextElement = { ...line, font: 'mono', weight: 400, fitMax: 8 };
|
||||
words.push({ ...mono, size: solveBookTextFit(mono, 8) });
|
||||
}
|
||||
draft.elements.push(...words);
|
||||
if (words.length > 1) draft.groups.push(words.map((e) => e.id));
|
||||
}
|
||||
@@ -15,7 +15,7 @@ import type {
|
||||
import { bookThemeFont, isBookFontFamily, mixHex, mutedOn } from '../theme/book-theme';
|
||||
import type { BookFontSlot, BookThemeFont } from '../theme/book-theme.schema';
|
||||
import { CALM_ART, withinTilt } from './design-art';
|
||||
import { bleedPage, frameOf, photoEl, type ComposeCtx } from './design-compose';
|
||||
import { bleedPage, frameOf, photoEl, printsAt, type ComposeCtx } from './design-compose';
|
||||
import { titleWords, type CoverWords } from './design-cover-words';
|
||||
import { designRng, type DesignRng } from './design-random';
|
||||
import { turnedBox } from './design-stickers';
|
||||
@@ -171,6 +171,12 @@ export function standOut(c: ComposeCtx, ground: string, skip: readonly string[]
|
||||
return tried.find((h) => deltaE(h, ground) > 18 && contrastRatio(h, ground) >= 1.4) ?? inkOn(c, ground);
|
||||
}
|
||||
|
||||
/** An accent small words read in on a ground (4.5:1), else the ink that reads there. */
|
||||
export function accentOn(c: ComposeCtx, ground: string): string {
|
||||
const p = c.look.theme.palette;
|
||||
return [c.look.accent, p.accent3, p.accent2].find((h) => contrastRatio(h, ground) >= 4.5) ?? inkOn(c, ground);
|
||||
}
|
||||
|
||||
/**
|
||||
* A lockup's tones on a ground: the ground as its paper, an ink and a muted
|
||||
* ink that read on it, and an accent that reads on it at 4.5:1, so the words
|
||||
@@ -397,6 +403,12 @@ export function spacedLine(k: PageKit, words: string, frame: BookFrame, color: s
|
||||
});
|
||||
}
|
||||
|
||||
/** A text on a band of a colour behind its words, set in the ink that reads on the band. */
|
||||
export function onBand(k: PageKit, el: BookTextElement, band: string): BookTextElement {
|
||||
const highlight = { color: band, alpha: 1, padX: mmOn(k, 1.6), padY: mmOn(k, 0.6), radius: 0 };
|
||||
return { ...el, color: inkOn(k.c, band), highlight };
|
||||
}
|
||||
|
||||
// ── shapes and photos ──────────────────────────────────────────────────────
|
||||
|
||||
/** A filled shape, unturned unless said, with no outline. */
|
||||
@@ -456,6 +468,19 @@ export function bleedPhoto(k: CoverKit, photo: AutoPhoto): BookPhotoElement {
|
||||
return photoEl(k.c, photo, bleedPage(k.c, 'single'), { bleed: { side: 'single' } });
|
||||
}
|
||||
|
||||
/**
|
||||
* A photo across the page in a band of it, to the bleed at both sides (a
|
||||
* magazine's picture under its masthead, a letterboxed still): to the bleed
|
||||
* when it prints sharp at that size, else as a print inside the margins over
|
||||
* the same rows, as the cover photo falls back.
|
||||
*/
|
||||
export function bandPhoto(k: CoverKit, photo: AutoPhoto, band: BookFrame): BookPhotoElement {
|
||||
if (printsAt(k.c, photo, band)) return photoEl(k.c, photo, band, { bleed: { side: 'single' } });
|
||||
const y = Math.max(band.y, k.m);
|
||||
const bottom = Math.min(band.y + band.h, k.H - k.m);
|
||||
return printEl(k, photo, frameOf(k.m, y, k.W - k.m * 2, bottom - y));
|
||||
}
|
||||
|
||||
interface PrintLook {
|
||||
turn?: number;
|
||||
border?: { width: number; color: string };
|
||||
|
||||
@@ -0,0 +1,142 @@
|
||||
import { luminance, parseHex } from '../book-colour';
|
||||
import { solveBookTextFit } from '../book-text-fit';
|
||||
import type { BookElement, BookFrame, BookLineElement, BookTextElement } from '../book.schema';
|
||||
import { mixHex } from '../theme/book-theme';
|
||||
import { frameOf } from './design-compose';
|
||||
import {
|
||||
accentOn,
|
||||
addLockup,
|
||||
bandPhoto,
|
||||
coverText,
|
||||
inkOn,
|
||||
mmOn,
|
||||
mmToPt,
|
||||
printEl,
|
||||
shapeEl,
|
||||
spacedLine,
|
||||
titleText,
|
||||
type CoverDraft,
|
||||
type CoverKit,
|
||||
} from './design-cover-kit';
|
||||
|
||||
/**
|
||||
* Night film: a dark cinematic page. The month and the place in mono in the
|
||||
* neon accent above a letterboxed still to the bleed, the title in tall
|
||||
* condensed capitals widely spaced with a short neon rule, and across the
|
||||
* foot a strip of film, its sprocket holes two dashed lines, holding the
|
||||
* next photos as frames.
|
||||
*/
|
||||
|
||||
const lum = (hex: string) => luminance(parseHex(hex) ?? { r: 255, g: 255, b: 255 });
|
||||
|
||||
/** The page's near black: the darker of the paper and the ink, taken towards black until it is one. */
|
||||
function nightOf(paper: string, ink: string): string {
|
||||
let night = lum(paper) <= lum(ink) ? paper : ink;
|
||||
for (let step = 0; step < 8 && lum(night) > 0.012; step++) night = mixHex(night, '#000000', 0.35);
|
||||
return night;
|
||||
}
|
||||
|
||||
/** A straight dashed line across a frame, as a row of sprocket holes. */
|
||||
function sprockets(k: CoverKit, frame: BookFrame, stroke: string): BookLineElement {
|
||||
return {
|
||||
id: k.c.newId('l'),
|
||||
kind: 'line',
|
||||
frame,
|
||||
rotation: 0,
|
||||
opacity: 1,
|
||||
locked: false,
|
||||
points: [
|
||||
{ x: 0, y: 0.5 },
|
||||
{ x: 1, y: 0.5 },
|
||||
],
|
||||
curve: 'straight',
|
||||
stroke,
|
||||
strokeWidth: Math.round(frame.h * 100) / 100,
|
||||
dash: 'dashed',
|
||||
squiggle: 'none',
|
||||
startCap: 'none',
|
||||
endCap: 'none',
|
||||
wobble: 0,
|
||||
ornament: 'none',
|
||||
};
|
||||
}
|
||||
|
||||
/** A line in mono, as a timecode is printed on the edge of a film. */
|
||||
function monoLine(
|
||||
k: CoverKit,
|
||||
words: string,
|
||||
frame: BookFrame,
|
||||
color: string,
|
||||
align: 'left' | 'right',
|
||||
): BookTextElement {
|
||||
const text = coverText(k, words, frame, { slot: 'heading', max: 8, color, align, tracking: 0.2 });
|
||||
const mono: BookTextElement = { ...text, font: 'mono', weight: 500, transform: 'upper', fitMax: 8 };
|
||||
return { ...mono, size: solveBookTextFit(mono, 8) };
|
||||
}
|
||||
|
||||
export function nightFilm(k: CoverKit): CoverDraft {
|
||||
const { c, W, H, b, m } = k;
|
||||
const night = nightOf(c.look.paper, c.look.ink);
|
||||
const draft: CoverDraft = { elements: [], groups: [], ...(night === c.look.paper ? {} : { background: night }) };
|
||||
const light = inkOn(c, night);
|
||||
const neon = accentOn(c, night);
|
||||
// Down the page: the timecode line, the still, the title, the strip.
|
||||
const metaH = mmOn(k, 6);
|
||||
const stillY = m + metaH + mmOn(k, 4);
|
||||
const stillH = Math.min(H * k.rng.range(0.36, 0.42), W * 0.46);
|
||||
const rest = H - m - (stillY + stillH) - mmOn(k, 12);
|
||||
const stripH = Math.min(rest * 0.5, W * 0.24);
|
||||
const stripY = H - m - stripH;
|
||||
const titleY = stillY + stillH + mmOn(k, 6);
|
||||
const titleBox = frameOf(m, titleY, W - m * 2, stripY - mmOn(k, 6) - titleY);
|
||||
const [photo, ...more] = k.photos;
|
||||
if (photo) draft.elements.push(bandPhoto(k, photo, frameOf(-b, stillY, W + b * 2, stillH)));
|
||||
// The film: a band a shade off the night, sprockets along both edges, the frames between them.
|
||||
const film = mixHex(night, light, 0.1);
|
||||
const hole = Math.max(0.6, stripH * 0.09);
|
||||
draft.elements.push(
|
||||
shapeEl(k, 'rect', frameOf(-b, stripY, W + b * 2, stripH), film),
|
||||
sprockets(k, frameOf(-b, stripY + stripH * 0.12 - hole / 2, W + b * 2, hole), mixHex(light, film, 0.3)),
|
||||
sprockets(k, frameOf(-b, stripY + stripH * 0.88 - hole / 2, W + b * 2, hole), mixHex(light, film, 0.3)),
|
||||
);
|
||||
const frames = more.slice(0, 3);
|
||||
const gap = mmOn(k, 3);
|
||||
const fw = frames.length ? (W - m * 2 - gap * (frames.length - 1)) / frames.length : 0;
|
||||
frames.forEach((p, i) => {
|
||||
draft.elements.push(printEl(k, p, frameOf(m + i * (fw + gap), stripY + stripH * 0.22, fw, stripH * 0.56)));
|
||||
});
|
||||
const meta: BookElement[] = [];
|
||||
const when = k.words.dates || k.words.year || '';
|
||||
const place = k.words.place ?? '';
|
||||
const half = (W - m * 2) / 2 - mmOn(k, 2);
|
||||
if (when) meta.push(monoLine(k, when, frameOf(m, m, half, metaH), neon, 'left'));
|
||||
if (place && place !== when) meta.push(monoLine(k, place, frameOf(W - m - half, m, half, metaH), neon, 'right'));
|
||||
draft.elements.push(...meta);
|
||||
if (meta.length > 1) draft.groups.push(meta.map((e) => e.id));
|
||||
if (addLockup(k, draft, { box: titleBox, ground: night }).length) return draft;
|
||||
const head: BookElement[] = [];
|
||||
const sub = k.sub.words.trim();
|
||||
const subH = sub ? mmOn(k, 7) : 0;
|
||||
if (k.title.words.trim()) {
|
||||
const box = frameOf(titleBox.x, titleBox.y, titleBox.w, titleBox.h - subH - mmOn(k, 3));
|
||||
head.push(
|
||||
titleText(k, box, {
|
||||
max: mmToPt(box.h * 0.85),
|
||||
color: light,
|
||||
transform: 'upper',
|
||||
tracking: 0.14,
|
||||
leading: 0.9,
|
||||
align: 'left',
|
||||
}),
|
||||
);
|
||||
}
|
||||
const ruleY = titleBox.y + titleBox.h - subH - mmOn(k, 1.5);
|
||||
head.push(shapeEl(k, 'rect', frameOf(m, ruleY, W * 0.16, Math.max(0.6, mmOn(k, 0.8))), neon));
|
||||
if (sub) {
|
||||
const line = spacedLine(k, sub, frameOf(m, titleBox.y + titleBox.h - subH, W * 0.6, subH), neon, 9);
|
||||
head.push({ ...line, align: 'left', ...(k.sub.bound ? { binding: { source: 'journey.subtitle' as const } } : {}) });
|
||||
}
|
||||
draft.elements.push(...head);
|
||||
if (head.length > 1) draft.groups.push(head.map((e) => e.id));
|
||||
return draft;
|
||||
}
|
||||
@@ -0,0 +1,117 @@
|
||||
import { luminance, parseHex } from '../book-colour';
|
||||
import type { BookElement, BookFrame } from '../book.schema';
|
||||
import { CALM_ART } from './design-art';
|
||||
import { frameOf } from './design-compose';
|
||||
import {
|
||||
addLockup,
|
||||
clearOfTrim,
|
||||
inkOn,
|
||||
keptTurn,
|
||||
mmOn,
|
||||
mmToPt,
|
||||
onBand,
|
||||
printEl,
|
||||
shapeEl,
|
||||
spacedLine,
|
||||
standOut,
|
||||
titleText,
|
||||
type CoverDraft,
|
||||
type CoverKit,
|
||||
} from './design-cover-kit';
|
||||
import { placeStickers, turnedBox } from './design-stickers';
|
||||
|
||||
/**
|
||||
* Riso print: a page printed in two or three spot inks, each a little out of
|
||||
* register with the next. A disc of one ink and a halftone disc of another
|
||||
* laid over it off centre, the cover photo as a duotone of the book's ink on
|
||||
* a block of the first ink that shows past its edge, the title in heavy
|
||||
* capitals with a hard shadow of that ink beside it, the subtitle and the
|
||||
* year on bands of their own, and a few doodles.
|
||||
*/
|
||||
|
||||
/** The darker and the lighter of two colours, for a duotone that keeps its tones the right way round in any theme. */
|
||||
function tonesOf(a: string, b: string): { dark: string; light: string } {
|
||||
const lum = (h: string) => luminance(parseHex(h) ?? { r: 255, g: 255, b: 255 });
|
||||
return lum(a) <= lum(b) ? { dark: a, light: b } : { dark: b, light: a };
|
||||
}
|
||||
|
||||
/** A box moved down until it starts below `top`, or left where it is. */
|
||||
const below = (box: BookFrame, top: number): BookFrame => (box.y >= top ? box : { ...box, y: top });
|
||||
|
||||
export function riso(k: CoverKit): CoverDraft {
|
||||
const { c, W, H, m } = k;
|
||||
const draft: CoverDraft = { elements: [], groups: [] };
|
||||
const ground = c.look.paper;
|
||||
const first = standOut(c, ground);
|
||||
const second = standOut(c, ground, [first]);
|
||||
const titleZone = frameOf(m, m, W - m * 2, H * 0.3);
|
||||
const titleFoot = titleZone.y + titleZone.h + mmOn(k, 12);
|
||||
const photo = k.photos[0];
|
||||
const pw = W * k.rng.range(0.5, 0.56);
|
||||
const ph = Math.min(H * 0.46, H - m - titleFoot);
|
||||
const at = frameOf(W - m - pw - k.rng.range(0, 0.04) * W, H - m - ph, pw, ph);
|
||||
// The two inks of the discs, the second laid over the first a few millimetres off.
|
||||
const d = Math.min(W, H) * k.rng.range(0.5, 0.6);
|
||||
const miss = mmOn(k, k.rng.range(3, 5));
|
||||
const disc = clearOfTrim(k, below(frameOf(at.x - d * 0.45, at.y + at.h * 0.35 - d / 2, d, d), titleFoot));
|
||||
const solid = shapeEl(k, 'ellipse', disc, second);
|
||||
const dots = shapeEl(k, 'ellipse', clearOfTrim(k, frameOf(disc.x + miss, disc.y - miss, d, d)), first);
|
||||
const scale = Math.round(k.rng.range(0.35, 0.5) * 100) / 100;
|
||||
draft.elements.push(
|
||||
{ ...solid, opacity: 0.85 },
|
||||
{ ...dots, paint: { type: 'pattern', pattern: 'dots', fg: first, bg: null, scale, angle: 45 } },
|
||||
);
|
||||
let photoBox: BookFrame | null = null;
|
||||
if (photo) {
|
||||
const turn = keptTurn(k, k.rng.sign() * k.rng.range(1.5, 3));
|
||||
const print = printEl(k, photo, at, { turn });
|
||||
const shift = mmOn(k, k.rng.range(2.5, 4));
|
||||
const offset = frameOf(print.frame.x - shift, print.frame.y + shift, print.frame.w, print.frame.h);
|
||||
const block = shapeEl(k, 'rect', offset, first, print.rotation);
|
||||
draft.elements.push(block, { ...print, duotone: tonesOf(c.look.ink, c.look.paper) });
|
||||
photoBox = turnedBox(offset, print.rotation);
|
||||
}
|
||||
const ink = inkOn(c, ground);
|
||||
const head: BookElement[] = [];
|
||||
if (!addLockup(k, draft, { box: titleZone, ground }).length) {
|
||||
if (k.title.words.trim()) {
|
||||
const title = titleText(k, titleZone, {
|
||||
max: mmToPt(titleZone.h / 2 / 0.95),
|
||||
color: ink,
|
||||
transform: 'upper',
|
||||
leading: 0.92,
|
||||
weight: 800,
|
||||
align: 'left',
|
||||
});
|
||||
const dx = mmOn(k, 1.6);
|
||||
head.push({ ...title, shadow: { dx, dy: dx, color: first, alpha: 1 } });
|
||||
}
|
||||
const sub = k.sub.words.trim();
|
||||
if (sub) {
|
||||
const line = spacedLine(k, sub, frameOf(m, titleZone.y + titleZone.h + mmOn(k, 3), W * 0.5, mmOn(k, 7)), ink, 10);
|
||||
const bound = k.sub.bound ? { ...line, binding: { source: 'journey.subtitle' as const } } : line;
|
||||
head.push(onBand(k, { ...bound, align: 'left' }, ground));
|
||||
}
|
||||
draft.elements.push(...head);
|
||||
if (head.length > 1) draft.groups.push(head.map((t) => t.id));
|
||||
}
|
||||
const year = k.words.year ?? '';
|
||||
// The year on a band of the second ink at the foot, left of the photo and its block.
|
||||
const room = (photoBox ? photoBox.x : W - m) - m - mmOn(k, 4);
|
||||
if (year && room > mmOn(k, 18)) {
|
||||
const frame = frameOf(m, H - m - mmOn(k, 7), Math.min(room, mmOn(k, 40)), mmOn(k, 7));
|
||||
draft.elements.push(onBand(k, { ...spacedLine(k, year, frame, ink, 9), align: 'left' }, second));
|
||||
}
|
||||
const count = (c.art ?? CALM_ART).bare ? 0 : k.rng.int(2, 4);
|
||||
draft.elements.push(
|
||||
...placeStickers(c, draft.elements, {
|
||||
count,
|
||||
size: [0.1, 0.16],
|
||||
sides: ['single'],
|
||||
key: 'cover:riso',
|
||||
avoid: [titleZone],
|
||||
used: c.art?.used,
|
||||
}),
|
||||
);
|
||||
return draft;
|
||||
}
|
||||
@@ -0,0 +1,96 @@
|
||||
import { deltaE } from '../book-colour';
|
||||
import type { BookElement } from '../book.schema';
|
||||
import { mixHex } from '../theme/book-theme';
|
||||
import { frameOf } from './design-compose';
|
||||
import {
|
||||
addLockup,
|
||||
inkOn,
|
||||
mmOn,
|
||||
mmToPt,
|
||||
printEl,
|
||||
shapeEl,
|
||||
spacedLine,
|
||||
titleText,
|
||||
type CoverDraft,
|
||||
type CoverKit,
|
||||
} from './design-cover-kit';
|
||||
|
||||
/**
|
||||
* Vintage poster: a travel poster of the 1950s. A thin rule framing the
|
||||
* page, and inside it a scenic panel of flat colour: a sky, a sun with its
|
||||
* rays at the horizon, two ranges of mountains and a band of sea, the cover
|
||||
* photo standing in an arch before the sun with a white cut edge, and under
|
||||
* the panel the title stacked in the display face with the month at the foot.
|
||||
*/
|
||||
|
||||
const WHITE = '#ffffff';
|
||||
|
||||
/** A colour of the palette that stands apart from another (delta E over 18), else the fallback. */
|
||||
const apart = (want: string, from: string, fallback: string) => (deltaE(want, from) > 18 ? want : fallback);
|
||||
|
||||
export function vintagePoster(k: CoverKit): CoverDraft {
|
||||
const { c, W, H, m } = k;
|
||||
const p = c.look.theme.palette;
|
||||
const draft: CoverDraft = { elements: [], groups: [] };
|
||||
const ground = c.look.paper;
|
||||
const ink = inkOn(c, ground);
|
||||
const sun = c.look.accent;
|
||||
const sky = apart(mixHex(p.accent3, ground, 0.3), sun, mixHex(p.accent2, ground, 0.45));
|
||||
const near = apart(p.accent2, sky, mixHex(ink, sky, 0.35));
|
||||
const far = mixHex(near, sky, 0.45);
|
||||
const sea = mixHex(near, ink, 0.25);
|
||||
const hair = Math.max(0.3, mmOn(k, 0.6));
|
||||
const edge = mmOn(k, 3.5);
|
||||
const border = { ...shapeEl(k, 'rect', frameOf(edge, edge, W - edge * 2, H - edge * 2), ink), fill: null };
|
||||
draft.elements.push({ ...border, stroke: ink, strokeWidth: hair });
|
||||
const inset = mmOn(k, 7);
|
||||
const panel = frameOf(inset, inset, W - inset * 2, H * k.rng.range(0.6, 0.64) - inset);
|
||||
const horizon = panel.y + panel.h * k.rng.range(0.5, 0.56);
|
||||
const rays = Math.min(panel.w, panel.h) * 0.92;
|
||||
const ry = Math.min(Math.max(horizon - rays / 2, panel.y), panel.y + panel.h - rays);
|
||||
const disc = rays * 0.6;
|
||||
draft.elements.push(
|
||||
shapeEl(k, 'rect', panel, sky),
|
||||
{ ...shapeEl(k, 'sunburst-24', frameOf(W / 2 - rays / 2, ry, rays, rays), mixHex(sun, sky, 0.5)), opacity: 0.7 },
|
||||
shapeEl(k, 'ellipse', frameOf(W / 2 - disc / 2, ry + (rays - disc) / 2, disc, disc), sun),
|
||||
);
|
||||
// The ranges from the horizon down to the panel's foot, the far one paler, the sea in front of them.
|
||||
const foot = panel.y + panel.h;
|
||||
const farW = panel.w * k.rng.range(0.6, 0.7);
|
||||
const nearW = panel.w * k.rng.range(0.62, 0.72);
|
||||
const left = k.rng.chance(0.5);
|
||||
const seaH = panel.h * 0.12;
|
||||
const farX = left ? panel.x : panel.x + panel.w - farW;
|
||||
const nearX = left ? panel.x + panel.w - nearW : panel.x;
|
||||
const nearY = horizon + (foot - horizon) * 0.25;
|
||||
draft.elements.push(
|
||||
shapeEl(k, 'mountain', frameOf(farX, horizon, farW, foot - horizon), far),
|
||||
shapeEl(k, 'mountain', frameOf(nearX, nearY, nearW, foot - nearY), near),
|
||||
shapeEl(k, 'rect', frameOf(panel.x, foot - seaH, panel.w, seaH), sea),
|
||||
);
|
||||
const photo = k.photos[0];
|
||||
if (photo) {
|
||||
const ph = panel.h * 0.74;
|
||||
const pw = Math.min(ph * 0.58, panel.w * 0.42);
|
||||
const arch = printEl(k, photo, frameOf(W / 2 - pw / 2, foot - ph - mmOn(k, 3), pw, ph), {
|
||||
mask: 'arch-tall',
|
||||
cutout: { width: mmOn(k, 2), color: WHITE },
|
||||
});
|
||||
draft.elements.push(arch);
|
||||
}
|
||||
// Under the panel: the title stacked in the display face, the month or the year at the foot.
|
||||
const line = k.words.dates || k.words.year || '';
|
||||
const lineH = line ? mmOn(k, 7) : 0;
|
||||
const top = foot + mmOn(k, 5);
|
||||
const box = frameOf(m, top, W - m * 2, H - m - top - lineH - mmOn(k, 2));
|
||||
const words: BookElement[] = [];
|
||||
if (!addLockup(k, draft, { box: frameOf(box.x, box.y, box.w, H - m - top), ground }).length) {
|
||||
if (k.title.words.trim()) {
|
||||
words.push(titleText(k, box, { max: mmToPt(box.h * 0.8), color: ink, transform: 'upper', leading: 0.92 }));
|
||||
}
|
||||
if (line) words.push(spacedLine(k, line, frameOf(m, H - m - lineH, W - m * 2, lineH), ink, 9));
|
||||
draft.elements.push(...words);
|
||||
if (words.length > 1) draft.groups.push(words.map((e) => e.id));
|
||||
}
|
||||
return draft;
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
import { BOOK_COVER_ARCHETYPES, type BookCoverArchetype } from '../book-archetypes';
|
||||
import { luminance, parseHex } from '../book-colour';
|
||||
import { bookSpreadSchema, type BookElement, type BookSpread } from '../book.schema';
|
||||
import { pageFindings } from '../describe-spread';
|
||||
import { BOOK_STICKERS } from '../stickers/sticker-catalogue';
|
||||
@@ -11,7 +12,7 @@ import { fileURLToPath } from 'node:url';
|
||||
import { describe, expect, it } from 'vitest';
|
||||
|
||||
/**
|
||||
* The seven composed covers (design-cover.ts) on the fixture journeys: each
|
||||
* The twelve composed covers (design-cover.ts) on the fixture journeys: each
|
||||
* a valid page, its words inside the page, nothing left for the repair to
|
||||
* flag, its archetype's signature there, the same for one seed and another
|
||||
* for another seed, and the cover of a design without an archetype exactly
|
||||
@@ -73,6 +74,38 @@ const SIGNATURE: Record<BookCoverArchetype, (s: BookSpread, W: number, H: number
|
||||
photos(s).some((p) => p.mask === 'arch-tall') &&
|
||||
photos(s).some((p) => p.edge === 'perforated') &&
|
||||
shapes(s).some((e) => e.shape === 'ellipse' && e.fill === null),
|
||||
riso: (s) =>
|
||||
shapes(s).some((e) => e.paint?.type === 'pattern' && e.paint.pattern === 'dots') &&
|
||||
texts(s).some((t) => t.binding?.source === 'journey.title' && !!t.shadow) &&
|
||||
photos(s).some(
|
||||
(p) =>
|
||||
!!p.duotone &&
|
||||
shapes(s).some(
|
||||
(e) =>
|
||||
e.shape === 'rect' &&
|
||||
Math.abs(e.frame.w - p.frame.w) < 0.5 &&
|
||||
Math.abs(e.frame.h - p.frame.h) < 0.5 &&
|
||||
(e.frame.x !== p.frame.x || e.frame.y !== p.frame.y),
|
||||
),
|
||||
),
|
||||
editorial: (s, W, H) =>
|
||||
shapes(s).some((e) => e.shape === 'rect' && e.frame.h <= 1 && e.frame.w >= W * 0.6) &&
|
||||
texts(s).some((t) => t.binding?.source === 'journey.title' && t.frame.y + t.frame.h <= H * 0.32) &&
|
||||
photos(s).some((p) => p.frame.w >= W * 0.6),
|
||||
'vintage-poster': (s, W) =>
|
||||
shapes(s).filter((e) => e.shape === 'mountain').length >= 2 &&
|
||||
shapes(s).some((e) => e.shape === 'sunburst-24') &&
|
||||
shapes(s).some((e) => e.fill === null && !!e.stroke && e.frame.w >= W * 0.8) &&
|
||||
photos(s).every((p) => p.mask === 'arch-tall'),
|
||||
'night-film': (s, W) =>
|
||||
luminance(parseHex(s.background ?? '#ffffff') ?? { r: 255, g: 255, b: 255 }) < 0.05 &&
|
||||
kinds(s, 'line').filter((e) => e.kind === 'line' && e.dash === 'dashed').length >= 2 &&
|
||||
shapes(s).some((e) => e.shape === 'rect' && e.frame.w >= W),
|
||||
'field-notes': (s) =>
|
||||
shapes(s).some((e) => e.paint?.type === 'pattern' && e.paint.pattern === 'grid') &&
|
||||
shapes(s).some((e) => e.shape.startsWith('leaf')) &&
|
||||
photos(s).length > 0 &&
|
||||
photos(s).every((p) => !!p.border),
|
||||
};
|
||||
|
||||
/** Every word on a cover lies on the page, turned with its frame; every other element at least touches it. */
|
||||
|
||||
@@ -4,6 +4,8 @@ import { solveBookTextFit } from '../book-text-fit';
|
||||
import type { BookElement, BookSpread } from '../book.schema';
|
||||
import { frameOf, scrimEl, type ComposeCtx } from './design-compose';
|
||||
import { gridBadge, stampCollage } from './design-cover-collage';
|
||||
import { editorial } from './design-cover-editorial';
|
||||
import { fieldNotes } from './design-cover-field-notes';
|
||||
import { postcard, posterPop } from './design-cover-graphic';
|
||||
import {
|
||||
addLockup,
|
||||
@@ -13,12 +15,15 @@ import {
|
||||
type CoverKit,
|
||||
type CoverMaterial,
|
||||
} from './design-cover-kit';
|
||||
import { nightFilm } from './design-cover-night-film';
|
||||
import { cutout, minimalSerif, spineBand } from './design-cover-photo';
|
||||
import { riso } from './design-cover-riso';
|
||||
import { vintagePoster } from './design-cover-vintage-poster';
|
||||
import { titleWords, type CoverWords } from './design-cover-words';
|
||||
import { paperBackground } from './design-style';
|
||||
|
||||
/**
|
||||
* The composed covers: `cover.archetype` picks one of seven composers, each
|
||||
* The composed covers: `cover.archetype` picks one of twelve composers, each
|
||||
* building its archetype from the book's own material (its photos, its words,
|
||||
* its theme's colours, faces and motifs, the lockups) with the seed's
|
||||
* variation, deterministic for one seed. A cover without an archetype is the
|
||||
@@ -33,6 +38,11 @@ const COMPOSERS: Readonly<Record<BookCoverArchetype, (k: CoverKit) => CoverDraft
|
||||
'grid-badge': gridBadge,
|
||||
'minimal-serif': minimalSerif,
|
||||
'stamp-collage': stampCollage,
|
||||
riso,
|
||||
editorial,
|
||||
'vintage-poster': vintagePoster,
|
||||
'night-film': nightFilm,
|
||||
'field-notes': fieldNotes,
|
||||
};
|
||||
|
||||
/** A draft as the cover page: on its ground, each lockup one group. */
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,844 @@
|
||||
import type { BookDecoratedTemplate } from '../template-format';
|
||||
|
||||
/**
|
||||
* More grid and badge pages: a cover of eight tiles round a red centre
|
||||
* badge, a words only spread with a large seal and the story, and a spread
|
||||
* of a hero photo with a scalloped badge beside six tall tiles. Drawn in
|
||||
* grid-badge.
|
||||
*
|
||||
* Drawn on a 210 mm page and kept as fractions of it (template-format.ts),
|
||||
* in the colours and faces of the theme named above; their links let any
|
||||
* other theme recolour them.
|
||||
*/
|
||||
export const MORE_GRID_BADGE: readonly BookDecoratedTemplate[] = [
|
||||
{
|
||||
id: 'grid-badge-tiles',
|
||||
labelKey: 'studio.templates.name.gridBadgeTiles',
|
||||
kind: 'single',
|
||||
archetype: 'grid-badge',
|
||||
tags: ['grid', 'eight-photos', 'badge', 'tiles', 'red', 'postmark', 'graphic'],
|
||||
descr:
|
||||
'Eight bleed photos three by three with 4 mm white gutters round a red centre tile holding a white hairline ring, a script line, the title in heavy capitals, a short rule and the year, an ink postmark on its corner.',
|
||||
background: null,
|
||||
backgroundToken: 'paper',
|
||||
elements: [
|
||||
{
|
||||
id: 'p1',
|
||||
role: 'photo:1',
|
||||
frame: { x: -0.0143, y: -0.0143, w: 0.3302, h: 0.3302 },
|
||||
rotation: 0,
|
||||
opacity: 1,
|
||||
locked: false,
|
||||
kind: 'photo',
|
||||
photoId: null,
|
||||
fit: 'cover',
|
||||
focalX: 0.5,
|
||||
focalY: 0.5,
|
||||
radius: 0,
|
||||
filter: 'none',
|
||||
mask: null,
|
||||
frameStyle: 'none',
|
||||
},
|
||||
{
|
||||
id: 'p2',
|
||||
role: 'photo:2',
|
||||
frame: { x: 0.3349, y: -0.0143, w: 0.3302, h: 0.3302 },
|
||||
rotation: 0,
|
||||
opacity: 1,
|
||||
locked: false,
|
||||
kind: 'photo',
|
||||
photoId: null,
|
||||
fit: 'cover',
|
||||
focalX: 0.5,
|
||||
focalY: 0.5,
|
||||
radius: 0,
|
||||
filter: 'none',
|
||||
mask: null,
|
||||
frameStyle: 'none',
|
||||
},
|
||||
{
|
||||
id: 'p3',
|
||||
role: 'photo:3',
|
||||
frame: { x: 0.6841, y: -0.0143, w: 0.3302, h: 0.3302 },
|
||||
rotation: 0,
|
||||
opacity: 1,
|
||||
locked: false,
|
||||
kind: 'photo',
|
||||
photoId: null,
|
||||
fit: 'cover',
|
||||
focalX: 0.5,
|
||||
focalY: 0.5,
|
||||
radius: 0,
|
||||
filter: 'none',
|
||||
mask: null,
|
||||
frameStyle: 'none',
|
||||
},
|
||||
{
|
||||
id: 'p4',
|
||||
role: 'photo:4',
|
||||
frame: { x: -0.0143, y: 0.3349, w: 0.3302, h: 0.3302 },
|
||||
rotation: 0,
|
||||
opacity: 1,
|
||||
locked: false,
|
||||
kind: 'photo',
|
||||
photoId: null,
|
||||
fit: 'cover',
|
||||
focalX: 0.5,
|
||||
focalY: 0.5,
|
||||
radius: 0,
|
||||
filter: 'none',
|
||||
mask: null,
|
||||
frameStyle: 'none',
|
||||
},
|
||||
{
|
||||
id: 'p5',
|
||||
role: 'photo:5',
|
||||
frame: { x: 0.6841, y: 0.3349, w: 0.3302, h: 0.3302 },
|
||||
rotation: 0,
|
||||
opacity: 1,
|
||||
locked: false,
|
||||
kind: 'photo',
|
||||
photoId: null,
|
||||
fit: 'cover',
|
||||
focalX: 0.5,
|
||||
focalY: 0.5,
|
||||
radius: 0,
|
||||
filter: 'none',
|
||||
mask: null,
|
||||
frameStyle: 'none',
|
||||
},
|
||||
{
|
||||
id: 'p6',
|
||||
role: 'photo:6',
|
||||
frame: { x: -0.0143, y: 0.6841, w: 0.3302, h: 0.3302 },
|
||||
rotation: 0,
|
||||
opacity: 1,
|
||||
locked: false,
|
||||
kind: 'photo',
|
||||
photoId: null,
|
||||
fit: 'cover',
|
||||
focalX: 0.5,
|
||||
focalY: 0.5,
|
||||
radius: 0,
|
||||
filter: 'none',
|
||||
mask: null,
|
||||
frameStyle: 'none',
|
||||
},
|
||||
{
|
||||
id: 'p7',
|
||||
role: 'photo:7',
|
||||
frame: { x: 0.3349, y: 0.6841, w: 0.3302, h: 0.3302 },
|
||||
rotation: 0,
|
||||
opacity: 1,
|
||||
locked: false,
|
||||
kind: 'photo',
|
||||
photoId: null,
|
||||
fit: 'cover',
|
||||
focalX: 0.5,
|
||||
focalY: 0.5,
|
||||
radius: 0,
|
||||
filter: 'none',
|
||||
mask: null,
|
||||
frameStyle: 'none',
|
||||
},
|
||||
{
|
||||
id: 'p8',
|
||||
role: 'photo:8',
|
||||
frame: { x: 0.6841, y: 0.6841, w: 0.3302, h: 0.3302 },
|
||||
rotation: 0,
|
||||
opacity: 1,
|
||||
locked: false,
|
||||
kind: 'photo',
|
||||
photoId: null,
|
||||
fit: 'cover',
|
||||
focalX: 0.5,
|
||||
focalY: 0.5,
|
||||
radius: 0,
|
||||
filter: 'none',
|
||||
mask: null,
|
||||
frameStyle: 'none',
|
||||
},
|
||||
{
|
||||
id: 's9',
|
||||
frame: { x: 0.3349, y: 0.3349, w: 0.3302, h: 0.3302 },
|
||||
rotation: 0,
|
||||
opacity: 1,
|
||||
locked: false,
|
||||
group: 'badge',
|
||||
kind: 'shape',
|
||||
shape: 'rect',
|
||||
fill: '#e2412f',
|
||||
gradient: 'none',
|
||||
stroke: null,
|
||||
token: 'accent',
|
||||
strokeWidth: 0,
|
||||
strokeStyle: 'solid',
|
||||
radius: 0,
|
||||
},
|
||||
{
|
||||
id: 's10',
|
||||
keep: true,
|
||||
frame: { x: 0.3619, y: 0.3619, w: 0.2762, h: 0.2762 },
|
||||
rotation: 0,
|
||||
opacity: 1,
|
||||
locked: false,
|
||||
group: 'badge',
|
||||
kind: 'shape',
|
||||
shape: 'ellipse',
|
||||
fill: null,
|
||||
gradient: 'none',
|
||||
stroke: '#ffffff',
|
||||
strokeToken: 'paper',
|
||||
strokeWidth: 0.0019,
|
||||
strokeStyle: 'solid',
|
||||
radius: 0,
|
||||
},
|
||||
{
|
||||
id: 't11',
|
||||
role: 'subtitle',
|
||||
keep: true,
|
||||
on: 'accent',
|
||||
frame: { x: 0.4048, y: 0.3952, w: 0.1905, h: 0.0476 },
|
||||
rotation: 0,
|
||||
opacity: 1,
|
||||
locked: false,
|
||||
group: 'badge',
|
||||
kind: 'text',
|
||||
text: '',
|
||||
font: 'allura',
|
||||
size: 0.0667,
|
||||
weight: 400,
|
||||
italic: false,
|
||||
align: 'center',
|
||||
leading: 1,
|
||||
tracking: 0,
|
||||
color: '#ffffff',
|
||||
token: 'paper',
|
||||
fontRole: 'script',
|
||||
binding: null,
|
||||
overridden: false,
|
||||
vAlign: 'bottom',
|
||||
fit: 'shrink',
|
||||
fitMax: 0.0667,
|
||||
},
|
||||
{
|
||||
id: 't12',
|
||||
role: 'title',
|
||||
keep: true,
|
||||
on: 'accent',
|
||||
frame: { x: 0.3857, y: 0.4476, w: 0.2286, h: 0.0857 },
|
||||
rotation: 0,
|
||||
opacity: 1,
|
||||
locked: false,
|
||||
group: 'badge',
|
||||
kind: 'text',
|
||||
text: '',
|
||||
font: 'montserrat',
|
||||
size: 0.0952,
|
||||
weight: 800,
|
||||
italic: false,
|
||||
align: 'center',
|
||||
leading: 0.95,
|
||||
tracking: 0,
|
||||
color: '#ffffff',
|
||||
token: 'paper',
|
||||
fontRole: 'display',
|
||||
binding: null,
|
||||
overridden: false,
|
||||
transform: 'upper',
|
||||
vAlign: 'middle',
|
||||
fit: 'shrink',
|
||||
fitMax: 0.0952,
|
||||
},
|
||||
{
|
||||
id: 's13',
|
||||
keep: true,
|
||||
frame: { x: 0.4762, y: 0.5429, w: 0.0476, h: 0.0038 },
|
||||
rotation: 0,
|
||||
opacity: 1,
|
||||
locked: false,
|
||||
group: 'badge',
|
||||
kind: 'shape',
|
||||
shape: 'rect',
|
||||
fill: '#ffffff',
|
||||
gradient: 'none',
|
||||
stroke: null,
|
||||
token: 'paper',
|
||||
strokeWidth: 0,
|
||||
strokeStyle: 'solid',
|
||||
radius: 0,
|
||||
},
|
||||
{
|
||||
id: 't14',
|
||||
role: 'date',
|
||||
keep: true,
|
||||
on: 'accent',
|
||||
frame: { x: 0.4048, y: 0.5571, w: 0.1905, h: 0.0333 },
|
||||
rotation: 0,
|
||||
opacity: 1,
|
||||
locked: false,
|
||||
group: 'badge',
|
||||
kind: 'text',
|
||||
text: '',
|
||||
font: 'montserrat',
|
||||
size: 0.0333,
|
||||
weight: 600,
|
||||
italic: false,
|
||||
align: 'center',
|
||||
leading: 1,
|
||||
tracking: 0.4,
|
||||
color: '#ffffff',
|
||||
token: 'paper',
|
||||
fontRole: 'heading',
|
||||
binding: null,
|
||||
overridden: false,
|
||||
transform: 'upper',
|
||||
vAlign: 'middle',
|
||||
fit: 'shrink',
|
||||
fitMax: 0.0333,
|
||||
},
|
||||
{
|
||||
id: 's15',
|
||||
tint: { colors: ['ink'] },
|
||||
frame: { x: 0.6, y: 0.6476, w: 0.1714, h: 0.0997 },
|
||||
rotation: -12,
|
||||
opacity: 0.85,
|
||||
locked: false,
|
||||
kind: 'sticker',
|
||||
stickerId: 'postmark',
|
||||
colors: ['#141414'],
|
||||
flipX: false,
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
id: 'grid-badge-letter',
|
||||
labelKey: 'studio.templates.name.gridBadgeLetter',
|
||||
kind: 'inner',
|
||||
archetype: 'grid-badge',
|
||||
tags: ['words-only', 'story', 'seal', 'badge', 'squared-paper', 'airmail', 'calm'],
|
||||
descr:
|
||||
'The left page cream squared paper with a large red seal holding the subtitle round its rim, the title in heavy capitals and the date; the right page a dashed airmail line to a small plane, the long story and a passport stamp.',
|
||||
background: null,
|
||||
backgroundToken: 'paper',
|
||||
elements: [
|
||||
{
|
||||
id: 's1',
|
||||
tint: { fg: 'accent3', bg: 'accent2' },
|
||||
frame: { x: -0.0143, y: -0.0143, w: 1.0143, h: 1.0286 },
|
||||
rotation: 0,
|
||||
opacity: 1,
|
||||
locked: false,
|
||||
kind: 'shape',
|
||||
shape: 'rect',
|
||||
fill: '#6f6f6f',
|
||||
gradient: 'none',
|
||||
paint: { type: 'pattern', pattern: 'grid', fg: '#6f6f6f', bg: '#f2eee7', scale: 1.2, angle: 0 },
|
||||
stroke: null,
|
||||
token: 'accent3',
|
||||
strokeWidth: 0,
|
||||
strokeStyle: 'solid',
|
||||
radius: 0,
|
||||
},
|
||||
{
|
||||
id: 's2',
|
||||
keep: true,
|
||||
frame: { x: 0.1857, y: 0.1457, w: 0.6286, h: 0.6286 },
|
||||
rotation: 0,
|
||||
opacity: 1,
|
||||
locked: false,
|
||||
group: 'badge',
|
||||
kind: 'shape',
|
||||
shape: 'seal',
|
||||
fill: '#e2412f',
|
||||
gradient: 'none',
|
||||
stroke: null,
|
||||
token: 'accent',
|
||||
strokeWidth: 0,
|
||||
strokeStyle: 'solid',
|
||||
radius: 0,
|
||||
},
|
||||
{
|
||||
id: 's3',
|
||||
keep: true,
|
||||
frame: { x: 0.2429, y: 0.2029, w: 0.5143, h: 0.5143 },
|
||||
rotation: 0,
|
||||
opacity: 1,
|
||||
locked: false,
|
||||
group: 'badge',
|
||||
kind: 'shape',
|
||||
shape: 'ellipse',
|
||||
fill: null,
|
||||
gradient: 'none',
|
||||
stroke: '#ffffff',
|
||||
strokeToken: 'paper',
|
||||
strokeWidth: 0.0019,
|
||||
strokeStyle: 'solid',
|
||||
radius: 0,
|
||||
},
|
||||
{
|
||||
id: 't4',
|
||||
role: 'subtitle',
|
||||
keep: true,
|
||||
on: 'accent',
|
||||
frame: { x: 0.2619, y: 0.2219, w: 0.4762, h: 0.4762 },
|
||||
rotation: 0,
|
||||
opacity: 1,
|
||||
locked: false,
|
||||
group: 'badge',
|
||||
kind: 'text',
|
||||
text: '',
|
||||
font: 'montserrat',
|
||||
size: 0.0429,
|
||||
weight: 600,
|
||||
italic: false,
|
||||
align: 'center',
|
||||
leading: 1,
|
||||
tracking: 0.3,
|
||||
color: '#ffffff',
|
||||
token: 'paper',
|
||||
fontRole: 'heading',
|
||||
binding: null,
|
||||
overridden: false,
|
||||
transform: 'upper',
|
||||
vAlign: 'middle',
|
||||
curve: { type: 'circle', bend: 40, start: 0 },
|
||||
fit: 'shrink',
|
||||
fitMax: 0.0429,
|
||||
},
|
||||
{
|
||||
id: 't5',
|
||||
role: 'title',
|
||||
keep: true,
|
||||
on: 'accent',
|
||||
frame: { x: 0.3095, y: 0.3905, w: 0.381, h: 0.1238 },
|
||||
rotation: 0,
|
||||
opacity: 1,
|
||||
locked: false,
|
||||
group: 'badge',
|
||||
kind: 'text',
|
||||
text: '',
|
||||
font: 'montserrat',
|
||||
size: 0.1524,
|
||||
weight: 800,
|
||||
italic: false,
|
||||
align: 'center',
|
||||
leading: 0.95,
|
||||
tracking: 0,
|
||||
color: '#ffffff',
|
||||
token: 'paper',
|
||||
fontRole: 'display',
|
||||
binding: null,
|
||||
overridden: false,
|
||||
transform: 'upper',
|
||||
vAlign: 'middle',
|
||||
fit: 'shrink',
|
||||
fitMax: 0.1524,
|
||||
},
|
||||
{
|
||||
id: 's6',
|
||||
keep: true,
|
||||
frame: { x: 0.4619, y: 0.5238, w: 0.0762, h: 0.0038 },
|
||||
rotation: 0,
|
||||
opacity: 1,
|
||||
locked: false,
|
||||
group: 'badge',
|
||||
kind: 'shape',
|
||||
shape: 'rect',
|
||||
fill: '#ffffff',
|
||||
gradient: 'none',
|
||||
stroke: null,
|
||||
token: 'paper',
|
||||
strokeWidth: 0,
|
||||
strokeStyle: 'solid',
|
||||
radius: 0,
|
||||
},
|
||||
{
|
||||
id: 't7',
|
||||
role: 'date',
|
||||
keep: true,
|
||||
on: 'accent',
|
||||
frame: { x: 0.3333, y: 0.5381, w: 0.3333, h: 0.0381 },
|
||||
rotation: 0,
|
||||
opacity: 1,
|
||||
locked: false,
|
||||
group: 'badge',
|
||||
kind: 'text',
|
||||
text: '',
|
||||
font: 'montserrat',
|
||||
size: 0.0381,
|
||||
weight: 600,
|
||||
italic: false,
|
||||
align: 'center',
|
||||
leading: 1,
|
||||
tracking: 0.4,
|
||||
color: '#ffffff',
|
||||
token: 'paper',
|
||||
fontRole: 'heading',
|
||||
binding: null,
|
||||
overridden: false,
|
||||
transform: 'upper',
|
||||
vAlign: 'middle',
|
||||
fit: 'shrink',
|
||||
fitMax: 0.0381,
|
||||
},
|
||||
{
|
||||
id: 'l8',
|
||||
tint: { stroke: 'ink' },
|
||||
frame: { x: 1.0762, y: 0.0833, w: 0.6762, h: 0.0143 },
|
||||
rotation: 0,
|
||||
opacity: 1,
|
||||
locked: false,
|
||||
group: 'head',
|
||||
kind: 'line',
|
||||
points: [
|
||||
{ x: 0, y: 0.5 },
|
||||
{ x: 1, y: 0.5 },
|
||||
],
|
||||
curve: 'straight',
|
||||
stroke: '#141414',
|
||||
strokeWidth: 0.0029,
|
||||
dash: 'dashed',
|
||||
squiggle: 'none',
|
||||
startCap: 'none',
|
||||
endCap: 'none',
|
||||
wobble: 0,
|
||||
ornament: 'none',
|
||||
},
|
||||
{
|
||||
id: 's9',
|
||||
tint: { colors: ['accent3', 'accent', 'paper'] },
|
||||
frame: { x: 1.7714, y: 0.0476, w: 0.1524, h: 0.0912 },
|
||||
rotation: -8,
|
||||
opacity: 1,
|
||||
locked: false,
|
||||
group: 'head',
|
||||
kind: 'sticker',
|
||||
stickerId: 'airplane',
|
||||
colors: ['#6f6f6f', '#e2412f', '#ffffff'],
|
||||
flipX: false,
|
||||
},
|
||||
{
|
||||
id: 't10',
|
||||
role: 'body',
|
||||
frame: { x: 1.0762, y: 0.1619, w: 0.6667, h: 0.7333 },
|
||||
rotation: 0,
|
||||
opacity: 1,
|
||||
locked: false,
|
||||
kind: 'text',
|
||||
text: '',
|
||||
font: 'inter',
|
||||
size: 0.0476,
|
||||
weight: 400,
|
||||
italic: false,
|
||||
align: 'left',
|
||||
leading: 1.55,
|
||||
tracking: 0,
|
||||
color: '#141414',
|
||||
token: 'ink',
|
||||
fontRole: 'body',
|
||||
binding: null,
|
||||
overridden: false,
|
||||
vAlign: 'top',
|
||||
},
|
||||
{
|
||||
id: 's11',
|
||||
tint: { colors: ['accent'] },
|
||||
frame: { x: 1.7524, y: 0.7333, w: 0.1905, h: 0.1333 },
|
||||
rotation: 14,
|
||||
opacity: 0.9,
|
||||
locked: false,
|
||||
kind: 'sticker',
|
||||
stickerId: 'passportStamp',
|
||||
colors: ['#e2412f'],
|
||||
flipX: false,
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
id: 'grid-badge-hero-six',
|
||||
labelKey: 'studio.templates.name.gridBadgeHeroSix',
|
||||
kind: 'inner',
|
||||
archetype: 'grid-badge',
|
||||
tags: ['grid', 'seven-photos', 'hero', 'badge', 'scalloped', 'full-bleed', 'graphic'],
|
||||
descr:
|
||||
'A bleed hero photo on the left page with a white scalloped badge low on it, a dashed red ring, a red pin, the subtitle, the title and the date; six tall photos three by two on the right page with 3 mm white gutters.',
|
||||
background: null,
|
||||
backgroundToken: 'paper',
|
||||
elements: [
|
||||
{
|
||||
id: 'p1',
|
||||
role: 'photo:1',
|
||||
frame: { x: -0.0143, y: -0.0143, w: 1.0072, h: 1.0286 },
|
||||
rotation: 0,
|
||||
opacity: 1,
|
||||
locked: false,
|
||||
kind: 'photo',
|
||||
photoId: null,
|
||||
fit: 'cover',
|
||||
focalX: 0.6,
|
||||
focalY: 0.5,
|
||||
radius: 0,
|
||||
filter: 'none',
|
||||
mask: null,
|
||||
frameStyle: 'none',
|
||||
},
|
||||
{
|
||||
id: 'p2',
|
||||
role: 'photo:2',
|
||||
frame: { x: 1.0071, y: -0.0143, w: 0.3262, h: 0.5071 },
|
||||
rotation: 0,
|
||||
opacity: 1,
|
||||
locked: false,
|
||||
kind: 'photo',
|
||||
photoId: null,
|
||||
fit: 'cover',
|
||||
focalX: 0.5,
|
||||
focalY: 0.5,
|
||||
radius: 0,
|
||||
filter: 'none',
|
||||
mask: null,
|
||||
frameStyle: 'none',
|
||||
},
|
||||
{
|
||||
id: 'p3',
|
||||
role: 'photo:3',
|
||||
frame: { x: 1.3476, y: -0.0143, w: 0.3262, h: 0.5071 },
|
||||
rotation: 0,
|
||||
opacity: 1,
|
||||
locked: false,
|
||||
kind: 'photo',
|
||||
photoId: null,
|
||||
fit: 'cover',
|
||||
focalX: 0.5,
|
||||
focalY: 0.5,
|
||||
radius: 0,
|
||||
filter: 'none',
|
||||
mask: null,
|
||||
frameStyle: 'none',
|
||||
},
|
||||
{
|
||||
id: 'p4',
|
||||
role: 'photo:4',
|
||||
frame: { x: 1.6881, y: -0.0143, w: 0.3262, h: 0.5071 },
|
||||
rotation: 0,
|
||||
opacity: 1,
|
||||
locked: false,
|
||||
kind: 'photo',
|
||||
photoId: null,
|
||||
fit: 'cover',
|
||||
focalX: 0.5,
|
||||
focalY: 0.5,
|
||||
radius: 0,
|
||||
filter: 'none',
|
||||
mask: null,
|
||||
frameStyle: 'none',
|
||||
},
|
||||
{
|
||||
id: 'p5',
|
||||
role: 'photo:5',
|
||||
frame: { x: 1.0071, y: 0.5071, w: 0.3262, h: 0.5071 },
|
||||
rotation: 0,
|
||||
opacity: 1,
|
||||
locked: false,
|
||||
kind: 'photo',
|
||||
photoId: null,
|
||||
fit: 'cover',
|
||||
focalX: 0.5,
|
||||
focalY: 0.5,
|
||||
radius: 0,
|
||||
filter: 'none',
|
||||
mask: null,
|
||||
frameStyle: 'none',
|
||||
},
|
||||
{
|
||||
id: 'p6',
|
||||
role: 'photo:6',
|
||||
frame: { x: 1.3476, y: 0.5071, w: 0.3262, h: 0.5071 },
|
||||
rotation: 0,
|
||||
opacity: 1,
|
||||
locked: false,
|
||||
kind: 'photo',
|
||||
photoId: null,
|
||||
fit: 'cover',
|
||||
focalX: 0.5,
|
||||
focalY: 0.5,
|
||||
radius: 0,
|
||||
filter: 'none',
|
||||
mask: null,
|
||||
frameStyle: 'none',
|
||||
},
|
||||
{
|
||||
id: 'p7',
|
||||
role: 'photo:7',
|
||||
frame: { x: 1.6881, y: 0.5071, w: 0.3262, h: 0.5071 },
|
||||
rotation: 0,
|
||||
opacity: 1,
|
||||
locked: false,
|
||||
kind: 'photo',
|
||||
photoId: null,
|
||||
fit: 'cover',
|
||||
focalX: 0.5,
|
||||
focalY: 0.5,
|
||||
radius: 0,
|
||||
filter: 'none',
|
||||
mask: null,
|
||||
frameStyle: 'none',
|
||||
},
|
||||
{
|
||||
id: 's8',
|
||||
keep: true,
|
||||
frame: { x: 0.0857, y: 0.5333, w: 0.381, h: 0.381 },
|
||||
rotation: 0,
|
||||
opacity: 1,
|
||||
locked: false,
|
||||
group: 'badge',
|
||||
kind: 'shape',
|
||||
shape: 'scallop-circle',
|
||||
fill: '#ffffff',
|
||||
gradient: 'none',
|
||||
stroke: null,
|
||||
token: 'paper',
|
||||
strokeWidth: 0,
|
||||
strokeStyle: 'solid',
|
||||
radius: 0,
|
||||
},
|
||||
{
|
||||
id: 's9',
|
||||
keep: true,
|
||||
frame: { x: 0.1048, y: 0.5524, w: 0.3429, h: 0.3429 },
|
||||
rotation: 0,
|
||||
opacity: 1,
|
||||
locked: false,
|
||||
group: 'badge',
|
||||
kind: 'shape',
|
||||
shape: 'ellipse',
|
||||
fill: null,
|
||||
gradient: 'none',
|
||||
stroke: '#e2412f',
|
||||
strokeToken: 'accent',
|
||||
strokeWidth: 0.0029,
|
||||
strokeStyle: 'dashed',
|
||||
radius: 0,
|
||||
},
|
||||
{
|
||||
id: 's10',
|
||||
tint: { colors: ['accent', 'paper'] },
|
||||
frame: { x: 0.2381, y: 0.4952, w: 0.0762, h: 0.1088 },
|
||||
rotation: 0,
|
||||
opacity: 1,
|
||||
locked: false,
|
||||
group: 'badge',
|
||||
kind: 'sticker',
|
||||
stickerId: 'mapPin',
|
||||
colors: ['#e2412f', '#ffffff'],
|
||||
flipX: false,
|
||||
},
|
||||
{
|
||||
id: 't11',
|
||||
role: 'subtitle',
|
||||
keep: true,
|
||||
on: 'paper',
|
||||
frame: { x: 0.1381, y: 0.6333, w: 0.2762, h: 0.0333 },
|
||||
rotation: 0,
|
||||
opacity: 1,
|
||||
locked: false,
|
||||
group: 'badge',
|
||||
kind: 'text',
|
||||
text: '',
|
||||
font: 'montserrat',
|
||||
size: 0.031,
|
||||
weight: 600,
|
||||
italic: false,
|
||||
align: 'center',
|
||||
leading: 1,
|
||||
tracking: 0.32,
|
||||
color: '#5b5b5b',
|
||||
token: 'muted',
|
||||
fontRole: 'heading',
|
||||
binding: null,
|
||||
overridden: false,
|
||||
transform: 'upper',
|
||||
vAlign: 'middle',
|
||||
fit: 'shrink',
|
||||
fitMax: 0.031,
|
||||
},
|
||||
{
|
||||
id: 't12',
|
||||
role: 'title',
|
||||
keep: true,
|
||||
on: 'paper',
|
||||
frame: { x: 0.1238, y: 0.6762, w: 0.3048, h: 0.1048 },
|
||||
rotation: 0,
|
||||
opacity: 1,
|
||||
locked: false,
|
||||
group: 'badge',
|
||||
kind: 'text',
|
||||
text: '',
|
||||
font: 'montserrat',
|
||||
size: 0.1238,
|
||||
weight: 800,
|
||||
italic: false,
|
||||
align: 'center',
|
||||
leading: 0.95,
|
||||
tracking: 0,
|
||||
color: '#141414',
|
||||
token: 'ink',
|
||||
fontRole: 'display',
|
||||
binding: null,
|
||||
overridden: false,
|
||||
transform: 'upper',
|
||||
vAlign: 'middle',
|
||||
fit: 'shrink',
|
||||
fitMax: 0.1238,
|
||||
},
|
||||
{
|
||||
id: 's13',
|
||||
keep: true,
|
||||
frame: { x: 0.2381, y: 0.7905, w: 0.0762, h: 0.0038 },
|
||||
rotation: 0,
|
||||
opacity: 1,
|
||||
locked: false,
|
||||
group: 'badge',
|
||||
kind: 'shape',
|
||||
shape: 'rect',
|
||||
fill: '#e2412f',
|
||||
gradient: 'none',
|
||||
stroke: null,
|
||||
token: 'accent',
|
||||
strokeWidth: 0,
|
||||
strokeStyle: 'solid',
|
||||
radius: 0,
|
||||
},
|
||||
{
|
||||
id: 't14',
|
||||
role: 'date',
|
||||
keep: true,
|
||||
on: 'paper',
|
||||
frame: { x: 0.1714, y: 0.8048, w: 0.2095, h: 0.0333 },
|
||||
rotation: 0,
|
||||
opacity: 1,
|
||||
locked: false,
|
||||
group: 'badge',
|
||||
kind: 'text',
|
||||
text: '',
|
||||
font: 'montserrat',
|
||||
size: 0.0333,
|
||||
weight: 600,
|
||||
italic: false,
|
||||
align: 'center',
|
||||
leading: 1,
|
||||
tracking: 0.4,
|
||||
color: '#141414',
|
||||
token: 'ink',
|
||||
fontRole: 'heading',
|
||||
binding: null,
|
||||
overridden: false,
|
||||
transform: 'upper',
|
||||
vAlign: 'middle',
|
||||
fit: 'shrink',
|
||||
fitMax: 0.0333,
|
||||
},
|
||||
],
|
||||
},
|
||||
];
|
||||
@@ -0,0 +1,637 @@
|
||||
import type { BookDecoratedTemplate } from '../template-format';
|
||||
|
||||
/**
|
||||
* More minimal serif pages: an oval cameo cover inside a hairline frame, a
|
||||
* words only essay spread and a triptych of three numbered portrait plates.
|
||||
* Drawn in minimal-serif.
|
||||
*
|
||||
* Drawn on a 210 mm page and kept as fractions of it (template-format.ts),
|
||||
* in the colours and faces of the theme named above; their links let any
|
||||
* other theme recolour them.
|
||||
*/
|
||||
export const MORE_MINIMAL_SERIF: readonly BookDecoratedTemplate[] = [
|
||||
{
|
||||
id: 'minimal-serif-cameo',
|
||||
labelKey: 'studio.templates.name.minimalSerifCameo',
|
||||
kind: 'single',
|
||||
archetype: 'minimal-serif',
|
||||
tags: ['minimal', 'serif', 'white', 'oval', 'cameo', 'hairline', 'elegant'],
|
||||
descr:
|
||||
'A white page inside a hairline frame: the year in spaced capitals at the head, an oval photo in a fine accent ring, a large thin italic serif title, a diamond rule and the subtitle.',
|
||||
background: null,
|
||||
backgroundToken: 'paper',
|
||||
elements: [
|
||||
{
|
||||
id: 's1',
|
||||
frame: { x: 0.0476, y: 0.0476, w: 0.9048, h: 0.9048 },
|
||||
rotation: 0,
|
||||
opacity: 1,
|
||||
locked: false,
|
||||
kind: 'shape',
|
||||
shape: 'rect',
|
||||
fill: null,
|
||||
gradient: 'none',
|
||||
stroke: '#222222',
|
||||
strokeToken: 'ink',
|
||||
strokeWidth: 0.0012,
|
||||
strokeStyle: 'solid',
|
||||
radius: 0,
|
||||
},
|
||||
{
|
||||
id: 't2',
|
||||
role: 'date',
|
||||
frame: { x: 0.3333, y: 0.0857, w: 0.3333, h: 0.0333 },
|
||||
rotation: 0,
|
||||
opacity: 1,
|
||||
locked: false,
|
||||
kind: 'text',
|
||||
text: '',
|
||||
font: 'montserrat',
|
||||
size: 0.0381,
|
||||
weight: 300,
|
||||
italic: false,
|
||||
align: 'center',
|
||||
leading: 1.4,
|
||||
tracking: 0.45,
|
||||
color: '#222222',
|
||||
token: 'ink',
|
||||
fontRole: 'heading',
|
||||
binding: null,
|
||||
overridden: false,
|
||||
transform: 'upper',
|
||||
vAlign: 'middle',
|
||||
fit: 'shrink',
|
||||
fitMax: 0.0381,
|
||||
},
|
||||
{
|
||||
id: 's3',
|
||||
keep: true,
|
||||
frame: { x: 0.2952, y: 0.1429, w: 0.4095, h: 0.4952 },
|
||||
rotation: 0,
|
||||
opacity: 1,
|
||||
locked: false,
|
||||
group: 'picture',
|
||||
kind: 'shape',
|
||||
shape: 'ellipse',
|
||||
fill: null,
|
||||
gradient: 'none',
|
||||
stroke: '#857d72',
|
||||
strokeToken: 'accent',
|
||||
strokeWidth: 0.0012,
|
||||
strokeStyle: 'solid',
|
||||
radius: 0,
|
||||
},
|
||||
{
|
||||
id: 'p4',
|
||||
role: 'photo:1',
|
||||
keep: true,
|
||||
tint: { border: 'ink' },
|
||||
frame: { x: 0.3143, y: 0.1667, w: 0.3714, h: 0.4476 },
|
||||
rotation: 0,
|
||||
opacity: 1,
|
||||
locked: false,
|
||||
group: 'picture',
|
||||
kind: 'photo',
|
||||
photoId: null,
|
||||
fit: 'cover',
|
||||
focalX: 0.5,
|
||||
focalY: 0.45,
|
||||
radius: 0,
|
||||
filter: 'none',
|
||||
mask: 'ellipse',
|
||||
frameStyle: 'none',
|
||||
border: { width: 0.0014, color: '#222222' },
|
||||
},
|
||||
{
|
||||
id: 't5',
|
||||
role: 'title',
|
||||
frame: { x: 0.0952, y: 0.6619, w: 0.8095, h: 0.1476 },
|
||||
rotation: 0,
|
||||
opacity: 1,
|
||||
locked: false,
|
||||
group: 'title',
|
||||
kind: 'text',
|
||||
text: '',
|
||||
font: 'cormorant',
|
||||
size: 0.3333,
|
||||
weight: 300,
|
||||
italic: true,
|
||||
align: 'center',
|
||||
leading: 0.95,
|
||||
tracking: 0,
|
||||
color: '#222222',
|
||||
token: 'ink',
|
||||
fontRole: 'display',
|
||||
binding: null,
|
||||
overridden: false,
|
||||
vAlign: 'middle',
|
||||
fit: 'shrink',
|
||||
fitMax: 0.3333,
|
||||
},
|
||||
{
|
||||
id: 'l6',
|
||||
tint: { stroke: 'accent' },
|
||||
frame: { x: 0.4048, y: 0.819, w: 0.1905, h: 0.0286 },
|
||||
rotation: 0,
|
||||
opacity: 1,
|
||||
locked: false,
|
||||
group: 'title',
|
||||
kind: 'line',
|
||||
points: [
|
||||
{ x: 0, y: 0.5 },
|
||||
{ x: 1, y: 0.5 },
|
||||
],
|
||||
curve: 'straight',
|
||||
stroke: '#857d72',
|
||||
strokeWidth: 0.0012,
|
||||
dash: 'solid',
|
||||
squiggle: 'none',
|
||||
startCap: 'none',
|
||||
endCap: 'none',
|
||||
wobble: 0,
|
||||
ornament: 'diamond',
|
||||
},
|
||||
{
|
||||
id: 't7',
|
||||
role: 'subtitle',
|
||||
frame: { x: 0.1429, y: 0.8571, w: 0.7143, h: 0.0333 },
|
||||
rotation: 0,
|
||||
opacity: 1,
|
||||
locked: false,
|
||||
group: 'title',
|
||||
kind: 'text',
|
||||
text: '',
|
||||
font: 'montserrat',
|
||||
size: 0.0381,
|
||||
weight: 300,
|
||||
italic: false,
|
||||
align: 'center',
|
||||
leading: 1.4,
|
||||
tracking: 0.32,
|
||||
color: '#646464',
|
||||
token: 'muted',
|
||||
fontRole: 'heading',
|
||||
binding: null,
|
||||
overridden: false,
|
||||
transform: 'upper',
|
||||
vAlign: 'middle',
|
||||
fit: 'shrink',
|
||||
fitMax: 0.0381,
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
id: 'minimal-serif-essay',
|
||||
labelKey: 'studio.templates.name.minimalSerifEssay',
|
||||
kind: 'inner',
|
||||
archetype: 'minimal-serif',
|
||||
tags: ['minimal', 'serif', 'words-only', 'essay', 'story', 'ornament', 'calm'],
|
||||
descr:
|
||||
'Words only: on the left page a fleuron, the date in spaced capitals, a large thin serif title, a diamond rule and the subtitle, centred; on the right a hairline, the long story in one column and a star rule.',
|
||||
background: null,
|
||||
backgroundToken: 'paper',
|
||||
elements: [
|
||||
{
|
||||
id: 's1',
|
||||
tint: { colors: ['accent'] },
|
||||
frame: { x: 0.4286, y: 0.1714, w: 0.1429, h: 0.1429 },
|
||||
rotation: 0,
|
||||
opacity: 1,
|
||||
locked: false,
|
||||
group: 'title',
|
||||
kind: 'sticker',
|
||||
stickerId: 'fleuron',
|
||||
colors: ['#857d72'],
|
||||
flipX: false,
|
||||
},
|
||||
{
|
||||
id: 't2',
|
||||
role: 'date',
|
||||
frame: { x: 0.1429, y: 0.3524, w: 0.7143, h: 0.0333 },
|
||||
rotation: 0,
|
||||
opacity: 1,
|
||||
locked: false,
|
||||
group: 'title',
|
||||
kind: 'text',
|
||||
text: '',
|
||||
font: 'montserrat',
|
||||
size: 0.0381,
|
||||
weight: 300,
|
||||
italic: false,
|
||||
align: 'center',
|
||||
leading: 1.4,
|
||||
tracking: 0.42,
|
||||
color: '#222222',
|
||||
token: 'ink',
|
||||
fontRole: 'heading',
|
||||
binding: null,
|
||||
overridden: false,
|
||||
transform: 'upper',
|
||||
vAlign: 'middle',
|
||||
fit: 'shrink',
|
||||
fitMax: 0.0381,
|
||||
},
|
||||
{
|
||||
id: 't3',
|
||||
role: 'title',
|
||||
frame: { x: 0.0762, y: 0.4048, w: 0.8476, h: 0.2667 },
|
||||
rotation: 0,
|
||||
opacity: 1,
|
||||
locked: false,
|
||||
group: 'title',
|
||||
kind: 'text',
|
||||
text: '',
|
||||
font: 'cormorant',
|
||||
size: 0.2857,
|
||||
weight: 300,
|
||||
italic: false,
|
||||
align: 'center',
|
||||
leading: 0.95,
|
||||
tracking: 0,
|
||||
color: '#222222',
|
||||
token: 'ink',
|
||||
fontRole: 'display',
|
||||
binding: null,
|
||||
overridden: false,
|
||||
vAlign: 'middle',
|
||||
fit: 'shrink',
|
||||
fitMax: 0.2857,
|
||||
},
|
||||
{
|
||||
id: 'l4',
|
||||
tint: { stroke: 'accent' },
|
||||
frame: { x: 0.381, y: 0.6952, w: 0.2381, h: 0.0286 },
|
||||
rotation: 0,
|
||||
opacity: 1,
|
||||
locked: false,
|
||||
group: 'title',
|
||||
kind: 'line',
|
||||
points: [
|
||||
{ x: 0, y: 0.5 },
|
||||
{ x: 1, y: 0.5 },
|
||||
],
|
||||
curve: 'straight',
|
||||
stroke: '#857d72',
|
||||
strokeWidth: 0.0012,
|
||||
dash: 'solid',
|
||||
squiggle: 'none',
|
||||
startCap: 'none',
|
||||
endCap: 'none',
|
||||
wobble: 0,
|
||||
ornament: 'diamond',
|
||||
},
|
||||
{
|
||||
id: 't5',
|
||||
role: 'subtitle',
|
||||
frame: { x: 0.1429, y: 0.7429, w: 0.7143, h: 0.0667 },
|
||||
rotation: 0,
|
||||
opacity: 1,
|
||||
locked: false,
|
||||
group: 'title',
|
||||
kind: 'text',
|
||||
text: '',
|
||||
font: 'montserrat',
|
||||
size: 0.0381,
|
||||
weight: 300,
|
||||
italic: false,
|
||||
align: 'center',
|
||||
leading: 1.4,
|
||||
tracking: 0.32,
|
||||
color: '#646464',
|
||||
token: 'muted',
|
||||
fontRole: 'heading',
|
||||
binding: null,
|
||||
overridden: false,
|
||||
transform: 'upper',
|
||||
vAlign: 'top',
|
||||
fit: 'shrink',
|
||||
fitMax: 0.0381,
|
||||
},
|
||||
{
|
||||
id: 'l6',
|
||||
tint: { stroke: 'ink' },
|
||||
frame: { x: 1.1429, y: 0.0857, w: 0.7143, h: 0.0286 },
|
||||
rotation: 0,
|
||||
opacity: 1,
|
||||
locked: false,
|
||||
group: 'column',
|
||||
kind: 'line',
|
||||
points: [
|
||||
{ x: 0, y: 0.5 },
|
||||
{ x: 1, y: 0.5 },
|
||||
],
|
||||
curve: 'straight',
|
||||
stroke: '#222222',
|
||||
strokeWidth: 0.0012,
|
||||
dash: 'solid',
|
||||
squiggle: 'none',
|
||||
startCap: 'none',
|
||||
endCap: 'none',
|
||||
wobble: 0,
|
||||
ornament: 'none',
|
||||
},
|
||||
{
|
||||
id: 't7',
|
||||
role: 'body',
|
||||
frame: { x: 1.1429, y: 0.1524, w: 0.7143, h: 0.7143 },
|
||||
rotation: 0,
|
||||
opacity: 1,
|
||||
locked: false,
|
||||
group: 'column',
|
||||
kind: 'text',
|
||||
text: '',
|
||||
font: 'inter',
|
||||
size: 0.0476,
|
||||
weight: 400,
|
||||
italic: false,
|
||||
align: 'left',
|
||||
leading: 1.6,
|
||||
tracking: 0,
|
||||
color: '#222222',
|
||||
token: 'ink',
|
||||
fontRole: 'body',
|
||||
binding: null,
|
||||
overridden: false,
|
||||
vAlign: 'top',
|
||||
},
|
||||
{
|
||||
id: 's8',
|
||||
tint: { colors: ['accent'] },
|
||||
frame: { x: 1.381, y: 0.9, w: 0.2381, h: 0.0408 },
|
||||
rotation: 0,
|
||||
opacity: 1,
|
||||
locked: false,
|
||||
group: 'column',
|
||||
kind: 'sticker',
|
||||
stickerId: 'starRule',
|
||||
colors: ['#857d72'],
|
||||
flipX: false,
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
id: 'minimal-serif-triptych',
|
||||
labelKey: 'studio.templates.name.minimalSerifTriptych',
|
||||
kind: 'inner',
|
||||
archetype: 'minimal-serif',
|
||||
tags: ['minimal', 'serif', 'triptych', 'three-photos', 'portrait', 'hairline', 'calm'],
|
||||
descr:
|
||||
'A thin serif title, a sun rule, the subtitle, the date and the story in a narrow left column; three tall photos with hairline borders on one line across the spread, each numbered by one, two or three accent dots.',
|
||||
background: null,
|
||||
backgroundToken: 'paper',
|
||||
elements: [
|
||||
{
|
||||
id: 't1',
|
||||
role: 'title',
|
||||
frame: { x: 0.0762, y: 0.1619, w: 0.4381, h: 0.2857 },
|
||||
rotation: 0,
|
||||
opacity: 1,
|
||||
locked: false,
|
||||
group: 'title',
|
||||
kind: 'text',
|
||||
text: '',
|
||||
font: 'cormorant',
|
||||
size: 0.1905,
|
||||
weight: 300,
|
||||
italic: false,
|
||||
align: 'left',
|
||||
leading: 0.95,
|
||||
tracking: 0,
|
||||
color: '#222222',
|
||||
token: 'ink',
|
||||
fontRole: 'display',
|
||||
binding: null,
|
||||
overridden: false,
|
||||
vAlign: 'bottom',
|
||||
fit: 'shrink',
|
||||
fitMax: 0.1905,
|
||||
},
|
||||
{
|
||||
id: 'l2',
|
||||
tint: { stroke: 'accent' },
|
||||
frame: { x: 0.0762, y: 0.4667, w: 0.1905, h: 0.0286 },
|
||||
rotation: 0,
|
||||
opacity: 1,
|
||||
locked: false,
|
||||
group: 'title',
|
||||
kind: 'line',
|
||||
points: [
|
||||
{ x: 0, y: 0.5 },
|
||||
{ x: 1, y: 0.5 },
|
||||
],
|
||||
curve: 'straight',
|
||||
stroke: '#857d72',
|
||||
strokeWidth: 0.0012,
|
||||
dash: 'solid',
|
||||
squiggle: 'none',
|
||||
startCap: 'none',
|
||||
endCap: 'none',
|
||||
wobble: 0,
|
||||
ornament: 'sun',
|
||||
},
|
||||
{
|
||||
id: 't3',
|
||||
role: 'subtitle',
|
||||
frame: { x: 0.0762, y: 0.5143, w: 0.4381, h: 0.0619 },
|
||||
rotation: 0,
|
||||
opacity: 1,
|
||||
locked: false,
|
||||
group: 'title',
|
||||
kind: 'text',
|
||||
text: '',
|
||||
font: 'montserrat',
|
||||
size: 0.0381,
|
||||
weight: 300,
|
||||
italic: false,
|
||||
align: 'left',
|
||||
leading: 1.4,
|
||||
tracking: 0.32,
|
||||
color: '#646464',
|
||||
token: 'muted',
|
||||
fontRole: 'heading',
|
||||
binding: null,
|
||||
overridden: false,
|
||||
transform: 'upper',
|
||||
vAlign: 'top',
|
||||
fit: 'shrink',
|
||||
fitMax: 0.0381,
|
||||
},
|
||||
{
|
||||
id: 't4',
|
||||
role: 'date',
|
||||
frame: { x: 0.0762, y: 0.5857, w: 0.4381, h: 0.0333 },
|
||||
rotation: 0,
|
||||
opacity: 1,
|
||||
locked: false,
|
||||
group: 'title',
|
||||
kind: 'text',
|
||||
text: '',
|
||||
font: 'montserrat',
|
||||
size: 0.0381,
|
||||
weight: 300,
|
||||
italic: false,
|
||||
align: 'left',
|
||||
leading: 1.4,
|
||||
tracking: 0.4,
|
||||
color: '#222222',
|
||||
token: 'ink',
|
||||
fontRole: 'heading',
|
||||
binding: null,
|
||||
overridden: false,
|
||||
transform: 'upper',
|
||||
vAlign: 'middle',
|
||||
fit: 'shrink',
|
||||
fitMax: 0.0381,
|
||||
},
|
||||
{
|
||||
id: 't5',
|
||||
role: 'body',
|
||||
frame: { x: 0.0762, y: 0.6571, w: 0.4381, h: 0.2667 },
|
||||
rotation: 0,
|
||||
opacity: 1,
|
||||
locked: false,
|
||||
kind: 'text',
|
||||
text: '',
|
||||
font: 'inter',
|
||||
size: 0.0429,
|
||||
weight: 400,
|
||||
italic: false,
|
||||
align: 'left',
|
||||
leading: 1.55,
|
||||
tracking: 0,
|
||||
color: '#222222',
|
||||
token: 'ink',
|
||||
fontRole: 'body',
|
||||
binding: null,
|
||||
overridden: false,
|
||||
vAlign: 'top',
|
||||
},
|
||||
{
|
||||
id: 'p6',
|
||||
role: 'photo:1',
|
||||
tint: { border: 'ink' },
|
||||
frame: { x: 0.5762, y: 0.1619, w: 0.3476, h: 0.5714 },
|
||||
rotation: 0,
|
||||
opacity: 1,
|
||||
locked: false,
|
||||
group: 'plates',
|
||||
kind: 'photo',
|
||||
photoId: null,
|
||||
fit: 'cover',
|
||||
focalX: 0.5,
|
||||
focalY: 0.5,
|
||||
radius: 0,
|
||||
filter: 'none',
|
||||
mask: null,
|
||||
frameStyle: 'none',
|
||||
border: { width: 0.0014, color: '#222222' },
|
||||
},
|
||||
{
|
||||
id: 't7',
|
||||
frame: { x: 0.5762, y: 0.7619, w: 0.3476, h: 0.0333 },
|
||||
rotation: 0,
|
||||
opacity: 1,
|
||||
locked: false,
|
||||
group: 'plates',
|
||||
kind: 'text',
|
||||
text: '•',
|
||||
font: 'montserrat',
|
||||
size: 0.0381,
|
||||
weight: 300,
|
||||
italic: false,
|
||||
align: 'left',
|
||||
leading: 1.4,
|
||||
tracking: 0.6,
|
||||
color: '#857d72',
|
||||
token: 'accent',
|
||||
binding: null,
|
||||
overridden: false,
|
||||
vAlign: 'middle',
|
||||
},
|
||||
{
|
||||
id: 'p8',
|
||||
role: 'photo:2',
|
||||
tint: { border: 'ink' },
|
||||
frame: { x: 1.0762, y: 0.1619, w: 0.3476, h: 0.5714 },
|
||||
rotation: 0,
|
||||
opacity: 1,
|
||||
locked: false,
|
||||
group: 'plates',
|
||||
kind: 'photo',
|
||||
photoId: null,
|
||||
fit: 'cover',
|
||||
focalX: 0.5,
|
||||
focalY: 0.5,
|
||||
radius: 0,
|
||||
filter: 'none',
|
||||
mask: null,
|
||||
frameStyle: 'none',
|
||||
border: { width: 0.0014, color: '#222222' },
|
||||
},
|
||||
{
|
||||
id: 't9',
|
||||
frame: { x: 1.0762, y: 0.7619, w: 0.3476, h: 0.0333 },
|
||||
rotation: 0,
|
||||
opacity: 1,
|
||||
locked: false,
|
||||
group: 'plates',
|
||||
kind: 'text',
|
||||
text: '••',
|
||||
font: 'montserrat',
|
||||
size: 0.0381,
|
||||
weight: 300,
|
||||
italic: false,
|
||||
align: 'left',
|
||||
leading: 1.4,
|
||||
tracking: 0.6,
|
||||
color: '#857d72',
|
||||
token: 'accent',
|
||||
binding: null,
|
||||
overridden: false,
|
||||
vAlign: 'middle',
|
||||
},
|
||||
{
|
||||
id: 'p10',
|
||||
role: 'photo:3',
|
||||
tint: { border: 'ink' },
|
||||
frame: { x: 1.5762, y: 0.1619, w: 0.3476, h: 0.5714 },
|
||||
rotation: 0,
|
||||
opacity: 1,
|
||||
locked: false,
|
||||
group: 'plates',
|
||||
kind: 'photo',
|
||||
photoId: null,
|
||||
fit: 'cover',
|
||||
focalX: 0.5,
|
||||
focalY: 0.5,
|
||||
radius: 0,
|
||||
filter: 'none',
|
||||
mask: null,
|
||||
frameStyle: 'none',
|
||||
border: { width: 0.0014, color: '#222222' },
|
||||
},
|
||||
{
|
||||
id: 't11',
|
||||
frame: { x: 1.5762, y: 0.7619, w: 0.3476, h: 0.0333 },
|
||||
rotation: 0,
|
||||
opacity: 1,
|
||||
locked: false,
|
||||
group: 'plates',
|
||||
kind: 'text',
|
||||
text: '•••',
|
||||
font: 'montserrat',
|
||||
size: 0.0381,
|
||||
weight: 300,
|
||||
italic: false,
|
||||
align: 'left',
|
||||
leading: 1.4,
|
||||
tracking: 0.6,
|
||||
color: '#857d72',
|
||||
token: 'accent',
|
||||
binding: null,
|
||||
overridden: false,
|
||||
vAlign: 'middle',
|
||||
},
|
||||
],
|
||||
},
|
||||
];
|
||||
@@ -0,0 +1,793 @@
|
||||
import type { BookDecoratedTemplate } from '../template-format';
|
||||
|
||||
/**
|
||||
* More illustrated postcard pages: a large letter cover whose title is
|
||||
* filled with the photo, an airmail letter spread of words only and a rack
|
||||
* of seven picture postcards. Drawn in postcard.
|
||||
*
|
||||
* Drawn on a 210 mm page and kept as fractions of it (template-format.ts),
|
||||
* in the colours and faces of the theme named above; their links let any
|
||||
* other theme recolour them.
|
||||
*/
|
||||
export const MORE_POSTCARD: readonly BookDecoratedTemplate[] = [
|
||||
{
|
||||
id: 'postcard-greetings',
|
||||
labelKey: 'studio.templates.name.postcardGreetings',
|
||||
kind: 'single',
|
||||
archetype: 'postcard',
|
||||
tags: ['postcard', 'large-letter', 'word-art', 'photo-filled', 'sunburst', 'one-photo', 'lively'],
|
||||
descr:
|
||||
'A large letter postcard: a soft sunburst behind a dashed border, the year, the title in huge display serif capitals filled with the photo and shadowed in coral, a script line, a star rule, the photo with a wavy edge, lemons and a postmark.',
|
||||
background: '#e3f1e8',
|
||||
backgroundToken: 'paper',
|
||||
elements: [
|
||||
{
|
||||
id: 's1',
|
||||
keep: true,
|
||||
frame: { x: -0.05, y: -0.0714, w: 1.1, h: 1.1 },
|
||||
rotation: 0,
|
||||
opacity: 0.4,
|
||||
locked: false,
|
||||
kind: 'shape',
|
||||
shape: 'sunburst-24',
|
||||
fill: '#f3d58a',
|
||||
gradient: 'none',
|
||||
stroke: null,
|
||||
token: 'accent3',
|
||||
strokeWidth: 0,
|
||||
strokeStyle: 'solid',
|
||||
radius: 0,
|
||||
},
|
||||
{
|
||||
id: 's2',
|
||||
frame: { x: 0.0476, y: 0.0476, w: 0.9048, h: 0.9048 },
|
||||
rotation: 0,
|
||||
opacity: 1,
|
||||
locked: false,
|
||||
kind: 'shape',
|
||||
shape: 'rect',
|
||||
fill: null,
|
||||
gradient: 'none',
|
||||
stroke: '#1f2d4d',
|
||||
strokeToken: 'ink',
|
||||
strokeWidth: 0.0024,
|
||||
strokeStyle: 'dashed',
|
||||
radius: 0.0071,
|
||||
},
|
||||
{
|
||||
id: 't3',
|
||||
role: 'date',
|
||||
frame: { x: 0.2619, y: 0.0905, w: 0.4762, h: 0.0381 },
|
||||
rotation: 0,
|
||||
opacity: 1,
|
||||
locked: false,
|
||||
group: 'title',
|
||||
kind: 'text',
|
||||
text: '',
|
||||
font: 'montserrat',
|
||||
size: 0.0381,
|
||||
weight: 600,
|
||||
italic: false,
|
||||
align: 'center',
|
||||
leading: 1,
|
||||
tracking: 0.45,
|
||||
color: '#1f2d4d',
|
||||
token: 'ink',
|
||||
fontRole: 'heading',
|
||||
binding: null,
|
||||
overridden: false,
|
||||
transform: 'upper',
|
||||
vAlign: 'middle',
|
||||
fit: 'shrink',
|
||||
fitMax: 0.0381,
|
||||
},
|
||||
{
|
||||
id: 't4',
|
||||
role: 'title',
|
||||
fillPhoto: 'photo:1',
|
||||
tint: { outline: 'ink', shadow: 'accent' },
|
||||
frame: { x: 0.0762, y: 0.1429, w: 0.8476, h: 0.2857 },
|
||||
rotation: 0,
|
||||
opacity: 1,
|
||||
locked: false,
|
||||
group: 'title',
|
||||
kind: 'text',
|
||||
text: '',
|
||||
font: 'dmserif',
|
||||
size: 0.3333,
|
||||
weight: 400,
|
||||
italic: false,
|
||||
align: 'center',
|
||||
leading: 0.9,
|
||||
tracking: 0,
|
||||
color: '#1f2d4d',
|
||||
token: 'ink',
|
||||
fontRole: 'display',
|
||||
binding: null,
|
||||
overridden: false,
|
||||
transform: 'upper',
|
||||
vAlign: 'middle',
|
||||
outline: { color: '#1f2d4d', width: 0.0033 },
|
||||
shadow: { dx: 0.0095, dy: 0.0095, color: '#c8453d', alpha: 1 },
|
||||
fit: 'shrink',
|
||||
fitMax: 0.3333,
|
||||
},
|
||||
{
|
||||
id: 't5',
|
||||
role: 'subtitle',
|
||||
frame: { x: 0.1143, y: 0.4381, w: 0.7714, h: 0.0857 },
|
||||
rotation: 0,
|
||||
opacity: 1,
|
||||
locked: false,
|
||||
group: 'title',
|
||||
kind: 'text',
|
||||
text: '',
|
||||
font: 'dancing',
|
||||
size: 0.1238,
|
||||
weight: 400,
|
||||
italic: false,
|
||||
align: 'center',
|
||||
leading: 1.1,
|
||||
tracking: 0,
|
||||
color: '#c8453d',
|
||||
token: 'accent',
|
||||
fontRole: 'script',
|
||||
binding: null,
|
||||
overridden: false,
|
||||
vAlign: 'middle',
|
||||
fit: 'shrink',
|
||||
fitMax: 0.1238,
|
||||
},
|
||||
{
|
||||
id: 's6',
|
||||
tint: { colors: ['ink'] },
|
||||
frame: { x: 0.3095, y: 0.5238, w: 0.381, h: 0.0653 },
|
||||
rotation: 0,
|
||||
opacity: 1,
|
||||
locked: false,
|
||||
group: 'title',
|
||||
kind: 'sticker',
|
||||
stickerId: 'starRule',
|
||||
colors: ['#1f2d4d'],
|
||||
flipX: false,
|
||||
},
|
||||
{
|
||||
id: 'p7',
|
||||
role: 'photo:1',
|
||||
tint: { shadow: 'ink' },
|
||||
frame: { x: 0.0952, y: 0.6, w: 0.8095, h: 0.3048 },
|
||||
rotation: 0,
|
||||
opacity: 1,
|
||||
locked: false,
|
||||
group: 'picture',
|
||||
kind: 'photo',
|
||||
photoId: null,
|
||||
fit: 'cover',
|
||||
focalX: 0.5,
|
||||
focalY: 0.5,
|
||||
radius: 0,
|
||||
filter: 'none',
|
||||
mask: null,
|
||||
frameStyle: 'none',
|
||||
border: { width: 0.0105, color: '#ffffff' },
|
||||
shadow: { dx: 0.0076, dy: 0.0076, color: '#1f2d4d', alpha: 0.25 },
|
||||
edge: 'wavy',
|
||||
edgeSize: 0.0095,
|
||||
},
|
||||
{
|
||||
id: 's8',
|
||||
tint: { colors: ['accent3', null, 'ink'] },
|
||||
frame: { x: 0.7476, y: 0.5143, w: 0.1905, h: 0.1905 },
|
||||
rotation: 18,
|
||||
opacity: 1,
|
||||
locked: false,
|
||||
group: 'picture',
|
||||
kind: 'sticker',
|
||||
stickerId: 'lemonBranch',
|
||||
colors: ['#f3d58a', '#3f8f4f', '#1f2d4d'],
|
||||
flipX: false,
|
||||
},
|
||||
{
|
||||
id: 's9',
|
||||
tint: { colors: ['ink'] },
|
||||
frame: { x: 0.0762, y: 0.8381, w: 0.181, h: 0.1052 },
|
||||
rotation: -8,
|
||||
opacity: 0.8,
|
||||
locked: false,
|
||||
group: 'picture',
|
||||
kind: 'sticker',
|
||||
stickerId: 'postmark',
|
||||
colors: ['#1f2d4d'],
|
||||
flipX: false,
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
id: 'postcard-airmail',
|
||||
labelKey: 'studio.templates.name.postcardAirmail',
|
||||
kind: 'inner',
|
||||
archetype: 'postcard',
|
||||
tags: ['postcard', 'airmail', 'letter', 'illustrated', 'stamp', 'words-only', 'story', 'calm'],
|
||||
descr:
|
||||
'Airmail stationery without photos: striped coral bands at head and foot, the date, a large display serif title, a script line and a wave rule over a drawn church and a passport stamp; on the right a stamp, a postmark and the long story.',
|
||||
background: '#e3f1e8',
|
||||
backgroundToken: 'paper',
|
||||
elements: [
|
||||
{
|
||||
id: 's1',
|
||||
tint: { fg: 'accent', bg: 'paper' },
|
||||
frame: { x: -0.0143, y: -0.0143, w: 2.0286, h: 0.0572 },
|
||||
rotation: 0,
|
||||
opacity: 1,
|
||||
locked: false,
|
||||
kind: 'shape',
|
||||
shape: 'rect',
|
||||
fill: '#c8453d',
|
||||
gradient: 'none',
|
||||
paint: { type: 'pattern', pattern: 'stripes', fg: '#c8453d', bg: '#e3f1e8', scale: 0.6, angle: 45 },
|
||||
stroke: null,
|
||||
token: 'accent',
|
||||
strokeWidth: 0,
|
||||
strokeStyle: 'solid',
|
||||
radius: 0,
|
||||
},
|
||||
{
|
||||
id: 's2',
|
||||
tint: { fg: 'accent', bg: 'paper' },
|
||||
frame: { x: -0.0143, y: 0.9571, w: 2.0286, h: 0.0572 },
|
||||
rotation: 0,
|
||||
opacity: 1,
|
||||
locked: false,
|
||||
kind: 'shape',
|
||||
shape: 'rect',
|
||||
fill: '#c8453d',
|
||||
gradient: 'none',
|
||||
paint: { type: 'pattern', pattern: 'stripes', fg: '#c8453d', bg: '#e3f1e8', scale: 0.6, angle: 45 },
|
||||
stroke: null,
|
||||
token: 'accent',
|
||||
strokeWidth: 0,
|
||||
strokeStyle: 'solid',
|
||||
radius: 0,
|
||||
},
|
||||
{
|
||||
id: 's3',
|
||||
keep: true,
|
||||
frame: { x: 0.5333, y: 0.5524, w: 0.4095, h: 0.4095 },
|
||||
rotation: 0,
|
||||
opacity: 0.35,
|
||||
locked: false,
|
||||
kind: 'shape',
|
||||
shape: 'ellipse',
|
||||
fill: '#ec8f6a',
|
||||
gradient: 'none',
|
||||
stroke: null,
|
||||
token: 'accent2',
|
||||
strokeWidth: 0,
|
||||
strokeStyle: 'solid',
|
||||
radius: 0,
|
||||
},
|
||||
{
|
||||
id: 's4',
|
||||
keep: true,
|
||||
tint: { colors: [null, 'ink', 'accent2', 'accent3'] },
|
||||
frame: { x: 0.5714, y: 0.5905, w: 0.3333, h: 0.3333 },
|
||||
rotation: 0,
|
||||
opacity: 1,
|
||||
locked: false,
|
||||
kind: 'sticker',
|
||||
stickerId: 'santoriniChurch',
|
||||
colors: ['#fbfaf5', '#1f2d4d', '#ec8f6a', '#f3d58a'],
|
||||
flipX: false,
|
||||
},
|
||||
{
|
||||
id: 's5',
|
||||
tint: { colors: ['ink'] },
|
||||
frame: { x: 0.0857, y: 0.7143, w: 0.2857, h: 0.2 },
|
||||
rotation: -12,
|
||||
opacity: 0.7,
|
||||
locked: false,
|
||||
kind: 'sticker',
|
||||
stickerId: 'passportStamp',
|
||||
colors: ['#1f2d4d'],
|
||||
flipX: false,
|
||||
},
|
||||
{
|
||||
id: 't6',
|
||||
role: 'date',
|
||||
frame: { x: 0.0762, y: 0.1143, w: 0.8476, h: 0.0381 },
|
||||
rotation: 0,
|
||||
opacity: 1,
|
||||
locked: false,
|
||||
group: 'head',
|
||||
kind: 'text',
|
||||
text: '',
|
||||
font: 'montserrat',
|
||||
size: 0.0381,
|
||||
weight: 600,
|
||||
italic: false,
|
||||
align: 'left',
|
||||
leading: 1,
|
||||
tracking: 0.42,
|
||||
color: '#1f2d4d',
|
||||
token: 'ink',
|
||||
fontRole: 'heading',
|
||||
binding: null,
|
||||
overridden: false,
|
||||
transform: 'upper',
|
||||
vAlign: 'middle',
|
||||
fit: 'shrink',
|
||||
fitMax: 0.0381,
|
||||
},
|
||||
{
|
||||
id: 't7',
|
||||
role: 'title',
|
||||
frame: { x: 0.0762, y: 0.1619, w: 0.8476, h: 0.3238 },
|
||||
rotation: 0,
|
||||
opacity: 1,
|
||||
locked: false,
|
||||
group: 'head',
|
||||
kind: 'text',
|
||||
text: '',
|
||||
font: 'dmserif',
|
||||
size: 0.381,
|
||||
weight: 400,
|
||||
italic: false,
|
||||
align: 'left',
|
||||
leading: 0.92,
|
||||
tracking: 0,
|
||||
color: '#1f2d4d',
|
||||
token: 'ink',
|
||||
fontRole: 'display',
|
||||
binding: null,
|
||||
overridden: false,
|
||||
vAlign: 'top',
|
||||
fit: 'shrink',
|
||||
fitMax: 0.381,
|
||||
},
|
||||
{
|
||||
id: 't8',
|
||||
role: 'subtitle',
|
||||
frame: { x: 0.0762, y: 0.4952, w: 0.8476, h: 0.0952 },
|
||||
rotation: 0,
|
||||
opacity: 1,
|
||||
locked: false,
|
||||
group: 'head',
|
||||
kind: 'text',
|
||||
text: '',
|
||||
font: 'dancing',
|
||||
size: 0.1333,
|
||||
weight: 400,
|
||||
italic: false,
|
||||
align: 'left',
|
||||
leading: 1.1,
|
||||
tracking: 0,
|
||||
color: '#c8453d',
|
||||
token: 'accent',
|
||||
fontRole: 'script',
|
||||
binding: null,
|
||||
overridden: false,
|
||||
vAlign: 'middle',
|
||||
fit: 'shrink',
|
||||
fitMax: 0.1333,
|
||||
},
|
||||
{
|
||||
id: 's9',
|
||||
tint: { colors: ['ink'] },
|
||||
frame: { x: 0.0762, y: 0.6048, w: 0.3, h: 0.0429 },
|
||||
rotation: 0,
|
||||
opacity: 1,
|
||||
locked: false,
|
||||
group: 'head',
|
||||
kind: 'sticker',
|
||||
stickerId: 'waveRule',
|
||||
colors: ['#1f2d4d'],
|
||||
flipX: false,
|
||||
},
|
||||
{
|
||||
id: 's10',
|
||||
tint: { colors: ['accent2', 'ink', 'accent3', null] },
|
||||
frame: { x: 1.7524, y: 0.0952, w: 0.1524, h: 0.1905 },
|
||||
rotation: 4,
|
||||
opacity: 1,
|
||||
locked: false,
|
||||
group: 'stamp',
|
||||
kind: 'sticker',
|
||||
stickerId: 'postageStamp',
|
||||
colors: ['#ec8f6a', '#1f2d4d', '#f3d58a', '#f7edd5'],
|
||||
flipX: false,
|
||||
},
|
||||
{
|
||||
id: 's11',
|
||||
tint: { colors: ['ink'] },
|
||||
frame: { x: 1.6, y: 0.1238, w: 0.2, h: 0.1163 },
|
||||
rotation: -10,
|
||||
opacity: 0.8,
|
||||
locked: false,
|
||||
group: 'stamp',
|
||||
kind: 'sticker',
|
||||
stickerId: 'postmark',
|
||||
colors: ['#1f2d4d'],
|
||||
flipX: false,
|
||||
},
|
||||
{
|
||||
id: 'l12',
|
||||
tint: { stroke: 'accent' },
|
||||
frame: { x: 1.0762, y: 0.2524, w: 0.4571, h: 0.0095 },
|
||||
rotation: 0,
|
||||
opacity: 1,
|
||||
locked: false,
|
||||
kind: 'line',
|
||||
points: [
|
||||
{
|
||||
x: 0,
|
||||
y: 0.5,
|
||||
},
|
||||
{
|
||||
x: 1,
|
||||
y: 0.5,
|
||||
},
|
||||
],
|
||||
curve: 'straight',
|
||||
stroke: '#c8453d',
|
||||
strokeWidth: 0.0012,
|
||||
dash: 'solid',
|
||||
squiggle: 'none',
|
||||
startCap: 'none',
|
||||
endCap: 'none',
|
||||
wobble: 0,
|
||||
ornament: 'star',
|
||||
},
|
||||
{
|
||||
id: 't13',
|
||||
role: 'body',
|
||||
frame: { x: 1.0762, y: 0.3048, w: 0.8476, h: 0.6095 },
|
||||
rotation: 0,
|
||||
opacity: 1,
|
||||
locked: false,
|
||||
kind: 'text',
|
||||
text: '',
|
||||
font: 'inter',
|
||||
size: 0.0476,
|
||||
weight: 400,
|
||||
italic: false,
|
||||
align: 'left',
|
||||
leading: 1.55,
|
||||
tracking: 0,
|
||||
color: '#1f2d4d',
|
||||
token: 'ink',
|
||||
fontRole: 'body',
|
||||
binding: null,
|
||||
overridden: false,
|
||||
vAlign: 'top',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
id: 'postcard-rack',
|
||||
labelKey: 'studio.templates.name.postcardRack',
|
||||
kind: 'inner',
|
||||
archetype: 'postcard',
|
||||
tags: ['postcard', 'collage', 'pinboard', 'tape', 'tilted', 'seven-photos', 'lively'],
|
||||
descr:
|
||||
'Seven photos as picture postcards in white borders, tilted and overlapping, held by tape, one cancelled by a postmark; a pale sun behind the date, the display serif title and the script line, the story at the foot.',
|
||||
background: '#e3f1e8',
|
||||
backgroundToken: 'paper',
|
||||
elements: [
|
||||
{
|
||||
id: 's1',
|
||||
keep: true,
|
||||
frame: { x: -0.12, y: -0.14, w: 0.5, h: 0.5102 },
|
||||
rotation: 0,
|
||||
opacity: 0.55,
|
||||
locked: false,
|
||||
kind: 'shape',
|
||||
shape: 'sun-cutout',
|
||||
fill: '#f3d58a',
|
||||
gradient: 'none',
|
||||
stroke: null,
|
||||
token: 'accent3',
|
||||
strokeWidth: 0,
|
||||
strokeStyle: 'solid',
|
||||
radius: 0,
|
||||
},
|
||||
{
|
||||
id: 't2',
|
||||
role: 'date',
|
||||
frame: { x: 0.0762, y: 0.0857, w: 0.8476, h: 0.0381 },
|
||||
rotation: 0,
|
||||
opacity: 1,
|
||||
locked: false,
|
||||
group: 'title',
|
||||
kind: 'text',
|
||||
text: '',
|
||||
font: 'montserrat',
|
||||
size: 0.0381,
|
||||
weight: 600,
|
||||
italic: false,
|
||||
align: 'left',
|
||||
leading: 1,
|
||||
tracking: 0.42,
|
||||
color: '#1f2d4d',
|
||||
token: 'ink',
|
||||
fontRole: 'heading',
|
||||
binding: null,
|
||||
overridden: false,
|
||||
transform: 'upper',
|
||||
vAlign: 'middle',
|
||||
fit: 'shrink',
|
||||
fitMax: 0.0381,
|
||||
},
|
||||
{
|
||||
id: 't3',
|
||||
role: 'title',
|
||||
frame: { x: 0.0762, y: 0.1333, w: 0.8476, h: 0.1238 },
|
||||
rotation: 0,
|
||||
opacity: 1,
|
||||
locked: false,
|
||||
group: 'title',
|
||||
kind: 'text',
|
||||
text: '',
|
||||
font: 'dmserif',
|
||||
size: 0.2286,
|
||||
weight: 400,
|
||||
italic: false,
|
||||
align: 'left',
|
||||
leading: 1,
|
||||
tracking: 0,
|
||||
color: '#1f2d4d',
|
||||
token: 'ink',
|
||||
fontRole: 'display',
|
||||
binding: null,
|
||||
overridden: false,
|
||||
vAlign: 'middle',
|
||||
fit: 'shrink',
|
||||
fitMax: 0.2286,
|
||||
},
|
||||
{
|
||||
id: 't4',
|
||||
role: 'subtitle',
|
||||
frame: { x: 0.0762, y: 0.2571, w: 0.8476, h: 0.0762 },
|
||||
rotation: 0,
|
||||
opacity: 1,
|
||||
locked: false,
|
||||
group: 'title',
|
||||
kind: 'text',
|
||||
text: '',
|
||||
font: 'dancing',
|
||||
size: 0.1048,
|
||||
weight: 400,
|
||||
italic: false,
|
||||
align: 'left',
|
||||
leading: 1.1,
|
||||
tracking: 0,
|
||||
color: '#c8453d',
|
||||
token: 'accent',
|
||||
fontRole: 'script',
|
||||
binding: null,
|
||||
overridden: false,
|
||||
vAlign: 'middle',
|
||||
fit: 'shrink',
|
||||
fitMax: 0.1048,
|
||||
},
|
||||
{
|
||||
id: 'p5',
|
||||
role: 'photo:1',
|
||||
tint: { shadow: 'ink' },
|
||||
frame: { x: 0.0762, y: 0.381, w: 0.5238, h: 0.3714 },
|
||||
rotation: -3,
|
||||
opacity: 1,
|
||||
locked: false,
|
||||
group: 'print',
|
||||
kind: 'photo',
|
||||
photoId: null,
|
||||
fit: 'cover',
|
||||
focalX: 0.5,
|
||||
focalY: 0.5,
|
||||
radius: 0,
|
||||
filter: 'none',
|
||||
mask: null,
|
||||
frameStyle: 'none',
|
||||
border: { width: 0.0105, color: '#ffffff' },
|
||||
shadow: { dx: 0.0076, dy: 0.0076, color: '#1f2d4d', alpha: 0.25 },
|
||||
},
|
||||
{
|
||||
id: 's6',
|
||||
tint: { colors: ['accent3'] },
|
||||
frame: { x: 0.2619, y: 0.3429, w: 0.1524, h: 0.0762 },
|
||||
rotation: -8,
|
||||
opacity: 0.85,
|
||||
locked: false,
|
||||
group: 'print',
|
||||
kind: 'sticker',
|
||||
stickerId: 'maskingTape',
|
||||
colors: ['#f3d58a'],
|
||||
flipX: false,
|
||||
},
|
||||
{
|
||||
id: 'p7',
|
||||
role: 'photo:2',
|
||||
tint: { shadow: 'ink' },
|
||||
frame: { x: 0.6, y: 0.3333, w: 0.3048, h: 0.381 },
|
||||
rotation: 4,
|
||||
opacity: 1,
|
||||
locked: false,
|
||||
kind: 'photo',
|
||||
photoId: null,
|
||||
fit: 'cover',
|
||||
focalX: 0.5,
|
||||
focalY: 0.5,
|
||||
radius: 0,
|
||||
filter: 'none',
|
||||
mask: null,
|
||||
frameStyle: 'none',
|
||||
border: { width: 0.0105, color: '#ffffff' },
|
||||
shadow: { dx: 0.0076, dy: 0.0076, color: '#1f2d4d', alpha: 0.25 },
|
||||
},
|
||||
{
|
||||
id: 'p8',
|
||||
role: 'photo:3',
|
||||
tint: { shadow: 'ink' },
|
||||
frame: { x: 0.4, y: 0.6857, w: 0.3333, h: 0.2381 },
|
||||
rotation: 2,
|
||||
opacity: 1,
|
||||
locked: false,
|
||||
kind: 'photo',
|
||||
photoId: null,
|
||||
fit: 'cover',
|
||||
focalX: 0.5,
|
||||
focalY: 0.5,
|
||||
radius: 0,
|
||||
filter: 'none',
|
||||
mask: null,
|
||||
frameStyle: 'none',
|
||||
border: { width: 0.0105, color: '#ffffff' },
|
||||
shadow: { dx: 0.0076, dy: 0.0076, color: '#1f2d4d', alpha: 0.25 },
|
||||
},
|
||||
{
|
||||
id: 'p9',
|
||||
role: 'photo:4',
|
||||
tint: { shadow: 'ink' },
|
||||
frame: { x: 1.0762, y: 0.0762, w: 0.4, h: 0.2857 },
|
||||
rotation: 3,
|
||||
opacity: 1,
|
||||
locked: false,
|
||||
kind: 'photo',
|
||||
photoId: null,
|
||||
fit: 'cover',
|
||||
focalX: 0.5,
|
||||
focalY: 0.5,
|
||||
radius: 0,
|
||||
filter: 'none',
|
||||
mask: null,
|
||||
frameStyle: 'none',
|
||||
border: { width: 0.0105, color: '#ffffff' },
|
||||
shadow: { dx: 0.0076, dy: 0.0076, color: '#1f2d4d', alpha: 0.25 },
|
||||
},
|
||||
{
|
||||
id: 'p10',
|
||||
role: 'photo:5',
|
||||
tint: { shadow: 'ink' },
|
||||
frame: { x: 1.5048, y: 0.1048, w: 0.4, h: 0.2857 },
|
||||
rotation: -4,
|
||||
opacity: 1,
|
||||
locked: false,
|
||||
group: 'tape',
|
||||
kind: 'photo',
|
||||
photoId: null,
|
||||
fit: 'cover',
|
||||
focalX: 0.5,
|
||||
focalY: 0.5,
|
||||
radius: 0,
|
||||
filter: 'none',
|
||||
mask: null,
|
||||
frameStyle: 'none',
|
||||
border: { width: 0.0105, color: '#ffffff' },
|
||||
shadow: { dx: 0.0076, dy: 0.0076, color: '#1f2d4d', alpha: 0.25 },
|
||||
},
|
||||
{
|
||||
id: 's11',
|
||||
tint: { colors: ['accent3'] },
|
||||
frame: { x: 1.6286, y: 0.0667, w: 0.1524, h: 0.0762 },
|
||||
rotation: 6,
|
||||
opacity: 0.85,
|
||||
locked: false,
|
||||
group: 'tape',
|
||||
kind: 'sticker',
|
||||
stickerId: 'maskingTape',
|
||||
colors: ['#f3d58a'],
|
||||
flipX: false,
|
||||
},
|
||||
{
|
||||
id: 'p12',
|
||||
role: 'photo:6',
|
||||
tint: { shadow: 'ink' },
|
||||
frame: { x: 1.0952, y: 0.4095, w: 0.3048, h: 0.381 },
|
||||
rotation: -2,
|
||||
opacity: 1,
|
||||
locked: false,
|
||||
group: 'picture',
|
||||
kind: 'photo',
|
||||
photoId: null,
|
||||
fit: 'cover',
|
||||
focalX: 0.5,
|
||||
focalY: 0.5,
|
||||
radius: 0,
|
||||
filter: 'none',
|
||||
mask: null,
|
||||
frameStyle: 'none',
|
||||
border: { width: 0.0105, color: '#ffffff' },
|
||||
shadow: { dx: 0.0076, dy: 0.0076, color: '#1f2d4d', alpha: 0.25 },
|
||||
},
|
||||
{
|
||||
id: 's13',
|
||||
tint: { colors: ['accent2', 'paper'] },
|
||||
frame: { x: 1.0571, y: 0.3905, w: 0.1905, h: 0.054 },
|
||||
rotation: -30,
|
||||
opacity: 0.9,
|
||||
locked: false,
|
||||
group: 'picture',
|
||||
kind: 'sticker',
|
||||
stickerId: 'washiStripes',
|
||||
colors: ['#ec8f6a', '#e3f1e8'],
|
||||
flipX: false,
|
||||
},
|
||||
{
|
||||
id: 'p14',
|
||||
role: 'photo:7',
|
||||
tint: { shadow: 'ink' },
|
||||
frame: { x: 1.4381, y: 0.4286, w: 0.4667, h: 0.3143 },
|
||||
rotation: 5,
|
||||
opacity: 1,
|
||||
locked: false,
|
||||
group: 'postmark',
|
||||
kind: 'photo',
|
||||
photoId: null,
|
||||
fit: 'cover',
|
||||
focalX: 0.5,
|
||||
focalY: 0.5,
|
||||
radius: 0,
|
||||
filter: 'none',
|
||||
mask: null,
|
||||
frameStyle: 'none',
|
||||
border: { width: 0.0105, color: '#ffffff' },
|
||||
shadow: { dx: 0.0076, dy: 0.0076, color: '#1f2d4d', alpha: 0.25 },
|
||||
},
|
||||
{
|
||||
id: 's15',
|
||||
tint: { colors: ['ink'] },
|
||||
frame: { x: 1.7238, y: 0.6762, w: 0.181, h: 0.1052 },
|
||||
rotation: -12,
|
||||
opacity: 0.8,
|
||||
locked: false,
|
||||
group: 'postmark',
|
||||
kind: 'sticker',
|
||||
stickerId: 'postmark',
|
||||
colors: ['#1f2d4d'],
|
||||
flipX: false,
|
||||
},
|
||||
{
|
||||
id: 't16',
|
||||
role: 'body',
|
||||
frame: { x: 1.0762, y: 0.8286, w: 0.8476, h: 0.1143 },
|
||||
rotation: 0,
|
||||
opacity: 1,
|
||||
locked: false,
|
||||
kind: 'text',
|
||||
text: '',
|
||||
font: 'inter',
|
||||
size: 0.0429,
|
||||
weight: 400,
|
||||
italic: false,
|
||||
align: 'left',
|
||||
leading: 1.55,
|
||||
tracking: 0,
|
||||
color: '#1f2d4d',
|
||||
token: 'ink',
|
||||
fontRole: 'body',
|
||||
binding: null,
|
||||
overridden: false,
|
||||
vAlign: 'top',
|
||||
},
|
||||
],
|
||||
},
|
||||
];
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -55,12 +55,12 @@ function box(el: BookElement) {
|
||||
const camel = (id: string) => id.replace(/-([a-z0-9])/g, (_, c: string) => c.toUpperCase());
|
||||
|
||||
describe('the decorated template set', () => {
|
||||
it('TPLCAT-001: holds 21 covers, three in each archetype, and 16 double spreads', () => {
|
||||
expect(covers).toHaveLength(21);
|
||||
expect(spreads).toHaveLength(16);
|
||||
it('TPLCAT-001: holds 48 covers and 60 double spreads, four covers and five spreads in each archetype', () => {
|
||||
expect(covers).toHaveLength(48);
|
||||
expect(spreads).toHaveLength(60);
|
||||
for (const archetype of BOOK_COVER_ARCHETYPES) {
|
||||
expect(decoratedTemplatesFor('single', archetype), archetype).toHaveLength(3);
|
||||
expect(decoratedTemplatesFor('inner', archetype).length, archetype).toBeGreaterThanOrEqual(1);
|
||||
expect(decoratedTemplatesFor('single', archetype), archetype).toHaveLength(4);
|
||||
expect(decoratedTemplatesFor('inner', archetype), archetype).toHaveLength(5);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -190,7 +190,7 @@ describe('finding the templates', () => {
|
||||
expect(findDecoratedTemplate('no-such-template')).toBeUndefined();
|
||||
expect(decoratedTemplatesFor('single').every((t) => t.kind === 'single')).toBe(true);
|
||||
expect(decoratedTemplatesFor('inner', 'postcard').every((t) => t.archetype === 'postcard')).toBe(true);
|
||||
expect(decoratedTemplatesFor('single', null)).toHaveLength(21);
|
||||
expect(decoratedTemplatesFor('single', null)).toHaveLength(48);
|
||||
expect(isBookTemplateId('grid-badge-circle')).toBe(true);
|
||||
expect(isBookTemplateId('two-up')).toBe(true);
|
||||
expect(isBookTemplateId('cover-full')).toBe(true);
|
||||
@@ -203,10 +203,10 @@ describe('finding the templates', () => {
|
||||
expect(row.roles).toEqual(['title', 'date', 'body']);
|
||||
expect(row.tags).toContain('word-art');
|
||||
const all = listBookLayouts(null, square);
|
||||
expect(all.decorated.single).toHaveLength(21);
|
||||
expect(all.decorated.inner).toHaveLength(16);
|
||||
expect(all.decorated.single).toHaveLength(48);
|
||||
expect(all.decorated.inner).toHaveLength(60);
|
||||
expect(all.notes.decorated).toMatch(/whole designed page/);
|
||||
const inner = listBookLayouts(null, square, 'inner');
|
||||
expect([inner.decorated.single, inner.decorated.inner.length]).toEqual([[], 16]);
|
||||
expect([inner.decorated.single, inner.decorated.inner.length]).toEqual([[], 60]);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -12,6 +12,18 @@ import { INNER_COLLAGE } from './data/inner-collage.data';
|
||||
import { INNER_EPHEMERA } from './data/inner-ephemera.data';
|
||||
import { INNER_GRIDS } from './data/inner-grids.data';
|
||||
import { INNER_STORY } from './data/inner-story.data';
|
||||
import { MORE_CUTOUT } from './data/more-cutout.data';
|
||||
import { MORE_GRID_BADGE } from './data/more-grid-badge.data';
|
||||
import { MORE_MINIMAL_SERIF } from './data/more-minimal-serif.data';
|
||||
import { MORE_POSTCARD } from './data/more-postcard.data';
|
||||
import { MORE_POSTER_POP } from './data/more-poster-pop.data';
|
||||
import { MORE_SPINE_BAND } from './data/more-spine-band.data';
|
||||
import { MORE_STAMP_COLLAGE } from './data/more-stamp-collage.data';
|
||||
import { NEW_EDITORIAL } from './data/new-editorial.data';
|
||||
import { NEW_FIELD_NOTES } from './data/new-field-notes.data';
|
||||
import { NEW_NIGHT_FILM } from './data/new-night-film.data';
|
||||
import { NEW_RISO } from './data/new-riso.data';
|
||||
import { NEW_VINTAGE_POSTER } from './data/new-vintage-poster.data';
|
||||
import {
|
||||
templatePhotoSlots,
|
||||
templateRoles,
|
||||
@@ -19,26 +31,56 @@ import {
|
||||
type BookTemplateKind,
|
||||
} from './template-format';
|
||||
|
||||
/** The covers or the spreads of a data file that holds both. */
|
||||
function ofKind(set: readonly BookDecoratedTemplate[], kind: BookTemplateKind): BookDecoratedTemplate[] {
|
||||
return set.filter((t) => t.kind === kind);
|
||||
}
|
||||
|
||||
/**
|
||||
* The decorated templates the Studio offers and the assistant lays pages
|
||||
* on: 21 covers, three in each of the seven archetypes, and 16 double
|
||||
* spreads, each set in the manner of one of them. The data files hold them
|
||||
* as drawn (template-format.ts); this is the one list the Studio's panel,
|
||||
* the page operations and `list_book_layouts` read.
|
||||
* on: 48 covers, four in each of the twelve archetypes, and 60 double
|
||||
* spreads, five in the manner of each. The data files hold them as drawn
|
||||
* (template-format.ts); this is the one list the Studio's panel, the page
|
||||
* operations and `list_book_layouts` read. Its order is the panel's: the
|
||||
* covers archetype by archetype, then the spreads.
|
||||
*/
|
||||
export const BOOK_DECORATED_TEMPLATES: readonly BookDecoratedTemplate[] = [
|
||||
...COVERS_SPINE_BAND,
|
||||
...ofKind(MORE_SPINE_BAND, 'single'),
|
||||
...COVERS_POSTER_POP,
|
||||
...ofKind(MORE_POSTER_POP, 'single'),
|
||||
...COVERS_CUTOUT,
|
||||
...ofKind(MORE_CUTOUT, 'single'),
|
||||
...COVERS_POSTCARD,
|
||||
...ofKind(MORE_POSTCARD, 'single'),
|
||||
...COVERS_GRID_BADGE,
|
||||
...ofKind(MORE_GRID_BADGE, 'single'),
|
||||
...COVERS_MINIMAL_SERIF,
|
||||
...ofKind(MORE_MINIMAL_SERIF, 'single'),
|
||||
...COVERS_STAMP_COLLAGE,
|
||||
...ofKind(MORE_STAMP_COLLAGE, 'single'),
|
||||
...ofKind(NEW_RISO, 'single'),
|
||||
...ofKind(NEW_EDITORIAL, 'single'),
|
||||
...ofKind(NEW_VINTAGE_POSTER, 'single'),
|
||||
...ofKind(NEW_NIGHT_FILM, 'single'),
|
||||
...ofKind(NEW_FIELD_NOTES, 'single'),
|
||||
...INNER_STORY,
|
||||
...INNER_CHAPTERS,
|
||||
...INNER_COLLAGE,
|
||||
...INNER_EPHEMERA,
|
||||
...INNER_GRIDS,
|
||||
...ofKind(MORE_SPINE_BAND, 'inner'),
|
||||
...ofKind(MORE_POSTER_POP, 'inner'),
|
||||
...ofKind(MORE_CUTOUT, 'inner'),
|
||||
...ofKind(MORE_POSTCARD, 'inner'),
|
||||
...ofKind(MORE_GRID_BADGE, 'inner'),
|
||||
...ofKind(MORE_MINIMAL_SERIF, 'inner'),
|
||||
...ofKind(MORE_STAMP_COLLAGE, 'inner'),
|
||||
...ofKind(NEW_RISO, 'inner'),
|
||||
...ofKind(NEW_EDITORIAL, 'inner'),
|
||||
...ofKind(NEW_VINTAGE_POSTER, 'inner'),
|
||||
...ofKind(NEW_NIGHT_FILM, 'inner'),
|
||||
...ofKind(NEW_FIELD_NOTES, 'inner'),
|
||||
];
|
||||
|
||||
const BY_ID = new Map(BOOK_DECORATED_TEMPLATES.map((t) => [t.id, t]));
|
||||
|
||||
@@ -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];
|
||||
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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,
|
||||
},
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user