diff options
author | (quasar) nebula <qznebula@protonmail.com> | 2024-06-21 17:57:37 -0300 |
---|---|---|
committer | (quasar) nebula <qznebula@protonmail.com> | 2024-06-24 15:03:10 -0300 |
commit | 3ec7d66ece76cea96b0caa14e5729b5642a76afd (patch) | |
tree | 66746a5a24e9df5f2574dd8d4db96417d7062d56 /src | |
parent | d109eddb08e3e4c147e3b383fb2502936a253707 (diff) |
content: generateTrackInfoPage: credit sources section
Diffstat (limited to 'src')
-rw-r--r-- | src/content/dependencies/generateCommentarySection.js | 12 | ||||
-rw-r--r-- | src/content/dependencies/generateTrackInfoPage.js | 8 | ||||
-rw-r--r-- | src/strings-default.yaml | 3 |
3 files changed, 21 insertions, 2 deletions
diff --git a/src/content/dependencies/generateCommentarySection.js b/src/content/dependencies/generateCommentarySection.js index c5090660..6e7fea6a 100644 --- a/src/content/dependencies/generateCommentarySection.js +++ b/src/content/dependencies/generateCommentarySection.js @@ -27,11 +27,19 @@ export default { : !!entries[0].date), }), - generate: (data, relations, {html, language}) => + slots: { + title: {type: 'html', mutable: false}, + }, + + generate: (data, relations, slots, {html, language}) => html.tags([ relations.heading .slots({ - title: language.$('misc.artistCommentary'), + title: + (html.isBlank(slots.title) + ? language.$('misc.artistCommentary') + : slots.title), + attributes: [ {id: 'artist-commentary'}, data.firstEntryIsDated && diff --git a/src/content/dependencies/generateTrackInfoPage.js b/src/content/dependencies/generateTrackInfoPage.js index 64ed0cb4..dd234bf4 100644 --- a/src/content/dependencies/generateTrackInfoPage.js +++ b/src/content/dependencies/generateTrackInfoPage.js @@ -113,6 +113,9 @@ export default { artistCommentarySection: relation('generateCommentarySection', track.commentary), + + creditSourcesSection: + relation('generateCommentarySection', track.creditSources), }), data: (sprawl, track) => ({ @@ -359,6 +362,11 @@ export default { ]), relations.artistCommentarySection, + + relations.creditSourcesSection.slots({ + title: + language.$('misc.creditSources'), + }), ], navLinkStyle: 'hierarchical', diff --git a/src/strings-default.yaml b/src/strings-default.yaml index eab080af..c04ac181 100644 --- a/src/strings-default.yaml +++ b/src/strings-default.yaml @@ -547,6 +547,9 @@ misc: trackArt: "{INDEX} track art by {ARTIST}" onlyIndex: "Only" + creditSources: + _: "Crediting sources:" + # external: # Links which will generally bring you somewhere off of the wiki. # The list of sites is hard-coded into the wiki software, so it |