1
1
import Footer from "@/components/Footer" ;
2
2
import Header from "@/components/Header" ;
3
+ import ThemeSwitch from "@/components/ThemeSwitch" ;
3
4
import ActiveSectionContextProvider from "@/context/ActiveSectionContext" ;
5
+ import ThemeContextProvider from "@/context/ThemeContext" ;
4
6
import { Inter } from "next/font/google" ;
5
7
import { Toaster } from "react-hot-toast" ;
6
8
import "./globals.css" ;
@@ -21,18 +23,21 @@ export default function RootLayout({
21
23
return (
22
24
< html lang = "en" className = "!scroll-smooth" >
23
25
< body
24
- className = { `${ inter . className } bg-gray-50 text-gray-950 relative pt-28 sm:pt-36` }
26
+ className = { `${ inter . className } bg-gray-50 text-gray-950 relative pt-28 sm:pt-36 dark:bg-gray-900 dark:text-gray-50 dark:text-opacity-90 ` }
25
27
>
26
- < div className = "bg-[#fbe2e3] absolute top-[-6rem] -z-10 right-[11rem] h-[31.25rem] w-[31.25rem] rounded-full blur-[10rem] sm:w-[68.75rem]" > </ div >
27
- < div className = "bg-[#dbd7fb] absolute top-[-1rem] -z-10 left-[-35rem] h-[31.25rem] w-[50rem] rounded-full blur-[10rem] sm:w-[68.75rem] md:left-[-33rem] lg:left-[-28rem] xl:left-[-15rem] 2xl:left-[-5rem]" > </ div >
28
+ < div className = "bg-[#fbe2e3] absolute top-[-6rem] -z-10 right-[11rem] h-[31.25rem] w-[31.25rem] rounded-full blur-[10rem] sm:w-[68.75rem] dark:bg-[#946263] " > </ div >
29
+ < div className = "bg-[#dbd7fb] absolute top-[-1rem] -z-10 left-[-35rem] h-[31.25rem] w-[50rem] rounded-full blur-[10rem] sm:w-[68.75rem] md:left-[-33rem] lg:left-[-28rem] xl:left-[-15rem] 2xl:left-[-5rem] dark:bg-[#676394] " > </ div >
28
30
29
- < ActiveSectionContextProvider >
30
- < Header />
31
- { children }
32
- < Footer />
31
+ < ThemeContextProvider >
32
+ < ActiveSectionContextProvider >
33
+ < Header />
34
+ { children }
35
+ < Footer />
33
36
34
- < Toaster position = "top-right" />
35
- </ ActiveSectionContextProvider >
37
+ < Toaster position = "top-right" />
38
+ < ThemeSwitch />
39
+ </ ActiveSectionContextProvider >
40
+ </ ThemeContextProvider >
36
41
</ body >
37
42
</ html >
38
43
) ;
0 commit comments