/* Shared bits — Nav, Logo, footer, etc. */ const { useState, useEffect, useRef } = React; /* ---------- Logo mark ---------- */ function Mark({ size = 22 }) { // Original geometric mark: stacked offset rectangles forming an "R" silhouette in negative space const s = size; return ( ); } function Wordmark() { const home = window.location.pathname.includes('dashboard') || window.location.pathname.includes('impressum') || window.location.pathname.includes('datenschutz') ? 'index.html' : '#top'; return ( RICS Analytics ); } /* ---------- Nav ---------- */ function Nav() { const [scrolled, setScrolled] = useState(false); useEffect(() => { const onScroll = () => setScrolled(window.scrollY > 8); onScroll(); window.addEventListener('scroll', onScroll, { passive: true }); return () => window.removeEventListener('scroll', onScroll); }, []); return ( {(window.location.pathname.includes('dashboard') ? [ ['Lagekarte', '#lagekarte'], ['Reports', '#reports'], ['Portfolio', '#portfolio'], ['Bericht anfordern', '#request-report'], ] : window.location.pathname.includes('impressum') || window.location.pathname.includes('datenschutz') ? [ ['Methodik', 'index.html#methodology'], ['Reports', 'index.html#reports'], ['Track Record', 'index.html#track-record'], ['Plattform', 'index.html#founder'], ] : [ ['Methodik', '#methodology'], ['Reports', '#reports'], ['Track Record', '#track-record'], ['Plattform', '#founder'], ]).map(([label, href]) => ( e.currentTarget.style.color = 'var(--on-surface)'} onMouseLeave={(e) => e.currentTarget.style.color = 'var(--on-surface-variant)'}> {label} ))} {window.location.pathname.includes('intelligence') || window.location.pathname.includes('simulation') ? ( ← Dashboard ) : window.location.pathname.includes('dashboard') ? ( e.currentTarget.style.color = 'var(--on-surface)'} onMouseLeave={(e) => e.currentTarget.style.color = 'var(--on-surface-variant)'}> Intelligence ← Startseite ) : ( Dashboard )} ); } /* ---------- Footer ---------- */ function Footer() { const cols = [ { label: 'Reports', links: ['Makro-Regime', 'Geo-Reports', 'Konflikt-Reports', 'Infrastruktur & Lieferketten', 'Asset-Reports'], }, { label: 'Plattform', links: ['Methodik (GeoStrat)', 'Track Record', 'Technologie', 'Gründer', 'Kontakt'], }, { label: 'Folgen', links: ['TradingView · @Phillipklh', 'LinkedIn', 'X (Twitter)', 'Substack'], }, ]; return ( ); } /* ---------- Reveal helper (intersection-observer fade) ---------- */ function Reveal({ children, delay = 0, as = 'div', style = {} }) { const ref = useRef(null); const [shown, setShown] = useState(false); useEffect(() => { const el = ref.current; if (!el) return; const io = new IntersectionObserver((entries) => { entries.forEach((e) => { if (e.isIntersecting) { setTimeout(() => setShown(true), delay); io.unobserve(el); } }); }, { threshold: 0.12 }); io.observe(el); return () => io.disconnect(); }, [delay]); const Tag = as; return {children}; } Object.assign(window, { Mark, Wordmark, Nav, Footer, Reveal });