/* global React, FramerMotion, LogoMark, SoundWave, Icon, PALETTE */ /* eslint-disable */ // ============================================================ // Taide Collective — Navbar + Hero // ============================================================ const { useState: tcUseStateTop, useEffect: tcUseEffectTop, useRef: tcUseRefTop } = React; const { motion: motionTop, AnimatePresence: APTop, useScroll: useScrollTop, useTransform: useTransformTop, } = FramerMotion; // ------------------------------------------------------------ // Navbar // ------------------------------------------------------------ const NAV_LINKS = [ { label: 'Inicio', id: 'inicio' }, { label: 'Sistemas', id: 'sistemas' }, { label: 'Música', id: 'musica' }, { label: 'Contenido', id: 'contenido' }, { label: 'Sobre mí', id: 'sobre' }, ]; function Navbar() { const [scrolled, setScrolled] = tcUseStateTop(false); const [menuOpen, setMenuOpen] = tcUseStateTop(false); const [active, setActive] = tcUseStateTop('inicio'); tcUseEffectTop(() => { const fn = () => setScrolled(window.scrollY > 20); fn(); window.addEventListener('scroll', fn, { passive: true }); return () => window.removeEventListener('scroll', fn); }, []); tcUseEffectTop(() => { const fn = () => { const y = window.scrollY + 200; const ids = ['inicio', 'sistemas', 'musica', 'contenido', 'sobre']; for (let i = ids.length - 1; i >= 0; i--) { const el = document.getElementById(ids[i]); if (el && el.offsetTop <= y) { setActive(ids[i]); return; } } }; window.addEventListener('scroll', fn, { passive: true }); return () => window.removeEventListener('scroll', fn); }, []); const goTo = (id) => { setMenuOpen(false); const el = document.getElementById(id); if (el) window.scrollTo({ top: el.offsetTop - 80, behavior: 'smooth' }); }; return ( <> {/* Logo */} { e.preventDefault(); goTo('inicio'); }} className="flex items-center gap-3 shrink-0" >
TAIDE
COLLECTIVE
{/* Center links */}
{NAV_LINKS.map((l) => ( { e.preventDefault(); goTo(l.id); }} className={ 'nav-underline text-[12px] font-poppins font-light tracking-[0.18em] uppercase transition-colors ' + (active === l.id ? 'text-white active' : 'text-white/55 hover:text-white') } > {l.label} ))}
{/* Right: access */}
Acceso
{/* Mobile drawer */} {menuOpen && (
setMenuOpen(false)} />
TAIDE
)} ); } // ------------------------------------------------------------ // Hero — parallax y/opacity, two CTA buttons, full-width sound wave // ------------------------------------------------------------ function Hero() { const ref = tcUseRefTop(null); const { scrollY } = useScrollTop(); const y = useTransformTop(scrollY, [0, 700], [0, 100]); const opacity = useTransformTop(scrollY, [0, 500], [1, 0]); return (
{/* Two floating glass orbs (md+) */}
); } Object.assign(window, { Navbar, Hero });