// subpage-app.jsx — shared base for sub-pages // Uses KHeader, KFooter, KCTAFinal from main sections, plus the page-specific component function applyTweaksFromHtml() { const html = document.documentElement; if (!html.hasAttribute("data-accent")) html.setAttribute("data-accent", "orange"); if (!html.hasAttribute("data-type")) html.setAttribute("data-type", "jakarta"); } function useOnScrollReveal() { React.useEffect(() => { const reveal = (el) => el.classList.add("in"); const io = new IntersectionObserver( (entries) => { entries.forEach((e) => { if (e.isIntersecting) { reveal(e.target); io.unobserve(e.target); } }); }, { rootMargin: "0px 0px -40px 0px", threshold: 0.01 } ); document.querySelectorAll(".k-anim:not(.in)").forEach((el) => { const r = el.getBoundingClientRect(); if (r.top < window.innerHeight - 40) reveal(el); else io.observe(el); }); setTimeout(() => { document.querySelectorAll(".k-anim:not(.in)").forEach((el) => { const r = el.getBoundingClientRect(); if (r.top < window.innerHeight) reveal(el); }); }, 2500); return () => io.disconnect(); }, []); } function PageShell({ page, eyebrow, title, sub, children }) { applyTweaksFromHtml(); useOnScrollReveal(); return (
); } Object.assign(window, { PageShell, useOnScrollReveal, applyTweaksFromHtml });