guichet/static/javascript/journuit.js
2023-07-27 13:07:43 +02:00

27 lines
728 B
JavaScript

/*
// let toggle = document.querySelector('.toggle-darkmode');
let toggle = document.querySelector('#jour-nuit');
function lesgvGoDark(toggle) {
localStorage.removeItem('lightmode');
localStorage.setItem('darkmode', true);
toggle.innerText = 'Nuit';
document.body.classList.add('darkmode');
}
function lesgvGoLight(toggle) {
localStorage.removeItem('darkmode');
localStorage.setItem('lightmode', true);
toggle.innerText = 'Jour';
document.body.classList.remove('darkmode');
}
function toggleDarkmode() {
let toggle = document.querySelector('#jour-nuit');
if (document.body.classList.contains('darkmode')) {
lesgvGoLight(toggle);
} else {
lesgvGoDark(toggle);
}
}
*/