diff options
author | (quasar) nebula <towerofnix@gmail.com> | 2021-04-06 14:19:37 -0300 |
---|---|---|
committer | (quasar) nebula <towerofnix@gmail.com> | 2021-04-06 14:19:37 -0300 |
commit | e11c6707e9279d20c1a6373672ba6b3cd684f829 (patch) | |
tree | 9c4be9136bc76f3c399c85b1d2d428ddd3e545cb /static | |
parent | de0f42a3cd34311d1448fc0ebed901ad1260d3db (diff) |
show cover artists in info card
Diffstat (limited to 'static')
-rw-r--r-- | static/client.js | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/static/client.js b/static/client.js index 6883b83b..fe4f5c45 100644 --- a/static/client.js +++ b/static/client.js @@ -284,6 +284,20 @@ const infoCard = (() => { return a; })); + const coverArtistParagraph = container.querySelector('.info-card-cover-artists'); + const coverArtistSpan = coverArtistParagraph.querySelector('span'); + if (data.links.coverArtists.length) { + coverArtistParagraph.style.display = 'block'; + coverArtistSpan.innerHTML = joinElements('conjunction', data.links.coverArtists.map(({ who: artist }) => { + const a = document.createElement('a'); + a.href = getLinkHref('artist', artist.directory); + a.innerText = artist.name; + return a; + })); + } else { + coverArtistParagraph.style.display = 'none'; + } + // Cover art. const [ containerNoReveal, containerReveal ] = [ |