/* global React, ReactDOM, Hero, Story, Ceremony, Schedule, Venue, DressCode, Entourage, Gallery, Lightbox, FAQ, RSVP, Playlist, Gifts, MusicPlayer, TweaksPanel, TweakSection, TweakRadio, TweakColor, useTweaks */ const { useState, useEffect, useRef } = React; const TWEAK_DEFAULTS = /*EDITMODE-BEGIN*/{ "direction": "cinematic", "accent": "#d4a85a", "showCountdown": true, "showDecor": true, "wallStyle": "pill", "wallUnlockPreview": false } /*EDITMODE-END*/; const wallStyles = [ { value: 'pill', label: 'Pill' }, { value: 'banner', label: 'Banner' }, { value: 'seal', label: 'Seal' }]; const directions = [ { value: 'editorial', label: 'Editorial' }, { value: 'cinematic', label: 'Cinematic' }, { value: 'botanical', label: 'Botanical' }]; const accentOptions = { editorial: ['#b08a4a', '#3d0000', '#586357'], cinematic: ['#d4a85a', '#b08a4a', '#7d2233'], botanical: ['#7d2233', '#b08a4a', '#3d0000'] }; function Nav({ active, sections, onJump, brand }) { const [mobileOpen, setMobileOpen] = useState(false); return ( <>
{sections.map((s) => { e.preventDefault();setMobileOpen(false);onJump(s.id); }}>{s.label} )}
); } function Footer() { return ( ); } function App() { const [t, setTweak] = useTweaks(TWEAK_DEFAULTS); const [lightbox, setLightbox] = useState(null); const [active, setActive] = useState('home'); const scrollerRef = useRef(null); // apply theme useEffect(() => { document.documentElement.setAttribute('data-theme', t.direction); if (t.accent) document.documentElement.style.setProperty('--accent', t.accent); }, [t.direction, t.accent]); const sections = [ { id: 'home', label: 'Home' }, { id: 'story', label: 'Story' }, { id: 'schedule', label: 'Schedule' }, { id: 'ceremony', label: 'Ceremony' }, { id: 'venue', label: 'Venue' }, { id: 'attire', label: 'Attire' }, { id: 'entourage', label: 'Entourage' }, { id: 'gallery', label: 'Gallery' }, { id: 'faq', label: 'FAQ' }, { id: 'rsvp', label: 'RSVP' }, { id: 'gifts', label: 'Gifts' }]; const R = typeof window !== 'undefined' && window.__resources || {}; const galleryPhotos = [ { src: R.g01 || 'images/g01.jpg', cls: 'g-w8 ar-32' }, { src: R.g02 || 'images/g02.jpg', cls: 'g-w4 ar-34' }, { src: R.g03 || 'images/g03.jpg', cls: 'g-w6 ar-32' }, { src: R.g04 || 'images/g04.jpg', cls: 'g-w6 ar-32' }, { src: R.g05 || 'images/g05.jpg', cls: 'g-w4 ar-11' }, { src: R.g06 || 'images/g06.jpg', cls: 'g-w4 ar-11' }, { src: R.g07 || 'images/g07.jpg', cls: 'g-w4 ar-11' }, { src: R.g08 || 'images/g08.jpg', cls: 'g-w4 ar-34' }, { src: R.g09 || 'images/g09.jpg', cls: 'g-w8 ar-32' }, { src: R.g10 || 'images/g10.jpg', cls: 'g-w6 ar-32' }, { src: R.g11 || 'images/g11.jpg', cls: 'g-w6 ar-32' }, { src: R.g12 || 'images/g12.jpg', cls: 'g-w4 ar-11' }, { src: R.g13 || 'images/g13.jpg', cls: 'g-w4 ar-11' }, { src: R.g14 || 'images/g14.jpg', cls: 'g-w4 ar-11' }, { src: R.g15 || 'images/g15.jpg', cls: 'g-w12 ar-52' }]; function jump(id) { const el = document.getElementById(id); if (el && scrollerRef.current) { scrollerRef.current.scrollTo({ top: el.offsetTop, behavior: 'smooth' }); } } // Active section observer useEffect(() => { const scroller = scrollerRef.current; if (!scroller) return; function onScroll() { const pos = scroller.scrollTop + scroller.clientHeight * 0.4; let cur = sections[0].id; for (const s of sections) { const el = document.getElementById(s.id); if (el && el.offsetTop <= pos) cur = s.id; } setActive(cur); } scroller.addEventListener('scroll', onScroll, { passive: true }); onScroll(); return () => scroller.removeEventListener('scroll', onScroll); }, []); return (
); } const root = ReactDOM.createRoot(document.getElementById('root')); root.render();