// Header — fixed, blurred top bar. Name on the left, ghost nav + theme // toggle on the right; collapses to a menu button on small widths. const { Button: WButton } = window.WINTELAcademicDesignSystem_045d4f; function SocialIcon({ icon }) { if (icon === 'orcid') { return ( ); } if (icon === 'researchgate') { const rg = (window.__resources && window.__resources.rgIcon) || 'assets/researchgate.png'; return ( ); } if (icon === 'ieee') { return ( IEEE ); } if (icon === 'scholar') { return ( ); } if (icon === 'dblp') { return ( ); } if (icon === 'scopus') { return ( ); } return ; } function Header({ data, theme, onToggleTheme, onNavigate, view }) { const [menuOpen, setMenuOpen] = React.useState(false); const isNarrow = window.matchMedia('(max-width: 640px)').matches; const navLinks = data.nav.map((n) => { const isActive = n.view === view; const activeFill = theme === 'light' ? '#c0152f' : '#2563eb'; return ( { onNavigate(n.view); setMenuOpen(false); }} style={{ fontWeight: isActive ? 'var(--weight-semibold)' : 'var(--weight-normal)', color: isActive ? '#fff' : 'var(--text-body)', background: isActive ? activeFill : 'transparent', borderRadius: '0.5rem', padding: isActive ? '0.2rem 0.55rem' : '0.2rem 0.3rem', fontSize: 'calc(var(--text-xs) * 1.1)', whiteSpace: 'nowrap' }}> {n.name} ); }); return (
{isNarrow && menuOpen && (
{navLinks}
)}
); } Object.assign(window, { Header, SocialIcon });