From e5b2698286232986a31325cefd72467bf19f89a8 Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Wed, 30 Oct 2024 16:03:15 -0300 Subject: content: generateTrackList{,Item}: colorMode slot --- src/content/dependencies/generateTrackList.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src/content/dependencies/generateTrackList.js') 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, }))), }; -- cgit 1.3.0-6-gf8a5