From f84c44bad496d0d4aa179dd6484128553c1466c1 Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Sat, 8 Jun 2024 11:44:21 +0200 Subject: [PATCH] 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 --- homepage/index.php | 3 +- homepage/static/dark-style.css | 934 +++++++++++++++++++++++++++++ homepage/views.php | 3 +- scripts/common.php | 9 + scripts/config.php | 22 +- scripts/install_config.sh | 6 + scripts/update_birdnet_snippets.sh | 4 + 7 files changed, 978 insertions(+), 3 deletions(-) create mode 100644 homepage/static/dark-style.css diff --git a/homepage/index.php b/homepage/index.php index 3a2e8ba..211bef1 100644 --- a/homepage/index.php +++ b/homepage/index.php @@ -6,6 +6,7 @@ $_POST = filter_input_array(INPUT_POST, FILTER_SANITIZE_STRING); require_once 'scripts/common.php'; $config = get_config(); $site_name = get_sitename(); +$color_scheme = get_color_scheme(); set_timezone(); ?> @@ -13,7 +14,7 @@ set_timezone(); <?php echo $site_name; ?> - +