From efe6515fc93b9f63483c194a75f009cc84daf44c Mon Sep 17 00:00:00 2001 From: Anthony G <1@anthony.sh> Date: Tue, 11 Aug 2026 09:00:01 +0200 Subject: [PATCH] feat: update locale layout with Inter font, ThemeProvider, SEO metadata, JSON-LD, Header, and footer --- src/app/[locale]/layout.tsx | 70 ++++++++++++++++++++++++++++++++----- 1 file changed, 62 insertions(+), 8 deletions(-) diff --git a/src/app/[locale]/layout.tsx b/src/app/[locale]/layout.tsx index a9c7a02..ff7f273 100644 --- a/src/app/[locale]/layout.tsx +++ b/src/app/[locale]/layout.tsx @@ -1,9 +1,14 @@ import type { Metadata } from 'next' +import { Inter } from 'next/font/google' import { NextIntlClientProvider } from 'next-intl' import { getTranslations, getMessages } from 'next-intl/server' import { notFound } from 'next/navigation' +import { ThemeProvider } from 'next-themes' import { routing } from '@/i18n/routing' -import { LanguageSwitcher } from '@/components/LanguageSwitcher' +import { Header } from '@/components/Header' +import '../globals.css' + +const inter = Inter({ subsets: ['latin', 'latin-ext'] }) export async function generateMetadata({ params, @@ -12,7 +17,26 @@ export async function generateMetadata({ }): Promise { const { locale } = await params const t = await getTranslations({ locale, namespace: 'meta' }) - return { title: t('title') } + const baseUrl = process.env.NEXT_PUBLIC_BASE_URL ?? '' + + return { + title: t('title'), + description: t('description'), + robots: { index: true, follow: true }, + openGraph: { + title: t('title'), + description: t('description'), + url: `${baseUrl}/${locale}`, + siteName: 'Ombrora', + locale, + }, + alternates: { + canonical: `${baseUrl}/${locale}`, + languages: Object.fromEntries( + routing.locales.map((l) => [l, `/${l}`]) + ), + }, + } } export default async function LocaleLayout({ @@ -29,14 +53,44 @@ export default async function LocaleLayout({ } const messages = await getMessages() + const t = await getTranslations({ locale, namespace: 'footer' }) + const baseUrl = process.env.NEXT_PUBLIC_BASE_URL ?? '' + + const jsonLd = { + '@context': 'https://schema.org', + '@type': 'WebApplication', + name: 'Ombrora', + url: baseUrl, + description: 'Free, fast, private video downloader.', + applicationCategory: 'MultimediaApplication', + operatingSystem: 'Web', + offers: { + '@type': 'Offer', + price: '0', + priceCurrency: 'EUR', + }, + } return ( - - - - - {children} - + + +