diff options
Diffstat (limited to 'src/content/dependencies/generateFlashInfoPage.js')
-rw-r--r-- | src/content/dependencies/generateFlashInfoPage.js | 55 |
1 files changed, 37 insertions, 18 deletions
diff --git a/src/content/dependencies/generateFlashInfoPage.js b/src/content/dependencies/generateFlashInfoPage.js index 148925fb..ee043bfa 100644 --- a/src/content/dependencies/generateFlashInfoPage.js +++ b/src/content/dependencies/generateFlashInfoPage.js @@ -3,11 +3,12 @@ import {empty} from '#sugar'; export default { contentDependencies: [ 'generateAdditionalNamesBox', - 'generateCommentarySection', + 'generateCommentaryEntry', + 'generateContentContentHeading', 'generateContentHeading', 'generateContributionList', 'generateFlashActSidebar', - 'generateFlashCoverArtwork', + 'generateFlashArtworkColumn', 'generateFlashNavAccent', 'generatePageLayout', 'generateTrackList', @@ -47,12 +48,15 @@ export default { query.urls .map(url => relation('linkExternal', url)), - cover: - relation('generateFlashCoverArtwork', flash), + artworkColumn: + relation('generateFlashArtworkColumn', flash), contentHeading: relation('generateContentHeading'), + contentContentHeading: + relation('generateContentContentHeading', flash), + flashActLink: relation('linkFlashAct', flash.act), @@ -65,11 +69,13 @@ export default { contributorContributionList: relation('generateContributionList', flash.contributorContribs), - artistCommentarySection: - relation('generateCommentarySection', flash.commentary), + artistCommentaryEntries: + flash.commentary + .map(entry => relation('generateCommentaryEntry', entry)), - creditSourcesSection: - relation('generateCommentarySection', flash.creditSources), + creditSourceEntries: + flash.creditingSources + .map(entry => relation('generateCommentaryEntry', entry)), }), data: (_query, flash) => ({ @@ -96,7 +102,7 @@ export default { additionalNames: relations.additionalNamesBox, - cover: relations.cover, + artworkColumnContent: relations.artworkColumn, mainContent: [ html.tag('p', @@ -121,7 +127,7 @@ export default { {[html.joinChildren]: html.tag('br')}, language.encapsulate('releaseInfo', capsule => [ - !html.isBlank(relations.artistCommentarySection) && + !html.isBlank(relations.artistCommentaryEntries) && language.encapsulate(capsule, 'readCommentary', capsule => language.$(capsule, { link: @@ -130,12 +136,12 @@ export default { language.$(capsule, 'link')), })), - !html.isBlank(relations.creditSourcesSection) && - language.encapsulate(capsule, 'readCreditSources', capsule => + !html.isBlank(relations.creditSourceEntries) && + language.encapsulate(capsule, 'readCreditingSources', capsule => language.$(capsule, { link: html.tag('a', - {href: '#credit-sources'}, + {href: '#crediting-sources'}, language.$(capsule, 'link')), })), ])), @@ -165,12 +171,25 @@ export default { }), ]), - relations.artistCommentarySection, + html.tags([ + relations.contentContentHeading.clone() + .slots({ + attributes: {id: 'artist-commentary'}, + string: 'misc.artistCommentary', + }), - relations.creditSourcesSection.slots({ - id: 'credit-sources', - title: language.$('misc.creditSources'), - }), + relations.artistCommentaryEntries, + ]), + + html.tags([ + relations.contentContentHeading.clone() + .slots({ + attributes: {id: 'crediting-sources'}, + string: 'misc.creditingSources', + }), + + relations.creditSourceEntries, + ]), ], navLinkStyle: 'hierarchical', |