119 lines
4.0 KiB
TypeScript
119 lines
4.0 KiB
TypeScript
import type { Metadata } from 'next';
|
|
import { Poppins, Inter, JetBrains_Mono } from 'next/font/google';
|
|
import './globals.css';
|
|
import { getSiteConfig, getAllCategories, getAllTools } from '@/lib/config/loader';
|
|
import { Navbar } from '@/components/ui/Navbar';
|
|
import { Footer } from '@/components/ui/Footer';
|
|
import { SmoothScrollProvider } from '@/components/ui/SmoothScrollProvider';
|
|
import { AuthProvider } from '@/lib/firebase/AuthContext';
|
|
import { AuthModal } from '@/components/auth/AuthModal';
|
|
|
|
const poppinsFont = Poppins({
|
|
subsets: ['latin'],
|
|
weight: ['300', '400', '500', '600', '700', '800'],
|
|
variable: '--font-poppins',
|
|
display: 'swap',
|
|
});
|
|
|
|
const interFont = Inter({
|
|
subsets: ['latin'],
|
|
weight: ['300', '400', '500', '600', '700'],
|
|
variable: '--font-inter',
|
|
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 categories = getAllCategories();
|
|
const tools = getAllTools();
|
|
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={`${poppinsFont.variable} ${interFont.variable} ${monoFont.variable} font-sans`}>
|
|
<head>
|
|
<script
|
|
type="application/ld+json"
|
|
dangerouslySetInnerHTML={{ __html: JSON.stringify(organizationJsonLd) }}
|
|
/>
|
|
</head>
|
|
<body className="min-h-screen flex flex-col antialiased bg-paper text-ink relative font-sans overflow-x-clip">
|
|
<SmoothScrollProvider>
|
|
<AuthProvider>
|
|
<a href="#main-content" className="skip-link">Skip to main content</a>
|
|
<Navbar
|
|
config={config}
|
|
currentLocale="en"
|
|
categories={categories}
|
|
totalToolsCount={tools.length}
|
|
/>
|
|
<main id="main-content" className="flex-1">{children}</main>
|
|
<Footer config={config} currentLocale="en" />
|
|
<AuthModal />
|
|
</AuthProvider>
|
|
</SmoothScrollProvider>
|
|
</body>
|
|
</html>
|
|
);
|
|
}
|