ui/ add dark and light mode toggle

This commit is contained in:
Leon van Zyl
2025-08-16 10:57:50 +02:00
parent 6bbc2956b6
commit 68398567b9
10 changed files with 717 additions and 5 deletions

View File

@@ -1,3 +1,4 @@
import { ThemeProvider } from "@/components/theme-provider";
import type { Metadata } from "next";
import { Geist, Geist_Mono } from "next/font/google";
import "./globals.css";
@@ -15,7 +16,8 @@ const geistMono = Geist_Mono({
export const metadata: Metadata = {
title: "Next.js Full-Stack Boilerplate",
description: "Complete Next.js starter template with authentication, database, AI integration, and modern tooling by Leon van Zyl",
description:
"Complete Next.js starter template with authentication, database, AI integration, and modern tooling by Leon van Zyl",
};
export default function RootLayout({
@@ -24,12 +26,19 @@ export default function RootLayout({
children: React.ReactNode;
}>) {
return (
<html lang="en" className="dark">
<html lang="en" suppressHydrationWarning>
<body
className={`${geistSans.variable} ${geistMono.variable} antialiased`}
>
<SiteHeader />
{children}
<ThemeProvider
attribute="class"
defaultTheme="system"
enableSystem
disableTransitionOnChange
>
<SiteHeader />
{children}
</ThemeProvider>
</body>
</html>
);