mirror of
				https://github.com/bartvdbraak/hellob.art.git
				synced 2025-10-29 19:29:11 +00:00 
			
		
		
		
	refactor: added features and restructuring
This commit is contained in:
		
							parent
							
								
									652b69d837
								
							
						
					
					
						commit
						1592627eb4
					
				
					 1 changed files with 65 additions and 48 deletions
				
			
		
							
								
								
									
										103
									
								
								app/layout.tsx
									
										
									
									
									
								
							
							
						
						
									
										103
									
								
								app/layout.tsx
									
										
									
									
									
								
							|  | @ -1,79 +1,96 @@ | ||||||
| import { Inter, Fjalla_One } from "next/font/google"; | import { Inter as FontSans } from "next/font/google"; | ||||||
|  | import localFont from "next/font/local"; | ||||||
| 
 | 
 | ||||||
|  | import "@/styles/globals.css"; | ||||||
|  | import { siteConfig } from "@/config/site"; | ||||||
|  | import { absoluteUrl, cn } from "@/lib/utils"; | ||||||
|  | import { Analytics } from "@/components/analytics"; | ||||||
|  | import { TailwindIndicator } from "@/components/tailwind-indicator"; | ||||||
| import { ThemeProvider } from "@/components/theme-provider"; | import { ThemeProvider } from "@/components/theme-provider"; | ||||||
| import "tailwindcss/tailwind.css"; |  | ||||||
| 
 | 
 | ||||||
| import { Metadata } from "next"; | export const metadata = { | ||||||
| 
 |  | ||||||
| export const metadata: Metadata = { |  | ||||||
|   title: { |   title: { | ||||||
|     default: "hellob.art", |     default: siteConfig.name, | ||||||
|     template: "%s | hellob.art", |     template: `%s | ${siteConfig.name}`, | ||||||
|   }, |   }, | ||||||
|   description: "a simple portfolio made by bart van der braak", |   description: siteConfig.description, | ||||||
|   metadataBase: new URL("https://hellob.art"), |   keywords: [ | ||||||
|  |     "Next.js", | ||||||
|  |     "React", | ||||||
|  |     "Tailwind CSS", | ||||||
|  |     "Server Components", | ||||||
|  |     "Radix UI", | ||||||
|  |   ], | ||||||
|  |   authors: [ | ||||||
|  |     { | ||||||
|  |       name: "Bart van der Braak", | ||||||
|  |       url: siteConfig.url, | ||||||
|  |     }, | ||||||
|  |   ], | ||||||
|  |   creator: "shadcn", | ||||||
|  |   themeColor: [ | ||||||
|  |     { media: "(prefers-color-scheme: light)", color: "white" }, | ||||||
|  |     { media: "(prefers-color-scheme: dark)", color: "black" }, | ||||||
|  |   ], | ||||||
|   openGraph: { |   openGraph: { | ||||||
|     title: "hellob.art", |  | ||||||
|     description: "a simple portfolio made by bart van der braak", |  | ||||||
|     url: "https://hellob.art", |  | ||||||
|     siteName: "hellob.art", |  | ||||||
|     locale: "en-US", |  | ||||||
|     type: "website", |     type: "website", | ||||||
|   }, |     locale: "en_US", | ||||||
|   robots: { |     url: siteConfig.url, | ||||||
|     index: true, |     title: siteConfig.name, | ||||||
|     follow: true, |     description: siteConfig.description, | ||||||
|     googleBot: { |     siteName: siteConfig.name, | ||||||
|       index: true, |  | ||||||
|       follow: true, |  | ||||||
|       "max-video-preview": -1, |  | ||||||
|       "max-image-preview": "large", |  | ||||||
|       "max-snippet": -1, |  | ||||||
|     }, |  | ||||||
|   }, |   }, | ||||||
|   twitter: { |   twitter: { | ||||||
|     title: "hellob.art", |  | ||||||
|     card: "summary_large_image", |     card: "summary_large_image", | ||||||
|  |     title: siteConfig.name, | ||||||
|  |     description: siteConfig.description, | ||||||
|  |     images: [`${siteConfig.url}/og.jpg`], | ||||||
|  |     creator: "@bartvdbraak", | ||||||
|   }, |   }, | ||||||
|   icons: { |   icons: { | ||||||
|     shortcut: "/favicon.png", |     icon: "/favicon.ico", | ||||||
|  |     shortcut: "/favicon-16x16.png", | ||||||
|  |     apple: "/apple-touch-icon.png", | ||||||
|   }, |   }, | ||||||
|  |   manifest: `${siteConfig.url}/site.webmanifest`, | ||||||
| }; | }; | ||||||
| 
 | 
 | ||||||
| interface RootLayoutProps { | interface RootLayoutProps { | ||||||
|   children: React.ReactNode; |   children: React.ReactNode; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| const inter = Inter({ | const fontSans = FontSans({ | ||||||
|   subsets: ["latin"], |   subsets: ["latin"], | ||||||
|   variable: "--font-inter", |   variable: "--font-sans", | ||||||
| }); | }); | ||||||
| 
 | 
 | ||||||
| const fjallaOne = Fjalla_One({ | // Font files can be colocated inside of `pages`
 | ||||||
|   subsets: ["latin"], | const fontHeading = localFont({ | ||||||
|   weight: "400", |   src: "../assets/fonts/CalSans-SemiBold.woff2", | ||||||
|   variable: "--font-fjalla-one", |   variable: "--font-heading", | ||||||
| }); | }); | ||||||
| 
 | 
 | ||||||
| interface RootLayoutProps { | interface RootLayoutProps { | ||||||
|   children: React.ReactNode; |   children: React.ReactNode; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| export default async function RootLayout({ children }: RootLayoutProps) { | export default function RootLayout({ children }: RootLayoutProps) { | ||||||
|   return ( |   return ( | ||||||
|     <> |     <html lang="en" suppressHydrationWarning> | ||||||
|       <html |  | ||||||
|         lang="en" |  | ||||||
|         suppressHydrationWarning |  | ||||||
|         className={[inter.variable, fjallaOne.variable].join(" ")} |  | ||||||
|       > |  | ||||||
|       <head /> |       <head /> | ||||||
|         <body className="min-h-screen antialiased"> |       <body | ||||||
|           <ThemeProvider attribute="class" defaultTheme="dark" enableSystem> |         className={cn( | ||||||
|  |           "min-h-screen bg-background font-sans antialiased", | ||||||
|  |           fontSans.variable, | ||||||
|  |           fontHeading.variable | ||||||
|  |         )} | ||||||
|  |       > | ||||||
|  |         <ThemeProvider attribute="class" defaultTheme="system" enableSystem> | ||||||
|           {children} |           {children} | ||||||
|  |           <Analytics /> | ||||||
|  |           <TailwindIndicator /> | ||||||
|         </ThemeProvider> |         </ThemeProvider> | ||||||
|       </body> |       </body> | ||||||
|     </html> |     </html> | ||||||
|     </> |  | ||||||
|   ); |   ); | ||||||
| } | } | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue