html dark mode

This commit is contained in:
Jose Palazon 2024-09-09 17:58:15 +01:00
parent 9fa696d5a9
commit 467f80faee
2 changed files with 5 additions and 0 deletions

View file

@ -35,6 +35,7 @@
const currentTheme = localStorage.getItem('theme') || (window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light');
if (currentTheme === 'dark') {
document.body.parentElement.classList.add('dark-mode');
document.body.classList.add('dark-mode');
// themeIcon.classList.remove('fa-moon');
// themeIcon.classList.add('fa-sun');