From 504b464f0904f0e008ee6e886e25c6778a99d479 Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Sun, 4 Jun 2023 12:07:32 -0300 Subject: content: generateArtistInfoPage: gallery link & jump links --- src/content/dependencies/generateArtistInfoPage.js | 70 +++++++++++----------- 1 file changed, 35 insertions(+), 35 deletions(-) (limited to 'src/content/dependencies/generateArtistInfoPage.js') diff --git a/src/content/dependencies/generateArtistInfoPage.js b/src/content/dependencies/generateArtistInfoPage.js index a624c12c..821512b8 100644 --- a/src/content/dependencies/generateArtistInfoPage.js +++ b/src/content/dependencies/generateArtistInfoPage.js @@ -385,6 +385,41 @@ export default { links: language.formatDisjunctionList(sec.visit.externalLinks), })), + sec.artworks?.artistGalleryLink && + html.tag('p', + language.$('artistPage.viewArtGallery', { + link: sec.artworks.artistGalleryLink.slots({ + content: language.$('artistPage.viewArtGallery.link'), + }), + })), + + (sec.tracks || sec.artworsk || sec.flashes || sec.commentary) && + html.tag('p', + language.$('misc.jumpTo.withLinks', { + links: language.formatUnitList( + [ + sec.tracks && + html.tag('a', + {href: '#tracks'}, + language.$('artistPage.trackList.title')), + + sec.artworks && + html.tag('a', + {href: '#art'}, + language.$('artistPage.artList.title')), + + sec.flashes && + html.tag('a', + {href: '#flashes'}, + language.$('artistPage.flashList.title')), + + sec.commentary && + html.tag('a', + {href: '#commentary'}, + language.$('artistPage.commentaryList.title')), + ].filter(Boolean)), + })), + sec.tracks && [ sec.tracks.heading .slots({ @@ -677,41 +712,6 @@ export function write(artist, {wikiData}) { headingMode: 'sticky', content: [ - hasGallery && - html.tag('p', - language.$('artistPage.viewArtGallery', { - link: link.artistGallery(artist, { - text: language.$('artistPage.viewArtGallery.link'), - }), - })), - - showJumpTo && - html.tag('p', - language.$('misc.jumpTo.withLinks', { - links: language.formatUnitList( - [ - jumpTo.tracks && - html.tag('a', - {href: '#tracks'}, - language.$('artistPage.trackList.title')), - - jumpTo.art && - html.tag('a', - {href: '#art'}, - language.$('artistPage.artList.title')), - - jumpTo.flashes && - html.tag('a', - {href: '#flashes'}, - language.$('artistPage.flashList.title')), - - jumpTo.commentary && - html.tag('a', - {href: '#commentary'}, - language.$('artistPage.commentaryList.title')), - ].filter(Boolean)), - })), - ...html.fragment( wikiInfo.enableFlashesAndGames && !empty(flashes) && [ -- cgit 1.3.0-6-gf8a5