« get me outta code hell

content: generateListenLineOrList, generateReleaseInfoBlock - 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:
author(quasar) nebula <qznebula@protonmail.com>2026-05-01 18:37:35 -0300
committer(quasar) nebula <qznebula@protonmail.com>2026-05-01 18:37:35 -0300
commita1d39a16ab3ed60a9af4ef277fbf5c4a98a84b2d (patch)
tree5533aa908374b3575fbf1091950abde6e710a606 /src/content/dependencies/generateArtistInfoPage.js
parentf6aad9a81fbb1b4e619355cbec316988837fb61a (diff)
content: generateListenLineOrList, generateReleaseInfoBlock
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},