Changeset ca0ad44 in Klonkt for src/views


Ignore:
Timestamp:
06/27/2026 09:14:55 AM (2 months ago)
Author:
Robin Genis <roboburr@…>
Branches:
main
Children:
5421ce1
Parents:
a3e0746
Message:

feat(news): surface embedUrl + a direct "open the player" link

  • routes/posts.js — klonktAudioEmbed now returns embedUrl (the /embed?post=… player URL); the /news builder carries it on each post as p.embedUrl.
  • views/pages/news.ejs — render a top-level "▶ Open the player" link to embedUrl, which opens the player full-page so it works even when a browser shield/CSP blocks the cross-site iframe; + CSS.
  • services/i18n.js — tl.open_player (NL/EN/DE).
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/views/pages/news.ejs

    ra3e0746 rca0ad44  
    4343
    4444          <% if (p.embedHtml) { %><div class="tl-embed"><%- p.embedHtml %></div><% } %>
     45          <% if (p.embedUrl) { %><a class="tl-embed-open" href="<%= p.embedUrl %>" target="_blank" rel="noopener">▶ <%= t('tl.open_player') %></a><% } %>
    4546
    4647          <% if (p.url) { %><a class="tl-orig" href="<%= p.url %>" target="_blank" rel="nofollow noopener"><%= t('tl.view_original') %></a><% } %>
     
    105106  .tl-embed-bandcamp { aspect-ratio: auto; height: 470px; }
    106107  .tl-embed-apple { aspect-ratio: auto; height: 175px; }
     108  .tl-embed-open { display: inline-block; margin: .45rem .9rem 0 0; font-size: .82rem; font-weight: 600; color: var(--accent); text-decoration: none; }
     109  .tl-embed-open:hover { text-decoration: underline; }
    107110
    108111  .tl-orig { display: inline-block; margin: .7rem 0 0; font-size: .82rem; color: var(--accent, #06c); text-decoration: none; }
Note: See TracChangeset for help on using the changeset viewer.