« get me outta code hell

content: generateFlashInfoPage: show flash commentary - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/content/dependencies/generateFlashInfoPage.js
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2024-04-04 13:06:26 -0300
committer(quasar) nebula <qznebula@protonmail.com>2024-04-04 13:06:26 -0300
commita0c60358e89b6a6de218897e7e5d74e2dff61af8 (patch)
tree702890c0fcdd1ee99f23ec8a60ce9b1ee2d7d1da /src/content/dependencies/generateFlashInfoPage.js
parenta30da5289dbeaf3bf0fb89999a48fe20da4c63a4 (diff)
content: generateFlashInfoPage: show flash commentary
Diffstat (limited to 'src/content/dependencies/generateFlashInfoPage.js')
-rw-r--r--src/content/dependencies/generateFlashInfoPage.js23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/content/dependencies/generateFlashInfoPage.js b/src/content/dependencies/generateFlashInfoPage.js
index b88ce982..05964936 100644
--- a/src/content/dependencies/generateFlashInfoPage.js
+++ b/src/content/dependencies/generateFlashInfoPage.js
@@ -2,6 +2,7 @@ import {empty} from '#sugar';
 
 export default {
   contentDependencies: [
+    'generateCommentarySection',
     'generateContentHeading',
     'generateContributionList',
     'generateFlashActSidebar',
@@ -89,6 +90,13 @@ export default {
         relation('generateContributionList', flash.contributorContribs);
     }
 
+    // Section: Artist commentary
+
+    if (flash.commentary) {
+      sections.artistCommentary =
+        relation('generateCommentarySection', flash.commentary);
+    }
+
     return relations;
   },
 
@@ -136,6 +144,19 @@ export default {
                     .map(link => link.slot('context', 'flash'))),
             })),
 
+        html.tag('p',
+          {[html.onlyIfContent]: true},
+          {[html.joinChildren]: html.tag('br')},
+
+          [
+            sec.artistCommentary &&
+              language.$('releaseInfo.readCommentary', {
+                link: html.tag('a',
+                  {href: '#artist-commentary'},
+                  language.$('releaseInfo.readCommentary.link')),
+              }),
+          ]),
+
         sec.featuredTracks && [
           sec.featuredTracks.heading
             .slots({
@@ -158,6 +179,8 @@ export default {
 
           sec.contributors.list,
         ],
+
+        sec.artistCommentary,
       ],
 
       navLinkStyle: 'hierarchical',