Repository navigation
feat: deCDN marketing one-pager - #1
Conversation
Ship a static one-page site explaining deCDN (decentralized P2P CDN) to a broad audience. Technical-minimalist aesthetic, light-first with a prefers-color-scheme dark fallback. Configures output: 'export' for a pure static build. All external URLs live in lib/links.ts as clearly marked placeholders. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
There was a problem hiding this comment.
Code Review
This pull request transforms the initial Next.js boilerplate into a functional landing page for deCDN. Key changes include a comprehensive overhaul of the global CSS theme with dark mode support, the introduction of several site-specific and reusable UI components, and updated metadata and configuration for static export. Feedback focuses on centralizing the site URL within the new links library and restoring essential layout classes to the root layout to ensure correct background propagation and improved navigation UX.
There was a problem hiding this comment.
Pull request overview
This PR replaces the Create Next App starter with a static-exported Next.js one-page marketing site for deCDN, including a small UI primitive layer and section components, plus updated global theming tokens for light/dark.
Changes:
- Configure Next.js for static export (
output: "export",trailingSlash: true) and remove starter assets. - Add a marketing one-pager composed of
components/site/*sections andcomponents/ui/*primitives. - Introduce global CSS design tokens (light-first with
prefers-color-scheme: dark) and add basic SEO/OG metadata.
Reviewed changes
Copilot reviewed 17 out of 22 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| public/window.svg | Removes starter asset |
| public/vercel.svg | Removes starter asset |
| public/next.svg | Removes starter asset |
| public/globe.svg | Removes starter asset |
| public/file.svg | Removes starter asset |
| next.config.ts | Enables static export + trailing slashes |
| lib/links.ts | Centralizes outbound URLs as placeholders |
| components/ui/Stat.tsx | Adds stat display primitive |
| components/ui/Section.tsx | Adds section layout primitive |
| components/ui/Mono.tsx | Adds monospace inline primitive |
| components/ui/Button.tsx | Adds link-styled button primitive (external-link handling) |
| components/site/Nav.tsx | Adds header/nav with in-page anchors + GitHub link |
| components/site/Hero.tsx | Adds hero section with primary CTAs |
| components/site/Problem.tsx | Adds “problem” section + stats |
| components/site/HowItWorks.tsx | Adds “how it works” step grid |
| components/site/Economics.tsx | Adds economics section |
| components/site/Audiences.tsx | Adds audiences section with CTAs |
| components/site/Status.tsx | Adds status/roadmap section |
| components/site/Footer.tsx | Adds footer with links + copyright |
| app/page.tsx | Replaces starter page with the composed one-pager |
| app/layout.tsx | Updates metadata + viewport settings; adjusts html/body wrappers |
| app/globals.css | Adds token-based theming + selection styling |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…noindex placeholders - Move SITE_URL into lib/links.ts as links.site so all placeholder URLs live in one place (Gemini + Copilot) - Restore h-full on <html> and min-h-full on <body> so the canvas background paints the full viewport on short pages (Gemini) - Add motion-safe:scroll-smooth on <html> for the in-page anchor nav while respecting prefers-reduced-motion (Gemini, refined) - Set robots.index to false while links.site is a placeholder origin; flip when swapping to the real domain (Copilot) - Include the user's allowedDevOrigins tweak for ngrok-free.app in next.config.ts Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
F1: centralize the section vocabulary
Lift `SECTION_IDS`, `SectionId`, `NAV_SECTIONS`, and `DARK_SECTIONS`
out of Chrome.tsx + MobileMenu.tsx into a new `lib/sections.ts`. The
two components had drifted-prone copies of the same five strings.
No behavior change.
F2: tighten the iOS Safari scroll lock
`body { overflow: hidden }` leaks on iOS Safari — touches on a fixed
overlay can still drag the documentElement. Replace with the
position-fixed-on-body pattern: save `window.scrollY` and every body
style we override on open; pin `position: fixed; top: -y; left/right:
0; width: 100%; overflow: hidden`; on close restore the saved styles
and `scrollTo` back to the saved y so the page doesn't appear to jump.
Closes Gemini-bot MEDIUM #1 (SectionId duplication) and MEDIUM #3
(iOS scroll lock) from the PR #56 review.
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
* feat(nav): add phone-only slide-out menu drawer On phones (<md) the navbar collapsed the section anchors but left a cramped Docs/Litepaper cluster competing with the wordmark, so compare/method/faq/contact were entirely inaccessible. Replace the right cluster on phones with a single toggle that opens a paper slide-out drawer holding all six destinations, with active-section indication, focus trap, body scroll lock, and a reduced-motion path. Desktop layout is unchanged. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]> * fix(mobile-menu): portal drawer to body to escape nav containing block .chrome-nav sets `backdrop-filter: blur(0)` as its base — any non-`none` backdrop-filter creates a containing block for `position: fixed` descendants, so the panel's `top: 0; bottom: 0` was being resolved against the ~70px nav strip instead of the viewport. The drawer rendered as a thin band across the top with the items clipped out. Portal the overlay + panel to `document.body` so their fixed positioning resolves against the viewport. The toggle stays inside the nav (it's intended to live there). Hydration-gate the portal target via useSyncExternalStore — the static-export SSR sees no portal, the first client render matches, and the post-hydration render mounts it. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]> * refactor(mobile-menu): drop divider above Docs, widen the gap The hairline divider between the section anchors and the external links was reading as visual clutter. Remove the .mm-divider element and replace its ~28px of total margin with a 2.5rem top margin on the external list, giving Docs a touch more breathing room from Contact than the divider previously allowed. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]> * refactor(mobile-menu): apply PR review fixes + paper-editorial polish Portal the toggle (now alongside the overlay + panel) so its morphed × can sit above the drawer (z-65 > panel z-60) while leaving the wordmark untouched inside the nav — the wordmark stays at z-50 and is naturally covered by the drawer, which is what the prior bare `z-50` layout produced and what we want visually. Drop the redundant in-panel × close button; the morphed toggle is the only close affordance now. The toggle takes a `tone` prop from Chrome so its ink/paper color tracks the navbar's tone (necessary now that it doesn't inherit from the nav). Mark the drawer with `inert={!open}` so descendants leave the tab order while it's translated off-screen (`aria-hidden` alone didn't do that), and listen to `matchMedia('(min-width: 768px)')` so a resize past `md` while open releases the body scroll lock and the forced-paper nav tone. Replace the static `menu` header with a clickable `home` link that jumps to #intro and closes the drawer on tap. The `decdn_`-style green underscore that previously sat next to the header is gone; the same shape now lives as a 14×3px whisper-green bar that slides in next to the active section row — the wordmark's accent recurs inside the drawer instead of being a one-off decoration. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]> * style(mobile-menu): slow the open/close/stagger choreography The drawer was reading as snappy on phone; bump every transition and keyframe duration ~50–90% on the same easings. Header and rows settle into place more deliberately; the panel slide and overlay dim run closer to the page's existing brutal-rise pacing. - panel slide: 380ms → 720ms - overlay fade: 220ms → 480ms - toggle morph: 280ms → 460ms - toggle color: 260ms → 400ms - header rise: 520ms / 80ms → 760ms / 140ms - row stagger: 520ms · 55ms · 120ms → 760ms · 80ms · 220ms - mark fade: 280ms → 540ms Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]> * refactor(mobile-menu): land the two deferred review follow-ups F1: centralize the section vocabulary Lift `SECTION_IDS`, `SectionId`, `NAV_SECTIONS`, and `DARK_SECTIONS` out of Chrome.tsx + MobileMenu.tsx into a new `lib/sections.ts`. The two components had drifted-prone copies of the same five strings. No behavior change. F2: tighten the iOS Safari scroll lock `body { overflow: hidden }` leaks on iOS Safari — touches on a fixed overlay can still drag the documentElement. Replace with the position-fixed-on-body pattern: save `window.scrollY` and every body style we override on open; pin `position: fixed; top: -y; left/right: 0; width: 100%; overflow: hidden`; on close restore the saved styles and `scrollTo` back to the saved y so the page doesn't appear to jump. Closes Gemini-bot MEDIUM #1 (SectionId duplication) and MEDIUM #3 (iOS scroll lock) from the PR #56 review. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]> * refactor(mobile-menu): land second-pass review fixes Six valid items from the latest Copilot + Gemini reviews, plus a walk-back on the wordmark-variant rule from the previous pass. - Wordmark now tracks the actual section (`onDark`), not the forced menu-open paper tone. The wordmark, labs span, and the chrome-nav's tinted backdrop sit at z-50 behind the drawer and are only visible in the left strip the drawer doesn't cover, so they paint on top of the section background — forcing them to paper made the ink-coloured wordmark invisible on dark sections. Only the portalled toggle (z-65, above the drawer) keeps the menu-open paper override via a renamed `toggleTone` prop on MobileMenu. - Focusable elements are cached once at the top of the open-effect and reused by both the Tab handler and `focusFirst`. The portalled toggle is appended as the last entry so keyboard users can Tab to the close × instead of being trapped inside the panel with only ESC as an exit. - The scroll-lock cleanup no longer clobbers in-page anchor navigation. A single `handleClick` reads the link's href; if it starts with `#` it preventDefaults and stashes the target id. The cleanup branches on that ref — anchor present → history.replaceState + el.scrollIntoView; otherwise the existing scroll restoration. - Reduced-motion path actually fades now (matching the PR description). Panel drops its translate and animates opacity 0→1 over 240ms; overlay's existing opacity transition is shortened to 240ms. Rows / header / mark still settle without stagger. - Stale block comment above the mobile-menu CSS block is rewritten — the toggle is described as portalled to <body> at z-65, wordmark explicitly noted as staying inside the nav at z-50. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]> * feat(nav): re-wire MobileMenu into Chrome on top of main's nav Parking the integration in the merge commit (ae1fcc3) left the nav unusable <md: the desktop Docs/Blog/Litepaper links stayed visible and crowded the row while the section anchors (compare/method/faq/ contact) and the drawer toggle were both missing. Re-doing the integration on top of main's nav (which now uses next/link and `/#section` anchors so the navbar works from /blog/* routes): - Render MobileMenu in the right cluster, after Litepaper. - Add `mobileOpen` state + `handleMobileOpenChange` callback so the toggle's tone overrides `onDark` while the drawer is open. - Hide Docs/Blog/Litepaper <md so the drawer replaces them. The Tailwind utilities migrated on main (border-b border-current pb-[2px]) stay; litepaper keeps the inline borderBottom that main left untouched. Closes #87. * refactor(mobile-menu): apply review fixes Address findings from the four-agent PR review: - Fix the /blog/* anchor regression. When the drawer is opened from a non-home route and a section row is tapped, the close-cleanup's getElementById returned null and silently fell back to scrollTo(scrollYRef) — the tap looked broken. Now the null branch navigates via window.location.assign("/#" + anchor) so the browser handles the cross-route hash jump. - Rewrite two inaccurate comments. globals.css's lead block claimed Chrome.tsx forces data-tone="paper" on the whole nav while the drawer is open — it doesn't, only toggleTone flips. Chrome.tsx's toggleTone comment framed the toggle as a nav child; it's portalled to <body>, so its tone is independent of the nav's data-tone. Collapse the duplicated CSS lead block + .mm-toggle gloss into a one-liner pointing at MobileMenu.tsx — three copies of the portal/z-index story were the worst rot risk in the file. - Replace `external: boolean` on the drawer's bottom-link table with a `kind: "internal" | "external"` discriminant — kills the EXTERNAL.external name overlap and makes the navigation behavior explicit instead of hiding under a boolean. - Make `onOpenChange` required. The only caller passes it and the toggleTone coupling in Chrome.tsx depends on it; optional understated the contract. - Drop two over-defensive guards (`if (focusables.length === 0)` and the `panel ? ... : []` ternary). With the static drawer contents, focusables.length >= 8 and panelRef is always attached when the open-effect runs. - Trim restated-what comments (parent-notify block, body-lock section label, branch narration in the cleanup) and tighten the reduced-motion + .mm-mark blurbs. WHY-only. Kept useSyncExternalStore for the portal hydration gate: the project's eslint config enforces react-hooks/set-state-in-effect, which is exactly the rule the SES pattern exists to avoid. The existing comment was right; the reviewer's suggestion to swap to useState+useEffect was incompatible with the lint config. Did not extract SectionId to a shared module — that path was deliberately closed when lib/sections.ts was deleted in ae1fcc3. --------- Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]>
Summary
output: 'export',trailingSlash: true) so the build emits to/out/and can be hosted anywhere (S3/Cloudflare/GH Pages).prefers-color-scheme: darkoverride, plusSection/Button/Mono/Statprimitives undercomponents/ui/and per-section components undercomponents/site/.lib/links.tsas clearly-marked placeholders — grep forREPLACE_ME/decdn.exampleto find everything that needs real values before launch.Test plan
pnpm lint && npx tsc --noEmit && pnpm build— all clean,/out/index.htmlgeneratednpx serve out -l 3000and verify each section renders and scrolls correctly--color-mutedcontrast against canvas)lib/links.tswith real targets before launch🤖 Generated with Claude Code