source: Klonkt/src/views/pages/downloads.ejs@ d8c6a83

main
Last change on this file since d8c6a83 was d8c6a83, checked in by roboburr <roboburr@…>, 3 months ago

fix(downloads+posts): post nav on downloads page + post images full width

  • The pinned "Downloads!" is a real post with slug 'downloads'; the feature route /downloads intercepts it (no post nav). Now /downloads calculates the Newer/Older neighbours of that post and shows the post nav — download buttons remain.
  • Post images (.post-content img) always fill the container width with natural (uncropped) height. style.css?v=20.

Co-Authored-By: Claude <noreply@…>

  • Property mode set to 100644
File size: 2.2 KB
RevLine 
[91094a4]1<%
2 var ts = (typeof dlTracks !== 'undefined') ? dlTracks : [];
3%>
4<section class="dls">
[d8c6a83]5 <%- include('../partials/post-nav', { newerPost: (typeof newerPost !== 'undefined' ? newerPost : null), olderPost: (typeof olderPost !== 'undefined' ? olderPost : null) }) %>
[91094a4]6 <h1 class="dls-h1">Downloads</h1>
7 <p class="dls-sub">Gratis te downloaden — laat je e-mailadres achter en je krijgt het bestand.</p>
8
9 <% if (!ts.length) { %>
10 <p class="dls-empty">Er staan momenteel geen downloads klaar.</p>
11 <% } else { %>
12 <ul class="dls-list">
13 <% ts.forEach(function(t){ %>
14 <li class="dls-item">
15 <% if (t.cover_url) { %><span class="dls-cover" style="background-image:url('<%= t.cover_url %>')"></span><% } else { %><span class="dls-cover dls-cover-empty">♪</span><% } %>
16 <span class="dls-meta">
17 <span class="dls-title"><%= t.title %></span>
18 <% if (t.artist) { %><span class="dls-artist"><%= t.artist %></span><% } %>
19 </span>
20 <a class="dls-btn" href="<%= siteUrlBase %>/download/<%= t.id %>">⬇ Download</a>
21 </li>
22 <% }); %>
23 </ul>
24 <% } %>
25</section>
26
27<style>
28 .dls { max-width: 680px; margin: 0 auto; padding: 32px 18px 64px; }
29 .dls-h1 { font-size: clamp(26px,5vw,38px); margin: 0 0 8px; }
30 .dls-sub { opacity: .8; margin: 0 0 24px; }
31 .dls-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
32 .dls-item { display: flex; align-items: center; gap: 14px; padding: 10px 12px; border: 1px solid rgba(128,128,128,.2); border-radius: 12px; }
33 .dls-cover { flex: 0 0 auto; width: 48px; height: 48px; border-radius: 8px; background-size: cover; background-position: center; display: grid; place-items: center; }
34 .dls-cover-empty { background: var(--accent,#6b8f71); color: #fff; opacity: .85; }
35 .dls-meta { display: flex; flex-direction: column; flex: 1 1 auto; min-width: 0; }
36 .dls-title { font-weight: 600; }
37 .dls-artist { font-size: 12.5px; opacity: .65; }
38 .dls-btn { flex: 0 0 auto; padding: 9px 15px; border-radius: 999px; background: var(--accent,#6b8f71); color: #fff; text-decoration: none; font-weight: 600; font-size: 13.5px; }
39</style>
Note: See TracBrowser for help on using the repository browser.