Files
frontend-helper/src/app/layout.tsx
T

54 lines
1.7 KiB
TypeScript

import type { Metadata, Viewport } from "next";
import type { ReactNode } from "react";
import { Cormorant_Garamond, Manrope } from "next/font/google";
import { DEFAULT_THEME, THEME_SCRIPT } from "@/lib/theme";
import "./globals.css";
import "../styles/type.css";
import "../styles/layout.css";
import "../styles/buttons.css";
import "../styles/avatar.css";
import "../styles/signin.css";
import "../styles/post.css";
import "../styles/composer.css";
import "../styles/featured.css";
import "../styles/feed.css";
import "../styles/trending.css";
import "../styles/search.css";
import "../styles/mobile.css";
import "../styles/sheet.css";
const manrope = Manrope({
subsets: ["latin"],
weight: ["400", "500", "600", "700", "800"],
variable: "--font-sans",
display: "swap",
});
const cormorant = Cormorant_Garamond({
subsets: ["latin"],
weight: ["500", "600"],
style: ["normal", "italic"],
variable: "--font-serif",
display: "swap",
});
// viewport-fit=cover makes env(safe-area-inset-*) report the iPhone home indicator.
export const viewport: Viewport = { width: "device-width", initialScale: 1, viewportFit: "cover" };
export const metadata: Metadata = {
title: "Minnect feed browser",
description: "Sign in with your Minnect account to read and write the home feed.",
};
export default function RootLayout({ children }: { children: ReactNode }) {
return (
<html lang="en" className={`${manrope.variable} ${cormorant.variable}`} data-theme={DEFAULT_THEME} suppressHydrationWarning>
<head>
{/* Applies the stored theme before first paint (ADR 0001, section 5). */}
<script dangerouslySetInnerHTML={{ __html: THEME_SCRIPT }} />
</head>
<body>{children}</body>
</html>
);
}