/* nav.jsx — top nav, mobile menu, language toggle, footer. */ const { useState: useStateN, useEffect: useEffectN, useRef: useRefN } = React; function LangToggle({ lang, setLang, compact }) { return (
); } function Nav({ lang, setLang, onNavigate, activeId }) { const [solid, setSolid] = useStateN(window.scrollY > 40); const [open, setOpen] = useStateN(false); const T = (v) => window.t(v, lang); useEffectN(() => { const onScroll = () => setSolid(window.scrollY > 40); window.addEventListener("scroll", onScroll, { passive: true }); return () => window.removeEventListener("scroll", onScroll); }, []); useEffectN(() => { document.body.style.overflow = open ? "hidden" : ""; }, [open]); const nav = window.OLV.nav; const go = (id) => { setOpen(false); onNavigate(id); }; return (
{nav.map((n) => ( ))}
{window.OLV.brand.email}
{window.OLV.brand.phones.join(" · ")}
); } function Footer({ lang, onNavigate }) { const T = (v) => window.t(v, lang); const B = window.OLV.brand, F = window.OLV.footer; const yr = new Date().getFullYear(); return ( ); } /* rough map of footer labels to section anchors */ function sectionForFooter(label) { const l = label.toLowerCase(); if (l.includes("why") || l.includes("क्यों")) return "why"; if (l.includes("about") || l.includes("leader") || l.includes("परिचय") || l.includes("नेतृत्व")) return "about"; if (l.includes("portfolio") || l.includes("पोर्ट")) return "portfolio"; if (l.includes("contact") || l.includes("संपर्क")) return "contact"; return "portfolio"; } Object.assign(window, { Nav, Footer, LangToggle });