diff options
author | (quasar) nebula <qznebula@protonmail.com> | 2024-11-17 16:38:07 -0400 |
---|---|---|
committer | (quasar) nebula <qznebula@protonmail.com> | 2024-11-17 16:39:59 -0400 |
commit | 257b7616e3a0997f2a5c2766c7923719cf2ca0b5 (patch) | |
tree | 366ad2dfca2643c1a0a59b238b98cad0abce0e8f /src/content/dependencies/generateTrackNavLinks.js | |
parent | 9c3da1ff14bf2760a6358bcab1bdc97f012c2b46 (diff) |
content: generateTrackReferencedArtworksPage
Diffstat (limited to 'src/content/dependencies/generateTrackNavLinks.js')
-rw-r--r-- | src/content/dependencies/generateTrackNavLinks.js | 17 |
1 files changed, 16 insertions, 1 deletions
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)), }, ]), }; |