Forms gained steps, conditions, image choices, number fields with units and a summary step; the DEEG price finder uses all of it. Plugins are manifest plus Twig: blocks, settings, containers, routes, presets and theme packs, switched per installation. The review backlog is done: archive pages render through the normal page pipeline, forms and post lists work inside areas and sections, repeated sections get their own ids, breakpoints and colours come from the palette, backup and update work on MySQL and lock each other out. The task worker no longer shortens a process that has no time limit: set_time_limit() sets the limit instead of extending it, which turned an unlimited CLI run into eighty seconds and killed the full test suite far away from the scheduler. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
16 lines
1.0 KiB
JavaScript
16 lines
1.0 KiB
JavaScript
import { readFile, writeFile } from 'node:fs/promises';
|
|
|
|
/**
|
|
* The design classes are scoped to the body class, not to #main: the header and the footer are
|
|
* block documents of their own and live outside #main, so a #main prefix left every design token
|
|
* in them without effect - a row in the header ignored its column count.
|
|
*/
|
|
export function designCss(tokens) {
|
|
const rules = device => Object.entries(tokens).flatMap(([key, token]) => Object.entries(token.values).map(([value, [, css]]) => `.kant .d-${device}-${key}-${value}{${css}}`)).join('\n');
|
|
return `/* Generated from design-tokens.json by npm run build:design. */\n${rules('desktop')}\n@media(max-width:1024px){\n${rules('tablet')}\n}\n@media(max-width:767px){\n${rules('mobile')}\n}\n`;
|
|
}
|
|
if (process.argv[1]?.replaceAll('\\', '/').endsWith('/build-design.mjs')) {
|
|
const tokens = JSON.parse(await readFile(new URL('../public/assets/design-tokens.json', import.meta.url), 'utf8'));
|
|
await writeFile(new URL('../public/assets/design.css', import.meta.url), designCss(tokens));
|
|
}
|