diff --git a/app/globals.css b/app/globals.css index de6bb2c..98bc0ec 100644 --- a/app/globals.css +++ b/app/globals.css @@ -4,39 +4,39 @@ @custom-variant dark (&:is(.dark *)); :root { - --background: oklch(1 0 0); - --foreground: oklch(0.145 0 0); + --background: oklch(0.99 0 0); + --foreground: oklch(0.09 0 0); --card: oklch(1 0 0); - --card-foreground: oklch(0.145 0 0); + --card-foreground: oklch(0.09 0 0); --popover: oklch(1 0 0); - --popover-foreground: oklch(0.145 0 0); - --primary: oklch(0.205 0 0); - --primary-foreground: oklch(0.985 0 0); - --secondary: oklch(0.97 0 0); - --secondary-foreground: oklch(0.205 0 0); - --muted: oklch(0.97 0 0); - --muted-foreground: oklch(0.556 0 0); - --accent: oklch(0.97 0 0); - --accent-foreground: oklch(0.205 0 0); - --destructive: oklch(0.577 0.245 27.325); - --destructive-foreground: oklch(0.577 0.245 27.325); - --border: oklch(0.922 0 0); - --input: oklch(0.922 0 0); - --ring: oklch(0.708 0 0); - --chart-1: oklch(0.646 0.222 41.116); - --chart-2: oklch(0.6 0.118 184.704); - --chart-3: oklch(0.398 0.07 227.392); - --chart-4: oklch(0.828 0.189 84.429); - --chart-5: oklch(0.769 0.188 70.08); + --popover-foreground: oklch(0.09 0 0); + --primary: oklch(0.45 0.22 285); + --primary-foreground: oklch(0.99 0 0); + --secondary: oklch(0.50 0.18 200); + --secondary-foreground: oklch(0.99 0 0); + --muted: oklch(0.96 0 0); + --muted-foreground: oklch(0.45 0 0); + --accent: oklch(0.55 0.2 195); + --accent-foreground: oklch(0.99 0 0); + --destructive: oklch(0.55 0.22 25); + --destructive-foreground: oklch(0.99 0 0); + --border: oklch(0.88 0 0); + --input: oklch(0.88 0 0); + --ring: oklch(0.45 0.22 285); + --chart-1: oklch(0.50 0.22 285); + --chart-2: oklch(0.50 0.18 200); + --chart-3: oklch(0.55 0.2 195); + --chart-4: oklch(0.55 0.15 160); + --chart-5: oklch(0.60 0.12 180); --radius: 0.625rem; - --sidebar: oklch(0.985 0 0); - --sidebar-foreground: oklch(0.145 0 0); - --sidebar-primary: oklch(0.205 0 0); - --sidebar-primary-foreground: oklch(0.985 0 0); - --sidebar-accent: oklch(0.97 0 0); - --sidebar-accent-foreground: oklch(0.205 0 0); - --sidebar-border: oklch(0.922 0 0); - --sidebar-ring: oklch(0.708 0 0); + --sidebar: oklch(0.99 0 0); + --sidebar-foreground: oklch(0.09 0 0); + --sidebar-primary: oklch(0.45 0.22 285); + --sidebar-primary-foreground: oklch(0.99 0 0); + --sidebar-accent: oklch(0.96 0 0); + --sidebar-accent-foreground: oklch(0.09 0 0); + --sidebar-border: oklch(0.88 0 0); + --sidebar-ring: oklch(0.45 0.22 285); } .dark { diff --git a/app/layout.tsx b/app/layout.tsx index 45c1545..ec8db8a 100644 --- a/app/layout.tsx +++ b/app/layout.tsx @@ -2,6 +2,7 @@ import React from "react" import type { Metadata } from 'next' import { Geist, Geist_Mono } from 'next/font/google' import { Analytics } from '@vercel/analytics/next' +import { ThemeProvider } from '@/components/theme-provider' import './globals.css' const _geist = Geist({ subsets: ["latin"] }); @@ -36,10 +37,17 @@ export default function RootLayout({ children: React.ReactNode }>) { return ( - + - {children} - + + {children} + + ) diff --git a/components/navbar.tsx b/components/navbar.tsx index bbc991e..6c9952d 100644 --- a/components/navbar.tsx +++ b/components/navbar.tsx @@ -2,6 +2,7 @@ import Link from 'next/link' import { Button } from '@/components/ui/button' +import { ThemeToggle } from '@/components/theme-toggle' import { Menu, X } from 'lucide-react' import { useState } from 'react' @@ -13,7 +14,7 @@ export function Navbar() {
-
+
TaskChain
@@ -33,6 +34,7 @@ export function Navbar() {
+ @@ -66,6 +68,10 @@ export function Navbar() { Testimonials
+
+ Theme + +
diff --git a/components/theme-toggle.tsx b/components/theme-toggle.tsx new file mode 100644 index 0000000..a6aab07 --- /dev/null +++ b/components/theme-toggle.tsx @@ -0,0 +1,40 @@ +'use client' + +import * as React from 'react' +import { Moon, Sun } from 'lucide-react' +import { useTheme } from 'next-themes' +import { Button } from '@/components/ui/button' + +export function ThemeToggle() { + const { theme, setTheme } = useTheme() + const [mounted, setMounted] = React.useState(false) + + // Avoid hydration mismatch + React.useEffect(() => { + setMounted(true) + }, []) + + if (!mounted) { + return ( + + ) + } + + return ( + + ) +}