41 lines
1.2 KiB
TypeScript
41 lines
1.2 KiB
TypeScript
|
|
import type { Metadata } from 'next';
|
||
|
|
import './globals.css';
|
||
|
|
|
||
|
|
export const metadata: Metadata = {
|
||
|
|
title: 'Paint UI - Browser Image Editor',
|
||
|
|
description: 'Modern browser-based image editor built with Next.js. Multi-layer canvas, drawing tools, effects, and more.',
|
||
|
|
keywords: ['image editor', 'canvas', 'drawing', 'paint', 'layers', 'effects', 'photoshop alternative'],
|
||
|
|
};
|
||
|
|
|
||
|
|
export default function RootLayout({
|
||
|
|
children,
|
||
|
|
}: {
|
||
|
|
children: React.ReactNode;
|
||
|
|
}) {
|
||
|
|
return (
|
||
|
|
<html lang="en" suppressHydrationWarning>
|
||
|
|
<head>
|
||
|
|
<script
|
||
|
|
dangerouslySetInnerHTML={{
|
||
|
|
__html: `
|
||
|
|
(function() {
|
||
|
|
try {
|
||
|
|
const theme = localStorage.getItem('theme');
|
||
|
|
const prefersDark = window.matchMedia('(prefers-color-scheme: dark)').matches;
|
||
|
|
const shouldBeDark = theme === 'dark' || (!theme && prefersDark);
|
||
|
|
if (shouldBeDark) {
|
||
|
|
document.documentElement.classList.add('dark');
|
||
|
|
}
|
||
|
|
} catch (e) {}
|
||
|
|
})();
|
||
|
|
`,
|
||
|
|
}}
|
||
|
|
/>
|
||
|
|
</head>
|
||
|
|
<body className="min-h-screen antialiased overflow-hidden">
|
||
|
|
{children}
|
||
|
|
</body>
|
||
|
|
</html>
|
||
|
|
);
|
||
|
|
}
|