39 lines
1.4 KiB
TypeScript
39 lines
1.4 KiB
TypeScript
import type { Metadata, Viewport } from 'next';
|
||
import '@fontsource/dm-sans/400.css';
|
||
import '@fontsource/dm-sans/500.css';
|
||
import '@fontsource/dm-sans/600.css';
|
||
import '@fontsource/dm-sans/700.css';
|
||
import '@fontsource/fraunces/400.css';
|
||
import '@fontsource/fraunces/500.css';
|
||
import './globals.css';
|
||
import { Shell } from '@/components/shell';
|
||
export const metadata: Metadata = {
|
||
title: { default: 'HamHam · Zuhause schmeckt’s am besten', template: '%s · HamHam' },
|
||
description:
|
||
'Dein persönliches Kochbuch. Lieblingsrezepte sammeln, clever planen und entspannt kochen.',
|
||
manifest: '/manifest.webmanifest',
|
||
appleWebApp: { capable: true, title: 'HamHam', statusBarStyle: 'default' },
|
||
};
|
||
export const viewport: Viewport = {
|
||
width: 'device-width',
|
||
initialScale: 1,
|
||
viewportFit: 'cover',
|
||
themeColor: '#365747',
|
||
};
|
||
export default function RootLayout({ children }: { children: React.ReactNode }) {
|
||
return (
|
||
<html lang="de" suppressHydrationWarning>
|
||
<head>
|
||
<script
|
||
dangerouslySetInnerHTML={{
|
||
__html: `try{let t=JSON.parse(localStorage.getItem('hamham:theme')||'"system"');document.documentElement.dataset.theme=t==='system'?(matchMedia('(prefers-color-scheme: dark)').matches?'dark':'light'):t}catch{}`,
|
||
}}
|
||
/>
|
||
</head>
|
||
<body>
|
||
<Shell>{children}</Shell>
|
||
</body>
|
||
</html>
|
||
);
|
||
}
|