<!doctype html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <link
      rel="stylesheet"
      href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/7.0.1/css/all.min.css"
      integrity="sha512-2SwdPD6INVrV/lHTZbO2nodKhrnDdJK9/kg2XD1r9uGqPo1cUbujc+IYdlYdEErWNu69gVcYgdxlmVmzTWnetw=="
      crossorigin="anonymous"
      referrerpolicy="no-referrer"
    />
    <link
      id="hljs-theme-dark"
      rel="stylesheet"
      href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.11.1/styles/github-dark.min.css"
      integrity="sha512-rO+olRTkcf304DQBxSWxln8JXCzTHlKnIdnMUwYvQa9/Jd4cQaNkItIUj6Z4nvW1dqK0SKXLbn9h4KwZTNtAyw=="
      crossorigin="anonymous"
      referrerpolicy="no-referrer"
    />
    <link
      id="hljs-theme-light"
      rel="stylesheet"
      href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.11.1/styles/github.min.css"
      integrity="sha512-0aPQyyeZrWj9sCA46UlmWgKOP0mUipLQ6OZXu8l4IcAmD2u31EPEy9VcIMvl7SoAaKe8bLXZhYoMaE/in+gcgA=="
      crossorigin="anonymous"
      referrerpolicy="no-referrer"
      disabled
    />
    <script
      src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.11.1/highlight.min.js"
      integrity="sha512-EBLzUL8XLl+va/zAsmXwS7Z2B1F9HUHkZwyS/VKwh3S7T/U0nF4BaU29EP/ZSf6zgiIxYAnKLu6bJ8dqpmX5uw=="
      crossorigin="anonymous"
      referrerpolicy="no-referrer"
      defer
    ></script>

    <title>{{ title }} - mdwatch</title>
    <style>
      {{ style | safe }}
    </style>
  </head>
  <body>
    <button class="theme-toggle" onclick="toggleTheme()" title="Toggle theme">
      <i class="fa-solid fa-moon"></i>
    </button>
    <article id="content">{{content | safe}}</article>

    <script id="injected-script" type="application/json">
      {{ script | safe }}
    </script>
    <script>
      const code = document.getElementById("injected-script").textContent;
      (0, eval)(code);
    </script>
  </body>
</html>
