Dark mode fix
parent
dfc3ed0d30
commit
9f9688a734
|
@ -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
|
||||
|
|
|
@ -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()
|
||||
}
|
||||
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
<div class="site-info">
|
||||
<h1 class="site-name"><a href="{{ site.baseurl }}/">{{ site.name }}</a></h1>
|
||||
<p class="site-description">{{ site.description }}</p>
|
||||
<a class="dark-mode-button" >🌗</a>
|
||||
</div>
|
||||
|
||||
<nav>
|
||||
|
@ -34,7 +35,6 @@
|
|||
<a href="https://swisskyrepo.github.io/PayloadsAllTheThingsWeb/">📖PayloadsAllTheThings</a>
|
||||
<a href="https://swisskyrepo.github.io/HardwareAllTheThings/">🖥️HardwareAllTheThings</a>
|
||||
<a href="{{ site.baseurl }}/about">👤About</a>
|
||||
<a class="dark-mode-button" >🌗 Dark mode</a>
|
||||
</nav>
|
||||
|
||||
{% include dark-mode.html %}
|
||||
|
|
Loading…
Reference in New Issue