Sha256: 77c8a651053ce53d59d88537cc93c37d3cc71856af1096ffb3f28da490fd11ee

Contents?: true

Size: 1.52 KB

Versions: 6

Compression:

Stored size: 1.52 KB

Contents

---
layout: compress
---

<!DOCTYPE html>
<html lang="en">
  {% include head.html %}

  <body>
    <main>{% include anchor_headings.html html=content anchorBody="#" %}</main>

    <script>
      function setTheme(theme) {
        if (theme === "dark") {
          document.documentElement.setAttribute("data-theme", "dark");
          window.localStorage.setItem("theme", "dark");
          document.getElementById("theme-toggle").classList.add("sun");
          document.getElementById("theme-toggle").classList.remove("moon");
        } else {
          document.documentElement.setAttribute("data-theme", "light");
          window.localStorage.setItem("theme", "light");
          document.getElementById("theme-toggle").classList.add("moon");
          document.getElementById("theme-toggle").classList.remove("sun");
        }
      }

      let theme = localStorage.getItem("theme");

      theme =
        theme ||
        (window.matchMedia
          ? window.matchMedia("(prefers-color-scheme: dark)").matches
            ? "dark"
            : "light"
          : "light");

      setTheme(theme);

      function modeSwitcher() {
        let currentMode = document.documentElement.getAttribute("data-theme");

        if (currentMode === "dark") {
          setTheme("light");
        } else {
          setTheme("dark");
        }
      }
    </script>
  </body>

  <footer class="social-footer">
    <p>&copy; {{ site.time | date: '%Y' }} &middot; <a href="mailto:{{ site.author.email }}" >{{ site.author.name }}</a></p>
  </footer>
</html>

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
jekyll-calculus-theme-0.2.1 _layouts/default.html
jekyll-calculus-theme-0.2.0 _layouts/default.html
jekyll-calculus-theme-0.1.3 _layouts/default.html
jekyll-calculus-theme-0.1.2 _layouts/default.html
jekyll-calculus-theme-0.1.1 _layouts/default.html
jekyll-calculus-theme-0.1.0 _layouts/default.html