|
1 | | -import type { Metadata } from "next"; |
2 | | -import { Geist, Geist_Mono } from "next/font/google"; |
| 1 | +import type React from "react"; |
| 2 | +import { SiteHeader } from "@/components/site-header"; |
| 3 | +import { SiteFooter } from "@/components/site-footer"; |
| 4 | +import { ThemeProvider } from "@/components/theme-provider"; |
| 5 | +import { siteConfig } from "@/lib/site-config"; |
3 | 6 | import "./globals.css"; |
4 | | -import { cn } from "@/lib/utils"; |
5 | | -import { ThemeProvider } from '@/components/theme-provider'; |
6 | | -import { ModeToggle } from '@/components/mode-toggle'; |
| 7 | +import type { Metadata } from "next"; |
| 8 | +import { Noto_Sans, Noto_Sans_Mono } from "next/font/google"; |
7 | 9 |
|
8 | | -const geistSans = Geist({ |
9 | | - variable: "--font-geist-sans", |
| 10 | +// Body font |
| 11 | +const notoSans = Noto_Sans({ |
10 | 12 | subsets: ["latin"], |
| 13 | + weight: ["400", "500", "600", "700"], |
| 14 | + variable: "--font-noto-sans", |
11 | 15 | }); |
12 | 16 |
|
13 | | -const geistMono = Geist_Mono({ |
14 | | - variable: "--font-geist-mono", |
| 17 | +// Heading font |
| 18 | +const notoMono = Noto_Sans_Mono({ |
15 | 19 | subsets: ["latin"], |
| 20 | + weight: ["400", "700"], |
| 21 | + variable: "--font-noto-mono", |
16 | 22 | }); |
17 | 23 |
|
18 | 24 | export const metadata: Metadata = { |
19 | | - title: "Create Next App", |
20 | | - description: "Generated by create next app", |
| 25 | + title: { |
| 26 | + default: siteConfig.name, |
| 27 | + template: `%s | ${siteConfig.name}`, |
| 28 | + }, |
| 29 | + description: siteConfig.description, |
| 30 | + openGraph: { |
| 31 | + type: "website", |
| 32 | + locale: "es_ES", |
| 33 | + url: siteConfig.url, |
| 34 | + title: siteConfig.name, |
| 35 | + description: siteConfig.description, |
| 36 | + siteName: siteConfig.name, |
| 37 | + }, |
| 38 | + twitter: { |
| 39 | + card: "summary_large_image", |
| 40 | + title: siteConfig.name, |
| 41 | + description: siteConfig.description, |
| 42 | + }, |
21 | 43 | }; |
22 | 44 |
|
23 | | -export default function RootLayout({ |
24 | | - children, |
25 | | -}: Readonly<{ |
26 | | - children: React.ReactNode; |
27 | | -}>) { |
| 45 | +export default function RootLayout({ children }: { children: React.ReactNode }) { |
28 | 46 | return ( |
29 | | - <html lang="en" suppressHydrationWarning> |
30 | | - <body |
31 | | - className={cn( |
32 | | - `${geistSans.variable} ${geistMono.variable} antialiased`, |
33 | | - 'prose prose-headings:mt-8 prose-headings:font-semibold prose-headings:text-black prose-h1:text-5xl prose-h2:text-4xl prose-h3:text-3xl prose-h4:text-2xl prose-h5:text-xl prose-h6:text-lg dark:prose-headings:text-white' |
34 | | - )} |
35 | | - > |
36 | | - <ThemeProvider |
37 | | - attribute="class" |
38 | | - defaultTheme="system" |
39 | | - enableSystem |
40 | | - disableTransitionOnChange |
41 | | - > |
42 | | - <ModeToggle /> |
43 | | - {children} |
| 47 | + <html lang="es" suppressHydrationWarning> |
| 48 | + <body className={`${notoSans.variable} ${notoMono.variable} font-sans`}> |
| 49 | + <ThemeProvider attribute="class" defaultTheme="system" enableSystem disableTransitionOnChange> |
| 50 | + <div className="relative flex min-h-screen flex-col"> |
| 51 | + <SiteHeader /> |
| 52 | + <div className="flex-1">{children}</div> |
| 53 | + <SiteFooter /> |
| 54 | + </div> |
44 | 55 | </ThemeProvider> |
45 | | - {children} |
46 | 56 | </body> |
47 | 57 | </html> |
48 | 58 | ); |
|
0 commit comments