// GEM Homepage — composes the design-system Editorial homepage (OptionA: hero + // structural-shifts slider + performance) with the shared chrome, full nav/footer // link wiring, the diamond loader, and the global light/dark toggle. const Nav = window.Nav, FooterCTA = window.FooterCTA, Footer = window.Footer; const OptionA = window.OptionA; const { useState } = React; const TWEAK_DEFAULTS = /*EDITMODE-BEGIN*/{ "accent": "#BEA87D", "showPerformance": true }/*EDITMODE-END*/; const App = () => { const [t, setTweak] = useTweaks(TWEAK_DEFAULTS); const [ping, setPing] = useState(false); const onBook = () => { setPing(true); setTimeout(() => setPing(false), 1800); }; React.useEffect(() => { const wireHome = (el) => { if (!el || el.dataset.home) return; el.dataset.home = '1'; el.style.cursor = 'pointer'; el.addEventListener('click', () => { window.location.href = 'Home.html'; }); }; const fix = () => { document.querySelectorAll('img').forEach((img) => { const s = img.getAttribute('src') || ''; if (s.includes('gem_logo_primary_horizontal.png') && window.GEM_LOGO_PRIMARY) img.src = window.GEM_LOGO_PRIMARY; else if (s.includes('gem_mark.png') && window.GEM_MARK) img.src = window.GEM_MARK; }); document.querySelectorAll('.gem-nav-logo').forEach(wireHome); wireHome(document.querySelector('.gem-footer-brand img')); document.querySelectorAll('.gem-nav-link').forEach((a) => { const label = (a.textContent || '').trim(); if (label === 'Equities') a.setAttribute('href', encodeURI('Equities.html')); else if (label === 'Property') a.setAttribute('href', encodeURI('Property.html')); else if (label === 'Managed Funds') a.setAttribute('href', encodeURI('Managed Funds.html')); }); document.querySelectorAll('.gem-footer-col a').forEach((a) => { const l = (a.textContent || '').trim(); if (l === 'Privacy Policy') a.setAttribute('href', encodeURI('Privacy.html')); else if (l === 'Terms & Conditions') a.setAttribute('href', encodeURI('Terms.html')); else if (l === 'Contact Us') a.setAttribute('href', encodeURI('Contact.html')); else if (l === 'Team') a.setAttribute('href', encodeURI('Team.html')); else if (l === 'History') a.setAttribute('href', encodeURI('History.html')); else if (l === 'Careers') a.setAttribute('href', encodeURI('Careers.html')); }); }; fix(); requestAnimationFrame(fix); const mo = new MutationObserver(fix); mo.observe(document.body, { childList: true, subtree: true }); return () => mo.disconnect(); }, []); // Optionally hide the performance section (last
inside OptionA). React.useEffect(() => { const perf = document.querySelector('.opt-a .perf'); if (perf) perf.style.display = t.showPerformance ? '' : 'none'; }, [t.showPerformance]); const rootStyle = { '--antique-gold': t.accent, '--antique-gold-soft': `${t.accent}26` }; return ( <>
setTweak('accent', v)} /> setTweak('showPerformance', v)} /> {ping &&
Booking flow — prototype stub
} ); }; ReactDOM.createRoot(document.getElementById('root')).render(); setTimeout(() => document.documentElement.classList.add('anim-ready'), 1400);