style(app): standardize app page file formatting
This commit is contained in:
@@ -5,49 +5,56 @@ import { ThemeProvider } from "next-themes";
|
||||
import { ModeToggle } from "@/components/mode-toggle";
|
||||
import SignIn from "@/components/sign-in";
|
||||
import { Toaster } from "@/components/ui/sonner";
|
||||
import Link from "next/link"
|
||||
import Link from "next/link";
|
||||
|
||||
const geist = Geist({ subsets: ['latin', 'cyrillic'], variable: "--font-geist-sans" })
|
||||
const geist = Geist({
|
||||
subsets: ["latin", "cyrillic"],
|
||||
variable: "--font-geist-sans",
|
||||
});
|
||||
|
||||
const magra = Magra({ subsets: ["latin"], weight: "400", variable: "--font-cascadia-code" })
|
||||
const magra = Magra({
|
||||
subsets: ["latin"],
|
||||
weight: "400",
|
||||
variable: "--font-cascadia-code",
|
||||
});
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: 'Local iCal',
|
||||
description: 'Local iCal editor for calendar events',
|
||||
creator: "Dmytro Stanchiev",
|
||||
}
|
||||
title: "Local iCal",
|
||||
description: "Local iCal editor for calendar events",
|
||||
creator: "Dmytro Stanchiev",
|
||||
};
|
||||
|
||||
export default function RootLayout({
|
||||
children,
|
||||
children,
|
||||
}: Readonly<{
|
||||
children: React.ReactNode;
|
||||
children: React.ReactNode;
|
||||
}>) {
|
||||
return (
|
||||
<html lang="en" suppressHydrationWarning>
|
||||
<body
|
||||
className={`${geist.variable} antialiased min-h-screen flex flex-col dark:text-gray-300 --color-background`}
|
||||
>
|
||||
<ThemeProvider
|
||||
attribute="class"
|
||||
defaultTheme="system"
|
||||
enableSystem
|
||||
disableTransitionOnChange
|
||||
>
|
||||
<header className="dark:text-white text-gray-900 px-4 py-3 font-bold flex justify-between items-center-safe">
|
||||
<Link href={"/"}>
|
||||
<p className={`${magra.variable}`}>
|
||||
{metadata.title as string || "iCal PWA"}
|
||||
</p>
|
||||
</Link>
|
||||
<div className="flex flex-row gap-2">
|
||||
<SignIn />
|
||||
<ModeToggle />
|
||||
</div>
|
||||
</header>
|
||||
<main className="flex-1 p-4">{children}</main>
|
||||
<Toaster closeButton richColors />
|
||||
</ThemeProvider>
|
||||
</body>
|
||||
</html>
|
||||
);
|
||||
return (
|
||||
<html lang="en" suppressHydrationWarning>
|
||||
<body
|
||||
className={`${geist.variable} antialiased min-h-screen flex flex-col dark:text-gray-300 --color-background`}
|
||||
>
|
||||
<ThemeProvider
|
||||
attribute="class"
|
||||
defaultTheme="system"
|
||||
enableSystem
|
||||
disableTransitionOnChange
|
||||
>
|
||||
<header className="dark:text-white text-gray-900 px-4 py-3 font-bold flex justify-between items-center-safe">
|
||||
<Link href={"/"}>
|
||||
<p className={`${magra.variable}`}>
|
||||
{(metadata.title as string) || "iCal PWA"}
|
||||
</p>
|
||||
</Link>
|
||||
<div className="flex flex-row gap-2">
|
||||
<SignIn />
|
||||
<ModeToggle />
|
||||
</div>
|
||||
</header>
|
||||
<main className="flex-1 p-4">{children}</main>
|
||||
<Toaster closeButton richColors />
|
||||
</ThemeProvider>
|
||||
</body>
|
||||
</html>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user