« get me outta code hell

hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/content/dependencies/generateMusicVideo.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/content/dependencies/generateMusicVideo.js')
-rw-r--r--src/content/dependencies/generateMusicVideo.js18
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')},
 
           [