Changeset a66f691 in Klonkt


Ignore:
Timestamp:
06/20/2026 05:43:49 AM (3 months ago)
Author:
roboburr <roboburr@…>
Branches:
main
Children:
903f10b
Parents:
d727e92
Message:

fix(audio): link-only track shows cover (instead of music note)

A track without audio that has a cover set now shows the artwork as thumbnail;
the music note is only the fallback when there is no cover. buster audio.css?v=10.

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

Location:
src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • src/assets/css/audio.css

    rd727e92 ra66f691  
    113113}
    114114.pat-noplay svg { width: 18px; height: 18px; }
     115/* Cover-thumbnail op een link-only track (i.p.v. het muzieknootje). */
     116.pat-noplay--cover {
     117  width: 44px; height: 44px; flex: 0 0 44px;
     118  border-radius: 6px;
     119  background-size: cover; background-position: center;
     120  margin: 0 .35rem;
     121}
    115122.pat-row.pat-static { cursor: default; }
    116123
  • src/services/AudioEmbedService.js

    rd727e92 ra66f691  
    276276      // Link-only track (geen audiobestand): geen afspeelknop, wel info + open-in.
    277277      if (!t.url) {
     278        const coverH0 = this.escape(t.cover || '');
     279        const leader0 = coverH0
     280          ? `<span class="pat-noplay pat-noplay--cover" style="background-image:url('${coverH0}')" aria-hidden="true"></span>`
     281          : `<span class="pat-noplay" aria-hidden="true"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M9 18V5l12-2v13"/><circle cx="6" cy="18" r="3"/><circle cx="18" cy="16" r="3"/></svg></span>`;
    278282        return `<div class="post-audio-track post-audio-track--static" id="track-${id}">
    279   <span class="pat-noplay" aria-hidden="true"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M9 18V5l12-2v13"/><circle cx="6" cy="18" r="3"/><circle cx="18" cy="16" r="3"/></svg></span>
     283  ${leader0}
    280284  <div class="pat-info">
    281285    <div class="pat-title">${titleH0}</div>
  • src/views/shell.ejs

    rd727e92 ra66f691  
    168168     anywhere (admin previews, post embeds, etc). The player itself is
    169169     a singleton — see the script tag near </body>. -->
    170 <link rel="stylesheet" href="/assets/css/audio.css?v=9">
     170<link rel="stylesheet" href="/assets/css/audio.css?v=10">
    171171<!-- Eigen custom media-embeds (YouTube/SoundCloud/Spotify) in huisstijl. -->
    172172<link rel="stylesheet" href="/assets/css/embed.css?v=8">
Note: See TracChangeset for help on using the changeset viewer.