Branchwell

Become a Pro / website · becomeapro.ai / src / app / layout.tsx

Raw 3.8 KB on b7854f3692d64213a2fce644d0b5101d3e345b03
1import type { Metadata, Viewport } from "next";
2import Script from "next/script";
3import { Funnel_Display, Geist, Geist_Mono, Poppins } from "next/font/google";
4import "./globals.css";
5import { cn } from "@/lib/utils";
6import { SiteHeader } from "@/components/site-header";
7import { SiteFooter } from "@/components/site-footer";
8import { ThemeProvider } from "@/components/theme/theme-provider";
9import { AUTHOR, RSS_ALTERNATE, SITE_DESCRIPTION, SITE_NAME, SITE_OG_IMAGE, SITE_OG_IMAGE_ALT, SITE_TITLE, SITE_URL } from "@/lib/seo";
10
11const display = Funnel_Display({ subsets: ["latin"], display: "swap", variable: "--font-display" });
12const sans = Geist({ subsets: ["latin"], display: "swap", variable: "--font-sans" });
13const mono = Geist_Mono({ subsets: ["latin"], display: "swap", variable: "--font-mono" });
14// The wordmark is set in Poppins SemiBold, as on the original site
15const mark = Poppins({ subsets: ["latin"], weight: "600", display: "swap", variable: "--font-mark" });
16
17// Defaults for every page; each page sets its own canonical URL, title and share card with pageMetadata()
18export const metadata: Metadata = {
19 title: { default: SITE_TITLE, template: `%s | ${SITE_NAME}` },
20 description: SITE_DESCRIPTION,
21 metadataBase: new URL(SITE_URL),
22 applicationName: SITE_NAME,
23 icons: {
24 // app/favicon.ico is added automatically; this is the sharper icon for high-density screens
25 icon: [{ url: "/android-chrome-192x192.png", sizes: "192x192", type: "image/png" }],
26 apple: "/apple-touch-icon.png",
27 },
28 authors: [{ name: AUTHOR.name, url: AUTHOR.path }],
29 creator: AUTHOR.name,
30 publisher: "AI Resource Pro",
31 category: "technology",
32 keywords: ["AI tutorials", "Claude Code", "Codex", "ChatGPT", "computer use", "AI agents", "open-weight models", "Runpod", "ComfyUI"],
33 manifest: "/site.webmanifest",
34 alternates: { types: RSS_ALTERNATE },
35 // Google Search Console ownership of https://airesourcepro.com/ (keep it, or the property loses verification)
36 verification: { google: "dR3ow4mE5vjoNgGzd9u4tRYa5xvWFDHOTYwIaZIeOwU" },
37 openGraph: {
38 title: SITE_TITLE,
39 description: SITE_DESCRIPTION,
40 siteName: SITE_NAME,
41 locale: "en_US",
42 type: "website",
43 images: [{ url: SITE_OG_IMAGE, width: 1200, height: 630, alt: SITE_OG_IMAGE_ALT }],
44 },
45 twitter: {
46 card: "summary_large_image",
47 title: SITE_TITLE,
48 description: SITE_DESCRIPTION,
49 images: [{ url: SITE_OG_IMAGE, width: 1200, height: 630, alt: SITE_OG_IMAGE_ALT }],
50 },
51};
52
53export const viewport: Viewport = {
54 themeColor: [
55 { media: "(prefers-color-scheme: dark)", color: "#111111" },
56 { media: "(prefers-color-scheme: light)", color: "#f7f7f7" },
57 ],
58 colorScheme: "dark light",
59};
60
61export default function RootLayout({ children }: { children: React.ReactNode }) {
62 return (
63 <html
64 lang="en"
65 suppressHydrationWarning
66 className={cn(display.variable, sans.variable, mono.variable, mark.variable)}
67 >
68 <head>
69 <link rel="stylesheet" href="/assets/visitor-odometer.v1.css" />
70 {/* No orphans: no single word alone on a last line (shared fix, hosting-research assets/no-orphans). */}
71 <link rel="stylesheet" href="/no-orphans.css" />
72 <script src="/no-orphans.js" defer />
73 </head>
74 <body className="min-h-screen overflow-x-hidden bg-background font-sans text-foreground antialiased">
75 <ThemeProvider>
76 <div className="flex min-h-screen flex-col">
77 <SiteHeader />
78 <main className="flex-1">{children}</main>
79 <SiteFooter />
80 </div>
81 </ThemeProvider>
82 {/* Share buttons (components/share-button.tsx) */}
83 <Script src="/share.js" strategy="afterInteractive" />
84 <Script src="/assets/visitor-odometer.v1.js" strategy="afterInteractive" />
85 </body>
86 </html>
87 );
88}