mirror of
https://github.com/pi-hole/web.git
synced 2026-08-23 06:39:09 +01:00
Reviewed and built on top of a round of fixes already applied to the working tree (boxed layout, badge alignment, sidebar treeview links, bootstrap5-toggle's on/off->onlabel/offlabel rename, and forcing data-bs-theme explicitly instead of leaving Bootstrap 5 to fall back to the OS's prefers-color-scheme, plus the new scripts/js/theme.js that locks the resolved theme so AdminLTE's own color-mode logic can't silently override Pi-hole's own theme selection). On top of that: - Fixed the "day theme still shows dark" gap: the anti-FOUC inline background style in header.lp only covered the case where the theme is unconditionally dark, never the "auto" theme (whose Lua-side flag is literally the string "auto", not "dark") - added a prefers-color-scheme media query fallback so the auto theme also avoids a white flash without needing to wait for theme.js/CSS to load. - Fixed a strict Content-Security-Policy (img-src 'self', set by FTL's webserver) blocking every checkbox/radio checkmark, the modal close button, and the select2 dropdown arrow/clear icon: Bootstrap 5 and its plugins ship these as inline data: URI SVGs, which the CSP rejects outright. Re-hosted the exact same icons as local files under style/icons/ and pointed the same CSS custom properties at them. Learned the hard way that a url() stored in a custom property resolves relative to the stylesheet that *consumes* it via var(), not the one that declares it - the consumer here is always vendor/adminLTE/adminlte.min.css, so the override paths needed to account for that rather than being relative to pi-hole.css itself. - Found and fixed three more leftover .box-* selectors in pi-hole.css that never got updated to .card-* during the earlier card-conversion phase: the query-types/forward-destinations pie chart flex layout, the domains-list filter row header, and the dynamically-generated settings cards' sizing/hidden-state selectors - all on pages that render in normal use, unlike the handful of genuinely-unreachable .box-solid/.box-comment selectors left alone in the theme files (those modifier classes are never applied by any current markup). Verified against a live container: boxed layout now visibly constrains and centers the page, day theme renders light content with checkmarks/ close icons/dropdown arrows all visible with zero console errors, clicking Settings/Tools now expands the submenu instead of navigating to the dashboard, and sidebar badges are aligned to a consistent right edge. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Signed-off-by: Adam Warner <me@adamwarner.co.uk>
258 lines
5.0 KiB
CSS
258 lines
5.0 KiB
CSS
/* Pi-hole: A black hole for Internet advertisements
|
|
* (c) 2020 Pi-hole, LLC (https://pi-hole.net)
|
|
* Network-wide ad blocking via your own hardware.
|
|
*
|
|
* This file is copyright under the latest version of the EUPL.
|
|
* Please see LICENSE file for your rights under this license. */
|
|
|
|
.app-header.navbar {
|
|
background-color: #3c8dbc;
|
|
}
|
|
.app-header.navbar .nav > li > a,
|
|
.app-header.navbar .nav > li > .navbar-text {
|
|
color: #fff;
|
|
height: 50px;
|
|
padding: 15px;
|
|
}
|
|
.app-header.navbar .nav > li > a:hover,
|
|
.app-header.navbar .nav > li > a:active,
|
|
.app-header.navbar .nav > li > a:focus,
|
|
.app-header.navbar .nav .open > a,
|
|
.app-header.navbar .nav .open > a:hover,
|
|
.app-header.navbar .nav .open > a:focus {
|
|
background-color: rgba(0, 0, 0, 0.1);
|
|
color: #f6f6f6;
|
|
}
|
|
.app-header.navbar .sidebar-toggle {
|
|
color: #fff;
|
|
}
|
|
.app-header.navbar .sidebar-toggle:hover {
|
|
color: #f6f6f6;
|
|
background-color: #367fa9;
|
|
}
|
|
@media (max-width: 767px) {
|
|
.app-header.navbar .dropdown-menu li.divider {
|
|
background-color: rgba(255, 255, 255, 0.1);
|
|
}
|
|
.app-header.navbar .dropdown-menu li a:hover {
|
|
background-color: #367fa9;
|
|
}
|
|
}
|
|
.app-header .logo {
|
|
color: #fff;
|
|
border-bottom: 0 solid transparent;
|
|
}
|
|
.app-header .logo:hover {
|
|
background-color: transparent;
|
|
}
|
|
.app-header li.user-header {
|
|
background-color: #3c8dbc;
|
|
}
|
|
.content-header {
|
|
background-color: transparent;
|
|
}
|
|
.navbar-nav > .user-menu > .dropdown-menu > .user-body {
|
|
background: #e4e8f0;
|
|
}
|
|
.navbar-nav > .user-menu > .dropdown-menu > .user-footer a:hover {
|
|
color: #367fa9 !important;
|
|
}
|
|
|
|
/* removed app-wrapper background-color */
|
|
/* user-panel text color removed */
|
|
.sidebar-menu > li.nav-header {
|
|
color: #808a90;
|
|
}
|
|
.sidebar-menu > li > a {
|
|
border-left: 3px solid transparent;
|
|
}
|
|
.sidebar-menu > li:hover > a,
|
|
.sidebar-menu > li > a:focus,
|
|
.sidebar-menu > li.active > a {
|
|
border-left-color: #3c8dbc;
|
|
}
|
|
.sidebar-menu > li > .nav-treeview {
|
|
margin: 0 1px;
|
|
}
|
|
/* sidebar a color removed */
|
|
.sidebar a:hover {
|
|
text-decoration: none;
|
|
}
|
|
/* "Donate" sidebar button */
|
|
.sidebar-menu > li.menu-donate:hover > a,
|
|
.sidebar-menu > li.menu-donate > a:focus {
|
|
background-color: #367fa9;
|
|
border-left-color: #fff;
|
|
}
|
|
/* nav-treeview a colors removed */
|
|
/* sidebar-form removed */
|
|
|
|
.nav-tabs-custom > .nav-tabs {
|
|
background: #e4e8f0;
|
|
}
|
|
.nav-tabs-custom > .nav-tabs > li {
|
|
margin-right: 1px;
|
|
}
|
|
.nav-tabs-custom > .nav-tabs > li:not(.active):hover {
|
|
background: #fff;
|
|
border-top-color: #d2d6de;
|
|
}
|
|
.nav-tabs-custom > .nav-tabs > li > a,
|
|
.nav-tabs-custom > .nav-tabs > li > a:hover {
|
|
color: #567;
|
|
}
|
|
.nav-tabs-custom > .nav-tabs > li > a:focus {
|
|
color: #3c8dbc;
|
|
}
|
|
|
|
.layout-top-nav .app-header > .logo {
|
|
background-color: #3c8dbc;
|
|
color: #fff;
|
|
border-bottom: 0 solid transparent;
|
|
}
|
|
.layout-top-nav .app-header > .logo:hover {
|
|
background-color: #3b8ab8;
|
|
}
|
|
|
|
.login-box {
|
|
background: #f0f2f4;
|
|
}
|
|
|
|
.not-used {
|
|
background-color: #eee;
|
|
}
|
|
.not-used:hover {
|
|
background-color: #c5c5c5;
|
|
}
|
|
.used {
|
|
background-color: #fff;
|
|
}
|
|
.used:hover {
|
|
background-color: #ddd;
|
|
}
|
|
|
|
.graphs-grid {
|
|
background-color: rgba(0, 0, 0, 0.1);
|
|
}
|
|
.graphs-ticks {
|
|
color: #000;
|
|
}
|
|
|
|
.progress {
|
|
background-color: #eee;
|
|
}
|
|
|
|
/* Used in the Query Log table */
|
|
.text-black {
|
|
color: #000 !important;
|
|
}
|
|
|
|
.text-green-light {
|
|
color: #7fff00 !important;
|
|
}
|
|
|
|
.text-green {
|
|
color: #080 !important;
|
|
}
|
|
|
|
.text-orange {
|
|
color: #ffa500 !important;
|
|
}
|
|
|
|
.text-red {
|
|
color: #f00 !important;
|
|
}
|
|
|
|
.text-vivid-blue {
|
|
color: #36f !important;
|
|
}
|
|
|
|
/* Used in debug log page */
|
|
.log-red {
|
|
color: #e00;
|
|
}
|
|
.log-green {
|
|
color: #093;
|
|
}
|
|
.log-yellow {
|
|
color: #f69600;
|
|
}
|
|
.log-blue {
|
|
color: #04d;
|
|
}
|
|
.log-purple {
|
|
color: #a0c;
|
|
}
|
|
.log-cyan {
|
|
color: #0ab;
|
|
}
|
|
.log-gray {
|
|
color: #999;
|
|
}
|
|
|
|
td.highlight {
|
|
background-color: rgba(255, 204, 0, 0.333);
|
|
}
|
|
|
|
.network-never {
|
|
background-color: #ffbfaa;
|
|
}
|
|
.network-recent {
|
|
background-color: #e7ffde;
|
|
}
|
|
.network-old {
|
|
background-color: #ffffdf;
|
|
}
|
|
.network-older {
|
|
background-color: #ffedd9;
|
|
}
|
|
.network-gradient {
|
|
background-image: linear-gradient(to right, #e7ffde 0%, #ffffdf 100%);
|
|
}
|
|
|
|
.datatable-bt,
|
|
.datatable-bt:active,
|
|
.datatable-bt:active:focus,
|
|
.datatable-bt:focus {
|
|
background: #fff;
|
|
border-color: #ddd;
|
|
color: #345;
|
|
}
|
|
|
|
.datatable-bt:hover,
|
|
.datatable-bt:active:hover {
|
|
background: #337ab7;
|
|
border-color: #337ab7;
|
|
color: #fff;
|
|
}
|
|
|
|
/*** Overwrite chrome's input field auto-filling ***/
|
|
input:-webkit-autofill,
|
|
input:-webkit-autofill:focus,
|
|
textarea:-webkit-autofill,
|
|
select:-webkit-autofill {
|
|
-webkit-text-fill-color: #666 !important;
|
|
-webkit-box-shadow: 0 0 0px 1000px #fff inset;
|
|
-webkit-transition: background-color 1s ease-in-out 0s;
|
|
transition: background-color 1s ease-in-out 0s;
|
|
}
|
|
|
|
.page-header {
|
|
border-color: #ddd;
|
|
}
|
|
|
|
/* Group assignment select */
|
|
.open > .dropdown-toggle.btn-default,
|
|
.open > .dropdown-toggle.btn-default:active {
|
|
background-color: #fff;
|
|
}
|
|
|
|
kbd {
|
|
color: #ffffff;
|
|
background-color: rgb(51, 51, 51);
|
|
box-shadow:
|
|
inset 1px 1px 2px 0 rgba(255, 255, 255, 0.2),
|
|
inset -1px -1px 2px 0 rgba(0, 0, 0, 0.5);
|
|
vertical-align: middle;
|
|
}
|