2024-09-30 22:16:55 +01:00
|
|
|
import "./globals.css";
|
2024-09-12 19:56:09 +01:00
|
|
|
import { PreloadResources } from "@/components/preload-resources";
|
2024-09-25 15:08:06 +01:00
|
|
|
import { QueryProvider } from "@/components/providers/query-provider";
|
|
|
|
import { ThemeProvider } from "@/components/providers/theme-provider";
|
|
|
|
import { Toaster } from "@/components/ui/toaster";
|
|
|
|
import { TooltipProvider } from "@/components/ui/tooltip";
|
2024-09-30 08:35:00 +01:00
|
|
|
import type { Metadata, Viewport } from "next";
|
2024-09-05 17:09:17 +01:00
|
|
|
import localFont from "next/font/local";
|
2024-10-04 18:25:37 +01:00
|
|
|
import BackgroundCover from "../components/background-cover";
|
2024-09-11 23:10:16 +01:00
|
|
|
import DatabaseLoader from "../components/loaders/database-loader";
|
|
|
|
import NavBar from "../components/navbar/navbar";
|
2024-09-30 08:35:00 +01:00
|
|
|
import { Colors } from "@/common/colors";
|
2024-09-30 22:16:55 +01:00
|
|
|
import OfflineNetwork from "@/components/offline-network";
|
2024-10-04 18:25:37 +01:00
|
|
|
import Script from "next/script";
|
2024-10-16 08:03:36 +01:00
|
|
|
import { ApiHealth } from "@/components/api/api-health";
|
2024-10-29 17:39:32 -04:00
|
|
|
import Footer from "@/components/footer";
|
|
|
|
import { getBuildInformation } from "@/common/website-utils";
|
2024-09-27 23:04:14 +01:00
|
|
|
|
2024-09-08 22:35:32 +01:00
|
|
|
const siteFont = localFont({
|
2024-09-30 21:17:42 +01:00
|
|
|
src: "./fonts/JetBrainsMono.ttf",
|
2024-09-30 22:16:55 +01:00
|
|
|
weight: "100 300",
|
2024-09-05 17:09:17 +01:00
|
|
|
});
|
|
|
|
|
|
|
|
export const metadata: Metadata = {
|
2024-09-08 22:35:32 +01:00
|
|
|
title: {
|
|
|
|
default: "ScoreSaber Reloaded",
|
2024-10-04 18:25:37 +01:00
|
|
|
template: "%s - ScoreSaber Reloaded",
|
2024-09-08 22:35:32 +01:00
|
|
|
},
|
|
|
|
applicationName: "ScoreSaber Reloaded",
|
|
|
|
authors: [
|
|
|
|
{
|
|
|
|
name: "Fascinated",
|
|
|
|
url: "https://git.fascinated.cc/Fascinated",
|
|
|
|
},
|
|
|
|
],
|
|
|
|
robots: {
|
|
|
|
index: true,
|
|
|
|
follow: true,
|
|
|
|
nocache: false,
|
|
|
|
googleBot: {
|
|
|
|
index: true,
|
|
|
|
follow: true,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
keywords:
|
|
|
|
"scoresaber, score saber, scoresaber stats, score saber stats, beatleader, beat leader," +
|
|
|
|
"scoresaber reloaded, ssr, github, score aggregation, scoresaber api, score saber api, scoresaber api," +
|
|
|
|
"BeatSaber, Overlay, OBS, Twitch, YouTube, BeatSaber Overlay, Github, Beat Saber overlay, ScoreSaber, BeatLeader," +
|
|
|
|
"VR gaming, Twitch stream enhancement, Customizable overlay, Real-time scores, Rankings, Leaderboard information," +
|
|
|
|
"Stream enhancement, Professional overlay, Easy to use overlay builder.",
|
|
|
|
openGraph: {
|
|
|
|
title: "Scoresaber Reloaded",
|
2024-09-30 22:16:55 +01:00
|
|
|
description: "Scoresaber Reloaded is a new way to view your scores and get more stats about your and your plays",
|
2024-09-08 22:35:32 +01:00
|
|
|
url: "https://ssr.fascinated.cc",
|
|
|
|
locale: "en_US",
|
|
|
|
type: "website",
|
|
|
|
},
|
2024-09-30 22:16:55 +01:00
|
|
|
description: "Scoresaber Reloaded is a new way to view your scores and get more stats about your and your plays",
|
2024-09-05 17:09:17 +01:00
|
|
|
};
|
|
|
|
|
2024-09-30 08:35:00 +01:00
|
|
|
export const viewport: Viewport = {
|
|
|
|
themeColor: Colors.primary,
|
|
|
|
};
|
|
|
|
|
2024-09-05 17:09:17 +01:00
|
|
|
export default function RootLayout({
|
|
|
|
children,
|
|
|
|
}: Readonly<{
|
|
|
|
children: React.ReactNode;
|
|
|
|
}>) {
|
2024-10-29 17:39:32 -04:00
|
|
|
const { buildId, buildTimeShort } = getBuildInformation();
|
2024-09-05 17:09:17 +01:00
|
|
|
return (
|
|
|
|
<html lang="en">
|
2024-09-30 15:30:18 +01:00
|
|
|
<body className={`${siteFont.className} antialiased w-full h-full`}>
|
2024-10-04 18:25:37 +01:00
|
|
|
<Script defer data-domain="ssr.fascinated.cc" src="https://analytics.fascinated.cc/js/script.js" />
|
2024-09-08 22:35:32 +01:00
|
|
|
<DatabaseLoader>
|
|
|
|
<Toaster />
|
2024-10-04 18:25:37 +01:00
|
|
|
<BackgroundCover />
|
2024-09-12 19:56:09 +01:00
|
|
|
<PreloadResources />
|
2024-09-27 22:05:46 +01:00
|
|
|
<TooltipProvider delayDuration={100}>
|
2024-09-30 22:16:55 +01:00
|
|
|
<OfflineNetwork>
|
|
|
|
<ThemeProvider attribute="class" defaultTheme="dark" enableSystem disableTransitionOnChange>
|
|
|
|
<QueryProvider>
|
2024-10-23 15:33:25 +01:00
|
|
|
<ApiHealth />
|
2024-10-28 22:47:45 -04:00
|
|
|
<main className="flex flex-col min-h-screen text-white w-full">
|
2024-10-23 15:33:25 +01:00
|
|
|
<NavBar />
|
2024-10-28 22:47:45 -04:00
|
|
|
<div className="mt-3 z-[1] m-auto flex flex-col flex-grow items-center w-full md:max-w-[1600px]">
|
2024-10-23 15:33:25 +01:00
|
|
|
{children}
|
|
|
|
</div>
|
2024-10-29 17:39:32 -04:00
|
|
|
{/*<Footer />*/}
|
|
|
|
<Footer buildId={buildId} buildTimeShort={buildTimeShort} />
|
2024-10-23 15:33:25 +01:00
|
|
|
</main>
|
2024-09-30 22:16:55 +01:00
|
|
|
</QueryProvider>
|
|
|
|
</ThemeProvider>
|
|
|
|
</OfflineNetwork>
|
2024-09-08 22:35:32 +01:00
|
|
|
</TooltipProvider>
|
|
|
|
</DatabaseLoader>
|
2024-09-05 17:09:17 +01:00
|
|
|
</body>
|
|
|
|
</html>
|
|
|
|
);
|
|
|
|
}
|