Implement a switch for switching between light and dark mode

This commit is contained in:
Philipp Oppermann
2020-12-28 20:47:17 +01:00
parent eb767523a5
commit 300a6f452a
5 changed files with 81 additions and 3 deletions

View File

@@ -41,6 +41,8 @@
</footer>
</div>
<div class="light-switch" onclick="toggle_lights()"></div>
<!-- Fathom - simple website analytics - https://github.com/usefathom/fathom -->
<script>
(function(f, a, t, h, o, m){

View File

@@ -98,7 +98,7 @@
</p>
{% endif %}
{{ macros::utterances() }}
{{ macros::utterances_edition_3() }}
</section>
<aside class="page-aside-right">

View File

@@ -54,6 +54,17 @@
</script>
{% endmacro utterances %}
{% macro utterances_edition_3() %}
<script src="https://utteranc.es/client.js"
data-repo="phil-opp/blog_os"
data-issue-term="url"
data-label="comments"
crossorigin="anonymous"
theme="preferred-color-scheme"
async>
</script>
{% endmacro utterances_edition_3 %}
{% macro toc(toc) %}
<details id = "toc-inline">
<summary><b>Table of Contents</b></summary>