« get me outta code hell

content: generateArtistInfoPage: artist gallery link - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/content/dependencies
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2023-06-02 19:37:48 -0300
committer(quasar) nebula <qznebula@protonmail.com>2023-06-02 19:37:48 -0300
commit0148f49f3e08e6f148e30807669a6c103e3021ff (patch)
treee18e984c5651df4ff4db284564dd09080fe5b006 /src/content/dependencies
parent1ac4ee874047636ed9013350c3db2d5e49d7669a (diff)
content: generateArtistInfoPage: artist gallery link
Diffstat (limited to 'src/content/dependencies')
-rw-r--r--src/content/dependencies/generateArtistInfoPage.js21
1 files changed, 11 insertions, 10 deletions
diff --git a/src/content/dependencies/generateArtistInfoPage.js b/src/content/dependencies/generateArtistInfoPage.js
index 06baa961..c319d08b 100644
--- a/src/content/dependencies/generateArtistInfoPage.js
+++ b/src/content/dependencies/generateArtistInfoPage.js
@@ -11,6 +11,7 @@ export default {
     'generatePageLayout',
     'linkAlbum',
     'linkArtist',
+    'linkArtistGallery',
     'linkTrack',
   ],
 
@@ -25,11 +26,13 @@ export default {
     relations.artistNavLinks =
       relation('generateArtistNavLinks', artist);
 
-    /*
-    const hasGallery =
+    if (
       !empty(artist.albumsAsCoverArtist) ||
-      !empty(artist.tracksAsCoverArtist);
-    */
+      !empty(artist.tracksAsCoverArtist)
+    ) {
+      relations.artistGalleryLink =
+        relation('linkArtistGallery', artist);
+    }
 
     const processContribs = (...contribArrays) => {
       const properties = {};
@@ -202,15 +205,13 @@ export default {
               {id: 'art', class: ['content-heading']},
               language.$('artistPage.artList.title')),
 
-            /*
-            hasGallery &&
+            relations.artistGalleryLink &&
               html.tag('p',
                 language.$('artistPage.viewArtGallery.orBrowseList', {
-                  link: link.artistGallery(artist, {
-                    text: language.$('artistPage.viewArtGallery.link'),
-                  })
+                  link: relations.artistGalleryLink.slots({
+                    content: language.$('artistPage.viewArtGallery.link'),
+                  }),
                 })),
-            */
 
             /*
             !empty(artGroups) &&