From 0148f49f3e08e6f148e30807669a6c103e3021ff Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Fri, 2 Jun 2023 19:37:48 -0300 Subject: content: generateArtistInfoPage: artist gallery link --- src/content/dependencies/generateArtistInfoPage.js | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) (limited to 'src/content/dependencies') diff --git a/src/content/dependencies/generateArtistInfoPage.js b/src/content/dependencies/generateArtistInfoPage.js index 06baa961..c319d08b 100644 --- a/src/content/dependencies/generateArtistInfoPage.js +++ b/src/content/dependencies/generateArtistInfoPage.js @@ -11,6 +11,7 @@ export default { 'generatePageLayout', 'linkAlbum', 'linkArtist', + 'linkArtistGallery', 'linkTrack', ], @@ -25,11 +26,13 @@ export default { relations.artistNavLinks = relation('generateArtistNavLinks', artist); - /* - const hasGallery = + if ( !empty(artist.albumsAsCoverArtist) || - !empty(artist.tracksAsCoverArtist); - */ + !empty(artist.tracksAsCoverArtist) + ) { + relations.artistGalleryLink = + relation('linkArtistGallery', artist); + } const processContribs = (...contribArrays) => { const properties = {}; @@ -202,15 +205,13 @@ export default { {id: 'art', class: ['content-heading']}, language.$('artistPage.artList.title')), - /* - hasGallery && + relations.artistGalleryLink && html.tag('p', language.$('artistPage.viewArtGallery.orBrowseList', { - link: link.artistGallery(artist, { - text: language.$('artistPage.viewArtGallery.link'), - }) + link: relations.artistGalleryLink.slots({ + content: language.$('artistPage.viewArtGallery.link'), + }), })), - */ /* !empty(artGroups) && -- cgit 1.3.0-6-gf8a5