// app.jsx — root: routing + tweaks const { useState: useStateRoot, useEffect: useEffectRoot } = React; const TWEAK_DEFAULTS = /*EDITMODE-BEGIN*/{ "direction": "centered", "accent": "Kick green", "glassBlur": 26, "bgStyle": "mesh", "bgGlow": 0.5 }/*EDITMODE-END*/; const ACCENTS = { "Kick green": 140, "Emerald": 158, "Mint": 172, "Cyan": 200, "Violet": 290 }; const DIRECTIONS = { "Centered": "centered", "Split": "split", "Full-bleed": "fullbleed", "Editorial": "editorial" }; function App() { const [t, setTweak] = useTweaks(TWEAK_DEFAULTS); const [route, setRoute] = useStateRoot("landing"); // apply tweaks to CSS useEffectRoot(() => { const r = document.documentElement; r.style.setProperty("--accent-h", String(ACCENTS[t.accent] ?? 142)); r.style.setProperty("--glass-blur", t.glassBlur + "px"); r.style.setProperty("--bg-glow", String(t.bgGlow)); document.body.setAttribute("data-bg", t.bgStyle); }, [t]); const onNav = (r) => { setRoute(r); window.scrollTo({ top: 0, behavior: "instant" in window ? "instant" : "auto" }); }; return (
{route === "landing" && ( onNav("login")} route={route} />