« 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/generateArtistInfoPage.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/content/dependencies/generateArtistInfoPage.js')
-rw-r--r--src/content/dependencies/generateArtistInfoPage.js21
1 files changed, 7 insertions, 14 deletions
diff --git a/src/content/dependencies/generateArtistInfoPage.js b/src/content/dependencies/generateArtistInfoPage.js
index 45b111ed..ae21b361 100644
--- a/src/content/dependencies/generateArtistInfoPage.js
+++ b/src/content/dependencies/generateArtistInfoPage.js
@@ -60,9 +60,8 @@ export default {
       query.aliasLinkedGroups
         .map(({group}) => relation('linkGroup', group)),
 
-    visitLinks:
-      artist.urls
-        .map(entry => relation('linkExternal', entry)),
+    externalLinksLineOrList:
+      relation('generateExternalLinksLineOrList', artist.urls),
 
     tracksChunkedList:
       relation('generateArtistInfoPageTracksChunkedList', artist),
@@ -182,17 +181,11 @@ export default {
               }),
             ])),
 
-          html.tag('p',
-            {[html.onlyIfContent]: true},
-
-            language.$('releaseInfo.visitOn', {
-              [language.onlyIfOptions]: ['links'],
-
-              links:
-                language.formatDisjunctionList(
-                  relations.visitLinks
-                    .map(link => link.slot('context', 'artist'))),
-            })),
+          relations.externalLinksLineOrList.slots({
+            string: 'releaseInfo.visitOn',
+            maximumTotalEntriesInLine: 5,
+            maximumAnnotatedEntriesInLine: 3,
+          }),
 
           html.tag('p',
             {[html.onlyIfContent]: true},