Fix over-broad .log-table header fix: lh.php/localtx.php are mixed-align

The previous commit (4c58f85f) put class="log-table" on lh.php and
localtx.php too, which forced *every* header left - but only
Time/Mode/Callsign/Target are actually align="left" in those two
files. Source/Duration/Loss/BER have no align attribute at all (plain
<td>), so they were already correctly centered - the blanket fix just
moved the misalignment from the first 4 columns to the last 4.

Replace with a new `.al` class applied only to the specific <th>
elements whose column is genuinely align="left", leaving
Source/Duration/Loss/BER headers on the sitewide centered default to
match their centered data. last_herd.php/local_tx.php are untouched -
every column in those two really is align="left", so table.log-table
(all headers) remains correct there.
This commit is contained in:
2026-07-21 15:57:07 +08:00
parent 4c58f85ff1
commit 53b0218f75
6 changed files with 39 additions and 23 deletions
+5 -1
View File
@@ -614,11 +614,15 @@ table th {
border-bottom: 2px solid var(--accent);
}
/* See css/pistar-css.php for why this is scoped to .log-table only. */
/* See css/pistar-css.php for why there are two variants here. */
table.log-table th {
text-align: left;
}
th.al {
text-align: left;
}
table tr:nth-child(even) {
background: var(--table-even);
}
+14 -2
View File
@@ -758,17 +758,29 @@ table th {
}
/* Log-style tables (Last Heard, Local TX, D-Star activity lists) render
every data cell with align="left"; headers inherit the sitewide
data cells with align="left"; headers inherit the sitewide
`table { text-align: center; }` though, so the caption visually
drifts away from its column's actual left-aligned content - most
noticeable on wide columns like Target. Left-align just these
headers rather than changing text-align sitewide, since the vast
majority of the dashboard's other tables (config grids, status
tables) intentionally keep centered cells. */
tables) intentionally keep centered cells.
Two variants because not every log table is left-aligned in every
column: dstarrepeater's last_herd.php/local_tx.php are align="left"
in every cell, so the whole table gets .log-table. lh.php/localtx.php
mix the two - Time/Mode/Callsign/Target are align="left" but
Source/Duration/Loss/BER have no align attribute (i.e. stay
centered) - so only those specific <th> get .al instead of the
whole table, or their headers would drift the opposite way. */
table.log-table th {
text-align: left;
}
th.al {
text-align: left;
}
table tr:nth-child(even) {
background: var(--table-even);
}