added:增加Linux-server
This commit is contained in:
1 parent
6fe4e9d23f
commit
d78f3f811b
90 files changed
+16784
-1
No files matched your search
@@ -0,0 +1,36 @@
|
||||
import type { Metadata } from "next";
|
||||
import "./globals.css";
|
||||
import Sidebar from "@/components/Sidebar";
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: "写作后台",
|
||||
description: "Blog admin for Hugo",
|
||||
};
|
||||
|
||||
export default function RootLayout({
|
||||
children,
|
||||
}: Readonly<{
|
||||
children: React.ReactNode;
|
||||
}>) {
|
||||
const themeScript = `
|
||||
try {
|
||||
if (localStorage.getItem("write-theme") === "dark") {
|
||||
document.documentElement.dataset.theme = "dark";
|
||||
}
|
||||
} catch {}
|
||||
`;
|
||||
|
||||
return (
|
||||
<html lang="zh-CN" className="h-full" suppressHydrationWarning>
|
||||
<head>
|
||||
<script dangerouslySetInnerHTML={{ __html: themeScript }} />
|
||||
</head>
|
||||
<body className="h-full md:flex bg-bg text-text">
|
||||
<Sidebar />
|
||||
<main className="flex-1 overflow-auto pt-12 md:pt-0 h-full">
|
||||
{children}
|
||||
</main>
|
||||
</body>
|
||||
</html>
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user