init
This commit is contained in:
commit
c19b910c36
80 changed files with 16134 additions and 0 deletions
44
app/layout.tsx
Normal file
44
app/layout.tsx
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
import type { Metadata, Viewport } from "next";
|
||||
import { Fraunces, JetBrains_Mono, Plus_Jakarta_Sans } from "next/font/google";
|
||||
import "./globals.css";
|
||||
|
||||
const jakarta = Plus_Jakarta_Sans({
|
||||
variable: "--font-jakarta",
|
||||
subsets: ["latin"],
|
||||
});
|
||||
|
||||
const fraunces = Fraunces({
|
||||
variable: "--font-fraunces",
|
||||
subsets: ["latin"],
|
||||
});
|
||||
|
||||
const jetbrainsMono = JetBrains_Mono({
|
||||
variable: "--font-jb-mono",
|
||||
subsets: ["latin"],
|
||||
});
|
||||
|
||||
export const metadata: Metadata = {
|
||||
// Pages set just their own name ("Recipes"); the template adds the app name.
|
||||
title: { default: "Plan my Meals: Budget Meal Planner", template: "%s · Plan my Meals" },
|
||||
description: "Plan a week of meals around your grocery budget and the appliances you actually own.",
|
||||
};
|
||||
|
||||
export const viewport: Viewport = {
|
||||
themeColor: [
|
||||
{ media: "(prefers-color-scheme: light)", color: "#faf6ef" },
|
||||
{ media: "(prefers-color-scheme: dark)", color: "#0e171f" },
|
||||
],
|
||||
};
|
||||
|
||||
const THEME_INIT_SCRIPT = `(function(){try{var t=localStorage.getItem("plan-my-meals:theme");if(t==="light"||t==="dark")document.documentElement.dataset.theme=t;}catch(e){}})();`;
|
||||
|
||||
export default function RootLayout({ children }: LayoutProps<"/">) {
|
||||
return (
|
||||
<html lang="en" suppressHydrationWarning className={`${jakarta.variable} ${fraunces.variable} ${jetbrainsMono.variable}`}>
|
||||
<head>
|
||||
<script dangerouslySetInnerHTML={{ __html: THEME_INIT_SCRIPT }} />
|
||||
</head>
|
||||
<body className="min-h-dvh font-sans">{children}</body>
|
||||
</html>
|
||||
);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue