diff options
author | (quasar) nebula <qznebula@protonmail.com> | 2024-06-13 23:39:35 -0300 |
---|---|---|
committer | (quasar) nebula <qznebula@protonmail.com> | 2024-06-18 22:56:12 -0300 |
commit | 98ae7f44fb9a2b74ad7cdd25f75babe84fb4fc81 (patch) | |
tree | dfb4503850a294fc31a24a9faf7c36507a8e636a /src/content/dependencies | |
parent | d2a6d2f75fa1d2e6452d4c67574c6a1ea9fabe5e (diff) |
content: generateAdditionalFilesListChunk: nice capsule
Diffstat (limited to 'src/content/dependencies')
-rw-r--r-- | src/content/dependencies/generateAdditionalFilesListChunk.js | 63 |
1 files changed, 27 insertions, 36 deletions
diff --git a/src/content/dependencies/generateAdditionalFilesListChunk.js b/src/content/dependencies/generateAdditionalFilesListChunk.js index e6a97898..e66560fc 100644 --- a/src/content/dependencies/generateAdditionalFilesListChunk.js +++ b/src/content/dependencies/generateAdditionalFilesListChunk.js @@ -17,40 +17,31 @@ export default { }, }, - generate(slots, {html, language}) { - const capsule = - language.encapsulate('releaseInfo.additionalFiles.entry'); - - const summary = - html.tag('summary', - html.tag('span', - language.$(capsule, { - title: - html.tag('span', {class: 'group-name'}, - slots.title), - }))); - - const description = - html.tag('li', {class: 'entry-description'}, - {[html.onlyIfContent]: true}, - slots.description); - - const items = - (html.isBlank(slots.items) - ? html.tag('li', - language.$(capsule, 'noFilesAvailable')) - : slots.items); - - const content = - html.tag('ul', [description, items]); - - const details = - html.tag('details', - html.isBlank(slots.items) && - {open: true}, - - [summary, content]); - - return html.tag('li', details); - }, + generate: (slots, {html, language}) => + language.encapsulate('releaseInfo.additionalFiles.entry', capsule => + html.tag('li', + html.tag('details', + html.isBlank(slots.items) && + {open: true}, + + [ + html.tag('summary', + html.tag('span', + language.$(capsule, { + title: + html.tag('span', {class: 'group-name'}, + slots.title), + }))), + + html.tag('ul', [ + html.tag('li', {class: 'entry-description'}, + {[html.onlyIfContent]: true}, + slots.description), + + (html.isBlank(slots.items) + ? html.tag('li', + language.$(capsule, 'noFilesAvailable')) + : slots.items), + ]), + ]))), }; |