« get me outta code hell

content: inline generateCommentarySection behavior - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/content/dependencies/generateAlbumInfoPage.js
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2025-02-18 17:35:35 -0400
committer(quasar) nebula <qznebula@protonmail.com>2025-03-02 08:23:22 -0400
commiteedd05e6aa40d050851d877a3be90bc5b17dd5f8 (patch)
tree1da6efe75a38e30f095df272ecbc724871e83a60 /src/content/dependencies/generateAlbumInfoPage.js
parentae08fc94a062554c479c4ba6c4367d31dd157a4f (diff)
content: inline generateCommentarySection behavior
Diffstat (limited to 'src/content/dependencies/generateAlbumInfoPage.js')
-rw-r--r--src/content/dependencies/generateAlbumInfoPage.js35
1 files changed, 25 insertions, 10 deletions
diff --git a/src/content/dependencies/generateAlbumInfoPage.js b/src/content/dependencies/generateAlbumInfoPage.js
index 242680c5..5a9f9524 100644
--- a/src/content/dependencies/generateAlbumInfoPage.js
+++ b/src/content/dependencies/generateAlbumInfoPage.js
@@ -13,7 +13,7 @@ export default {
     'generateAlbumSocialEmbed',
     'generateAlbumStyleRules',
     'generateAlbumTrackList',
-    'generateCommentarySection',
+    'generateCommentaryEntry',
     'generateContentHeading',
     'generatePageLayout',
     'linkAlbumCommentary',
@@ -78,11 +78,13 @@ export default {
         album,
         album.additionalFiles),
 
-    artistCommentarySection:
-      relation('generateCommentarySection', album.commentary),
+    artistCommentaryEntries:
+      album.commentary
+        .map(entry => relation('generateCommentaryEntry', entry)),
 
-    creditSourcesSection:
-      relation('generateCommentarySection', album.creditSources),
+    creditSourceEntries:
+      album.creditSources
+        .map(entry => relation('generateCommentaryEntry', entry)),
   }),
 
   data: (album) => ({
@@ -196,12 +198,25 @@ export default {
               relations.additionalFilesList,
             ])),
 
-          relations.artistCommentarySection,
+          html.tags([
+            relations.contentHeading.clone()
+              .slots({
+                attributes: {id: 'artist-commentary'},
+                title: language.$('misc.artistCommentary'),
+              }),
 
-          relations.creditSourcesSection.slots({
-            id: 'credit-sources',
-            title: language.$('misc.creditSources'),
-          }),
+            relations.artistCommentaryEntries,
+          ]),
+
+          html.tags([
+            relations.contentHeading.clone()
+              .slots({
+                attributes: {id: 'credit-sources'},
+                title: language.$('misc.creditSources'),
+              }),
+
+            relations.creditSourceEntries,
+          ]),
         ],
 
         navLinkStyle: 'hierarchical',