Skip to content

Commit 7fb27b1

Browse files
committed
Fix comment indentation for editorconfig and equalise list icon columns
- The multi-line comments added in the previous UI-fix commits aligned their continuation lines with an odd number of leading spaces, which the editorconfig check rejects (it wants multiples of two). Re-indent them. - Equalise the two single-icon columns (list status and list type) on the subscribed-lists table so the type column is no longer noticeably wider than the status one, and centre their icons. Signed-off-by: DL6ER <dl6er@dl6er.de>
1 parent 3f28d6d commit 7fb27b1

4 files changed

Lines changed: 38 additions & 30 deletions

File tree

scripts/js/groups-lists.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ function setTypeIcon(type) {
171171
title = "This is an allowlist";
172172
}
173173

174-
return `<span class='fa fa-fw ${iconClass}' title='${title}\nClick for details about this list'></span> `;
174+
return `<span class='fa fa-fw ${iconClass}' title='${title}\nClick for details about this list'></span>`;
175175
}
176176

177177
function initTable() {

style/pi-hole.css

Lines changed: 31 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -45,30 +45,30 @@
4545
}
4646

4747
/* Bootstrap 5 dropped the `.hidden` utility that Bootstrap 3 (and AdminLTE 2)
48-
provided. We still toggle `.hidden` from templates and JS - e.g. the 2FA
49-
login field, the diagnosis warning-count badge and the "reset sorting"
50-
buttons - so restore it here, otherwise those elements are always shown. */
48+
provided. We still toggle `.hidden` from templates and JS - e.g. the 2FA
49+
login field, the diagnosis warning-count badge and the "reset sorting"
50+
buttons - so restore it here, otherwise those elements are always shown. */
5151
.hidden {
5252
display: none !important;
5353
}
5454

5555
/* AdminLTE 4 resets `.card` bottom margin to 0 and expects per-card spacing
56-
utilities. Restore the vertical rhythm between stacked cards that AdminLTE
57-
2's `.box` used to provide, unless a card opts out with its own `mb-*`. */
56+
utilities. Restore the vertical rhythm between stacked cards that AdminLTE
57+
2's `.box` used to provide, unless a card opts out with its own `mb-*`. */
5858
.app-content .card {
5959
margin-bottom: 1rem;
6060
}
6161

6262
/* AdminLTE 4's `.app-content` has no vertical padding in this build, so page
63-
content sits flush against the header. Add consistent top spacing so every
64-
page has breathing room below the header. */
63+
content sits flush against the header. Add consistent top spacing so every
64+
page has breathing room below the header. */
6565
.app-content {
6666
padding-top: 1rem;
6767
}
6868

6969
/* DataTables renders its pager as a Bootstrap `.pagination` but no longer
70-
right-aligns it, so it drifted to the middle of its column. Restore the
71-
conventional right-aligned position. */
70+
right-aligns it, so it drifted to the middle of its column. Restore the
71+
conventional right-aligned position. */
7272
.dataTables_wrapper ul.pagination,
7373
.dt-container ul.pagination,
7474
.card ul.pagination {
@@ -77,29 +77,29 @@
7777
}
7878

7979
/* AdminLTE 4's card title is 1.1rem, which looks oversized for the longer
80-
headings on the settings pages. Nudge it down a touch. */
80+
headings on the settings pages. Nudge it down a touch. */
8181
.card-title {
8282
font-size: 1rem;
8383
}
8484

8585
/* Bootstrap 5 dropped `.btn-block`; restore it so buttons that are meant to
86-
fill their grid column (e.g. the settings "Actions" and gravity buttons)
87-
stretch to full width instead of collapsing to their intrinsic size. */
86+
fill their grid column (e.g. the settings "Actions" and gravity buttons)
87+
stretch to full width instead of collapsing to their intrinsic size. */
8888
.btn-block {
8989
display: block;
9090
width: 100%;
9191
}
9292

9393
/* Space out the button groups inside a toolbar (Bootstrap 5's `.btn-toolbar`
94-
no longer adds a gap between adjacent groups). */
94+
no longer adds a gap between adjacent groups). */
9595
.btn-toolbar {
9696
gap: 0.5rem;
9797
}
9898

9999
/* Bootstrap 5 removed `.form-group` (which carried the bottom margin between
100-
form rows) and `.help-block` (muted helper text). The templates still use
101-
both throughout, so restore their spacing/appearance rather than rewrite
102-
every form to `.mb-3`/`.form-text`. */
100+
form rows) and `.help-block` (muted helper text). The templates still use
101+
both throughout, so restore their spacing/appearance rather than rewrite
102+
every form to `.mb-3`/`.form-text`. */
103103
.form-group {
104104
margin-bottom: 1rem;
105105
}
@@ -110,8 +110,8 @@
110110
}
111111

112112
/* AdminLTE 4 no longer swaps the mini/full logo in the header when the sidebar
113-
is collapsed, so the full "Pi-hole" wordmark stays and wraps in the narrow
114-
header. Show the compact "Ph" mark while collapsed instead. */
113+
is collapsed, so the full "Pi-hole" wordmark stays and wraps in the narrow
114+
header. Show the compact "Ph" mark while collapsed instead. */
115115
.logo-mini {
116116
display: none;
117117
}
@@ -174,8 +174,8 @@ td.lookatme {
174174
.table-responsive {
175175
-webkit-overflow-scrolling: touch;
176176
/* Keep the horizontal scrollbar visible on wide tables (e.g. the network
177-
overview) instead of relying on overlay scrollbars that stay hidden until
178-
scrolling, which made it look like content was simply cut off. */
177+
overview) instead of relying on overlay scrollbars that stay hidden until
178+
scrolling, which made it look like content was simply cut off. */
179179
scrollbar-width: thin;
180180
scrollbar-color: rgba(128, 128, 128, 0.6) transparent;
181181
}
@@ -1174,9 +1174,9 @@ div.dt-buttons {
11741174
}
11751175

11761176
/* Datatables Select - checkbox outline. The Bootstrap 5 Select build no longer
1177-
draws the checkbox box itself (it only nudges the margin), so the outline was
1178-
invisible and the bulk-select column looked empty. Draw the box and the
1179-
checkmark here so the selection control is visible again. */
1177+
draws the checkbox box itself (it only nudges the margin), so the outline was
1178+
invisible and the bulk-select column looked empty. Draw the box and the
1179+
checkmark here so the selection control is visible again. */
11801180
table.dataTable tbody td.select-checkbox,
11811181
table.dataTable tbody th.select-checkbox {
11821182
position: relative;
@@ -1760,3 +1760,11 @@ td.dnssec i {
17601760
text-indent: 0;
17611761
margin-left: -0.5rem;
17621762
}
1763+
1764+
/* Keep the two single-icon columns (list status and list type) on the
1765+
subscribed-lists table the same width, and centre their icons. */
1766+
#listsTable td.details-control,
1767+
#listsTable th.details-control {
1768+
min-width: 3.5rem;
1769+
text-align: center;
1770+
}

style/themes/default-dark.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ h4 {
3636
color: #3c8dbc;
3737
}
3838
/* Tone down Bootstrap's bright accent fills, which are too saturated on the
39-
dark background (the active page link and the filled coloured card headers
40-
such as the query-log "Advanced filtering" box). */
39+
dark background (the active page link and the filled coloured card headers
40+
such as the query-log "Advanced filtering" box). */
4141
.page-item.active > .page-link {
4242
background-color: #3c8dbc;
4343
border-color: #3c8dbc;

style/themes/default-darker.css

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -218,10 +218,10 @@ h6 {
218218
color: inherit;
219219
}
220220
/* Bootstrap 5 / AdminLTE 4 colour the filled card headers through the
221-
`--lte-card-variant-*` variables and use `.page-item`/`.page-link` markup,
222-
neither of which this theme's older Bootstrap 3 rules match. Recolour them
223-
here so the query-log "Advanced filtering" box and active pagination are not
224-
left with Bootstrap's over-bright defaults. */
221+
`--lte-card-variant-*` variables and use `.page-item`/`.page-link` markup,
222+
neither of which this theme's older Bootstrap 3 rules match. Recolour them
223+
here so the query-log "Advanced filtering" box and active pagination are not
224+
left with Bootstrap's over-bright defaults. */
225225
.card-info {
226226
--lte-card-variant-bg: rgb(37, 92, 105);
227227
--lte-card-variant-bg-rgb: 37, 92, 105;

0 commit comments

Comments
 (0)