/* Top navigation. Drives both anchor-scroll (on the landing page) and the portfolio view. */ function SiteHeader({ solid, view, onGo }) { const homeUrl = window.CARINA_HOME_URL || "/"; const portfolioUrl = window.CARINA_PORTFOLIO_URL || "/imoveis"; const links = [ ["top", "Início"], ["/imoveis", "Imóveis"], ["#processo", "Como funciona"], ["#bio", "A Carina"], ["#depoimentos", "Depoimentos"] ]; const [menu, setMenu] = React.useState(false); const pageHref = (id) => { if (window.CARINA_IS_PORTFOLIO_TARGET?.(id)) return portfolioUrl; if (id === "top") return homeUrl; return id; }; const openPage = (event, id) => { event.preventDefault(); onGo(id); }; return (
78 Carina Imóveis {/* Mobile trigger */}
{menu && (
{links.map(([id, label]) => { const isPageLink = id.startsWith("/") || /\.(html|php)$/i.test(id); return isPageLink ? ( { openPage(e, id); setMenu(false); }} style={{ ...navLink, padding: "14px 0", textAlign: "left", fontSize: 14, textDecoration: "none" }}>{label} ) : ( ); })} Falar com a Carina
)}
); } const navLink = { background: "none", border: "none", cursor: "pointer", fontFamily: "var(--font-sans)", fontSize: 12.5, fontWeight: 500, letterSpacing: "0.16em", textTransform: "uppercase", color: "var(--cream)", padding: "8px 0", transition: "color var(--dur) var(--ease)" }; Object.assign(window, { SiteHeader });