« get me outta code hell

content: misc content syntax cleanup, mostly attribute merging - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/content/dependencies/generateGroupSidebarCategoryDetails.js
diff options
context:
space:
mode:
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
commitf400a43640e7106d181d55365a9617c3d12e5891 (patch)
tree91c7911c2f5e91d4a230f807814930761991d23a /src/content/dependencies/generateGroupSidebarCategoryDetails.js
parent25c434a514152fdd02e5405e4de418cd62614c6a (diff)
content: misc content syntax cleanup, mostly attribute merging
Diffstat (limited to 'src/content/dependencies/generateGroupSidebarCategoryDetails.js')
-rw-r--r--src/content/dependencies/generateGroupSidebarCategoryDetails.js17
1 files changed, 11 insertions, 6 deletions
diff --git a/src/content/dependencies/generateGroupSidebarCategoryDetails.js b/src/content/dependencies/generateGroupSidebarCategoryDetails.js
index 709ab21..19c5447 100644
--- a/src/content/dependencies/generateGroupSidebarCategoryDetails.js
+++ b/src/content/dependencies/generateGroupSidebarCategoryDetails.js
@@ -49,13 +49,16 @@ export default {
 
   generate(data, relations, slots, {html, language}) {
     return html.tag('details',
-      {
-        open: data.isCurrentCategory,
-        class: data.isCurrentCategory && 'current',
-      },
+      data.isCurrentCategory &&
+        {class: 'current', open: true},
+
       [
         html.tag('summary',
-          {style: relations.colorVariables.slot('color', data.color).content},
+          {style:
+            relations.colorVariables
+              .slot('color', data.color)
+              .content},
+
           html.tag('span',
             language.$('groupSidebar.groupList.category', {
               category:
@@ -69,7 +72,9 @@ export default {
             galleryLink: relations.groupGalleryLinks,
           })).map(({infoLink, galleryLink}, index) =>
                 html.tag('li',
-                  {class: index === data.currentGroupIndex && 'current'},
+                  index === data.currentGroupIndex &&
+                    {class: 'current'},
+
                   language.$('groupSidebar.groupList.item', {
                     group:
                       (slots.currentExtra === 'gallery'