« get me outta code hell

content: pass color directly through slots in various places - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/content/dependencies/generateArtTagGalleryPage.js
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2023-08-02 12:45:30 -0300
committer(quasar) nebula <qznebula@protonmail.com>2023-08-02 12:45:30 -0300
commit00644623eb6c99a33b3b08771f4f23841f747b88 (patch)
treeeffb4db5cb5a317adc56614484180552c447cc70 /src/content/dependencies/generateArtTagGalleryPage.js
parentc699396105f5aaa2380ab3dee282e1f99f7055fb (diff)
content: pass color directly through slots in various places
Primarily through generateColorStyle{Rules,Variables}, the former
of which is also refactored into generatePageLayout, which now
takes a direct color slot itself as well.
Diffstat (limited to 'src/content/dependencies/generateArtTagGalleryPage.js')
-rw-r--r--src/content/dependencies/generateArtTagGalleryPage.js11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/content/dependencies/generateArtTagGalleryPage.js b/src/content/dependencies/generateArtTagGalleryPage.js
index 138189e..a08e192 100644
--- a/src/content/dependencies/generateArtTagGalleryPage.js
+++ b/src/content/dependencies/generateArtTagGalleryPage.js
@@ -3,7 +3,6 @@ import {sortAlbumsTracksChronologically} from '../../util/wiki-data.js';
 
 export default {
   contentDependencies: [
-    'generateColorStyleRules',
     'generateCoverGrid',
     'generatePageLayout',
     'image',
@@ -37,9 +36,6 @@ export default {
     relations.layout =
       relation('generatePageLayout');
 
-    relations.colorStyleRules =
-      relation('generateColorStyleRules', tag.color);
-
     relations.artTagMainLink =
       relation('linkArtTag', tag);
 
@@ -59,12 +55,13 @@ export default {
     return relations;
   },
 
-  data(query, sprawl, artist) {
+  data(query, sprawl, tag) {
     const data = {};
 
     data.enableListings = sprawl.enableListings;
 
-    data.name = artist.name;
+    data.name = tag.name;
+    data.color = tag.color;
 
     data.numArtworks = query.things.length;
 
@@ -90,7 +87,7 @@ export default {
 
         headingMode: 'static',
 
-        colorStyleRules: [relations.colorStyleRules],
+        color: data.color,
 
         mainClasses: ['top-index'],
         mainContent: [