2023-12-01 02:22:05 +00:00
|
|
|
import clsx from "clsx";
|
|
|
|
import { Metadata, Viewport } from "next";
|
|
|
|
import { Inter } from "next/font/google";
|
|
|
|
import Script from "next/script";
|
2023-11-30 23:40:28 +00:00
|
|
|
|
2023-12-01 02:22:05 +00:00
|
|
|
import AppProvider from "./components/AppProvider";
|
|
|
|
import { ThemeProvider } from "./components/ThemeProvider";
|
|
|
|
import { Config } from "./config";
|
|
|
|
import "./globals.css";
|
|
|
|
|
|
|
|
const font = Inter({ subsets: ["latin-ext"], weight: "500" });
|
|
|
|
|
|
|
|
export const viewport: Viewport = {
|
|
|
|
themeColor: "#3B82F6",
|
|
|
|
};
|
2023-11-30 23:40:28 +00:00
|
|
|
|
|
|
|
export const metadata: Metadata = {
|
2023-12-01 02:22:05 +00:00
|
|
|
metadataBase: new URL(Config.siteUrl),
|
|
|
|
title: {
|
|
|
|
template: Config.siteName + " - %s",
|
|
|
|
default: Config.siteName,
|
|
|
|
},
|
|
|
|
description: Config.description,
|
|
|
|
openGraph: {
|
|
|
|
title: Config.siteName,
|
|
|
|
description: Config.description,
|
|
|
|
url: Config.siteUrl,
|
|
|
|
locale: "en_US",
|
|
|
|
type: "website",
|
|
|
|
},
|
|
|
|
};
|
2023-11-30 23:40:28 +00:00
|
|
|
|
|
|
|
export default function RootLayout({
|
|
|
|
children,
|
|
|
|
}: {
|
2023-12-01 02:22:05 +00:00
|
|
|
children: React.ReactNode;
|
2023-11-30 23:40:28 +00:00
|
|
|
}) {
|
|
|
|
return (
|
|
|
|
<html lang="en">
|
2023-12-01 02:22:05 +00:00
|
|
|
<Script
|
|
|
|
id="plausible"
|
|
|
|
data-domain="ssr.fascinated.cc"
|
|
|
|
src="https://analytics.fascinated.cc/js/script.js"
|
|
|
|
defer
|
|
|
|
/>
|
|
|
|
|
|
|
|
<body className={clsx(font.className, "text-primary")}>
|
|
|
|
<ThemeProvider
|
|
|
|
storageKey="ssr-theme"
|
|
|
|
attribute="class"
|
|
|
|
defaultTheme="dark"
|
|
|
|
enableSystem
|
|
|
|
>
|
|
|
|
<AppProvider>{children}</AppProvider>
|
|
|
|
</ThemeProvider>
|
|
|
|
</body>
|
2023-11-30 23:40:28 +00:00
|
|
|
</html>
|
2023-12-01 02:22:05 +00:00
|
|
|
);
|
2023-11-30 23:40:28 +00:00
|
|
|
}
|