Remove darkmode selector

This commit is contained in:
2021-05-30 05:08:37 +00:00
parent 5bcad7eb77
commit b5b9e68df0
5 changed files with 13 additions and 129 deletions

View File

@@ -36,53 +36,22 @@
</style>
<script defer src="/theme/instant-page.js"></script>
<noscript>
<style type="text/css">
.theme-select {
display: none !important;
}
</style>
</noscript>
</head>
{% if PROD %}
<body class="<?php echo $themeClass; ?>">
{% else %}
<body>
{% endif %}
<body>
<div class="container">
<div class="bar">
{% block info %}
{% endblock %}
</div>
<div class="container">
<div class="bar">
{% block info %}
{% block content %}
{% endblock %}
</div>
{% block content %}
{% endblock %}
</div>
<p class="copyright">
© 20122021 Tanner Collin
</p>
<script>
function setTheme(theme) {
console.log('Setting theme to', theme);
if (theme == 'dark') {
document.body.classList.add('dark');
document.body.classList.remove('light');
} else if (theme == 'light') {
document.body.classList.add('light');
document.body.classList.remove('dark');
}
document.cookie = 'theme=' + theme + '; Max-Age=31536000; Path=/; SameSite=Lax';
}
</script>
<p class="copyright">
© 20122021 Tanner Collin
</p>
</body>
</html>