Test darkmode
This commit is contained in:
parent
187206ba2b
commit
c3d86ae28a
3 changed files with 28 additions and 1 deletions
|
@ -721,6 +721,14 @@ math {
|
|||
#nav-lang-icon:hover {
|
||||
color: darkblue;
|
||||
}
|
||||
|
||||
#nav-darkmode-icon {
|
||||
cursor: pointer;
|
||||
&:hover {
|
||||
color: gray;
|
||||
}
|
||||
}
|
||||
|
||||
.dropdown {
|
||||
border-radius: 4px;
|
||||
border: 0.5px solid lightgray;
|
||||
|
|
|
@ -410,4 +410,19 @@ $(function() {
|
|||
$('#form-lang').submit();
|
||||
})
|
||||
$('#logout').on('click', () => $('#logout-form').submit());
|
||||
|
||||
$('#nav-darkmode-icon').on('click', function() {
|
||||
if (localStorage.getItem("darkmode") === "true") {
|
||||
localStorage.setItem("darkmode", "false");
|
||||
DarkReader.disable();
|
||||
}
|
||||
else {
|
||||
localStorage.setItem("darkmode", "true");
|
||||
DarkReader.enable();
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
if (localStorage.getItem("darkmode") === "true") {
|
||||
DarkReader.enable();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue