Implement night mode toggle in top navbar

This commit is contained in:
billz
2021-02-15 19:02:13 +00:00
parent faffbfea51
commit 4378ff7add
3 changed files with 27 additions and 1 deletions

View File

@@ -720,3 +720,13 @@ function validate_host($host) {
return preg_match('/^([a-z\d](-*[a-z\d])*)(\.([a-z\d](-*[a-z\d])*))*$/i', $host);
}
// Gets night mode toggle value
// @return boolean
function getNightmode(){
if ($_COOKIE['theme'] == 'lightsout.css') {
return true;
} else {
return false;
}
}