« 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/generateTrackList.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/content/dependencies/generateTrackList.js')
-rw-r--r--src/content/dependencies/generateTrackList.js11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/content/dependencies/generateTrackList.js b/src/content/dependencies/generateTrackList.js
index 19e2efeb..53a32536 100644
--- a/src/content/dependencies/generateTrackList.js
+++ b/src/content/dependencies/generateTrackList.js
@@ -8,7 +8,14 @@ export default {
         .map(track => relation('generateTrackListItem', track, [])),
   }),
 
-  generate: (relations, {html}) =>
+  slots: {
+    colorMode: {
+      validate: v => v.is('none', 'track', 'line'),
+      default: 'track',
+    },
+  },
+
+  generate: (relations, slots, {html}) =>
     html.tag('ul',
       {[html.onlyIfContent]: true},
 
@@ -16,6 +23,6 @@ export default {
         item.slots({
           showArtists: true,
           showDuration: false,
-          color: true,
+          colorMode: slots.colorMode,
         }))),
 };