From a0c60358e89b6a6de218897e7e5d74e2dff61af8 Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Thu, 4 Apr 2024 13:06:26 -0300 Subject: content: generateFlashInfoPage: show flash commentary --- src/content/dependencies/generateFlashInfoPage.js | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'src') diff --git a/src/content/dependencies/generateFlashInfoPage.js b/src/content/dependencies/generateFlashInfoPage.js index b88ce98..0596493 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', -- cgit 1.3.0-6-gf8a5