Skip to content

Commit

Permalink
Fix Dark theme Bugs
Browse files Browse the repository at this point in the history
 * Add dark theme to 404 page.
 * Swap toggle theme icons 🌞 & 🌙.
  • Loading branch information
yousinix committed May 5, 2021
1 parent 8437f4b commit eca75f9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions _includes/404.html
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,9 @@ <h3>Page not Found!</h3>

</div>

<!-- Theme style -->
<script src="{{ '/assets/js/theme.js' | relative_url }}"></script>

</body>

</html>
4 changes: 2 additions & 2 deletions assets/js/theme.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ function loadTheme() {
if (isDark) {
BODY.classList.remove("bootstrap");
BODY.classList.add("bootstrap-dark");
THEME_TOGGLER.innerHTML = "🌙";
THEME_TOGGLER.innerHTML = "🌞";
} else {
BODY.classList.remove("bootstrap-dark");
BODY.classList.add("bootstrap");
THEME_TOGGLER.innerHTML = "🌞";
THEME_TOGGLER.innerHTML = "🌙";
}
}

0 comments on commit eca75f9

Please sign in to comment.