diff --git a/scripts/pi-hole/php/header.php b/scripts/pi-hole/php/header.php
index 24ce8f3b..d15fd9ee 100644
--- a/scripts/pi-hole/php/header.php
+++ b/scripts/pi-hole/php/header.php
@@ -175,6 +175,11 @@
* Please see LICENSE file for your rights under this license. -->
+
+
+
Pi-hole
diff --git a/scripts/pi-hole/php/theme.php b/scripts/pi-hole/php/theme.php
index 29632658..274fb31c 100644
--- a/scripts/pi-hole/php/theme.php
+++ b/scripts/pi-hole/php/theme.php
@@ -8,9 +8,16 @@
// Array of available themes and their description
$available_themes = [];
-$available_themes["default-light"] = ["Pi-hole default theme (light, default)", "default-light", "minimal", "blue"];
-$available_themes["default-dark"] = ["Pi-hole midnight theme (dark)", "default-dark", "polaris", "polaris"];
-$available_themes["default-dark2"] = ["Pi-hole afternoon theme (dark)", "default-dark", "futurico", "futurico"];
+/* Array key = name used internally, not shown to the user
+* Array[0] = Description
+* Array[1] = Is this a dark mode theme? (Sets background to black during page reloading to avoid white "flashing")
+* Array[2] = Style sheet name
+* Array[3] = Radio/checkbox theme name
+* Array[4] = Radio/checkbox theme variant
+*/
+$available_themes["default-light"] = ["Pi-hole default theme (light, default)", false, "default-light", "minimal", "blue"];
+$available_themes["default-dark"] = ["Pi-hole midnight theme (dark)", true, "default-dark", "polaris", "polaris"];
+$available_themes["default-dark2"] = ["Pi-hole afternoon theme (dark)", true, "default-dark", "futurico", "futurico"];
$webtheme = "";
// Try to load theme settings from setupVars.conf
@@ -29,15 +36,16 @@ if(!array_key_exists($webtheme,$available_themes)) {
// or requested theme is not among the available
$webtheme = "default-light";
}
-$theme = $available_themes[$webtheme][1];
-$checkbox_theme_name = $available_themes[$webtheme][2];
-$checkbox_theme_variant = $available_themes[$webtheme][3];
+
+$darkmode = $available_themes[$webtheme][1];
+$theme = $available_themes[$webtheme][2];
+$checkbox_theme_name = $available_themes[$webtheme][3];
+$checkbox_theme_variant = $available_themes[$webtheme][4];
error_log(print_r($available_themes,true));
function theme_selection() {
global $available_themes, $webtheme;
foreach ($available_themes as $key => $value) {
- error_log($key."->".$value);
?>checked>