templates2.Saas.Next/app/layout.tsx
w4c-templates 6538da5797
Some checks are pending
CI / quality (push) Waiting to run
chore(template): publish Saas.Next
2026-10-11 23:24:56 +03:00

37 lines
1.4 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.',
images: [{ url: '/art/og.webp', width: 1536, height: 1024, alt: 'Acme — ready-to-run app' }],
},
twitter: {
card: 'summary_large_image',
images: ['/art/og.webp'],
},
robots: { index: true, follow: true },
};
const themeScript = `document.documentElement.classList.add('js');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>
);
}