diff --git a/src/components/landing-shard-canvas.tsx b/src/components/landing-shard-canvas.tsx index 1a9c009..8d141b5 100644 --- a/src/components/landing-shard-canvas.tsx +++ b/src/components/landing-shard-canvas.tsx @@ -150,7 +150,8 @@ export function LandingShardCanvas({ } }; - render(); + // Read theme colors after the provider has updated the document class. + animationFrameRef.current = requestAnimationFrame(render); return clearScheduledRender; }, [gridDimensions, phase, reduceMotion, themeRevision]); diff --git a/src/components/site-nav.tsx b/src/components/site-nav.tsx index 6984ed3..f8e6375 100644 --- a/src/components/site-nav.tsx +++ b/src/components/site-nav.tsx @@ -10,6 +10,7 @@ import { FullSearchTrigger, SearchTrigger, } from 'fumadocs-ui/layouts/shared/slots/search-trigger'; +import { ThemeSwitch } from 'fumadocs-ui/layouts/shared/slots/theme-switch'; import { Link } from '@tanstack/react-router'; import type { ReactNode } from 'react'; @@ -32,7 +33,7 @@ export function SiteNav({ trailing, className }: SiteNavProps) { className="inline-flex items-center gap-2 justify-self-start font-heading text-lg font-bold text-foreground" > - {appName} + {appName}
@@ -48,7 +49,7 @@ export function SiteNav({ trailing, className }: SiteNavProps) { />
-
+
{siteNavLinks.map((item) => item.external ? ( ) : null} - {item.label} + + {item.label} + ) : item.href.startsWith('/') ? ( ), )} + {trailing}
diff --git a/src/routes/__root.tsx b/src/routes/__root.tsx index 251298d..96babcd 100644 --- a/src/routes/__root.tsx +++ b/src/routes/__root.tsx @@ -124,8 +124,8 @@ function RootComponent() { search={{ options: { api: '/api/search' } }} theme={{ storageKey: 'multigres-ui-theme', - defaultTheme: 'dark', - enableSystem: false, + defaultTheme: 'system', + enableSystem: true, }} className="flex min-h-dvh flex-1 flex-col" >