Files
webb/src/app/layout.tsx
T

102 lines
3.4 KiB
TypeScript
Raw Normal View History

import type { Metadata } from 'next';
import { Plus_Jakarta_Sans, Outfit, JetBrains_Mono } from 'next/font/google';
import './globals.css';
import { getSiteConfig } from '@/lib/config/loader';
import { Navbar } from '@/components/ui/Navbar';
import { Footer } from '@/components/ui/Footer';
const sansFont = Plus_Jakarta_Sans({
subsets: ['latin'],
variable: '--font-sans',
display: 'swap',
});
const displayFont = Outfit({
subsets: ['latin'],
variable: '--font-display',
display: 'swap',
});
const monoFont = JetBrains_Mono({
subsets: ['latin'],
variable: '--font-mono',
display: 'swap',
});
export async function generateMetadata(): Promise<Metadata> {
const config = getSiteConfig();
const siteUrl = process.env.SITE_URL || config.seo.siteUrl || 'http://localhost:3000';
return {
title: {
default: `${config.brand.name} | Advanced AI Vision & Creative Tools Studio`,
template: config.seo.titleTemplate || `%s | ${config.brand.name}`,
},
description: 'Advanced neural vision models for sub-pore portrait retouching, hair-strand matting background cutouts, and 4K photo restoration.',
metadataBase: new URL(siteUrl),
keywords: [
'CRE Innovations',
'AI photo editor',
'online blemish remover',
'P3M background remover',
'photo enhancer 4K',
'vintage photo restoration',
'teeth whitener AI',
'CartoonGAN anime avatar',
],
authors: [{ name: 'CRE Innovations Engineering Team' }],
openGraph: {
type: 'website',
siteName: config.brand.name,
title: `${config.brand.name} | Advanced AI Photo Tools`,
description: 'Free online AI photo tools with zero photo retention and native mobile app handoff.',
images: [{ url: '/brand/og-default.png', width: 1200, height: 630, alt: config.brand.name }],
},
twitter: {
card: 'summary_large_image',
title: `${config.brand.name} | Advanced AI Photo Tools`,
description: 'Free online AI photo tools with zero storage and native mobile app handoff.',
images: ['/brand/og-default.png'],
},
robots: { index: true, follow: true },
};
}
export default function RootLayout({
children,
}: {
children: React.ReactNode;
}) {
const config = getSiteConfig();
const siteUrl = process.env.SITE_URL || config.seo.siteUrl || 'http://localhost:3000';
// Root Schema.org JSON-LD for Organization & WebSite
const organizationJsonLd = {
'@context': 'https://schema.org',
'@type': 'Organization',
name: config.brand.name,
url: siteUrl,
logo: `${siteUrl}/brand/logo.svg`,
sameAs: [
'https://play.google.com/store/apps/dev?id=creinnovations',
'https://apps.apple.com/developer/creinnovations',
],
};
return (
<html lang="en" className={`${sansFont.variable} ${displayFont.variable} ${monoFont.variable}`}>
<head>
<script
type="application/ld+json"
dangerouslySetInnerHTML={{ __html: JSON.stringify(organizationJsonLd) }}
/>
</head>
<body className="min-h-screen flex flex-col antialiased selection:bg-blue-600 selection:text-white bg-[#FAF8F5] text-slate-900 relative">
<a href="#main-content" className="skip-link">Skip to main content</a>
<Navbar config={config} currentLocale="en" />
<main id="main-content" className="flex-1">{children}</main>
<Footer config={config} currentLocale="en" />
</body>
</html>
);
}