From 257b7616e3a0997f2a5c2766c7923719cf2ca0b5 Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Sun, 17 Nov 2024 16:38:07 -0400 Subject: content: generateTrackReferencedArtworksPage --- src/content/dependencies/generateTrackNavLinks.js | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'src/content/dependencies/generateTrackNavLinks.js') diff --git a/src/content/dependencies/generateTrackNavLinks.js b/src/content/dependencies/generateTrackNavLinks.js index 89da171a..e6e6d6ab 100644 --- a/src/content/dependencies/generateTrackNavLinks.js +++ b/src/content/dependencies/generateTrackNavLinks.js @@ -18,7 +18,11 @@ export default { track.album.tracks.indexOf(track) + 1, }), - slots: {}, + slots: { + currentExtra: { + validate: v => v.is('referenced-art'), + }, + }, generate: (data, relations, slots, {html, language}) => language.encapsulate('trackPage.nav', navCapsule => [ @@ -42,6 +46,17 @@ export default { return language.$(workingCapsule, workingOptions); }), + + accent: + html.tag('a', + {[html.onlyIfContent]: true}, + + {href: ''}, + {class: 'current'}, + + (slots.currentExtra === 'referenced-art' + ? language.$(navCapsule, 'referencedArtworks') + : null)), }, ]), }; -- cgit 1.3.0-6-gf8a5