89 lines
2.4 KiB
TypeScript
89 lines
2.4 KiB
TypeScript
import type { Metadata } from 'next';
|
|
import { Playfair_Display, Lora, Fragment_Mono } from 'next/font/google';
|
|
import './globals.css';
|
|
|
|
const playfair = Playfair_Display({
|
|
subsets: ['latin'],
|
|
variable: '--font-playfair',
|
|
weight: ['700', '900'],
|
|
style: ['normal', 'italic'],
|
|
display: 'swap',
|
|
});
|
|
|
|
const lora = Lora({
|
|
subsets: ['latin'],
|
|
variable: '--font-lora',
|
|
weight: ['400', '500'],
|
|
style: ['normal', 'italic'],
|
|
display: 'swap',
|
|
});
|
|
|
|
const fragmentMono = Fragment_Mono({
|
|
subsets: ['latin'],
|
|
variable: '--font-fragment-mono',
|
|
weight: ['400'],
|
|
display: 'swap',
|
|
});
|
|
|
|
export const metadata: Metadata = {
|
|
title: {
|
|
default: 'PetLink — Adopção de Animais em Portugal',
|
|
template: '%s | PetLink',
|
|
},
|
|
description:
|
|
'Encontra o teu companheiro para a vida. PetLink conecta adoptantes, doadores e canis em todo o território português.',
|
|
keywords: ['adopção animais', 'canis portugal', 'adoptar cão', 'adoptar gato', 'doação canil'],
|
|
authors: [{ name: 'PetLink' }],
|
|
creator: 'PetLink',
|
|
metadataBase: new URL('https://petlink.pt'),
|
|
openGraph: {
|
|
type: 'website',
|
|
locale: 'pt_PT',
|
|
url: 'https://petlink.pt',
|
|
siteName: 'PetLink',
|
|
title: 'PetLink — Adopção de Animais em Portugal',
|
|
description: 'Encontra o teu companheiro para a vida.',
|
|
},
|
|
};
|
|
|
|
export default function RootLayout({
|
|
children,
|
|
}: Readonly<{
|
|
children: React.ReactNode;
|
|
}>) {
|
|
return (
|
|
<html
|
|
lang="pt"
|
|
className={`${playfair.variable} ${lora.variable} ${fragmentMono.variable}`}
|
|
suppressHydrationWarning
|
|
>
|
|
<head>
|
|
<script
|
|
dangerouslySetInnerHTML={{
|
|
__html: `
|
|
(function() {
|
|
try {
|
|
var theme = localStorage.getItem('pawlink-theme');
|
|
var prefersDark = window.matchMedia('(prefers-color-scheme: dark)').matches;
|
|
if (theme === 'dark' || (!theme && prefersDark)) {
|
|
document.documentElement.classList.add('dark');
|
|
document.documentElement.setAttribute('data-theme', 'dark');
|
|
}
|
|
} catch(e) {}
|
|
})();
|
|
`,
|
|
}}
|
|
/>
|
|
</head>
|
|
<body
|
|
className="min-h-dvh flex flex-col antialiased"
|
|
style={{
|
|
fontFamily: 'var(--font-lora, var(--font-body, Lora, Georgia, serif))',
|
|
}}
|
|
>
|
|
{children}
|
|
</body>
|
|
</html>
|
|
);
|
|
}
|