« get me outta code hell

content: generateArtistGroupContributionsInfo: table layout 👻 - 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>2023-06-30 20:45:00 -0300
committer(quasar) nebula <qznebula@protonmail.com>2023-06-30 20:45:00 -0300
commitda5ba89f4171c395f5e7fa2c764272e7d2de93f3 (patch)
tree51252bb8e85fc6e2867c40393798ef8b9304734e /src/content/dependencies/generateArtistInfoPage.js
parent84e1f947c9ac17ab075348ea386d43c17af66435 (diff)
content: generateArtistGroupContributionsInfo: table layout 👻
Diffstat (limited to 'src/content/dependencies/generateArtistInfoPage.js')
-rw-r--r--src/content/dependencies/generateArtistInfoPage.js47
1 files changed, 34 insertions, 13 deletions
diff --git a/src/content/dependencies/generateArtistInfoPage.js b/src/content/dependencies/generateArtistInfoPage.js
index 1f6c66f..7f79a60 100644
--- a/src/content/dependencies/generateArtistInfoPage.js
+++ b/src/content/dependencies/generateArtistInfoPage.js
@@ -218,14 +218,30 @@ export default {
                     }),
                 })),
 
-            // TODO: How to check if a template is blank!?
-            // !html.isBlank(sec.tracks.groupInfo.content) &&
-              html.tag('p',
-                language.$('artistPage.musicGroupsLine', {
-                  groups: sec.tracks.groupInfo.slot('mode', 'duration'),
-                })),
+            sec.tracks.list
+              .slots({
+                groupInfo: [
+                  sec.tracks.groupInfo
+                    .clone()
+                    .slots({
+                      title: language.$('artistPage.groupContributions.title.music'),
+                      showSortButton: true,
+                      sort: 'count',
+                      countUnit: 'tracks',
+                      visible: true,
+                    }),
 
-            sec.tracks.list,
+                  sec.tracks.groupInfo
+                    .clone()
+                    .slots({
+                      title: language.$('artistPage.groupContributions.title.music'),
+                      showSortButton: true,
+                      sort: 'duration',
+                      countUnit: 'tracks',
+                      visible: false,
+                    }),
+                ],
+              }),
           ],
 
           sec.artworks && [
@@ -236,11 +252,6 @@ export default {
                 title: language.$('artistPage.artList.title'),
               }),
 
-            html.tag('p',
-              language.$('artistPage.artGroupsLine', {
-                groups: sec.artworks.groupInfo.slot('mode', 'count'),
-              })),
-
             sec.artworks.artistGalleryLink &&
               html.tag('p',
                 language.$('artistPage.viewArtGallery.orBrowseList', {
@@ -249,7 +260,17 @@ export default {
                   }),
                 })),
 
-            sec.artworks.list,
+            sec.artworks.list
+              .slots({
+                groupInfo:
+                  sec.artworks.groupInfo
+                    .slots({
+                      title: language.$('artistPage.groupContributions.title.artworks'),
+                      showBothColumns: false,
+                      sort: 'count',
+                      countUnit: 'artworks',
+                    }),
+              }),
           ],
 
           sec.flashes && [