From fabc67e447ae843df88fab998f16de4a8afc5ecc Mon Sep 17 00:00:00 2001 From: minhd-vu Date: Sat, 24 Feb 2024 20:31:18 -0500 Subject: [PATCH] use daisyui --- app/globals.css | 30 ----------- app/layout.tsx | 11 ++-- app/leaderboard/page.tsx | 58 ++++++++------------ app/page.tsx | 8 ++- components/AdminBadge.tsx | 6 +-- components/Alert.tsx | 20 +++++++ components/CreateParty.tsx | 5 +- components/Footer.tsx | 24 +++++---- components/Hero.tsx | 17 ++++++ components/JoinParty.tsx | 11 ++-- components/KillTarget.tsx | 6 +-- components/LeaveParty.tsx | 6 +-- components/LoginButton.tsx | 12 ++--- components/Navbar.tsx | 42 +++++++-------- components/Party.tsx | 52 ++++++++++++------ components/PartyStarted.tsx | 37 ------------- components/Spinner.tsx | 22 +------- components/StartGame.tsx | 6 +-- components/ThemeController.tsx | 48 +++++++++++++++++ components/ThemeProvider.tsx | 5 ++ package-lock.json | 97 ++++++++++++++++++++++++++++++++++ package.json | 3 ++ tailwind.config.ts | 5 +- 23 files changed, 308 insertions(+), 223 deletions(-) create mode 100644 components/Alert.tsx create mode 100644 components/Hero.tsx delete mode 100644 components/PartyStarted.tsx create mode 100644 components/ThemeController.tsx create mode 100644 components/ThemeProvider.tsx diff --git a/app/globals.css b/app/globals.css index 875c01e..b5c61c9 100644 --- a/app/globals.css +++ b/app/globals.css @@ -1,33 +1,3 @@ @tailwind base; @tailwind components; @tailwind utilities; - -:root { - --foreground-rgb: 0, 0, 0; - --background-start-rgb: 214, 219, 220; - --background-end-rgb: 255, 255, 255; -} - -@media (prefers-color-scheme: dark) { - :root { - --foreground-rgb: 255, 255, 255; - --background-start-rgb: 0, 0, 0; - --background-end-rgb: 0, 0, 0; - } -} - -body { - color: rgb(var(--foreground-rgb)); - background: linear-gradient( - to bottom, - transparent, - rgb(var(--background-end-rgb)) - ) - rgb(var(--background-start-rgb)); -} - -@layer utilities { - .text-balance { - text-wrap: balance; - } -} diff --git a/app/layout.tsx b/app/layout.tsx index 2e68543..c765350 100644 --- a/app/layout.tsx +++ b/app/layout.tsx @@ -5,6 +5,7 @@ import { Inter } from "next/font/google"; import "./globals.css"; import Navbar from "@/components/Navbar"; import Footer from "@/components/Footer"; +import ThemeProvider from "@/components/ThemeProvider"; const inter = Inter({ subsets: ["latin"] }); @@ -21,12 +22,14 @@ export default async function RootLayout({ const session = await getServerSession(); return ( - + - - {children} -