diff options
| author | (quasar) nebula <qznebula@protonmail.com> | 2026-04-06 08:25:54 -0300 |
|---|---|---|
| committer | (quasar) nebula <qznebula@protonmail.com> | 2026-04-06 08:25:54 -0300 |
| commit | cc635018fd28fc0edf95c100fcdc28292dc77384 (patch) | |
| tree | 734bcd551bdec23952437c5ff9675fe80784d74c /src/content/dependencies | |
| parent | b119249988890273fc4879871eb88decf61a5338 (diff) | |
content, data: multiple music video URLs, "watch on" line preview
Diffstat (limited to 'src/content/dependencies')
| -rw-r--r-- | src/content/dependencies/generateMusicVideo.js | 18 |
1 files changed, 16 insertions, 2 deletions
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')}, [ |