From 5952b9409f93dcc8ab6eaf3408916174c423e689 Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Tue, 2 Apr 2024 15:24:59 -0300 Subject: content: generateAdditionalFilesList: use
elements --- .../generateAdditionalFilesListChunk.js | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) (limited to 'src/content/dependencies/generateAdditionalFilesListChunk.js') diff --git a/src/content/dependencies/generateAdditionalFilesListChunk.js b/src/content/dependencies/generateAdditionalFilesListChunk.js index bb16b778..86e40062 100644 --- a/src/content/dependencies/generateAdditionalFilesListChunk.js +++ b/src/content/dependencies/generateAdditionalFilesListChunk.js @@ -26,14 +26,21 @@ export default { titleOptions.description = slots.description; } - const dt = - html.tag('dt', - language.$(...titleParts, titleOptions)); + const summary = + html.tag('summary', + html.tag('span', + language.$(...titleParts, titleOptions))); - const dd = - html.tag('dd', - html.tag('ul', slots.items)); + const content = + html.tag('ul', slots.items); - return html.tags([dt, dd]); + const details = + html.tag('details', + slots.items.length <= 5 && + {open: true}, + + [summary, content]); + + return html.tag('li', details); }, }; -- cgit 1.3.0-6-gf8a5