---
import '../styles/global.css';

interface Props {
  title: string;
}
const { title } = Astro.props;
---
<html lang="en" data-theme="mocha">
  <head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <title>{title}</title>
    <link rel="icon" href="/favicon.svg" />
  </head>
  <body class="min-h-screen flex items-center justify-center bg-ctp-base">
		  <slot />
		  <script>
    const saved = localStorage.getItem('ctp-theme') ?? 'mocha';
    document.documentElement.setAttribute('data-theme', saved);
  </script>
  </body>
</html>
