Feature proposal : darkmode (#85)

* Create dark-style.css

* Add call to get_color_scheme

* Add call to get_color_scheme

* Create get_color_scheme function

* Add selection box in config.php

* Accept both lower and uppercase COLOR_SCHEME

* Add COLOR_SCHEME

* Add COLOR_SCHEME

* Change birdnet.conf after color scheme selection

* Move css to static to enable it

* Adapt css location to static

* Improve opacity value

* Fix logo background issues on smaller screens

* Avoid overlap of logos

* Ensure clean look (same margin as before but different location)

* Default background as transparent to avoid white on white

* Avoid black on dark ; improve readability

* Last element of green is homogenized to grayscale

* Enable site reload after color_scheme change
This commit is contained in:
Alexandre
2024-06-08 11:44:21 +02:00
committed by GitHub
parent a06b5bacf4
commit f84c44bad4
7 changed files with 978 additions and 3 deletions
+9
View File
@@ -282,3 +282,12 @@ function get_info_url($sciname){
);
return $ret;
}
function get_color_scheme(){
$config = get_config();
if (strtolower($config['COLOR_SCHEME']) === 'dark'){
return 'static/dark-style.css';
} else {
return 'style.css';
}
}