// mapemedia — site chrome: multi-page TopNav + Footer. const NAV_LINKS = [ { label: 'Leistungen', href: 'index.html#leistungen', page: 'home' }, { label: 'Case Studies', href: 'case-studies.html', page: 'cases' }, { label: 'Über mich', href: 'about.html', page: 'about' }, { label: 'Kontakt', href: 'contact.html', page: 'contact' }]; // ── Language flags (DE / EN switch) ─────────────────────────────────── const DEFlag = () => ; const UKFlag = () => { const id = React.useId().replace(/[:]/g, ''); return ( ); }; const LangSwitch = ({ size = 22 }) => { const [lang, setLang] = React.useState(() => window.mmI18n ? window.mmI18n.get() : 'de'); React.useEffect(() => { const onChange = (e) => setLang(e.detail); document.addEventListener('mm-lang', onChange); return () => document.removeEventListener('mm-lang', onChange); }, []); const pick = (l) => {if (window.mmI18n) window.mmI18n.set(l);setLang(l);}; const flagBtn = (l, label, Flag) => ; return (
{flagBtn('en', 'English', UKFlag)} {flagBtn('de', 'Deutsch', DEFlag)}
); }; const Wordmark = ({ size = 22, href = 'index.html' }) => mapemedia ; const TopNav = ({ current }) => { const [menu, setMenu] = React.useState(false); const [scrolled, setScrolled] = React.useState(false); React.useEffect(() => { const onScroll = () => setScrolled(window.scrollY > 8); onScroll(); window.addEventListener('scroll', onScroll, { passive: true }); return () => window.removeEventListener('scroll', onScroll); }, []); const linkStyle = (active) => ({ fontFamily: 'var(--font-sans)', fontSize: 11, fontWeight: 500, letterSpacing: '.12em', textTransform: 'uppercase', color: active ? '#fff' : 'rgba(255,255,255,.6)', textDecoration: 'none', cursor: 'pointer', transition: 'color .2s', position: 'relative', paddingBottom: 4, borderBottom: active ? '1px solid var(--primary)' : '1px solid transparent' }); return ( {menu &&
{NAV_LINKS.map((l) => {l.label} )}
}
); }; // ── Footer ──────────────────────────────────────────────────────────── const FooterCol = ({ title, links }) =>
{title}
{links.map((l) => { const ext = l.href && /^https?:/.test(l.href); return ( e.currentTarget.style.color = 'var(--primary)'} onMouseLeave={(e) => e.currentTarget.style.color = 'rgba(255,255,255,.45)'}> {l.label} ); })}
; const Footer = () => ; Object.assign(window, { TopNav, Footer, FooterCol, Wordmark, NAV_LINKS, LangSwitch, UKFlag, DEFlag });