templates2.Content.Next/app/layout.tsx
w4c-templates 3caefb8833
Some checks are pending
CI / quality (push) Waiting to run
chore(template): publish Content.Next
2026-10-11 23:29:57 +03:00

32 lines
1.1 KiB
TypeScript

import type { Metadata } from 'next';
import './globals.css';
const siteUrl = process.env.NEXT_PUBLIC_SITE_URL || 'http://localhost:3000';
export const metadata: Metadata = {
metadataBase: new URL(siteUrl),
title: { default: 'Acme — ready-to-run app', template: '%s · Acme' },
description: 'A production-ready base app: auth, roles, payments, admin, SEO — working on day one.',
openGraph: {
type: 'website',
siteName: 'Acme',
url: '/',
title: 'Acme — ready-to-run app',
description: 'A production-ready base app: auth, roles, payments, admin, SEO.',
},
robots: { index: true, follow: true },
};
const themeScript = `try{var t=localStorage.getItem('theme');var d=t? t==='dark' : matchMedia('(prefers-color-scheme: dark)').matches;if(d)document.documentElement.classList.add('dark');}catch(e){}`;
export default function RootLayout({ children }: { children: React.ReactNode }) {
return (
<html lang="en" suppressHydrationWarning>
<head>
<script dangerouslySetInnerHTML={{ __html: themeScript }} />
</head>
<body className="min-h-screen antialiased">{children}</body>
</html>
);
}