From 457e05182805871399f04e094720fce0ee732223 Mon Sep 17 00:00:00 2001 From: Matthew Daubney Date: Tue, 6 Oct 2026 13:30:30 +0100 Subject: [PATCH] Make "Recently played" rows match the Tracks list style Stack the track above a muted artist line and link each row to its song page, consistent with how the "Most played > Tracks" list already looks and behaves. Scoped with a new .log-stacked modifier so history.html and the song page's own history list (which share the base .log classes) are unaffected. Verified manually in-browser: rows render stacked and link to the right song page, and history.html's layout is unchanged. Co-Authored-By: Claude Sonnet 5 --- frontend/css/style.css | 16 ++++++++++++++++ frontend/index.html | 2 +- frontend/js/dashboard.js | 7 ++++++- 3 files changed, 23 insertions(+), 2 deletions(-) diff --git a/frontend/css/style.css b/frontend/css/style.css index ecdfb40..065b60a 100644 --- a/frontend/css/style.css +++ b/frontend/css/style.css @@ -625,6 +625,22 @@ input { color: var(--ink-soft); } +/* Stack the track above a muted artist line and make the cell a link, like .ranking rows */ +.log-stacked .by { + display: block; +} + +.log-stacked li a { + display: block; + color: inherit; + text-decoration: none; +} + +.log-stacked li a:hover, +.log-stacked li a:focus-visible { + text-decoration: underline; +} + .log-day { margin: 2rem 0 0.25rem; font-size: var(--step-0); diff --git a/frontend/index.html b/frontend/index.html index f3e6fd4..be3c782 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -40,7 +40,7 @@

Recently played

Full history -
    +
      diff --git a/frontend/js/dashboard.js b/frontend/js/dashboard.js index 7c08145..cf92a70 100644 --- a/frontend/js/dashboard.js +++ b/frontend/js/dashboard.js @@ -262,7 +262,12 @@ async function loadRecent() { "li", {}, h("time", { datetime: s.played_at, title: new Date(s.played_at).toLocaleString() }, timeAgo(s.played_at)), - h("span", {}, h("span", { class: "track" }, s.track), h("span", { class: "by" }, ` by ${s.artist}`)), + h( + "a", + { href: songHref(s.artist, s.track) }, + h("span", { class: "track" }, s.track), + h("span", { class: "by" }, s.artist), + ), ), ), ); -- 2.54.0