---
interface Props {
  title?: string;
}

const { title = "MeshCore SAR RX Stats" } = Astro.props;

import "../index.css";
---

<!doctype html>
<html lang="en">
  <head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <link rel="icon" type="image/png" href="/favicon.png" />
    <title>{title}</title>
  </head>
  <body>
    <slot />
    <script>
      const mq = window.matchMedia("(prefers-color-scheme: dark)");
      function apply(e) { document.documentElement.classList.toggle("dark", e.matches); }
      apply(mq);
      mq.addEventListener("change", apply);
    </script>
  </body>
</html>
