feat: implement the first section of landing page

This commit is contained in:
Henry Li
2026-01-23 00:15:21 +08:00
parent 6e1f63e47f
commit b69c13a3e5
14 changed files with 757 additions and 7 deletions

View File

@@ -1,10 +1,19 @@
"use client";
import { usePathname } from "next/navigation";
import { ThemeProvider as NextThemesProvider } from "next-themes";
export function ThemeProvider({
children,
...props
}: React.ComponentProps<typeof NextThemesProvider>) {
return <NextThemesProvider {...props}>{children}</NextThemesProvider>;
const pathname = usePathname();
return (
<NextThemesProvider
{...props}
forcedTheme={pathname === "/" ? "dark" : undefined}
>
{children}
</NextThemesProvider>
);
}