From cc635018fd28fc0edf95c100fcdc28292dc77384 Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Mon, 6 Apr 2026 08:25:54 -0300 Subject: content, data: multiple music video URLs, "watch on" line --- src/content/dependencies/generateMusicVideo.js | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'src/content/dependencies') diff --git a/src/content/dependencies/generateMusicVideo.js b/src/content/dependencies/generateMusicVideo.js index 1eb33e0b..f02064c4 100644 --- a/src/content/dependencies/generateMusicVideo.js +++ b/src/content/dependencies/generateMusicVideo.js @@ -18,6 +18,10 @@ export default { contributorCredit: relation('generateArtistCredit', musicVideo.contributorContribs, []), + + watchLinks: + musicVideo.urls + .map(url => relation('linkExternal', url)), }), data: (musicVideo, _thing) => ({ @@ -27,7 +31,7 @@ export default { label: musicVideo.label, - url: + primaryURL: musicVideo.url, }), @@ -53,10 +57,20 @@ export default { })), relations.image.slots({ - link: data.url, + link: data.primaryURL, }), html.tag('p', + {[html.onlyIfContent]: true}, + + html.tag('span', {class: 'watch-line'}, + language.$(capsule, 'watchOn', { + links: + language.formatUnitList(relations.watchLinks), + }))), + + html.tag('p', + {[html.onlyIfContent]: true}, {[html.joinChildren]: html.tag('br')}, [ -- cgit 1.3.0-6-gf8a5