From 42a06333e4ebf98f22cbb7a856ff4517ee47fcb1 Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Fri, 31 May 2024 23:21:56 -0300 Subject: content: gAIPFlashesChunkedList: general refactor a la tracks --- .../generateArtistInfoPageFlashesChunkItem.js | 34 ++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 src/content/dependencies/generateArtistInfoPageFlashesChunkItem.js (limited to 'src/content/dependencies/generateArtistInfoPageFlashesChunkItem.js') 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, + }), + }), +}; -- cgit 1.3.0-6-gf8a5