Commit Graph
35 Commits
Author SHA1 Message Date
646a3ef6ab Fix theme/layout regressions and CSP-blocked icons found in manual testing
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>
2026-07-17 22:39:57 +01:00
b7bd4cb6d1 Bump Font Awesome to v7, rename theme CSS to match new layout classes
Bump @fortawesome/fontawesome-free 6.7.2 -> 7.3.0 (the only remaining
outdated dependency; everything else was already at latest). Drop the
now-unused .ttf webfonts - FA7's dist CSS only references .woff2.

Rename the same AdminLTE2/Bootstrap3 selectors across all 6 theme files
under style/themes/ that were already renamed everywhere else in this
migration: .main-header/.main-sidebar/.main-footer -> .app-header/
.app-sidebar/.app-footer, .wrapper -> .app-wrapper, .content-wrapper ->
.app-main (this one predates AdminLTE 4 entirely and no longer exists
anywhere - confirmed dead in the current markup), .treeview-menu ->
.nav-treeview, sidebar .header list items -> .nav-header, and the full
box/panel -> card component family (including collapsed-box -> collapsed-
card and the color/state variants). Also removed now-dead bootstrap-select/
icheck-bootstrap selectors that can never match anything anymore.

All 7 theme options (default-auto/-light/-dark/-darker, high-contrast,
high-contrast-dark, lcars) are genuinely selectable in Settings -> Web
interface/API, confirmed via the live theme dropdown - none of these
files were dead code, despite "default-darker" not being referenced by
name anywhere else in this repo (themes are loaded via string
concatenation of a backend-supplied name).

Removed pi-hole.css's ~210-line hand-rolled polyfill of Bootstrap 4/5's
margin/padding/display utility classes (.m-0.../.py-3/.d-none) - these
exist natively in Bootstrap 5 now (confirmed present with identical
values in the vendored adminlte.min.css), so the polyfill was pure dead
weight.

Verified against a live container: switched the active theme through
default-darker, lcars, and high-contrast and reloaded the dashboard for
each - all three render correctly (LCARS's very custom skin in
particular came through intact) with zero console errors. FA7 icons
render correctly across the sidebar and dashboard.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2026-07-17 22:39:57 +01:00
yubiuser fe516a3796 Use CSS to style the keys as 3D key caps
Signed-off-by: yubiuser <github@yubiuser.dev>
2026-02-22 17:35:55 +01:00
XhmikosR 1fbbb91f51 Remove icheckbox related-code except for primary
v6 doesn't support changing this like v5

Signed-off-by: XhmikosR <xhmikosr@gmail.com>
2025-04-21 12:07:06 +03:00
XhmikosR 9b0c212a53 Ran autoprefixer
Move selector where appropriate

Signed-off-by: XhmikosR <xhmikosr@gmail.com>
2025-02-22 17:07:24 +02:00
RD WebDesign 6f9332983c Remove old (and unnecessary) style definitions from all themes
Signed-off-by: RD WebDesign <github@rdwebdesign.com.br>
2025-01-23 21:29:15 -03:00
RD WebDesign 46092a4ba3 Adjust style for the "group assignment" control
Signed-off-by: RD WebDesign <github@rdwebdesign.com.br>
2024-12-24 17:48:39 -03:00
DL6ER 50f28e8a93 The permitted column in the main graph was actually the sum of forwarded and other queries. As cache is arguably somehow permitted, too, make the difference between them clear
Signed-off-by: DL6ER <dl6er@dl6er.de>
2024-02-11 21:02:43 +01:00
RD WebDesign b1c0631a69 Settings pages: apply style to page titles using a flex container
Signed-off-by: RD WebDesign <github@rdwebdesign.com.br>
2023-07-19 01:20:02 -03:00
DL6ER 20cd1b5e80 De-ghostify cached queries
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-05-22 19:51:15 +02:00
Christian König dac2731e33 Adjust CSS to suppress webkit-autofill style
Signed-off-by: Christian König <ckoenig@posteo.de>
2022-12-28 15:44:04 +01:00
RD WebDesign 944ce3aa64 Tweak topbar and sidebar
- fix broken visual after initial changes;
- remove donate button from topmenu;
- re-add donate button to the sidebar and add hover color;
- remove "Ph" when collapsed;
- add icon and background to topmenu button;
- hide main menu headers (using lines as separators);
- reorder the main menu;
- adjust each theme to the new visual (CSS and HTML tweaks).
- new menu colors for LCARS theme

Signed-off-by: RD WebDesign <github@rdwebdesign.com.br>
2022-08-18 23:53:18 -03:00
RD WebDesign f528829c67 Testing a shorter main menu + top menu
Signed-off-by: RD WebDesign <github@rdwebdesign.com.br>
2022-08-13 02:00:24 -03:00
RD WebDesign 509113296c Move login form to a new page
Signed-off-by: RD WebDesign <github@rdwebdesign.com.br>
2022-08-12 18:04:57 -03:00
Christian König 67fa5e21c0 Address reviewer's comment
Signed-off-by: Christian König <ckoenig@posteo.de>
2022-07-17 08:34:50 +02:00
Christian König f8e25e1142 Restructure nav menu
Signed-off-by: Christian König <ckoenig@posteo.de>
2022-07-16 11:08:32 +02:00
RD WebDesign 2d6a78d6cb Improving debug log
- add a message to show while loading content;
- add CSS to format the loading message;
- fix yellow log color (light theme);

Signed-off-by: RD WebDesign <github@rdwebdesign.com.br>
2022-03-14 20:25:55 -03:00
RD WebDesign 01eef9c05e Fix prettier
Signed-off-by: RD WebDesign <github@rdwebdesign.com.br>
2022-03-12 03:28:12 -03:00
RD WebDesign ea24655a7b Add colors to debug log
- Add function and CSS to show colorful debug log
- Adjusts to #output element

Signed-off-by: RD WebDesign <github@rdwebdesign.com.br>
2022-03-12 03:22:22 -03:00
RD WebDesign 6288112044 Allow bulk deletion of warnings
- add Datatables extension Select (CSS and js);
- add Datatables extension Buttons (CSS and js);
- allow selection of multiple warnings;
- new button to select all;
- new button to delete all selected warnings;
- add icons for the buttons;
- hide buttons if all messages were deleted;
- update CSS themes to format the new items;
- Fix: update icon count after warning deletion;
- Fix: remove triangle icon after delete last warning;

Signed-off-by: RD WebDesign <github@rdwebdesign.com.br>
2022-02-26 19:59:13 -03:00
rdwebdesign e8807fb9d2 Fix an "overflow" on hover
Change the animation range and timing

Signed-off-by: rdwebdesign <github@rdwebdesign.com.br>
2022-01-20 20:09:37 -03:00
RD WebDesignandGitHub e1cbe8775f Improving contrast for UI tabs (#2076)
* Improving nav-tabs contrast

Signed-off-by: rdwebdesign <github@rdwebdesign.com.br>

* Improving nav-tabs contrast + prettier

Signed-off-by: rdwebdesign <github@rdwebdesign.com.br>
2022-01-15 07:47:26 +01:00
rdwebdesign c36e08dbcc Sidebar: same effect for hover and focus (all themes).
Signed-off-by: rdwebdesign <github@rdwebdesign.com.br>
2021-11-03 00:50:52 -03:00
rdwebdesign 675a1a6206 Sidebar and NavTabs: additional CSS for focus state.
Signed-off-by: rdwebdesign <github@rdwebdesign.com.br>
2021-10-30 17:29:16 -03:00
DL6ER f06a2b6ed1 CSS: Use rgba() instead of hex-color.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2020-06-21 21:45:22 +02:00
DL6ER c90fbc28cc Reduce agressiveness of highlight color.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2020-06-04 10:14:23 +02:00
XhmikosR d48a57a2cd Update pi-hole.css
* format code
* use `background-color` instead of the `background` shorthand
* use the `animation` shorthand
* remove unneeded CSS prefixes

Signed-off-by: XhmikosR <xhmikosr@gmail.com>
2020-05-26 13:14:45 +03:00
XhmikosR 30b8c5f383 Improve navbar's hostname markup
Signed-off-by: XhmikosR <xhmikosr@gmail.com>
2020-05-17 17:20:48 +03:00
DL6ER b7d74ff772 Reinstall loading overlay on long-term graphs page (shown only if data has been requested).
Signed-off-by: DL6ER <dl6er@dl6er.de>
2020-05-12 22:50:29 +02:00
DL6ER 05d5f02a36 Add theme chooser to Setting -> Web interface.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2020-05-12 22:50:29 +02:00
DL6ER 064a0aae9c Use the iCheck library for input box styling.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2020-05-12 22:50:29 +02:00
DL6ER 170e9d37a7 Add custom checkboxes.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2020-05-12 22:49:33 +02:00
DL6ER 6b47a937fb Add network table theming.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2020-05-12 22:44:55 +02:00
DL6ER 8468f129eb Dark mode optimizations for Query Log and Long-term graphics
Signed-off-by: DL6ER <dl6er@dl6er.de>
2020-05-12 22:44:55 +02:00
DL6ER a08a85994e Initial (incomplete) support for themes. Currently, the default is the new Pi-hole dark theme.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2020-05-12 22:44:52 +02:00