Added dark theme
This commit is contained in:
parent
6d26698b78
commit
bb63827e2a
@ -13,6 +13,7 @@
|
|||||||
"@nextui-org/react": "^1.0.0-beta.10",
|
"@nextui-org/react": "^1.0.0-beta.10",
|
||||||
"next": "12",
|
"next": "12",
|
||||||
"next-seo": "^5.5.0",
|
"next-seo": "^5.5.0",
|
||||||
|
"next-themes": "^0.2.1",
|
||||||
"node-fetch": "^3.2.10",
|
"node-fetch": "^3.2.10",
|
||||||
"prop-types": "^15.8.1",
|
"prop-types": "^15.8.1",
|
||||||
"react": "^18.2.0",
|
"react": "^18.2.0",
|
||||||
|
@ -1,13 +1,36 @@
|
|||||||
import { NextUIProvider } from "@nextui-org/react";
|
import { createTheme, NextUIProvider } from "@nextui-org/react";
|
||||||
import { NextSeo } from "next-seo";
|
import { NextSeo } from "next-seo";
|
||||||
|
import { ThemeProvider as NextThemesProvider } from "next-themes";
|
||||||
import Head from "next/head";
|
import Head from "next/head";
|
||||||
|
|
||||||
import Config from "../config.json";
|
import Config from "../config.json";
|
||||||
|
|
||||||
import "../styles/globals.css";
|
import "../styles/globals.css";
|
||||||
|
|
||||||
|
const lightTheme = createTheme({
|
||||||
|
type: "light",
|
||||||
|
theme: {
|
||||||
|
colors: {},
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
const darkTheme = createTheme({
|
||||||
|
type: "dark",
|
||||||
|
theme: {
|
||||||
|
colors: {},
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
function MyApp({ Component, pageProps }) {
|
function MyApp({ Component, pageProps }) {
|
||||||
return (
|
return (
|
||||||
|
<NextThemesProvider
|
||||||
|
storageKey="theme"
|
||||||
|
attribute="class"
|
||||||
|
value={{
|
||||||
|
dark: darkTheme,
|
||||||
|
light: lightTheme,
|
||||||
|
}}
|
||||||
|
>
|
||||||
<NextUIProvider>
|
<NextUIProvider>
|
||||||
<NextSeo
|
<NextSeo
|
||||||
title={Config.name}
|
title={Config.name}
|
||||||
@ -47,6 +70,7 @@ function MyApp({ Component, pageProps }) {
|
|||||||
</Head>
|
</Head>
|
||||||
<Component {...pageProps} />
|
<Component {...pageProps} />
|
||||||
</NextUIProvider>
|
</NextUIProvider>
|
||||||
|
</NextThemesProvider>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2155,6 +2155,11 @@ next-seo@^5.5.0:
|
|||||||
resolved "https://registry.yarnpkg.com/next-seo/-/next-seo-5.5.0.tgz#12bdfce60a6ae098f49617357a166c2d44dbc29e"
|
resolved "https://registry.yarnpkg.com/next-seo/-/next-seo-5.5.0.tgz#12bdfce60a6ae098f49617357a166c2d44dbc29e"
|
||||||
integrity sha512-5ouBHFtx8YrSDW44lj0qIEQ+oMcz6stgoITB+SqHUZbhgizoJsyLmq73gJ0lxtEKpcN8vG2QgRIJfdb8OAPChw==
|
integrity sha512-5ouBHFtx8YrSDW44lj0qIEQ+oMcz6stgoITB+SqHUZbhgizoJsyLmq73gJ0lxtEKpcN8vG2QgRIJfdb8OAPChw==
|
||||||
|
|
||||||
|
next-themes@^0.2.1:
|
||||||
|
version "0.2.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/next-themes/-/next-themes-0.2.1.tgz#0c9f128e847979daf6c67f70b38e6b6567856e45"
|
||||||
|
integrity sha512-B+AKNfYNIzh0vqQQKqQItTS8evEouKD7H5Hj3kmuPERwddR2TxvDSFZuTj6T7Jfn1oyeUyJMydPl1Bkxkh0W7A==
|
||||||
|
|
||||||
next@12:
|
next@12:
|
||||||
version "12.3.1"
|
version "12.3.1"
|
||||||
resolved "https://registry.yarnpkg.com/next/-/next-12.3.1.tgz#127b825ad2207faf869b33393ec8c75fe61e50f1"
|
resolved "https://registry.yarnpkg.com/next/-/next-12.3.1.tgz#127b825ad2207faf869b33393ec8c75fe61e50f1"
|
||||||
|
Reference in New Issue
Block a user