« get me outta code hell

content: generateColorStyleAttribute - 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 23:58:38 -0400
committer(quasar) nebula <qznebula@protonmail.com>2023-12-30 16:26:36 -0400
commit3fb01a3022a3f47c0e1e6e76771a35fce23a128b (patch)
treec8b23f194b1c632b02c926cb1b3eeb0b1084cca7 /src/content/dependencies/generateGroupSidebarCategoryDetails.js
parentf400a43640e7106d181d55365a9617c3d12e5891 (diff)
content: generateColorStyleAttribute
Diffstat (limited to 'src/content/dependencies/generateGroupSidebarCategoryDetails.js')
-rw-r--r--src/content/dependencies/generateGroupSidebarCategoryDetails.js12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/content/dependencies/generateGroupSidebarCategoryDetails.js b/src/content/dependencies/generateGroupSidebarCategoryDetails.js
index 19c5447..69de373 100644
--- a/src/content/dependencies/generateGroupSidebarCategoryDetails.js
+++ b/src/content/dependencies/generateGroupSidebarCategoryDetails.js
@@ -2,7 +2,7 @@ import {empty, stitchArrays} from '#sugar';
 
 export default {
   contentDependencies: [
-    'generateColorStyleVariables',
+    'generateColorStyleAttribute',
     'linkGroup',
     'linkGroupGallery',
   ],
@@ -11,8 +11,8 @@ export default {
 
   relations(relation, category) {
     return {
-      colorVariables:
-        relation('generateColorStyleVariables'),
+      colorStyle:
+        relation('generateColorStyleAttribute', category.color),
 
       groupInfoLinks:
         category.groups.map(group =>
@@ -30,7 +30,6 @@ export default {
     const data = {};
 
     data.name = category.name;
-    data.color = category.color;
 
     data.isCurrentCategory = category === group.category;
 
@@ -54,10 +53,7 @@ export default {
 
       [
         html.tag('summary',
-          {style:
-            relations.colorVariables
-              .slot('color', data.color)
-              .content},
+          relations.colorStyle,
 
           html.tag('span',
             language.$('groupSidebar.groupList.category', {