Formatting on mobile, again

This commit is contained in:
2026-03-22 19:39:39 +00:00
parent e07ce75bd5
commit 201604f37b

View File

@@ -1544,9 +1544,16 @@ fn write_bar_table(h: &mut HtmlWriter, title: &str, headers: &[&str], rows: &[Ba
if has_covers {
h.line("<th></th>"); // empty header for the cover column
}
for hdr in headers {
// The second-to-last header is always the play-count column; mark it so
// it can be hidden together with the td.play-count cells on mobile.
let play_count_idx = headers.len().saturating_sub(2);
for (i, hdr) in headers.iter().enumerate() {
if i == play_count_idx {
h.linef(format_args!("<th class=\"play-count\">{}</th>", html_escape(hdr)));
} else {
h.linef(format_args!("<th>{}</th>", html_escape(hdr)));
}
}
h.close("</tr>");
h.close("</thead>");