From 07a99b441c55e0fbc987224b10dea8eea56c6305 Mon Sep 17 00:00:00 2001 From: Rami Bitar Date: Fri, 18 Sep 2026 09:29:12 -0400 Subject: [PATCH] Add theme toggle, hero snippet, and reorganize homepage components - Set up next-themes with a light/dark toggle in the header and move all sections onto theme tokens; dark mode stays pure black - Replace the hero terminal line with the AI Elements Snippet component - Restructure components into layout/, sections/, and shared/ with site-wide config in lib/site.ts Co-Authored-By: Claude Fable 5.1 --- app/globals.css | 2 +- app/layout.tsx | 21 ++- app/page.tsx | 30 ++-- components.json | 3 +- components/ai-elements/snippet.tsx | 145 ++++++++++++++++++ .../{site => layout}/mobile-navigation.tsx | 39 ++--- components/layout/site-footer.tsx | 63 ++++++++ components/layout/site-header.tsx | 53 +++++++ components/layout/theme-provider.tsx | 11 ++ components/layout/theme-toggle.tsx | 43 ++++++ components/sections/cta-section.tsx | 25 +++ components/sections/features-section.tsx | 87 +++++++++++ components/sections/hero-section.tsx | 82 ++++++++++ .../logos-section.tsx} | 13 +- .../stats.tsx => sections/stats-section.tsx} | 15 +- components/sections/stats/stats-globe.tsx | 67 ++++++++ components/shared/action-buttons.tsx | 41 +++++ .../{site/logo.tsx => shared/brand.tsx} | 5 +- components/shared/container.tsx | 9 ++ components/shared/gradient-glow.tsx | 21 +++ components/shared/section-heading.tsx | 44 ++++++ components/site/cta.tsx | 40 ----- components/site/features.tsx | 86 ----------- components/site/footer.tsx | 77 ---------- components/site/hero.tsx | 73 --------- components/site/navbar.tsx | 53 ------- components/site/stats-globe.tsx | 48 ------ lib/site.ts | 53 +++++++ 28 files changed, 812 insertions(+), 437 deletions(-) create mode 100644 components/ai-elements/snippet.tsx rename components/{site => layout}/mobile-navigation.tsx (68%) create mode 100644 components/layout/site-footer.tsx create mode 100644 components/layout/site-header.tsx create mode 100644 components/layout/theme-provider.tsx create mode 100644 components/layout/theme-toggle.tsx create mode 100644 components/sections/cta-section.tsx create mode 100644 components/sections/features-section.tsx create mode 100644 components/sections/hero-section.tsx rename components/{site/logo-cloud.tsx => sections/logos-section.tsx} (86%) rename components/{site/stats.tsx => sections/stats-section.tsx} (65%) create mode 100644 components/sections/stats/stats-globe.tsx create mode 100644 components/shared/action-buttons.tsx rename components/{site/logo.tsx => shared/brand.tsx} (67%) create mode 100644 components/shared/container.tsx create mode 100644 components/shared/gradient-glow.tsx create mode 100644 components/shared/section-heading.tsx delete mode 100644 components/site/cta.tsx delete mode 100644 components/site/features.tsx delete mode 100644 components/site/footer.tsx delete mode 100644 components/site/hero.tsx delete mode 100644 components/site/navbar.tsx delete mode 100644 components/site/stats-globe.tsx create mode 100644 lib/site.ts diff --git a/app/globals.css b/app/globals.css index 6f3a68c..5a04a3c 100644 --- a/app/globals.css +++ b/app/globals.css @@ -118,7 +118,7 @@ } .dark { - --background: oklch(0.145 0 0); + --background: oklch(0 0 0); --foreground: oklch(0.985 0 0); --card: oklch(0.205 0 0); --card-foreground: oklch(0.985 0 0); diff --git a/app/layout.tsx b/app/layout.tsx index 26a91b3..e286ad2 100644 --- a/app/layout.tsx +++ b/app/layout.tsx @@ -1,10 +1,12 @@ import type { Metadata } from 'next'; + +import { ThemeProvider } from '@/components/layout/theme-provider'; +import { siteConfig } from '@/lib/site'; import './globals.css'; export const metadata: Metadata = { - title: 'Vertex — Build. Preview. Ship.', - description: - 'Vertex gives frontend teams the tooling and cloud infrastructure to build, preview, and ship a faster web.', + title: siteConfig.title, + description: siteConfig.description, }; export default function RootLayout({ @@ -13,9 +15,16 @@ export default function RootLayout({ children: React.ReactNode; }>) { return ( - - - {children} + + + + {children} + ); diff --git a/app/page.tsx b/app/page.tsx index f045496..496ed3a 100644 --- a/app/page.tsx +++ b/app/page.tsx @@ -1,23 +1,23 @@ -import { Cta } from '@/components/site/cta'; -import { Features } from '@/components/site/features'; -import { Footer } from '@/components/site/footer'; -import { Hero } from '@/components/site/hero'; -import { LogoCloud } from '@/components/site/logo-cloud'; -import { Navbar } from '@/components/site/navbar'; -import { Stats } from '@/components/site/stats'; +import { SiteFooter } from '@/components/layout/site-footer'; +import { SiteHeader } from '@/components/layout/site-header'; +import { CtaSection } from '@/components/sections/cta-section'; +import { FeaturesSection } from '@/components/sections/features-section'; +import { HeroSection } from '@/components/sections/hero-section'; +import { LogosSection } from '@/components/sections/logos-section'; +import { StatsSection } from '@/components/sections/stats-section'; export default function Home() { return ( <> - -
- - - - - + +
+ + + + +
-