Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 19 additions & 3 deletions src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ const momentColumns = [
function Marquee() {
return <div className="hero-marquee" aria-hidden="true">{marqueeWords.map((word, i) => <div className={`marquee-row marquee-row-${i + 1}`} key={word}><div className="marquee-track"><span>{word} · {word} · </span><span>{word} · {word} · </span></div></div>)}</div>;
}
function PhotoTiles({ seed = 0, className = '' }) {
return <span className={`nav-photo-tiles ${className}`} aria-hidden="true">{Array.from({ length: 36 }, (_, tile) => <span key={tile} style={{ '--tile-delay': `${((tile * 17 + seed * 7) % 36) * 16}ms` }} />)}</span>;
}
function AnimatedLabel({ text }) {
return <span className="button-roll"><span className="button-roll-sr">{text}</span><span className="button-roll-letters" aria-hidden="true">{Array.from(text, (letter, index) => <span className="button-roll-char" key={index} data-char={letter === ' ' ? '\u00a0' : letter} style={{ '--roll-index': Math.min(index, 18) }}>{letter === ' ' ? '\u00a0' : letter}</span>)}</span></span>;
}
Expand Down Expand Up @@ -218,6 +221,19 @@ export default function App() {
});
return () => media.revert();
}, [menuOpen, reducedMotion]);
useEffect(() => {
if (reducedMotion || window.matchMedia('(prefers-reduced-motion: reduce)').matches || !('IntersectionObserver' in window)) return;
const photos = document.querySelectorAll('.photo-filled, .project-art.has-image');
const observer = new IntersectionObserver(entries => {
for (const entry of entries) {
if (!entry.isIntersecting) continue;
entry.target.classList.add('tile-revealed');
observer.unobserve(entry.target);
}
}, { threshold: 0.1 });
photos.forEach(photo => { photo.classList.add('tile-reveal-enabled'); observer.observe(photo); });
return () => { observer.disconnect(); photos.forEach(photo => photo.classList.remove('tile-reveal-enabled', 'tile-revealed')); };
}, [reducedMotion]);
useEffect(() => { if (activeProject) dialogRef.current?.showModal(); }, [activeProject]);
useEffect(() => {
if (reducedMotion || window.matchMedia('(prefers-reduced-motion: reduce)').matches || !('IntersectionObserver' in window) || !Element.prototype.animate) return;
Expand Down Expand Up @@ -277,7 +293,7 @@ export default function App() {
<header className={intro ? "site-header is-intro" : "site-header"} role={menuOpen ? "dialog" : undefined} aria-modal={menuOpen || undefined} aria-label={menuOpen ? "Navigation menu" : undefined}>
<button ref={menuRef} className="notch-trigger" type="button" aria-label={menuOpen ? "Close navigation menu" : "Open navigation menu"} aria-expanded={menuOpen} data-curtain-closing={curtainClosing || undefined} aria-controls="main-nav" disabled={intro} onClick={() => { if (menuOpen) closeMenu(); else { window.clearTimeout(curtainTimer.current); setCurtainClosing(false); setMenuOpen(true); } }}><span className="menu-toggle-icon" aria-hidden="true"><span className="menu-toggle-icon-stack"><svg width="17" height="17" viewBox="0 0 256 256" fill="currentColor" aria-hidden="true"><path d="M219.31,108.68l-80-80a16,16,0,0,0-22.62,0l-80,80A15.87,15.87,0,0,0,32,120v96a8,8,0,0,0,8,8h64a8,8,0,0,0,8-8V160h32v56a8,8,0,0,0,8,8h64a8,8,0,0,0,8-8V120A15.87,15.87,0,0,0,219.31,108.68ZM208,208H160V152a8,8,0,0,0-8-8H104a8,8,0,0,0-8,8v56H48V120l80-80,80,80Z" /></svg><X size={17} /></span></span><span className="menu-toggle-label" aria-hidden="true"><span className="menu-toggle-label-stack"><AnimatedLabel text="Menu" /><AnimatedLabel text="Close" /></span></span></button>
<div ref={navRef} id="main-nav" className={`nav-links${menuOpen ? ' is-open' : ''}${menuClosing || curtainClosing ? ' is-closing' : ''}`} aria-hidden={!menuOpen} inert={!menuOpen} data-lenis-prevent onTransitionEnd={event => { if (event.target === event.currentTarget && event.propertyName === 'transform' && !menuOpen) { window.clearTimeout(curtainTimer.current); setCurtainClosing(false); } }}>
<div className="nav-art" aria-hidden="true">{['/images/optimized/menu-v1-portrait.webp', '/images/optimized/menu-v1-horizontal.webp', '/images/optimized/menu-v2-frateran.webp', '/images/optimized/menu-v1-speaking.webp'].map((src, index) => <div className="nav-art-shift" key={src}><div className="nav-art-item" style={{ '--art-index': index }}><img src={src} alt="" fetchPriority="low" decoding="async" /><span className="nav-photo-tiles">{Array.from({ length: 36 }, (_, tile) => <span key={tile} style={{ '--tile-delay': `${((tile * 17 + index * 7) % 36) * 18}ms` }} />)}</span></div></div>)}</div>
<div className="nav-art" aria-hidden="true">{['/images/optimized/menu-v1-portrait.webp', '/images/optimized/menu-v1-horizontal.webp', '/images/optimized/menu-v2-frateran.webp', '/images/optimized/menu-v1-speaking.webp'].map((src, index) => <div className="nav-art-shift" key={src}><div className="nav-art-item" style={{ '--art-index': index }}><img src={src} alt="" fetchPriority="low" decoding="async" /><PhotoTiles seed={index} /></div></div>)}</div>
<div className="nav-content"><p className="nav-caption">Explore the portfolio</p><nav aria-label="Sections">{[['Home', '#home'], ['About', '#about'], ['Experience', '#experience'], ['Moments', '#moments'], ['Explorations', '#work'], ['Contact', '#contact']].map(([label, href], index) => <a key={href} href={href} style={{ '--nav-index': index }} onClick={event => navigateFromMenu(event, href)}><span className="nav-word"><AnimatedLabel text={label} /></span></a>)}</nav><div className="nav-socials">{socials.map(social => <a key={social.name} href={social.href} target="_blank" rel="noreferrer"><AnimatedLabel text={social.name} /></a>)}</div></div>
</div>
</header>
Expand All @@ -302,8 +318,8 @@ export default function App() {
<article className="timeline-row"><p>2024</p><div><h3>Suara Fratorian Podcast Production Committee</h3><p>Contributed to the production of the Suara Fratorian podcast.</p></div></article>
<article className="timeline-row"><div><h3>Berbagi Takjil Ramadan Event</h3><p>Fundraiser</p><p>Contributed to fundraising for the Ramadan event.</p></div></article>
</div><a className="underlined-link" href={linkedin} target="_blank" rel="noreferrer"><AnimatedLabel text="View experience on LinkedIn" /> <ArrowUpRight size={16} /></a></div></div></section>
<section id="moments" ref={photoSectionRef} className="photo-section section-wrap"><div className="section-heading"><div><div className="section-index">03 / Moments</div><h2>Moments <span>in motion.</span></h2></div><p>Snapshots of moments shared along the way.</p></div><div className="photo-toolbar"><p>Scroll down to explore the gallery, or swipe through it. More photographs are coming soon.</p></div><div ref={photoRailRef} className="photo-rail" role="region" aria-label="Photo gallery; scroll horizontally" tabIndex={0}><div className="photo-track">{momentColumns.map((column, columnIndex) => <div className="photo-column" key={columnIndex} style={{ width: `clamp(140px, ${column.width}svh, 600px)`, '--photo-offset': `${column.offset}svh` }}>{column.photos.map((photoIndex, row) => { const photo = photoIndex === null ? null : momentPhotos[photoIndex]; return <div className={photo ? 'photo-placeholder photo-filled' : 'photo-placeholder'} key={row} style={photo ? { aspectRatio: photo.ratio } : { '--placeholder-height': `${row ? 27 : 20}svh` }}>{photo ? <img src={photo.src} alt={photo.alt} loading="lazy" decoding="async" /> : <><span>{String(columnIndex * 2 + row + 1).padStart(2, '0')}</span><p>PHOTO PLACEHOLDER</p><small>Coming soon</small></>}</div>; })}</div>)}</div></div></section>
<section id="work" className="work-section section-wrap"><div className="section-heading"><div><div className="section-index">04 / Explorations</div><h2>Selected <span>possibilities.</span></h2></div><p>A space for ideas and what comes next.</p></div><div className="project-grid">{concepts.map(project => { const Card = project.href ? 'a' : 'button'; return <Card key={project.number} className="project-card" {...(project.href ? { href: project.href, target: '_blank', rel: 'noopener noreferrer', 'aria-label': 'Watch Godspeed on Instagram in a new tab' } : { type: 'button', onClick: () => setActiveProject(project), 'aria-label': `View concept placeholder ${project.number}: ${project.title}` })}><div className={`project-art ${project.style}${project.image ? ' has-image' : ''}`}>{project.image ? <img src={project.image} alt="" loading="lazy" /> : <><span>EXPLORATION {project.number}</span><span className="concept-symbol" aria-hidden="true">{project.style === 'orbit' ? '◉' : project.style === 'type' ? '↗' : '✳'}</span><span className="placeholder-label">CONCEPT / PLACEHOLDER</span></>}</div><div className="project-info"><span>{project.href ? 'Graduation Film, Film Editor' : 'Concept / Placeholder'}</span><h3 className={project.href ? 'project-title-reveal' : undefined}>{project.title}</h3><p><AnimatedLabel text={project.href ? 'Watch on Instagram' : 'Explore the idea'} /> <ArrowUpRight size={15} /></p></div></Card>; })}</div></section>
<section id="moments" ref={photoSectionRef} className="photo-section section-wrap"><div className="section-heading"><div><div className="section-index">03 / Moments</div><h2>Moments <span>in motion.</span></h2></div><p>Snapshots of moments shared along the way.</p></div><div className="photo-toolbar"><p>Scroll down to explore the gallery, or swipe through it. More photographs are coming soon.</p></div><div ref={photoRailRef} className="photo-rail" role="region" aria-label="Photo gallery; scroll horizontally" tabIndex={0}><div className="photo-track">{momentColumns.map((column, columnIndex) => <div className="photo-column" key={columnIndex} style={{ width: `clamp(140px, ${column.width}svh, 600px)`, '--photo-offset': `${column.offset}svh` }}>{column.photos.map((photoIndex, row) => { const photo = photoIndex === null ? null : momentPhotos[photoIndex]; return <div className={photo ? 'photo-placeholder photo-filled' : 'photo-placeholder'} key={row} style={photo ? { aspectRatio: photo.ratio } : { '--placeholder-height': `${row ? 27 : 20}svh` }}>{photo ? <><img src={photo.src} alt={photo.alt} loading="lazy" decoding="async" /><PhotoTiles seed={columnIndex + row} className="scroll-photo-tiles" /></> : <><span>{String(columnIndex * 2 + row + 1).padStart(2, '0')}</span><p>PHOTO PLACEHOLDER</p><small>Coming soon</small></>}</div>; })}</div>)}</div></div></section>
<section id="work" className="work-section section-wrap"><div className="section-heading"><div><div className="section-index">04 / Explorations</div><h2>Selected <span>possibilities.</span></h2></div><p>A space for ideas and what comes next.</p></div><div className="project-grid">{concepts.map(project => { const Card = project.href ? 'a' : 'button'; return <Card key={project.number} className="project-card" {...(project.href ? { href: project.href, target: '_blank', rel: 'noopener noreferrer', 'aria-label': 'Watch Godspeed on Instagram in a new tab' } : { type: 'button', onClick: () => setActiveProject(project), 'aria-label': `View concept placeholder ${project.number}: ${project.title}` })}><div className={`project-art ${project.style}${project.image ? ' has-image' : ''}`}>{project.image ? <><img src={project.image} alt="" loading="lazy" /><PhotoTiles className="scroll-photo-tiles" /></> : <><span>EXPLORATION {project.number}</span><span className="concept-symbol" aria-hidden="true">{project.style === 'orbit' ? '◉' : project.style === 'type' ? '↗' : '✳'}</span><span className="placeholder-label">CONCEPT / PLACEHOLDER</span></>}</div><div className="project-info"><span>{project.href ? 'Graduation Film, Film Editor' : 'Concept / Placeholder'}</span><h3 className={project.href ? 'project-title-reveal' : undefined}>{project.title}</h3><p><AnimatedLabel text={project.href ? 'Watch on Instagram' : 'Explore the idea'} /> <ArrowUpRight size={15} /></p></div></Card>; })}</div></section>
<section id="contact" className="contact-section section-wrap"><div className="contact-copy"><div className="section-index">05 / Contact</div><h2>Let’s stay<br /><span>connected.</span></h2><p>Find me online and let’s start a conversation.</p></div><div className="contact-socials" role="group" aria-label="Social media profiles">{socials.map(social => <a className="contact-social" key={social.name} href={social.href} target="_blank" rel="noreferrer"><span className="contact-social-icon"><img src={`/social/${social.icon}.svg`} alt="" width="24" height="24" loading="lazy" /></span><span className="contact-social-label"><strong><AnimatedLabel text={social.name} /></strong><small>{social.handle}</small></span><ArrowUpRight className="contact-social-arrow" size={20} aria-hidden="true" /></a>)}</div></section>
</main>
<footer className="site-footer section-wrap" inert={menuOpen}><span>© {new Date().getFullYear()} Varellio Louis Tinangon</span><a href={linkedin} target="_blank" rel="noreferrer"><AnimatedLabel text="LinkedIn" /> <ArrowUpRight size={14} /></a><a href="#home"><AnimatedLabel text="Back to top ↑" /></a></footer>
Expand Down
9 changes: 7 additions & 2 deletions src/styles.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading