Lumen & Gesso / website · lumengesso.com / app / layout.tsx
| 1 | import Script from 'next/script'; |
| 2 | import type { Metadata } from 'next'; |
| 3 | import './globals.css'; |
| 4 | import { SiteHeader } from './components/SiteHeader'; |
| 5 | import { SiteFooter } from './components/SiteFooter'; |
| 6 | import { ComingSoon } from './components/ComingSoon'; |
| 7 | import { COMING_SOON } from './config'; |
| 8 | import { JsonLd, SITE_DESCRIPTION, SITE_NAME, SITE_URL, siteJsonLd } from './lib/seo'; |
| 9 | |
| 10 | // Local monochrome preview; the original product artwork is unchanged. |
| 11 | const DEFAULT_OG_IMAGE = '/brand/portrait-preview-monochrome.jpg'; |
| 12 | |
| 13 | export const metadata: Metadata = { |
| 14 | metadataBase: new URL(SITE_URL), |
| 15 | title: { |
| 16 | default: `Custom Pet Portraits from Your Photo · ${SITE_NAME}`, |
| 17 | // Child pages set just their own piece; this template adds the studio |
| 18 | // name suffix once, consistently. e.g. `title: 'Gallery'` → "Gallery · Lumen & Gesso". |
| 19 | template: `%s · ${SITE_NAME}`, |
| 20 | }, |
| 21 | description: SITE_DESCRIPTION, |
| 22 | applicationName: SITE_NAME, |
| 23 | keywords: [ |
| 24 | 'pet portrait', |
| 25 | 'custom pet portrait', |
| 26 | 'commission pet portrait', |
| 27 | 'dog portrait', |
| 28 | 'cat portrait', |
| 29 | 'painted pet portrait', |
| 30 | 'AI pet portrait', |
| 31 | 'archival giclée pet print', |
| 32 | 'framed pet portrait', |
| 33 | 'pet memorial portrait', |
| 34 | ], |
| 35 | authors: [{ name: SITE_NAME, url: SITE_URL }], |
| 36 | creator: SITE_NAME, |
| 37 | publisher: SITE_NAME, |
| 38 | // When the launch gate is still up, instruct crawlers to skip — we don't |
| 39 | // want the holding page to be what Google has cached when we go live. |
| 40 | robots: COMING_SOON |
| 41 | ? { index: false, follow: false, nocache: true, googleBot: { index: false, follow: false } } |
| 42 | : { index: true, follow: true, googleBot: { index: true, follow: true, 'max-image-preview': 'large' } }, |
| 43 | openGraph: { |
| 44 | type: 'website', |
| 45 | siteName: SITE_NAME, |
| 46 | locale: 'en_US', |
| 47 | url: '/', |
| 48 | title: `Custom Pet Portraits from Your Photo · ${SITE_NAME}`, |
| 49 | description: SITE_DESCRIPTION, |
| 50 | images: [{ url: DEFAULT_OG_IMAGE, width: 1200, height: 675, alt: `${SITE_NAME} — pet portraits hung in a sunlit home.` }], |
| 51 | }, |
| 52 | twitter: { |
| 53 | card: 'summary_large_image', |
| 54 | title: `Custom Pet Portraits from Your Photo · ${SITE_NAME}`, |
| 55 | description: SITE_DESCRIPTION, |
| 56 | images: [DEFAULT_OG_IMAGE], |
| 57 | }, |
| 58 | alternates: { canonical: '/' }, |
| 59 | icons: { |
| 60 | icon: [{ url: '/logo.png' }], |
| 61 | apple: [{ url: '/logo-1024.png', sizes: '1024x1024' }], |
| 62 | }, |
| 63 | // Google Search Console, Bing Webmaster Tools and Pinterest verification — emits |
| 64 | // <meta name="google-site-verification" …/>, <meta name="msvalidate.01" …/> and |
| 65 | // <meta name="p:domain_verify" content="…"/> into <head>. |
| 66 | // Keep all three or the verifications lapse. |
| 67 | verification: { |
| 68 | google: '0izlJoUVs6zCK1MJ8cmjuRdDgLi9Bwa2O96N2RIyNk4', |
| 69 | other: { |
| 70 | 'p:domain_verify': 'f7861786b742b6932cae69c8da211a35', |
| 71 | 'msvalidate.01': 'E2001B47E91F72A19BB1E8E642B26928', |
| 72 | }, |
| 73 | }, |
| 74 | }; |
| 75 | |
| 76 | export default function RootLayout({ children }: { children: React.ReactNode }) { |
| 77 | return ( |
| 78 | /* suppressHydrationWarning: some browser extensions (Scribe recorder, |
| 79 | Grammarly, dark-reader, password managers, etc.) inject attributes |
| 80 | onto <html> after the server render, which throws a hydration |
| 81 | mismatch. Suppression here is scoped to attribute diffs on this |
| 82 | single element — children are still hydration-checked normally. */ |
| 83 | <html lang="en" suppressHydrationWarning> |
| 84 | <head> |
| 85 | <link rel="preconnect" href="https://fonts.googleapis.com" /> |
| 86 | <link rel="preconnect" href="https://fonts.gstatic.com" crossOrigin="anonymous" /> |
| 87 | <link |
| 88 | href="https://fonts.googleapis.com/css2?family=Newsreader:ital,opsz,wght@0,16..72,400;0,16..72,500;0,16..72,600;1,16..72,400;1,16..72,500&family=DM+Sans:opsz,wght@9..40,400;9..40,500;9..40,600;9..40,700&family=Playfair+Display:wght@500;700&family=Cormorant+Garamond:ital,wght@0,500;1,500&family=Italiana&family=Pinyon+Script&family=Caveat:wght@500;600;700&family=Outfit:wght@400;500;600&display=swap" |
| 89 | rel="stylesheet" |
| 90 | /> |
| 91 | {/* Pre-paint build-state probe. Runs synchronously before the |
| 92 | header paints (same pattern as a no-flash dark-mode script), |
| 93 | reading the in-progress-build markers from sessionStorage and |
| 94 | stamping <html data-build-active>. The header renders BOTH |
| 95 | the "Start a Portrait" and "Resume portrait" buttons; CSS |
| 96 | shows the correct one based on this attribute — so it never |
| 97 | flips/flashes on navigation the way a hydrate-then-read |
| 98 | client component does. */} |
| 99 | <script |
| 100 | dangerouslySetInnerHTML={{ |
| 101 | __html: |
| 102 | "(function(){try{var a=sessionStorage.getItem('lg_build_progress')||sessionStorage.getItem('lg_pending_order_id');var e=document.documentElement;if(a){e.setAttribute('data-build-active','1');}else{e.removeAttribute('data-build-active');}}catch(_){}})();", |
| 103 | }} |
| 104 | /> |
| 105 | <link rel="stylesheet" href="/assets/visitor-odometer.v1.css" /> |
| 106 | <script defer src="/assets/visitor-odometer.v1.js"></script> |
| 107 | {/* No orphans: no single word alone on a last line (shared fix, hosting-research assets/no-orphans). */} |
| 108 | <link rel="stylesheet" href="/no-orphans.css" /> |
| 109 | <script src="/no-orphans.js" defer /> |
| 110 | </head> |
| 111 | <body> |
| 112 | {COMING_SOON ? ( |
| 113 | <ComingSoon /> |
| 114 | ) : ( |
| 115 | <> |
| 116 | {/* JSON-LD: the Lumen & Gesso organization and website, on |
| 117 | every page of the live site (see app/lib/seo.ts). */} |
| 118 | <JsonLd data={siteJsonLd()} /> |
| 119 | {/* Hidden SVG sprite: silhouettes + star */} |
| 120 | <svg width={0} height={0} style={{ position: 'absolute' }} aria-hidden="true"> |
| 121 | <symbol id="sil-dog" viewBox="0 0 200 220"> |
| 122 | <path d="M62 38c-4-6-3-14 2-18 6-3 12-1 17 6l8 14c4-1 8-2 13-2 4 0 9 1 13 2l8-14c5-7 11-9 17-6 5 4 6 12 2 18l-9 15c10 8 17 19 19 33 2 11-1 22-7 32 4 6 6 14 6 22 0 9-2 17-7 24-3 4-7 7-12 8-9 2-19 1-29 1s-20 1-29-1c-5-1-9-4-12-8-5-7-7-15-7-24 0-8 2-16 6-22-6-10-9-21-7-32 2-14 9-25 19-33l-9-15z" /> |
| 123 | </symbol> |
| 124 | <symbol id="sil-cat" viewBox="0 0 200 220"> |
| 125 | <path d="M55 60c-3-10-2-22 1-32 1-3 5-3 7-1l22 24c5-2 10-3 15-3s10 1 15 3l22-24c2-2 6-2 7 1 3 10 4 22 1 32 10 9 17 22 17 36 0 13-5 25-13 33 3 7 4 14 4 21 0 12-3 22-9 30-3 4-7 5-12 5-12 0-25 1-37 1s-25-1-37-1c-5 0-9-1-12-5-6-8-9-18-9-30 0-7 1-14 4-21-8-8-13-20-13-33 0-14 7-27 17-36z" /> |
| 126 | </symbol> |
| 127 | <symbol id="star" viewBox="0 0 24 24"> |
| 128 | <path d="M12 2l2.9 6.7 7.1.7-5.4 4.8 1.6 7-6.2-3.7-6.2 3.7 1.6-7L2 9.4l7.1-.7L12 2z" /> |
| 129 | </symbol> |
| 130 | </svg> |
| 131 | <SiteHeader /> |
| 132 | {children} |
| 133 | <SiteFooter /> |
| 134 | {/* Share buttons (components/ShareButton.tsx) */} |
| 135 | <Script src="/share.js" strategy="afterInteractive" /> |
| 136 | </> |
| 137 | )} |
| 138 | </body> |
| 139 | </html> |
| 140 | ); |
| 141 | } |