migrate to Next.js + TypeScript + React#2
Open
undeemed wants to merge 1 commit into
Open
Conversation
Full migration from static HTML/CSS/JS to Next.js 15 App Router: - 4 routes (/, /recon, /pulse, /helm) as server components, prerendered statically - Shared Nav, Footer, Marquee, Terminal, RadarMark components - main.js ported to GsapClient (use client) — useEffect keyed to pathname so animations re-init across soft navigations, and ScrollTriggers are torn down on route change - styles.css → app/globals.css; body[data-theme] selectors switched to [data-theme] so each page wraps content in a themed div - rm-progress gradient now uses --accent + --accent-glow vars so it picks up the helm-blue theme without a separate override - Static assets moved to public/ - Old HTML/CSS/JS files removed - vercel.json removed — Next.js framework detection handles routing and clean URLs natively Build output: 153 kB first-load JS shared, ~2.7 kB per route. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Full migration from static HTML/CSS/JS to Next.js 15 App Router + TypeScript + React 19. Same four pages, same visuals, same GSAP animations — now type-safe, statically prerendered, with proper component reuse.
What's in this PR
App Router routes (all server components, prerendered to static HTML at build time):
app/page.tsx—/42nights agency landingapp/recon/page.tsx—/reconplatform page (with the perimeter SVG diagram + glass overlay)app/pulse/page.tsx—/pulseGTM cockpit (lime theme)app/helm/page.tsx—/helmportfolio cockpit (blue theme)Shared components:
components/Nav.tsx— handles all four pages with the right links and brand mark per pagecomponents/Footer.tsx—studiovsproductvariantscomponents/Marquee.tsx— flat span sequence so flexgapworkscomponents/Terminal.tsx— generic; takes alinesprop array of{ prompt, cmd | out, outClass? }components/RadarMark.tsx— the radar SVG iconGSAP:
components/GsapClient.tsx—'use client'. The full main.js logic, ported to a singleuseEffectkeyed topathname. On route change, all ScrollTriggers are killed and re-initialized;pointermovelisteners on the spotlight are removed; the marquee tween is killed.Theming:
body[data-theme="helm"]→[data-theme="helm"]in CSS so any wrapper element can act as the theme root<div data-theme="agency|recon|helm">— CSS variables cascade through descendantsrm-progressand a couple other accent gradients changed from hardcoded lime to--accent/--accent-glowso they auto-themeRemoved:
index.html,recon.html,pulse.html,helm.html,main.js,styles.css,vercel.json— all replaced by the Next.js projectBuild
```
✓ Compiled successfully in 1.6s
✓ Generating static pages (7/7)
Route Size First Load JS
○ / 2.7 kB 153 kB
○ /helm 2.7 kB 153 kB
○ /pulse 2.7 kB 153 kB
○ /recon 2.7 kB 153 kB
```
All four pages prerender as static. Total shared JS 102 kB (mostly GSAP + Next/React runtime).
Test plan
next/linksoft nav and re-runs GSAP cleanly🤖 Generated with Claude Code