diff options
author | (quasar) nebula <qznebula@protonmail.com> | 2023-12-29 22:59:20 -0400 |
---|---|---|
committer | (quasar) nebula <qznebula@protonmail.com> | 2023-12-30 16:26:36 -0400 |
commit | f400a43640e7106d181d55365a9617c3d12e5891 (patch) | |
tree | 91c7911c2f5e91d4a230f807814930761991d23a /src/content/dependencies/generateFlashActSidebar.js | |
parent | 25c434a514152fdd02e5405e4de418cd62614c6a (diff) |
content: misc content syntax cleanup, mostly attribute merging
Diffstat (limited to 'src/content/dependencies/generateFlashActSidebar.js')
-rw-r--r-- | src/content/dependencies/generateFlashActSidebar.js | 43 |
1 files changed, 26 insertions, 17 deletions
diff --git a/src/content/dependencies/generateFlashActSidebar.js b/src/content/dependencies/generateFlashActSidebar.js index 2937964..3c631d9 100644 --- a/src/content/dependencies/generateFlashActSidebar.js +++ b/src/content/dependencies/generateFlashActSidebar.js @@ -155,7 +155,9 @@ export default { relations.currentActFlashLinks .map((flashLink, index) => html.tag('li', - {class: index === data.currentFlashIndex && 'current'}, + index === data.currentFlashIndex && + {class: 'current'}, + flashLink))), ]), ]); @@ -168,24 +170,31 @@ export default { sideColor: data.sideColors, actLinks: relations.sideActLinks, }).map(({sideName, sideColor, actLinks}, sideIndex) => - html.tag('details', { - class: sideIndex === data.currentSideIndex && 'current', - open: data.isFlashActPage && sideIndex === data.currentSideIndex, - style: sideColor && `--primary-color: ${getColors(sideColor).primary}` - }, [ - html.tag('summary', - html.tag('span', {class: 'group-name'}, - sideName)), - - html.tag('ul', - actLinks.map((actLink, actIndex) => - html.tag('li', - {class: + html.tag('details', + sideIndex === data.currentSideIndex && + {class: 'current'}, + + data.isFlashActPage && + sideIndex === data.currentSideIndex && + {open: true}, + + sideColor && + {style: `--primary-color: ${getColors(sideColor).primary}`}, + + [ + html.tag('summary', + html.tag('span', {class: 'group-name'}, + sideName)), + + html.tag('ul', + actLinks.map((actLink, actIndex) => + html.tag('li', sideIndex === data.currentSideIndex && actIndex === data.currentActIndex && - 'current'}, - actLink))), - ])), + {class: 'current'}, + + actLink))), + ])), ]); const sideMapBox = { |