Browse Source

removing theme switcher

master
jk 4 years ago
parent
commit
8cf14b9073
  1. 16
      themes/nipponalba/layouts/partials/footer.html
  2. 1
      themes/nipponalba/layouts/partials/navbar.html

16
themes/nipponalba/layouts/partials/footer.html

@ -7,21 +7,5 @@
An IndieWeb Webring 🕸💍
<a href="https://xn--sr8hvo.ws/%F0%9F%88%B8%F0%9F%91%98%F0%9F%91%A5/next"></a>
</footer>
<script>
// This code is only used to remember theme selection between page loads
const themeSwitch = document.querySelector('.theme-switch');
themeSwitch.checked = localStorage.getItem('switchedTheme') === 'true';
themeSwitch.addEventListener('change', function(e) {
if (e.currentTarget.checked === true) {
// Add item to localstorage
localStorage.setItem('switchedTheme', 'true');
} else {
// Remove item if theme is switched back to normal
localStorage.removeItem('switchedTheme');
}
});
</script>
</body>
</html>

1
themes/nipponalba/layouts/partials/navbar.html

@ -15,6 +15,5 @@
{{ end }}
{{ end }}
{{ end }}
<li><label for="theme-switch"><i class="fa fa-adjust fa-2x light" aria-hidden="true" title="light/dark mode switch"></i></label></li>
</nav>
</header>