Changeset 13b2986 in Klonkt
- Timestamp:
- 06/19/2026 08:20:35 AM (3 months ago)
- Branches:
- main
- Children:
- 977f65d
- Parents:
- 59e522f
- Location:
- src
- Files:
-
- 2 edited
-
routes/epk.js (modified) (1 diff)
-
views/pages/epk.ejs (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/routes/epk.js
r59e522f r13b2986 25 25 if (!site) return next(); 26 26 27 // Top 10 meest beluisterde nummers (op play_count), niet zomaar de eerste paar. 27 28 const tracks = db.prepare( 28 `SELECT title, artist, duration, cover_url 29 `SELECT title, artist, duration, cover_url, COALESCE(play_count, 0) AS plays 29 30 FROM audio_tracks 30 31 WHERE site_id = ? 31 ORDER BY p osition ASC, created_at ASC32 LIMIT 6`32 ORDER BY plays DESC, position ASC, created_at ASC 33 LIMIT 10` 33 34 ).all(site.id); 34 35 -
src/views/pages/epk.ejs
r59e522f r13b2986 28 28 <% if (epkTracks && epkTracks.length) { %> 29 29 <div class="epk-block"> 30 <h2 class="epk-h2">M uziek</h2>30 <h2 class="epk-h2">Meest beluisterd</h2> 31 31 <ul class="epk-tracks"> 32 <% epkTracks.forEach(function(t ){ %>32 <% epkTracks.forEach(function(t, i){ %> 33 33 <li class="epk-track"> 34 <span class="epk-rank"><%= i + 1 %></span> 34 35 <% if (t.cover_url) { %><span class="epk-cover" style="background-image:url('<%= t.cover_url %>')"></span><% } else { %><span class="epk-cover epk-cover-empty">♪</span><% } %> 35 36 <span class="epk-track-meta"> … … 77 78 .epk-tracks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; } 78 79 .epk-track { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border: 1px solid rgba(128,128,128,.18); border-radius: 12px; } 80 .epk-rank { flex: 0 0 auto; width: 20px; text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; opacity: .45; } 79 81 .epk-cover { flex: 0 0 auto; width: 42px; height: 42px; border-radius: 8px; background-size: cover; background-position: center; display: grid; place-items: center; } 80 82 .epk-cover-empty { background: var(--epk-accent); color: #fff; opacity: .85; }
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)