// Home page — reads from window.__C (content.json) const _h = () => window.c('home.hero', {}); const _stats = () => window.c('home.stats', []); const _trust = () => window.c('home.trust', {}); const _why = () => window.c('home.why', {}); const _comp = () => window.c('home.comparison', {}); const _pp = () => window.c('home.products_preview', {}); const _proc = () => window.c('home.process', {}); const _gal = () => window.c('home.gallery', {}); const _man = () => window.c('home.manifesto', {}); // Render image or placeholder slot function Img({ src, label, ratio = '16/9', cobalt = false, style = {}, className = '' }) { if (src && (src.startsWith('assets/') || src.startsWith('http'))) { // Use image if it exists (with onError fallback) return (
{label} { e.target.style.display = 'none'; e.target.nextSibling.style.display = 'flex'; }} /> {label}
); } return ; } function HomeHero({ variant, setRoute }) { return (
{variant === 'a' && } {variant === 'b' && } {variant === 'c' && }
); } function HeroA({ setRoute }) { const h = _h(); const t = _trust(); return ( <>
{h.chip || '#1 prefab panel in indonesia'} {h.eyebrow || 'Wall + floor panel system'}

{h.headline_a || 'Built\ndifferent.'}

{h.sub || "Indonesia's first building panel system engineered for primary structures."}

{ e.preventDefault(); setRoute('products'); }}> {h.cta_primary || 'Explore panels'} { e.preventDefault(); setRoute('contact'); }}> {h.cta_secondary || 'Request a quote'}
{/* Triplet below hero */}
{t.tested_title || 'Tested & certified by'}
{(t.tested_lines || []).map((l, i) => ( · {l} ))}
100% Karya
Anak Bangsa
Engineered & made in Indonesia
); } function HeroB({ setRoute }) { const h = _h(); return (
{h.chip || '#1 prefab panel · indonesia'}

{h.headline_b || 'Built\ndifferent.'}

{h.sub || ''}

{ e.preventDefault(); setRoute('products'); }}> {h.cta_primary || 'Explore panels'} { e.preventDefault(); setRoute('contact'); }}> {h.cta_secondary || 'Talk to sales'}
); } function HeroC({ setRoute }) { const h = _h(); return (
{h.chip || '#1 prefab panel in indonesia'}

{h.headline_c || 'We rebuild\nhow Indonesia builds.'}

{h.sub || ''}

{ e.preventDefault(); setRoute('products'); }}> {h.cta_primary || 'Explore panels'} { e.preventDefault(); setRoute('contact'); }}> {h.cta_secondary || 'Request a quote'}
); } function StatStrip() { const stats = _stats(); return (
{stats.map((s, i) => (
{s.label}
))}
); } function WhyMyfab() { const w = _why(); return (
{w.eyebrow}

{w.headline}

{w.sub}

{(w.pillars || []).map((p, i) => (
{p.num}

{p.title}

{p.body}

))}
); } function Comparison() { const cmp = _comp(); return (
{cmp.eyebrow}

{cmp.headline}

{(cmp.rows || []).map((r, i) => ( ))}
Brick & mortar Common precast Myfab panels
{r.label} {r.brick} {r.precast} {r.myfab}
); } function ProductsPreview({ setRoute }) { const pp = _pp(); const items = pp.items || []; return (
{pp.eyebrow}

{pp.headline}

{ e.preventDefault(); setRoute('products'); }}> See all specs →
{items.map((p, i) => ( { e.preventDefault(); setRoute('products'); }} style={{ display: 'block', cursor: 'pointer' }} >
{p.tag}

{p.name}

{p.spec}

{p.body}

))}
); } function ProcessTimeline() { const pr = _proc(); const phases = pr.phases || []; return (
{pr.eyebrow}

{pr.headline}

{phases.map((p, i) => (
{p.id}
{p.day}

{p.title}

{p.body}

{p.who}
))}
); } function GalleryPreview({ setRoute }) { const g = _gal(); const cells = g.cells || []; const layout = [ { c: 'span 6', r: 'span 2' }, { c: 'span 3', r: 'span 1' }, { c: 'span 3', r: 'span 1' }, { c: 'span 3', r: 'span 1' }, { c: 'span 3', r: 'span 1' }, { c: 'span 6', r: 'span 1' }, ]; return (
{g.eyebrow}

{g.headline}

{ e.preventDefault(); setRoute('about'); }}> See project gallery →
{cells.map((cell, i) => (
))}
); } function Manifesto() { const m = _man(); return (
{m.eyebrow}

{m.headline}

{(m.columns || []).map((col, i) => (
{col.title}

{col.body}

))}
); } function HomePage({ setRoute, tweaks }) { return (
); } Object.assign(window, { HomePage, Img });