diff --git a/scripts/pi-hole/js/footer.js b/scripts/pi-hole/js/footer.js index 171b9164..71772170 100644 --- a/scripts/pi-hole/js/footer.js +++ b/scripts/pi-hole/js/footer.js @@ -107,7 +107,8 @@ $(document).ready(function () { var checkbox_theme = $("#checkbox_theme").text(); $('input').icheck({ checkboxClass: 'icheckbox_' + checkbox_theme, - radioClass: 'iradio_' + checkbox_theme + radioClass: 'iradio_' + checkbox_theme, + increaseArea: '20%' }); }); diff --git a/scripts/pi-hole/php/header.php b/scripts/pi-hole/php/header.php index bf72c7d4..24ce8f3b 100644 --- a/scripts/pi-hole/php/header.php +++ b/scripts/pi-hole/php/header.php @@ -9,17 +9,9 @@ require "scripts/pi-hole/php/auth.php"; require "scripts/pi-hole/php/password.php"; require_once "scripts/pi-hole/php/FTL.php"; + require "scripts/pi-hole/php/theme.php"; $scriptname = basename($_SERVER['SCRIPT_FILENAME']); - //$theme = "default-light"; - $theme = "default-dark"; - //$checkbox_theme_name = "flat"; - //$checkbox_theme_variant = "blue"; - $checkbox_theme_name = "polaris"; - $checkbox_theme_variant = "polaris"; - //$checkbox_theme_name = "futurico"; - //$checkbox_theme_variant = "futurico"; - check_cors(); // Generate CSRF token diff --git a/scripts/pi-hole/php/savesettings.php b/scripts/pi-hole/php/savesettings.php index be75dc2d..d329eea1 100644 --- a/scripts/pi-hole/php/savesettings.php +++ b/scripts/pi-hole/php/savesettings.php @@ -555,6 +555,12 @@ function addStaticDHCPLease($mac, $ip, $hostname) { { pihole_execute('-a layout traditional'); } + if(isset($_POST["webtheme"])) + { + global $available_themes; + if(array_key_exists($_POST["webtheme"], $available_themes)) + exec('sudo pihole -a theme '.$_POST["webtheme"]); + } $success .= "The webUI settings have been updated"; break; diff --git a/scripts/pi-hole/php/theme.php b/scripts/pi-hole/php/theme.php new file mode 100644 index 00000000..29632658 --- /dev/null +++ b/scripts/pi-hole/php/theme.php @@ -0,0 +1,45 @@ + $value) { + error_log($key."->".$value); + ?>checked> +
\ No newline at end of file diff --git a/settings.php b/settings.php index d105907c..6052f24f 100644 --- a/settings.php +++ b/settings.php @@ -898,7 +898,8 @@ if (isset($_GET['tab']) && in_array($_GET['tab'], array("sysadmin", "blocklists"

Interface appearance

- checked> + + checked>

CPU Temperature Unit

checked>
checked>
diff --git a/style/themes/default-dark.css b/style/themes/default-dark.css index 97afd483..9b90fcc4 100644 --- a/style/themes/default-dark.css +++ b/style/themes/default-dark.css @@ -257,11 +257,12 @@ h4 { } .main-footer .nav-tabs, .nav-tabs-custom .nav-tabs { - border-bottom-color: #353c42; + background-color: #30383f; + border-bottom-color: #2f363b; } .main-footer .tab-content, .nav-tabs-custom .tab-content { - background-color: #272c30; + background-color: #30383f; } .nav-tabs-custom > .nav-tabs > li.active > a { border-left-color: #353c42; @@ -279,16 +280,6 @@ h4 { .nav-tabs-custom > .nav-tabs > li > a { color: #bec5cb; } -.form-group .input-group-addon, -.input-group .input-group-addon, -.form-group input, -.input-group input, -.form-group textarea, -.input-group textarea { - background-color: #353c42; - color: #bec5cb; - border: 1px solid #353c42; -} .list-group { color: #bec5cb; background-color: #272c30; @@ -441,16 +432,24 @@ td.highlight { background-color: #1e2226; color: #bec5cb; } +input, select, select.form-control, +.form-group .input-group-addon, +.input-group .input-group-addon, +.form-group input, +.input-group input, +.form-group textarea, +.input-group textarea .daterangepicker select.hourselect, .daterangepicker select.minuteselect, .daterangepicker select.secondselect, .daterangepicker select.ampmselect, +.form-control, div.dataTables_wrapper div.dataTables_length select { background-color: #353c42; color: #bec5cb; - border: 1px solid #353c42; + border: 1px solid #3d444b; } .nav-tabs-custom > .nav-tabs > li.active > a { color: #bec5cb; @@ -503,4 +502,15 @@ fieldset[disabled] .form-control { } .network-gradient { background-image: linear-gradient(to right, #114100 0%, #525200 100%); +} + +.icheckbox_polaris, +.icheckbox_futurico, +.icheckbox_minimal-blue { + margin-right: 10px; +} +.iradio_polaris, +.iradio_futurico, +.iradio_minimal-blue { + margin-right: 8px; } \ No newline at end of file diff --git a/style/themes/default-light.css b/style/themes/default-light.css index e6b3eebd..051ad6c5 100644 --- a/style/themes/default-light.css +++ b/style/themes/default-light.css @@ -216,3 +216,10 @@ td.highlight { .network-gradient { background-image: linear-gradient(to right, #e7ffde 0%, #ffffdf 100%); } + +.icheckbox_minimal-blue { + margin-right: 10px; +} +.iradio_minimal-blue { + margin-right: 8px; +} \ No newline at end of file