diff options
author | (quasar) nebula <qznebula@protonmail.com> | 2023-06-12 16:35:38 -0300 |
---|---|---|
committer | (quasar) nebula <qznebula@protonmail.com> | 2023-06-12 16:35:38 -0300 |
commit | 535acb34613b5cf7e22654619f4337b94b70644d (patch) | |
tree | 5a713eb4f12eae7e1fe1aa60941709708585db32 /src/content/dependencies/generateReleaseInfoContributionsLine.js | |
parent | 630af0a345f3be6c3e4aa3300ce138e48ed5ae91 (diff) |
content: cut html.template boilerplate
Diffstat (limited to 'src/content/dependencies/generateReleaseInfoContributionsLine.js')
-rw-r--r-- | src/content/dependencies/generateReleaseInfoContributionsLine.js | 40 |
1 files changed, 17 insertions, 23 deletions
diff --git a/src/content/dependencies/generateReleaseInfoContributionsLine.js b/src/content/dependencies/generateReleaseInfoContributionsLine.js index 2b342d09..78d3e506 100644 --- a/src/content/dependencies/generateReleaseInfoContributionsLine.js +++ b/src/content/dependencies/generateReleaseInfoContributionsLine.js @@ -18,32 +18,26 @@ export default { }; }, - generate(relations, {html, language}) { - return html.template({ - annotation: `generateReleaseInfoContributionsLine`, + slots: { + stringKey: {type: 'string'}, - slots: { - stringKey: {type: 'string'}, - - showContribution: {type: 'boolean', default: true}, - showIcons: {type: 'boolean', default: true}, - }, + showContribution: {type: 'boolean', default: true}, + showIcons: {type: 'boolean', default: true}, + }, - content(slots) { - if (!relations.contributionLinks) { - return html.blank(); - } + generate(relations, slots, {html, language}) { + if (!relations.contributionLinks) { + return html.blank(); + } - return language.$(slots.stringKey, { - artists: - language.formatConjunctionList( - relations.contributionLinks.map(link => - link.slots({ - showContribution: slots.showContribution, - showIcons: slots.showIcons, - }))), - }); - }, + return language.$(slots.stringKey, { + artists: + language.formatConjunctionList( + relations.contributionLinks.map(link => + link.slots({ + showContribution: slots.showContribution, + showIcons: slots.showIcons, + }))), }); }, }; |