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/generateTrackListItem.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/content/dependencies/generateTrackListItem.js') diff --git a/src/content/dependencies/generateTrackListItem.js b/src/content/dependencies/generateTrackListItem.js index 36e56717..887b6f03 100644 --- a/src/content/dependencies/generateTrackListItem.js +++ b/src/content/dependencies/generateTrackListItem.js @@ -50,16 +50,16 @@ export default { default: false, }, - color: { - type: 'boolean', - default: true, + colorMode: { + validate: v => v.is('none', 'track', 'line'), + default: 'track', }, }, generate: (data, relations, slots, {html, language}) => language.encapsulate('trackList.item', itemCapsule => html.tag('li', - slots.color && + slots.colorMode === 'line' && relations.colorStyle.slot('context', 'primary-only'), language.encapsulate(itemCapsule, workingCapsule => { @@ -67,7 +67,7 @@ export default { workingOptions.track = relations.trackLink - .slot('color', false); + .slot('color', slots.colorMode === 'track'); if (slots.showDuration) { workingCapsule += '.withDuration'; -- cgit 1.3.0-6-gf8a5