// app.jsx — root const TWEAK_DEFAULTS = /*EDITMODE-BEGIN*/{ "palette": "default", "dark": false, "density": "regular", "type": "serif-first", "heroVariant": "lede", "cursorSpot": true }/*EDITMODE-END*/; function App() { const [t, setTweak] = useTweaks(TWEAK_DEFAULTS); const [lang, setLang] = React.useState("de"); React.useEffect(() => { const r = document.documentElement; r.setAttribute("data-theme", t.dark ? "dark" : "light"); r.setAttribute("data-palette", t.palette); r.setAttribute("data-density", t.density); r.setAttribute("data-type", t.type); }, [t]); // Scroll to a hash target after the app has rendered (e.g. arriving from a method page link) React.useEffect(() => { const scrollToHash = () => { const id = window.location.hash.replace("#", ""); if (!id) return; const el = document.getElementById(id); if (el) window.scrollTo({ top: el.offsetTop - 70, behavior: "smooth" }); }; const timer = setTimeout(scrollToHash, 240); window.addEventListener("hashchange", scrollToHash); return () => { clearTimeout(timer); window.removeEventListener("hashchange", scrollToHash); }; }, []); return ( <> {t.cursorSpot && }