« get me outta code hell

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:
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 709ab211..19c5447c 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'