/* Shared EN components for largoaigiovani.it/en/
Same architecture as ../site.jsx but English nav/footer + IT lang toggle.
*/
/* global React, ReactDOM */
const { useState, useEffect, useRef } = React;
const HEADLINES_EN = {
thesis: {
display: <>Italy has
no talent
problem.>,
inline: <>Italy has no talent problem.>,
h1: <>Italy has no talent problem.
It has an activation problem.>,
lede: <>It has an activation problem. A memoir-manifesto by Vittorio Viarengo — thirty years of Silicon Valley, told for young Italians who don't want to wait their turn.>,
},
provocation: {
display: <>Talent
doesn't
exist.>,
inline: <>Talent doesn't exist.>,
h1: <>Talent doesn't exist.
Activation does.>,
lede: <>Or rather: not in the way most people think. Italy doesn't have a talent problem — it has an activation problem.>,
},
title: {
display: <>The Baker's Son
in Silicon Valley.>,
inline: <>The Baker's Son in Silicon Valley.>,
h1: <>The Baker's Son
in Silicon Valley.>,
lede: <>Why the Valley activates talent — and most places don't. The memoir-manifesto by Vittorio Viarengo — coming soon.>,
},
subtitle: {
display: <>Why the Valley
activates talent.>,
inline: <>Why the Valley activates talent — and most places don't.>,
h1: <>Why the Valley activates talent —
and most places don't.>,
lede: <>For young Italians who want to make their mark. A memoir-manifesto by Vittorio Viarengo — thirty years on the other side, told without filters.>,
},
};
function Nav({ page }) {
const [menuOpen, setMenuOpen] = useState(false);
const links = [
{ id: 'libro', label: 'The Book', href: 'libro.html' },
{ id: 'estratto', label: 'Excerpt', href: 'estratto.html' },
{ id: 'autore', label: 'The Author', href: 'autore.html' },
{ id: 'stampa', label: 'Press', href: 'stampa.html' },
];
const PAGE_FILES = { home: 'index.html', libro: 'libro.html', estratto: 'estratto.html', autore: 'autore.html', stampa: 'stampa.html', eventi: 'eventi.html' };
const itHref = '/' + (PAGE_FILES[page] || 'index.html');
return (
);
}
function Footer() {
return (
);
}
function Newsletter({ inverted = false, compact = false, label, cta, note, placeholder, emphasis }) {
const [email, setEmail] = useState('');
const [sent, setSent] = useState(false);
const [error, setError] = useState('');
const submit = (e) => {
e.preventDefault();
if (!email.includes('@')) return;
const body = new URLSearchParams({ 'form-name': 'notify', email, 'bot-field': '' }).toString();
fetch('/', { method: 'POST', headers: { 'Content-Type': 'application/x-www-form-urlencoded' }, body })
.then((r) => { if (r.ok) setSent(true); else setError('Submission error, please try again.'); })
.catch(() => setError('Network error, please try again.'));
};
return (