Simple conetent + restyled

This commit is contained in:
2026-09-21 17:59:29 +02:00
parent 0772462742
commit 467bf77d34
55 changed files with 2162 additions and 2070 deletions
+13
View File
@@ -0,0 +1,13 @@
// Derive editor body styles from the mockup CSS so the preview cannot drift.
import { readFileSync, writeFileSync } from 'node:fs';
const css = readFileSync(new URL('../src/styles/global.css', import.meta.url), 'utf8');
const base = css.slice(0, css.indexOf('/* Utilities'));
const prose = css.slice(css.indexOf('/* Prose'), css.indexOf('/* Footer'));
const markdown = css.slice(css.indexOf('.prose { overflow-wrap:'), css.indexOf('.submenu a[aria-current="page"]'));
const preview = (base + prose + markdown).replace(/\.prose\b/g, 'body');
writeFileSync(new URL('../public/admin/preview.css', import.meta.url),
'/* Generated by scripts/preview-styles.mjs; edit src/styles/global.css. */\n' + preview + `
body { display: block; min-height: 0; max-width: 64rem; margin: 0 auto; padding: 1.5rem; }
h1 { color: var(--galaxy-blue); font-family: var(--font-head); font-weight: 500; line-height: 1.05; }
`);