diff options
author | (quasar) nebula <qznebula@protonmail.com> | 2024-05-31 23:21:56 -0300 |
---|---|---|
committer | (quasar) nebula <qznebula@protonmail.com> | 2024-06-18 22:56:06 -0300 |
commit | a8e43dfabd10b379aa582aafbb9c87b0620068f7 (patch) | |
tree | a82a07d7279996b60c9df10e965bd86326f97c45 /src/content/dependencies/generateArtistInfoPageFlashesChunkItem.js | |
parent | 7606e0e15172d5cb493f1caa489140c7b99aa1c6 (diff) |
content: gAIPFlashesChunkedList: general refactor a la tracks
Diffstat (limited to 'src/content/dependencies/generateArtistInfoPageFlashesChunkItem.js')
-rw-r--r-- | src/content/dependencies/generateArtistInfoPageFlashesChunkItem.js | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/src/content/dependencies/generateArtistInfoPageFlashesChunkItem.js b/src/content/dependencies/generateArtistInfoPageFlashesChunkItem.js new file mode 100644 index 00000000..e4908bf9 --- /dev/null +++ b/src/content/dependencies/generateArtistInfoPageFlashesChunkItem.js @@ -0,0 +1,34 @@ +export default { + contentDependencies: ['generateArtistInfoPageChunkItem', 'linkFlash'], + + extraDependencies: ['language'], + + relations: (relation, contrib) => ({ + // Flashes and games can list multiple contributors as collaborative + // credits, but we don't display these on the artist page, since they + // usually involve many artists crediting a larger team where collaboration + // isn't as relevant (without more particular details that aren't tracked + // on the wiki). + + template: + relation('generateArtistInfoPageChunkItem'), + + flashLink: + relation('linkFlash', contrib.thing), + }), + + data: (contrib) => ({ + annotation: + contrib.annotation, + }), + + generate: (data, relations, {language}) => + relations.template.slots({ + annotation: data.annotation, + + content: + language.$('artistPage.creditList.entry.flash', { + flash: relations.flashLink, + }), + }), +}; |