« 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/generateCommentaryEntry.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/generateCommentaryEntry.js
parentf400a43640e7106d181d55365a9617c3d12e5891 (diff)
content: generateColorStyleAttribute
Diffstat (limited to 'src/content/dependencies/generateCommentaryEntry.js')
-rw-r--r--src/content/dependencies/generateCommentaryEntry.js17
1 files changed, 7 insertions, 10 deletions
diff --git a/src/content/dependencies/generateCommentaryEntry.js b/src/content/dependencies/generateCommentaryEntry.js
index b4f2468..522a028 100644
--- a/src/content/dependencies/generateCommentaryEntry.js
+++ b/src/content/dependencies/generateCommentaryEntry.js
@@ -2,7 +2,7 @@ import {empty} from '#sugar';
 
 export default {
   contentDependencies: [
-    'generateColorStyleVariables',
+    'generateColorStyleAttribute',
     'linkArtist',
     'transformContent',
   ],
@@ -31,8 +31,8 @@ export default {
         ? relation('transformContent', entry.body)
         : null),
 
-    colorVariables:
-      relation('generateColorStyleVariables'),
+    colorStyle:
+      relation('generateColorStyleAttribute'),
   }),
 
   data: (entry) => ({
@@ -82,19 +82,16 @@ export default {
     }
 
     const style =
-      (slots.color
-        ? relations.colorVariables
-            .slot('color', slots.color)
-            .content
-        : null);
+      slots.color &&
+        relations.colorStyle.slot('color', slots.color);
 
     return html.tags([
       html.tag('p', {class: 'commentary-entry-heading'},
-        {style},
+        style,
         language.$(...titleParts, titleOptions)),
 
       html.tag('blockquote', {class: 'commentary-entry-body'},
-        {style},
+        style,
         relations.bodyContent.slot('mode', 'multiline')),
     ]);
   },