Adds /api/health, ntfy notify on config save, /admin/analytics charts, and deploy smoke for miniprogram config/API. Co-authored-by: Cursor <cursoragent@cursor.com>
85 lines
2.2 KiB
TypeScript
85 lines
2.2 KiB
TypeScript
import "./globals.css";
|
|
import "./hub.css";
|
|
|
|
import { type Metadata, type Viewport } from "next";
|
|
import { Noto_Sans_SC, Outfit } from "next/font/google";
|
|
import { LocaleProvider } from "~/components/locale-provider";
|
|
import {
|
|
ThemeProvider,
|
|
themeInitScript,
|
|
} from "~/components/theme-provider";
|
|
import { SocialFollowPrompt } from "~/components/social-follow";
|
|
import { UmamiAnalytics } from "~/components/umami-analytics";
|
|
|
|
export const viewport: Viewport = {
|
|
width: "device-width",
|
|
initialScale: 1,
|
|
maximumScale: 5,
|
|
viewportFit: "cover",
|
|
themeColor: [
|
|
{ media: "(prefers-color-scheme: dark)", color: "#0a0e17" },
|
|
{ media: "(prefers-color-scheme: light)", color: "#f8fafc" },
|
|
{ color: "#0a0e17" },
|
|
],
|
|
};
|
|
|
|
export const metadata: Metadata = {
|
|
metadataBase: new URL("https://nomadro.cn"),
|
|
title: "nomadro",
|
|
description: "数字游民入口 · 出海导航 · 数字游民小册 · 旅居社群",
|
|
keywords: [
|
|
"数字游民",
|
|
"远程工作",
|
|
"旅居",
|
|
"自由职业",
|
|
"出海导航",
|
|
"旅居社群",
|
|
],
|
|
openGraph: {
|
|
title: "nomadro",
|
|
description: "随处工作,自由生活。出海导航 · 数字游民小册 · 旅居社群",
|
|
type: "website",
|
|
url: "https://nomadro.cn",
|
|
},
|
|
icons: [{ rel: "icon", url: "/favicon.ico" }],
|
|
};
|
|
|
|
const outfit = Outfit({
|
|
subsets: ["latin"],
|
|
weight: ["400", "500", "600", "700", "800"],
|
|
variable: "--font-outfit",
|
|
display: "swap",
|
|
});
|
|
|
|
const notoSansSC = Noto_Sans_SC({
|
|
subsets: ["latin"],
|
|
weight: ["300", "400", "500", "700"],
|
|
variable: "--font-noto-sc",
|
|
display: "swap",
|
|
});
|
|
|
|
export default function RootLayout({
|
|
children,
|
|
}: Readonly<{ children: React.ReactNode }>) {
|
|
return (
|
|
<html
|
|
lang="zh-CN"
|
|
className={`${outfit.variable} ${notoSansSC.variable} dark`}
|
|
suppressHydrationWarning
|
|
>
|
|
<head>
|
|
<script dangerouslySetInnerHTML={{ __html: themeInitScript }} />
|
|
</head>
|
|
<body className="antialiased">
|
|
<UmamiAnalytics />
|
|
<ThemeProvider>
|
|
<LocaleProvider>
|
|
{children}
|
|
<SocialFollowPrompt />
|
|
</LocaleProvider>
|
|
</ThemeProvider>
|
|
</body>
|
|
</html>
|
|
);
|
|
}
|