// Tweaks panel const { useState: useStateT, useEffect: useEffectT } = React; const TWEAK_DEFAULTS = /*EDITMODE-BEGIN*/{ "palette": "warm-gallery", "heroStyle": "giant-word", "serifAccent": "restrained" }/*EDITMODE-END*/; const PALETTES = { "warm-gallery": { bg: "#0e0c0a", fg: "#E8E2D0", card: "#141210", deep: "#0a0908", name: "Warm gallery" }, "deep-film": { bg: "#000000", fg: "#DEDBC8", card: "#101010", deep: "#060606", name: "Deep film" }, "paper-bone": { bg: "#F1ECDC", fg: "#1a1712", card: "#E8E1CD", deep: "#D9D2BE", name: "Paper & bone" }, }; function applyPalette(name) { const p = PALETTES[name] || PALETTES["warm-gallery"]; const root = document.documentElement; root.style.setProperty("--bg", p.bg); root.style.setProperty("--fg", p.fg); root.style.setProperty("--card", p.card); root.style.setProperty("--deep", p.deep); document.body.style.background = p.bg; document.body.style.color = p.fg; // override inline #E8E2D0 usage via CSS variable fallback class root.dataset.palette = name; } function TweaksPanel({ state, setState }) { return (
Tweaks
{Object.entries(PALETTES).map(([k, v]) => ( ))} {[ { k: "giant-word", n: "Giant word" }, { k: "stacked", n: "Stacked lines" }, { k: "serif-lead", n: "Serif italic lead" }, ].map((o) => ( ))} {[ { k: "none", n: "None" }, { k: "restrained", n: "Restrained (about only)" }, { k: "heavy", n: "Heavy (titles too)" }, ].map((o) => ( ))}
); } function TweakGroup({ label, children }) { return (
{label}
{children}
); } Object.assign(window, { TweaksPanel, TWEAK_DEFAULTS, PALETTES, applyPalette });