---
import Sidebar from "../components/Sidebar.astro";

const { title } = Astro.props;
---

<!doctype html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width" />
    <link rel="icon" type="image/svg+xml" href="/favicon.svg" />
    <link rel="icon" href="/favicon.ico" />
    <link rel="stylesheet" href="https://unpkg.com/@knadh/oat/oat.min.css" />
    <script src="https://unpkg.com/@knadh/oat/oat.min.js" is:inline defer
    ></script>
    <meta name="generator" content={Astro.generator} />
    <title>{title}</title>
  </head>
  <body data-sidebar-layout>
    <Sidebar />
    <main data-main-layout>
      <slot />
    </main>
  </body>
</html>

<style is:global>
  @font-face {
    font-family: "Desyrel";
    src: url("/desyrel.ttf") format("truetype");
    font-weight: normal;
    font-style: normal;
  }

  html {
    font-size: 16px;
  }

  html {
    margin: 0;
    width: 100%;
    height: 100%;
  }

  body {
    margin: 0;
  }

  :root {
    color-scheme: light;
    /* Oat UI */
    --background: #ffffff;
    --foreground: #000000;
    --primary: #133d56;

    /* Custom */
    --font-fancy: "Desyrel", serif;
    --container-lg: 1200px;
    --container-md: 600px;
    --container-sm: 480px;
    --radius-sm: 4px;
  }

  img {
    width: 100%;
    max-width: var(--container-lg);
  }

  [data-main-layout] {
    padding: 3rem 4rem 3rem 3rem;
  }
</style>
