Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Layout.tsx:
- import type { Metadata } from "next";
- import { Plus_Jakarta_Sans } from "next/font/google";
- import "./globals.css";
- import { Toaster } from "@/components/ui/toaster";
- const plusJakarta = Plus_Jakarta_Sans({
- subsets: ["latin"],
- variable: "--font-plus-jakarta",
- });
- export const metadata: Metadata = {
- metadataBase: new URL(process.env.NEXT_PUBLIC_BASE_URL || "http://localhost:3000"),
- title: "DesignDir - Web Design Tools & Resources Directory",
- description:
- "Discover curated web design tools, design resources, and professional design tools directory. Your one-stop destination for all design needs.",
- keywords: [
- "design tools",
- "web design tools",
- "web design directory",
- "design resources",
- ],
- openGraph: {
- title: "DesignDir - Web Design Tools & Resources Directory",
- description:
- "Discover curated web design tools, design resources, and professional design tools directory.",
- type: "website",
- locale: "en_US",
- siteName: "DesignDir",
- },
- twitter: {
- card: "summary_large_image",
- title: "DesignDir - Web Design Tools & Resources Directory",
- description:
- "Discover curated web design tools, design resources, and professional design tools directory.",
- },
- icons: {
- icon: "/favicon.ico",
- apple: "/apple-touch-icon.png",
- },
- };
- export default function RootLayout({
- children,
- }: {
- children: React.ReactNode;
- }) {
- return (
- <html lang="en" suppressHydrationWarning>
- <head>
- <script
- dangerouslySetInnerHTML={{
- __html: `
- try {
- const theme = localStorage.getItem('designdir.theme');
- if (theme === 'dark' || (!theme && window.matchMedia('(prefers-color-scheme: dark)').matches)) {
- document.documentElement.classList.add('dark');
- } else {
- document.documentElement.classList.remove('dark');
- }
- } catch (e) {}
- `,
- }}
- />
- </head>
- <body className={plusJakarta.className}>
- {children}
- <Toaster />
- </body>
- </html>
- );
- }
Advertisement
Add Comment
Please, Sign In to add comment