// ============================================================ // Tribeca Lisboa — NEWS ARTICLE sections (responsive) // Reuses: EIcon + useReveal + EdGuestCard (EventSections), // REventCard (ResponsiveSections), CAT + R (Primitives). // ============================================================ const { useRef: useRefN, useState: useStateN } = React; // ---- Social share row (editorial, inline) ------------------- function NewsShare() { const lang = React.useContext(LangContext); const [copied, setCopied] = useStateN(false); // Real share targets (operator, 2026-09-30 link check: these were placeholder "#" links and // "Link copiado" was shown without copying). URL = this page without the hash. const url = String(location.href).split('#')[0]; const title = tt(lang, (window.ARTICLE && (ARTICLE.titleEn || ARTICLE.title)) || document.title, (window.ARTICLE && ARTICLE.title) || document.title); const copy = () => { const done = () => { setCopied(true); setTimeout(() => setCopied(false), 1600); }; try { navigator.clipboard.writeText(url).then(done, () => {}); } catch (e) {} }; // Instagram has no web share URL: the system share sheet (phones) offers it; else copy the link. const shareInstagram = () => { if (navigator.share) { navigator.share({ title, url }).catch(() => {}); return; } copy(); }; const links = [ { name: 'WhatsApp', icon: 'wa', href: 'https://wa.me/?text=' + encodeURIComponent(title + ' ' + url) }, { name: 'X', icon: 'xlogo', href: 'https://twitter.com/intent/tweet?text=' + encodeURIComponent(title) + '&url=' + encodeURIComponent(url) }, ]; return (
{tt(lang, 'Share', 'Partilhar')}
{links.map(o => ( ))} {copied && {tt(lang, 'Link copied', 'Link copiado')}}
); } // ---- Hero image + masthead --------------------------------- function NewsHero() { const lang = React.useContext(LangContext); const c = CAT[ARTICLE.cat]; return (
{ARTICLE.title}
{tt(lang, 'Back to news', 'Voltar às notícias')}
{c.label}

{tt(lang, ARTICLE.titleEn, ARTICLE.title)}

{tt(lang, ARTICLE.authorEn, ARTICLE.author)} •{tt(lang, ARTICLE.dateEn, ARTICLE.date)}

{tt(lang, ARTICLE.dekEn, ARTICLE.dek)}

); } // ---- Rich-text body + optional external link ---------------- function NewsBody() { const lang = React.useContext(LangContext); return (
{ARTICLE.body.map((b, i) => { const txt = tt(lang, b.xEn, b.x); if (b.t === 'h2') return

{txt}

; if (b.t === 'quote') return
{txt}
; return

{txt}

; })} {ARTICLE.external && (
{tt(lang, ARTICLE.external.labelEn, ARTICLE.external.label)}
)}
); } // ---- Related events (homepage event card) ------------------- function NewsRelatedEvents() { const lang = React.useContext(LangContext); if (!NEWS_RELATED_EVENTS.length) return null; // general guests have no linked event return (
{tt(lang, 'Keep exploring', 'Continua a explorar')}

{tt(lang, 'Related events', 'Eventos relacionados')}

{NEWS_RELATED_EVENTS.map(ev => )}
); } // ---- Related speakers (Event Detail speaker card, reused) ---- function NewsRelatedSpeakers() { const lang = React.useContext(LangContext); return (
{tt(lang, 'Who appears in this story', 'Quem aparece nesta história')}

{tt(lang, 'Related speakers', 'Oradores relacionados')}

{NEWS_RELATED_SPEAKERS.map(g => )}
); } Object.assign(window, { NewsHero, NewsBody, NewsRelatedEvents, NewsRelatedSpeakers });