diff --git a/_config.yml b/_config.yml index ec79bf4..f80bb91 100755 --- a/_config.yml +++ b/_config.yml @@ -39,8 +39,8 @@ footer-links: # You can find your shortname on the Settings page of your Disqus account disqus: -# Enter your Google Analytics web tracking code (e.g. UA-2110908-2) to activate tracking -google_analytics: UA-109333953-1 +# Enter your Google Analytics web tracking code (e.g. UA-2110908-2) to activate tracking, old: UA-109333953-1 +google_analytics: # Your website URL (e.g. http://barryclark.github.io or http://www.barryclark.co) # Used for Sitemap.xml and your RSS feed diff --git a/_includes/dark-mode.html b/_includes/dark-mode.html index c167d20..e61ec7d 100755 --- a/_includes/dark-mode.html +++ b/_includes/dark-mode.html @@ -5,11 +5,7 @@ function darkmode() { let enabled = localStorage.getItem('dark-mode') - if (enabled === null) { - if (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches) { - enable(); - } - } else if (enabled === 'true') { + if (enabled === null || enabled === 'true') { enable() } diff --git a/_layouts/default.html b/_layouts/default.html index 340080b..8a54a45 100755 --- a/_layouts/default.html +++ b/_layouts/default.html @@ -26,6 +26,7 @@

{{ site.name }}

{{ site.description }}

+ 🌗
{% include dark-mode.html %}