44 lines
1.4 KiB
TypeScript
44 lines
1.4 KiB
TypeScript
import type { Metadata } from 'next';
|
|||
|
|
import { Inter } 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 inter = Inter({ subsets: ['latin'], variable: '--font-inter' });
|
||
|
|
|
||
|
|
export async function generateMetadata(): Promise<Metadata> {
|
||
|
|
const config = getSiteConfig();
|
||
|
|
return {
|
||
|
|
title: {
|
||
|
|
default: config.brand.name + ' | AI Photo Tools',
|
||
|
|
template: config.seo.titleTemplate || `%s | ${config.brand.name}`,
|
||
|
|
},
|
||
|
|
description: typeof config.brand.tagline === 'string' ? config.brand.tagline : config.brand.tagline.en,
|
||
|
|
metadataBase: new URL(config.seo.siteUrl || 'http://localhost:3000'),
|
||
|
|
openGraph: {
|
||
|
|
type: 'website',
|
||
|
|
siteName: config.brand.name,
|
||
|
|
images: [{ url: config.seo.defaultOgImage || '/brand/og-default.png' }],
|
||
|
|
},
|
||
|
|
};
|
||
|
|
}
|
||
|
|
|
||
|
|
export default function RootLayout({
|
||
|
|
children,
|
||
|
|
}: {
|
||
|
|
children: React.ReactNode;
|
||
|
|
}) {
|
||
|
|
const config = getSiteConfig();
|
||
|
|
|
||
|
|
return (
|
||
|
|
<html lang="en" className={inter.variable}>
|
||
|
|
<body className="min-h-screen flex flex-col antialiased selection:bg-blue-500 selection:text-white">
|
||
|
|
<Navbar config={config} currentLocale="en" />
|
||
|
|
<main className="flex-1">{children}</main>
|
||
|
|
<Footer config={config} currentLocale="en" />
|
||
|
|
</body>
|
||
|
|
</html>
|
||
|
|
);
|
||
|
|
}
|