/* global React */
const { useEffect, useRef, useState, useMemo } = React;
/* ============================================================
LOGO, four rounded vertical pills, animated as living mark
============================================================ */
const PILLS = [
{ id: 'orange', top: 'var(--orange-top)', bot: 'var(--orange-bot)' },
{ id: 'pink', top: 'var(--pink-top)', bot: 'var(--pink-bot)' },
{ id: 'blue', top: 'var(--blue-top)', bot: 'var(--blue-bot)' },
{ id: 'green', top: 'var(--green-top)', bot: 'var(--green-bot)' }];
function Logo({ size = 32, motion = 'restrained', interactive = true, scrollLink = 0, animateIn = true }) {
// Four rounded vertical pills, geometry from the golden-ratio brand mark
// (pill 118×292, gap 56). `size` drives the rendered HEIGHT; width follows.
// scrollLink: 0..1, compresses/expands the pills as a function of scroll
const pillCount = 4;
const pw = 118;
const ph = 292;
const gapPx = 56;
const pad = 16; // breathing room so scale/translate animation isn't clipped
const markW = pillCount * pw + (pillCount - 1) * gapPx; // 640
const W = markW + pad * 2;
const H = ph + pad * 2;
// animation states
const [mounted, setMounted] = useState(!animateIn);
useEffect(() => {
if (!animateIn) return;
const t = setTimeout(() => setMounted(true), 80);
return () => clearTimeout(t);
}, [animateIn]);
// breathing pulse per pill (CSS animation, just set delay)
return (
);
}
// keyframes injected once
function injectLogoKeyframes() {
if (document.getElementById('verveli-logo-keyframes')) return;
const style = document.createElement('style');
style.id = 'verveli-logo-keyframes';
style.textContent = `
@keyframes verveliPresence {
0%, 100% { transform: translateY(0) scaleY(1); filter: saturate(1); }
36% { transform: translateY(-16px) scaleY(1.035); filter: saturate(1.08); }
58% { transform: translateY(0) scaleY(0.985); }
}
`;
document.head.appendChild(style);
}
/* ============================================================
PHONE FRAME
============================================================ */
function PhoneFrame({ children }) {
return (
);
}
function TabBar({ active = 'today' }) {
const tabs = [
{ id: 'today', label: 'Today', ic: '🗞' },
{ id: 'signals', label: 'Signals', ic: '📡' },
{ id: 'alumni', label: 'Alumni', ic: '👥' },
{ id: 'community', label: 'Community', ic: '🌐' }];
// Use SVGs not emoji
const icons = {
today: ,
signals: ,
alumni: ,
community:
};
return (
);
}
/* ============================================================
PHONE SCREENS, Today / Signals / Alumni / Community
============================================================ */
function ScreenToday() {
return (
<>
For you
Events
News
Photos
Today’s question
From the institute
2h
What’s one habit from campus you still keep?
↳ 38 answers
· 4 from your batch
Alumni Day · Bengaluru
Sat, Nov 22 · RSVP open
·
Going · 42
Maybe · 18
Campus News
Office of Alumni Affairs
1d
Convocation 2026 dates announced. Returning alumni travel notes inside.
>);
}
function ScreenSignals() {
return (
<>
All
Hiring
Referrals
Help
A. Iyer · ’14
Hiring · Bengaluru
3h
Looking for senior backend engineers. Referrals welcome from any batch.
Full-time
Remote OK
Who works at Stripe?
Discovery
·
7 alumni · 3 in your city
R. Menon · ’09
Asking for help
1d
Moving back to campus city. Anyone who can recommend a paediatrician?
↳ 6 replies
>);
}
function ScreenAlumni() {
const profiles = [
{ name: 'Priya Shah', batch: '’11 · Director, Public Health', tint: 'var(--c-pink)' },
{ name: 'Vikram Rao', batch: '’02 · Founder, Indus Robotics', tint: 'var(--c-orange)' },
{ name: 'Ananya Bose', batch: '’17 · Postdoc, MIT', tint: 'var(--c-blue)' },
{ name: 'Karan Mehta', batch: '’08 · Partner, Sequoia', tint: 'var(--c-green)' }];
return (
<>
Featured
By batch
By city
Featured this week
Priya Shah, ’11, leading vaccine logistics in Tier 2 cities.
{profiles.slice(0, 3).map((p, i) =>
)}
>);
}
function ScreenCommunity() {
return (
<>
City chapters
Bengaluru chapter
Lead: M. Pillai · 384 members
Joined
SF Bay Area
Lead: S. Krishnan · 211 members
Join
Groups
Founders & Operators
97 members · EC: 3
Class of ’14
From WhatsApp directory · 142
>);
}
const SCREENS = {
today: ScreenToday,
signals: ScreenSignals,
alumni: ScreenAlumni,
community: ScreenCommunity
};
function Phone({ screen = 'today' }) {
const S = SCREENS[screen] || ScreenToday;
return (
);
}
Object.assign(window, { Logo, Phone, PhoneFrame, injectLogoKeyframes });