/* === App shell + Router === */ const { useState: useStateApp, useEffect: useEffectApp } = React; const TWEAK_DEFAULTS = /*EDITMODE-BEGIN*/{ "palette": "warm", "typo": "classic", "heroRecruitVariant": "callout-band", "employerVariant": "dual-match", "employerLeadVariant": "emphasis-em", "theme": "light" }/*EDITMODE-END*/; const BRAND_LOGO_SRC = "images/physiokur-logo-clean.png"; const NAV = [ { href: "#/", label: "Start" }, { href: "#/leistungen", label: "Leistungen" }, { href: "#/team", label: "Über uns" }, { href: "#/patienten", label: "Für Patienten" }, { href: "/app-reiter/", label: "Trainings-App" }, { href: "#/karriere", label: "Karriere" }, { href: "#/kontakt", label: "Kontakt" }, ]; function useHashRoute() { const [hash, setHash] = useStateApp(window.location.hash || "#/"); useEffectApp(() => { const onHash = () => { setHash(window.location.hash || "#/"); window.scrollTo({ top: 0, behavior: "instant" in window ? "instant" : "auto" }); }; window.addEventListener("hashchange", onHash); return () => window.removeEventListener("hashchange", onHash); }, []); return hash; } const THEME_ICONS = { sun: ( ), moon: ( ), }; function Nav({ route, theme, onToggleTheme }) { const [open, setOpen] = useStateApp(false); const isDark = theme === "dark"; return ( {NAV.map((n) => ( {n.label} ))} {isDark ? THEME_ICONS.sun : THEME_ICONS.moon} {isDark ? "Hell" : "Dunkel"} Termin anfragen setOpen(!open)}> {open ? "Schließen" : "Menü"} {open && ( {NAV.map((n) => ( setOpen(false)} className="nav__link" style={{ padding: "12px 14px" }}>{n.label} ))} { onToggleTheme(); setOpen(false); }} aria-label={isDark ? "Helles Design aktivieren" : "Dunkles Design aktivieren"} aria-pressed={isDark} style={{ justifySelf: "flex-start", marginTop: 8 }} > {isDark ? THEME_ICONS.sun : THEME_ICONS.moon} {isDark ? "Hell" : "Dunkel"} setOpen(false)} className="nav__cta" style={{ marginLeft: 0, marginTop: 8, justifySelf: "flex-start" }}>Termin anfragen )} ); } function Footer() { return ( ); } function App() { const route = useHashRoute(); const [t, setTweak] = useTweaks(TWEAK_DEFAULTS); useEffectApp(() => { document.documentElement.dataset.palette = t.palette; document.documentElement.dataset.typo = t.typo; document.documentElement.dataset.theme = t.theme; }, [t.palette, t.typo, t.theme]); let Page; switch (route) { case "#/leistungen": Page = ; break; case "#/team": Page = ; break; case "#/patienten": Page = ; break; case "#/karriere": Page = ; break; case "#/kontakt": Page = ; break; default: Page = ; } return ( <> setTweak("theme", t.theme === "dark" ? "light" : "dark")} /> {Page} ({ value: o.value, label: o.label, palette: o.colors }))} /> > ); } /* TweakColor with palette swatch options array support */ function TweakColor({ t, setTweak, k, options }) { return ( {options.map((o) => { const active = t[k] === o.value; return ( setTweak(k, o.value)} style={{ border: "1px solid " + (active ? "var(--ink)" : "rgba(0,0,0,.1)"), borderRadius: 10, padding: 10, background: "transparent", textAlign: "left", display: "grid", gap: 8, }}> {o.palette.map((c, i) => ( ))} {o.label} ); })} ); } function EmployerLayoutPreview({ layout }) { const frame = { border: "1px solid rgba(0,0,0,.1)", borderRadius: 6, overflow: "hidden", height: 52, background: "#ede7dc", padding: 6, display: "grid", gap: 4, }; const line = { height: 4, borderRadius: 999, background: "rgba(31,50,44,.18)" }; const block = { borderRadius: 4, background: "rgba(31,50,44,.12)" }; const ink = { background: "#1f322c" }; const sage = { background: "#5e7a6b" }; if (layout === "benefits-grid") { return ( {[0, 1, 2].map((i) => )} ); } if (layout === "editorial-split") { return ( {[0, 1, 2].map((i) => ( ))} ); } if (layout === "ink-band") { return ( {[0, 1, 2].map((i) => )} ); } if (layout === "culture-steps") { return ( {[0, 1, 2].map((i) => ( ))} ); } return ( {[0, 1].map((i) => )} {[0, 1].map((i) => )} ); } function TweakEmployerLayout({ t, setTweak, k, options }) { return ( {options.map((o) => { const active = t[k] === o.value; return ( setTweak(k, o.value)} style={{ border: "1px solid " + (active ? "var(--ink)" : "rgba(0,0,0,.1)"), borderRadius: 10, padding: 10, background: "transparent", textAlign: "left", display: "grid", gap: 8, }}> {o.label} ); })} ); } function EmployerLeadPreview({ layout }) { const frame = { border: "1px solid rgba(0,0,0,.1)", borderRadius: 6, overflow: "hidden", height: 52, background: "#ede7dc", padding: 6, display: "grid", gap: 4, }; const line = { height: 4, borderRadius: 999, background: "rgba(31,50,44,.18)" }; const block = { borderRadius: 4, background: "rgba(31,50,44,.12)" }; const pill = { width: 28, height: 8, borderRadius: 999, background: "#1f322c" }; const pillGhost = { width: 22, height: 8, borderRadius: 999, background: "rgba(31,50,44,.16)" }; const tag = { width: 34, height: 7, borderRadius: 999, background: "rgba(94,122,107,.35)" }; if (layout === "search-tag") { return ( ); } if (layout === "split-cta") { return ( ); } if (layout === "callout-band") { return ( ); } if (layout === "emphasis-em") { return ( ); } return ( ); } function TweakHeroRecruit({ t, setTweak, k, options }) { return ( {options.map((o) => { const active = t[k] === o.value; return ( setTweak(k, o.value)} style={{ border: "1px solid " + (active ? "var(--ink)" : "rgba(0,0,0,.1)"), borderRadius: 10, padding: 10, background: "transparent", textAlign: "left", display: "grid", gap: 8, }}> {o.label} ); })} ); } function TweakEmployerLead({ t, setTweak, k, options }) { return ( {options.map((o) => { const active = t[k] === o.value; return ( setTweak(k, o.value)} style={{ border: "1px solid " + (active ? "var(--ink)" : "rgba(0,0,0,.1)"), borderRadius: 10, padding: 10, background: "transparent", textAlign: "left", display: "grid", gap: 8, }}> {o.label} ); })} ); } ReactDOM.createRoot(document.getElementById("root")).render();