Skip to content

Commit b303fe1

Browse files
committed
Update layout.tsx
1 parent 27b1fcd commit b303fe1

File tree

1 file changed

+14
-9
lines changed

1 file changed

+14
-9
lines changed

Diff for: app/layout.tsx

+14-9
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import Footer from "@/components/Footer";
22
import Header from "@/components/Header";
3+
import ThemeSwitch from "@/components/ThemeSwitch";
34
import ActiveSectionContextProvider from "@/context/ActiveSectionContext";
5+
import ThemeContextProvider from "@/context/ThemeContext";
46
import { Inter } from "next/font/google";
57
import { Toaster } from "react-hot-toast";
68
import "./globals.css";
@@ -21,18 +23,21 @@ export default function RootLayout({
2123
return (
2224
<html lang="en" className="!scroll-smooth">
2325
<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`}
2527
>
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>
2830

29-
<ActiveSectionContextProvider>
30-
<Header />
31-
{children}
32-
<Footer />
31+
<ThemeContextProvider>
32+
<ActiveSectionContextProvider>
33+
<Header />
34+
{children}
35+
<Footer />
3336

34-
<Toaster position="top-right" />
35-
</ActiveSectionContextProvider>
37+
<Toaster position="top-right" />
38+
<ThemeSwitch />
39+
</ActiveSectionContextProvider>
40+
</ThemeContextProvider>
3641
</body>
3742
</html>
3843
);

0 commit comments

Comments
 (0)