<!doctype html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <link rel="icon" type="image/svg+xml" href="/icon.svg" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <script>
      function safeParseString(str) {
        try {
          return JSON.parse(str)
        } catch {
          return ""
        }
      }
      const theme = safeParseString(localStorage.getItem("color-scheme")) || "auto"
      const isDark = window.matchMedia("(prefers-color-scheme: dark)").matches
      if (theme === "auto" ? isDark : theme === "dark") {
        document.documentElement.classList.add("dark")
      }
    </script>
    <title>NewsNow</title>
  </head>
  <body>
    <div id="app"></div>
    <script type="module" src="/src/app.tsx"></script>
  </body>
</html>