diff --git a/package-lock.json b/package-lock.json index 96f9349..57ebc90 100644 --- a/package-lock.json +++ b/package-lock.json @@ -25,6 +25,7 @@ "date-fns": "^3.6.0", "lucide-react": "^0.394.0", "next": "14.2.3", + "next-themes": "^0.3.0", "react": "^18", "react-day-picker": "^8.10.1", "react-dom": "^18", @@ -4724,6 +4725,15 @@ } } }, + "node_modules/next-themes": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/next-themes/-/next-themes-0.3.0.tgz", + "integrity": "sha512-/QHIrsYpd6Kfk7xakK4svpDI5mmXP0gfvCoJdGpZQ2TOrQZmsW0QxjaiLn8wbIKjtm4BTSqLoix4lxYYOnLJ/w==", + "peerDependencies": { + "react": "^16.8 || ^17 || ^18", + "react-dom": "^16.8 || ^17 || ^18" + } + }, "node_modules/next/node_modules/postcss": { "version": "8.4.31", "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.31.tgz", diff --git a/package.json b/package.json index b147413..0dc8b8a 100644 --- a/package.json +++ b/package.json @@ -27,6 +27,7 @@ "date-fns": "^3.6.0", "lucide-react": "^0.394.0", "next": "14.2.3", + "next-themes": "^0.3.0", "react": "^18", "react-day-picker": "^8.10.1", "react-dom": "^18", diff --git a/src/app/globals.css b/src/app/globals.css index bc724a1..8260db7 100644 --- a/src/app/globals.css +++ b/src/app/globals.css @@ -2,70 +2,104 @@ @tailwind components; @tailwind utilities; +@import "rose-pine.css"; + +/* @layer base { */ +/* :root { */ +/* --background: 43 62% 98%; */ +/* --foreground: 43 73% 2%; */ +/* --muted: 43 24% 85%; */ +/* --muted-foreground: 43 10% 37%; */ +/* --popover: 43 62% 98%; */ +/* --popover-foreground: 43 73% 2%; */ +/* --card: 43 62% 98%; */ +/* --card-foreground: 43 73% 2%; */ +/* --border: 43 15% 91%; */ +/* --input: 43 15% 91%; */ +/* --primary: 43 50% 69%; */ +/* --primary-foreground: 43 50% 9%; */ +/* --secondary: 43 6% 92%; */ +/* --secondary-foreground: 43 6% 32%; */ +/* --accent: 43 13% 83%; */ +/* --accent-foreground: 43 13% 23%; */ +/* --destructive: 8 84% 20%; */ +/* --destructive-foreground: 8 84% 80%; */ +/* --ring: 43 50% 69%; */ +/* --radius: 0.5rem; */ +/* } */ +/* */ +/* .dark { */ +/* --background: 43 48% 4%; */ +/* --foreground: 43 26% 97%; */ +/* --muted: 43 24% 15%; */ +/* --muted-foreground: 43 10% 63%; */ +/* --popover: 43 48% 4%; */ +/* --popover-foreground: 43 26% 97%; */ +/* --card: 43 48% 4%; */ +/* --card-foreground: 43 26% 97%; */ +/* --border: 43 15% 13%; */ +/* --input: 43 15% 13%; */ +/* --primary: 43 50% 69%; */ +/* --primary-foreground: 43 50% 9%; */ +/* --secondary: 43 8% 18%; */ +/* --secondary-foreground: 43 8% 78%; */ +/* --accent: 43 14% 23%; */ +/* --accent-foreground: 43 14% 83%; */ +/* --destructive: 8 84% 52%; */ +/* --destructive-foreground: 0 0% 100%; */ +/* --ring: 43 50% 69%; */ +/* } */ +/* } */ + + @layer base { :root { - --background: 0 0% 100%; - --foreground: 222.2 84% 4.9%; - - --card: 0 0% 100%; - --card-foreground: 222.2 84% 4.9%; - - --popover: 0 0% 100%; - --popover-foreground: 222.2 84% 4.9%; - - --primary: 222.2 47.4% 11.2%; - --primary-foreground: 210 40% 98%; - - --secondary: 210 40% 96.1%; - --secondary-foreground: 222.2 47.4% 11.2%; - - --muted: 210 40% 96.1%; - --muted-foreground: 215.4 16.3% 46.9%; - - --accent: 210 40% 96.1%; - --accent-foreground: 222.2 47.4% 11.2%; - - --destructive: 0 84.2% 60.2%; - --destructive-foreground: 210 40% 98%; - - --border: 214.3 31.8% 91.4%; - --input: 214.3 31.8% 91.4%; - --ring: 222.2 84% 4.9%; - + --background: 258 70% 100%; + --foreground: 258 77% 0%; + --muted: 258 29% 85%; + --muted-foreground: 258 10% 40%; + --popover: 258 70% 100%; + --popover-foreground: 258 77% 0%; + --card: 258 70% 100%; + --card-foreground: 258 77% 0%; + --border: 220 13% 91%; + --input: 220 13% 91%; + --primary: 258 58% 37%; + --primary-foreground: 258 58% 97%; + --secondary: 258 19% 81%; + --secondary-foreground: 258 19% 21%; + --accent: 258 19% 81%; + --accent-foreground: 258 19% 21%; + --destructive: 19 98% 27%; + --destructive-foreground: 19 98% 87%; + --ring: 258 58% 37%; --radius: 0.5rem; } .dark { - --background: 222.2 84% 4.9%; - --foreground: 210 40% 98%; - - --card: 222.2 84% 4.9%; - --card-foreground: 210 40% 98%; - - --popover: 222.2 84% 4.9%; - --popover-foreground: 210 40% 98%; - - --primary: 210 40% 98%; - --primary-foreground: 222.2 47.4% 11.2%; - - --secondary: 217.2 32.6% 17.5%; - --secondary-foreground: 210 40% 98%; - - --muted: 217.2 32.6% 17.5%; - --muted-foreground: 215 20.2% 65.1%; - - --accent: 217.2 32.6% 17.5%; - --accent-foreground: 210 40% 98%; - - --destructive: 0 62.8% 30.6%; - --destructive-foreground: 210 40% 98%; - - --border: 217.2 32.6% 17.5%; - --input: 217.2 32.6% 17.5%; - --ring: 212.7 26.8% 83.9%; + --background: 258 53% 3%; + --foreground: 258 40% 97%; + --muted: 258 29% 15%; + --muted-foreground: 258 10% 60%; + --popover: 258 53% 3%; + --popover-foreground: 258 40% 97%; + --card: 258 53% 3%; + --card-foreground: 258 40% 97%; + --border: 215 27.9% 16.9%; + --input: 215 27.9% 16.9%; + --primary: 258 58% 37%; + --primary-foreground: 258 58% 97%; + --secondary: 258 15% 10%; + --secondary-foreground: 258 15% 70%; + --accent: 258 15% 10%; + --accent-foreground: 258 15% 70%; + --destructive: 19 98% 46%; + --destructive-foreground: 0 0% 100%; + --ring: 258 58% 37%; } } + @layer base { * { @apply border-border; diff --git a/src/app/layout.tsx b/src/app/layout.tsx index 81fea42..8727d14 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -1,6 +1,7 @@ import type { Metadata } from "next"; import { Inter } from "next/font/google"; +import { ThemeProvider } from "./ui/theme"; import { Toaster } from "@/components/ui/toaster"; import "./tailwind.css"; import Link from "next/link"; @@ -15,11 +16,6 @@ export const metadata: Metadata = { description: "A self-hosted literary submission tracker." }; -function NavLink(props: ComponentProps<"div"> & { href: string }) { - return ( -