From 748d2e561c8e1cfcecf5addee34b9dc96c724272 Mon Sep 17 00:00:00 2001 From: Manmohan <66306483+manmohan659@users.noreply.github.com> Date: Thu, 16 Apr 2026 20:08:55 -0400 Subject: [PATCH] fix(frontend): widen nav pill, default to dark theme (#41) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit LandingNav was max-w-3xl which forced "How it works" and "Try samosaChaat" to wrap on two lines. Bumps the pill to 1100px, tightens the link padding, demotes the @ handle to lg+, and adds whitespace-nowrap to every chip so nothing wraps again. Default theme is now dark — the no-flash init script adds .dark unless the user has explicitly stored 'light', and the useTheme hook seeds from the same logic. Co-authored-by: Claude Opus 4.7 (1M context) --- services/frontend/app/layout.tsx | 10 +++++----- services/frontend/components/LandingNav.tsx | 16 ++++++++-------- services/frontend/hooks/useTheme.ts | 6 +++--- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/services/frontend/app/layout.tsx b/services/frontend/app/layout.tsx index cb0ea9e7..60fd3aa0 100644 --- a/services/frontend/app/layout.tsx +++ b/services/frontend/app/layout.tsx @@ -44,19 +44,19 @@ export const metadata: Metadata = { }; export const viewport: Viewport = { - themeColor: '#fff8e7', + themeColor: '#0f0f10', width: 'device-width', initialScale: 1, viewportFit: 'cover', }; -// Set theme class before paint to avoid flash +// Set theme class before paint to avoid flash. Default = dark; user can flip via the toggle. const themeInitScript = ` (function(){try{ var t=localStorage.getItem('theme'); - if(t==='dark'){document.documentElement.classList.add('dark');} - else if(t==='light'){document.documentElement.classList.remove('dark');} -}catch(e){}})(); + if(t==='light'){document.documentElement.classList.remove('dark');} + else{document.documentElement.classList.add('dark');} +}catch(e){document.documentElement.classList.add('dark');}})(); `; export default function RootLayout({ children }: { children: React.ReactNode }) { diff --git a/services/frontend/components/LandingNav.tsx b/services/frontend/components/LandingNav.tsx index 28a07e0c..3e637721 100644 --- a/services/frontend/components/LandingNav.tsx +++ b/services/frontend/components/LandingNav.tsx @@ -10,12 +10,12 @@ export default function LandingNav() { return (