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

const { title, background } = config;
---

<!doctype html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="description" content="Astro description" />
    <meta name="viewport" content="width=device-width" />
    <link rel="icon" type="image/svg+xml" href="/favicon.svg" />
    <meta name="generator" content={Astro.generator} />
    <title>{title}</title>
  </head>
  <body>
      <div
        class="md:fixed md:left-0 md:top-0 w-full md:w-96 bg-[#ffffff59] h-full pt-4 z-[1] box-border text-center"
      >
        <Sidebar />
      </div>
      <slot />
  </body>
</html>
<style define:vars={{ background: `url(${background})` }}>
  .container {
    width: calc(100% - 25rem);
  }
  body {
    font-family: system-ui, sans-serif;
    background: var(--background);
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center center;
    background-attachment: fixed;
  }
</style>
