Added dark theme
This commit is contained in:
parent
6d26698b78
commit
bb63827e2a
@ -13,6 +13,7 @@
|
||||
"@nextui-org/react": "^1.0.0-beta.10",
|
||||
"next": "12",
|
||||
"next-seo": "^5.5.0",
|
||||
"next-themes": "^0.2.1",
|
||||
"node-fetch": "^3.2.10",
|
||||
"prop-types": "^15.8.1",
|
||||
"react": "^18.2.0",
|
||||
|
100
pages/_app.js
100
pages/_app.js
@ -1,52 +1,76 @@
|
||||
import { NextUIProvider } from "@nextui-org/react";
|
||||
import { createTheme, NextUIProvider } from "@nextui-org/react";
|
||||
import { NextSeo } from "next-seo";
|
||||
import { ThemeProvider as NextThemesProvider } from "next-themes";
|
||||
import Head from "next/head";
|
||||
|
||||
import Config from "../config.json";
|
||||
|
||||
import "../styles/globals.css";
|
||||
|
||||
const lightTheme = createTheme({
|
||||
type: "light",
|
||||
theme: {
|
||||
colors: {},
|
||||
},
|
||||
});
|
||||
|
||||
const darkTheme = createTheme({
|
||||
type: "dark",
|
||||
theme: {
|
||||
colors: {},
|
||||
},
|
||||
});
|
||||
|
||||
function MyApp({ Component, pageProps }) {
|
||||
return (
|
||||
<NextUIProvider>
|
||||
<NextSeo
|
||||
title={Config.name}
|
||||
description={Config.description}
|
||||
openGraph={{
|
||||
url: Config.url,
|
||||
title: Config.name,
|
||||
description: Config.description,
|
||||
site_name: Config.name,
|
||||
images: [
|
||||
{
|
||||
url: "https://cdn.fascinated.cc/YrATaLjUOP.png?raw=true",
|
||||
alt: "Site Example",
|
||||
},
|
||||
],
|
||||
}}
|
||||
twitter={{
|
||||
cardType: "summary_large_image",
|
||||
site: "@BeatSaber Overlay",
|
||||
}}
|
||||
/>
|
||||
|
||||
<Head>
|
||||
<meta name="theme-color" content={Config.color} />
|
||||
<meta
|
||||
property="og:keywords"
|
||||
content="BeatSaber,Overlay,OBS,Twitch,YouTube,BeatSaber Overlay,Github,"
|
||||
<NextThemesProvider
|
||||
storageKey="theme"
|
||||
attribute="class"
|
||||
value={{
|
||||
dark: darkTheme,
|
||||
light: lightTheme,
|
||||
}}
|
||||
>
|
||||
<NextUIProvider>
|
||||
<NextSeo
|
||||
title={Config.name}
|
||||
description={Config.description}
|
||||
openGraph={{
|
||||
url: Config.url,
|
||||
title: Config.name,
|
||||
description: Config.description,
|
||||
site_name: Config.name,
|
||||
images: [
|
||||
{
|
||||
url: "https://cdn.fascinated.cc/YrATaLjUOP.png?raw=true",
|
||||
alt: "Site Example",
|
||||
},
|
||||
],
|
||||
}}
|
||||
twitter={{
|
||||
cardType: "summary_large_image",
|
||||
site: "@BeatSaber Overlay",
|
||||
}}
|
||||
/>
|
||||
|
||||
<noscript>
|
||||
<img src="https://analytics.fascinated.cc/ingress/4bc413fa-a126-4860-9a6a-22d10d5cf2fb/pixel.gif" />
|
||||
</noscript>
|
||||
<script
|
||||
defer
|
||||
src="https://analytics.fascinated.cc/ingress/4bc413fa-a126-4860-9a6a-22d10d5cf2fb/script.js"
|
||||
></script>
|
||||
</Head>
|
||||
<Component {...pageProps} />
|
||||
</NextUIProvider>
|
||||
<Head>
|
||||
<meta name="theme-color" content={Config.color} />
|
||||
<meta
|
||||
property="og:keywords"
|
||||
content="BeatSaber,Overlay,OBS,Twitch,YouTube,BeatSaber Overlay,Github,"
|
||||
/>
|
||||
|
||||
<noscript>
|
||||
<img src="https://analytics.fascinated.cc/ingress/4bc413fa-a126-4860-9a6a-22d10d5cf2fb/pixel.gif" />
|
||||
</noscript>
|
||||
<script
|
||||
defer
|
||||
src="https://analytics.fascinated.cc/ingress/4bc413fa-a126-4860-9a6a-22d10d5cf2fb/script.js"
|
||||
></script>
|
||||
</Head>
|
||||
<Component {...pageProps} />
|
||||
</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"
|
||||
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:
|
||||
version "12.3.1"
|
||||
resolved "https://registry.yarnpkg.com/next/-/next-12.3.1.tgz#127b825ad2207faf869b33393ec8c75fe61e50f1"
|
||||
|
Reference in New Issue
Block a user