1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
import type { Metadata, Viewport } from "next";
import { Manrope, JetBrains_Mono } from "next/font/google";
import "./globals.css";
const manrope = Manrope({
variable: "--font-manrope",
subsets: ["latin", "cyrillic"],
display: "swap",
});
const jbMono = JetBrains_Mono({
variable: "--font-jbmono",
subsets: ["latin", "cyrillic"],
display: "swap",
});
export const metadata: Metadata = {
title: "Margin — заметки и цели",
description:
"Минималистичное приложение: заметки с чек-листами, календарь, иерархия целей и ИИ-ассистент.",
};
export const viewport: Viewport = {
themeColor: [
{ media: "(prefers-color-scheme: light)", color: "#f7f7f4" },
{ media: "(prefers-color-scheme: dark)", color: "#0e0f13" },
],
width: "device-width",
initialScale: 1,
};
const themeInit = `(function(){try{var t=localStorage.getItem("margin:theme");if(!t){t=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}document.documentElement.classList.toggle("dark",t==="dark")}catch(e){}})()`;
export default function RootLayout({ children }: LayoutProps<"/">) {
return (
<html
lang="ru"
suppressHydrationWarning
className={`${manrope.variable} ${jbMono.variable} h-full antialiased`}
>
<head>
<script dangerouslySetInnerHTML={{ __html: themeInit }} />
</head>
<body className="min-h-full">{children}</body>
</html>
);
}