import Script from 'next/script'; import type { Metadata } from 'next'; import './globals.css'; import { SiteHeader } from './components/SiteHeader'; import { SiteFooter } from './components/SiteFooter'; import { ComingSoon } from './components/ComingSoon'; import { COMING_SOON } from './config'; import { JsonLd, SITE_DESCRIPTION, SITE_NAME, SITE_URL, siteJsonLd } from './lib/seo'; // Local monochrome preview; the original product artwork is unchanged. const DEFAULT_OG_IMAGE = '/brand/portrait-preview-monochrome.jpg'; export const metadata: Metadata = { metadataBase: new URL(SITE_URL), title: { default: `Custom Pet Portraits from Your Photo · ${SITE_NAME}`, // Child pages set just their own piece; this template adds the studio // name suffix once, consistently. e.g. `title: 'Gallery'` → "Gallery · Lumen & Gesso". template: `%s · ${SITE_NAME}`, }, description: SITE_DESCRIPTION, applicationName: SITE_NAME, keywords: [ 'pet portrait', 'custom pet portrait', 'commission pet portrait', 'dog portrait', 'cat portrait', 'painted pet portrait', 'AI pet portrait', 'archival giclée pet print', 'framed pet portrait', 'pet memorial portrait', ], authors: [{ name: SITE_NAME, url: SITE_URL }], creator: SITE_NAME, publisher: SITE_NAME, // When the launch gate is still up, instruct crawlers to skip — we don't // want the holding page to be what Google has cached when we go live. robots: COMING_SOON ? { index: false, follow: false, nocache: true, googleBot: { index: false, follow: false } } : { index: true, follow: true, googleBot: { index: true, follow: true, 'max-image-preview': 'large' } }, openGraph: { type: 'website', siteName: SITE_NAME, locale: 'en_US', url: '/', title: `Custom Pet Portraits from Your Photo · ${SITE_NAME}`, description: SITE_DESCRIPTION, images: [{ url: DEFAULT_OG_IMAGE, width: 1200, height: 675, alt: `${SITE_NAME} — pet portraits hung in a sunlit home.` }], }, twitter: { card: 'summary_large_image', title: `Custom Pet Portraits from Your Photo · ${SITE_NAME}`, description: SITE_DESCRIPTION, images: [DEFAULT_OG_IMAGE], }, alternates: { canonical: '/' }, icons: { icon: [{ url: '/logo.png' }], apple: [{ url: '/logo-1024.png', sizes: '1024x1024' }], }, // Google Search Console, Bing Webmaster Tools and Pinterest verification — emits // , and // into
. // Keep all three or the verifications lapse. verification: { google: '0izlJoUVs6zCK1MJ8cmjuRdDgLi9Bwa2O96N2RIyNk4', other: { 'p:domain_verify': 'f7861786b742b6932cae69c8da211a35', 'msvalidate.01': 'E2001B47E91F72A19BB1E8E642B26928', }, }, }; export default function RootLayout({ children }: { children: React.ReactNode }) { return ( /* suppressHydrationWarning: some browser extensions (Scribe recorder, Grammarly, dark-reader, password managers, etc.) inject attributes onto after the server render, which throws a hydration mismatch. Suppression here is scoped to attribute diffs on this single element — children are still hydration-checked normally. */ {/* Pre-paint build-state probe. Runs synchronously before the header paints (same pattern as a no-flash dark-mode script), reading the in-progress-build markers from sessionStorage and stamping . The header renders BOTH the "Start a Portrait" and "Resume portrait" buttons; CSS shows the correct one based on this attribute — so it never flips/flashes on navigation the way a hydrate-then-read client component does. */} {/* No orphans: no single word alone on a last line (shared fix, hosting-research assets/no-orphans). */} {COMING_SOON ? (