Branchwell

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

1import type { Metadata, Viewport } from "next";
2import Script from "next/script";
3import "./globals.css";
4import { SiteHeader } from "@/components/site-header";
5import { SiteFooter } from "@/components/site-footer";
6import { SITE_DESCRIPTION, SITE_NAME, SITE_SHARE_IMAGE, SITE_TITLE, SITE_URL } from "@/lib/seo";
7
8// Defaults for every page; each page sets its own title and description with pageMetadata()
9export const metadata: Metadata = {
10 title: { default: SITE_TITLE, template: `%s | ${SITE_NAME}` },
11 description: SITE_DESCRIPTION,
12 metadataBase: new URL(SITE_URL),
13 applicationName: SITE_NAME,
14 icons: {
15 icon: [{ url: "/android-chrome-192x192.png", sizes: "192x192", type: "image/png" }],
16 apple: "/apple-touch-icon.png",
17 },
18 publisher: SITE_NAME,
19 manifest: "/site.webmanifest",
20 openGraph: {
21 title: SITE_TITLE,
22 description: SITE_DESCRIPTION,
23 siteName: SITE_NAME,
24 locale: "en_US",
25 type: "website",
26 images: [{ url: SITE_SHARE_IMAGE, width: 1200, height: 630, alt: SITE_NAME }],
27 },
28 twitter: {
29 card: "summary_large_image",
30 title: SITE_TITLE,
31 description: SITE_DESCRIPTION,
32 images: [{ url: SITE_SHARE_IMAGE, width: 1200, height: 630, alt: SITE_NAME }],
33 },
34};
35
36export const viewport: Viewport = {
37 themeColor: [
38 { media: "(prefers-color-scheme: dark)", color: "#121212" },
39 { media: "(prefers-color-scheme: light)", color: "#ffffff" },
40 ],
41 colorScheme: "light dark",
42};
43
44export default function RootLayout({ children }: { children: React.ReactNode }) {
45 return (
46 <html lang="en">
47 <head>
48 <link rel="stylesheet" href="/assets/visitor-odometer.v1.css" />
49 </head>
50 <body className="min-h-screen bg-background text-foreground">
51 <div className="flex min-h-screen flex-col">
52 <SiteHeader />
53 <main className="flex-1">{children}</main>
54 <SiteFooter />
55 </div>
56 {/* Share buttons (components/share-button.tsx) */}
57 <Script src="/share.js" strategy="afterInteractive" />
58 <Script src="/assets/visitor-odometer.v1.js" strategy="afterInteractive" />
59 </body>
60 </html>
61 );
62}