rafmacalaba's picture
feat: format dropdown names and add light/dark theme toggle
46de1a2
Raw
History Blame Contribute Delete
1.23 kB
import './globals.css';
export const metadata = {
title: 'Hugging Face Spaces Annotation App',
description: 'Minimal MVP for annotation',
};
export default function RootLayout({ children }) {
return (
<html lang="en">
<head>
<script
dangerouslySetInnerHTML={{
__html: `
(function() {
try {
const theme = localStorage.getItem('theme');
if (theme) {
document.documentElement.setAttribute('data-theme', theme);
} else {
const systemDark = window.matchMedia('(prefers-color-scheme: dark)').matches;
document.documentElement.setAttribute('data-theme', systemDark ? 'dark' : 'light');
}
} catch (e) {}
})();
`,
}}
/>
</head>
<body>{children}</body>
</html>
);
}