Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/components/landing-shard-canvas.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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]);
Expand Down
10 changes: 7 additions & 3 deletions src/components/site-nav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand All @@ -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"
>
<MultigresLogo className="size-8" />
<span>{appName}</span>
<span className="sr-only sm:not-sr-only">{appName}</span>
</Link>

<div className="flex w-full min-w-0 justify-center justify-self-stretch px-2">
Expand All @@ -48,7 +49,7 @@ export function SiteNav({ trailing, className }: SiteNavProps) {
/>
</div>

<div className="flex items-center justify-end gap-6 justify-self-end">
<div className="flex items-center justify-end gap-1.5 justify-self-end sm:gap-6">
{siteNavLinks.map((item) =>
item.external ? (
<a
Expand All @@ -66,7 +67,9 @@ export function SiteNav({ trailing, className }: SiteNavProps) {
{item.label === 'GitHub' ? (
<GithubIcon className="size-4" />
) : null}
{item.label}
<span className={item.label === 'GitHub' ? 'sr-only sm:not-sr-only' : undefined}>
{item.label}
</span>
</a>
) : item.href.startsWith('/') ? (
<Link
Expand All @@ -86,6 +89,7 @@ export function SiteNav({ trailing, className }: SiteNavProps) {
</a>
),
)}
<ThemeSwitch className="shrink-0" />
{trailing}
</div>
</nav>
Expand Down
4 changes: 2 additions & 2 deletions src/routes/__root.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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"
>
Expand Down