diff options
author | (quasar) nebula <qznebula@protonmail.com> | 2023-04-15 12:22:48 -0300 |
---|---|---|
committer | (quasar) nebula <qznebula@protonmail.com> | 2023-04-15 12:24:22 -0300 |
commit | 6b35077eb1542eaf9a89534d6920c35fee86cc04 (patch) | |
tree | 3ff4e6bb1860b67b9b2a4f2e39cdcd76cbeaa4b9 /src/content/dependencies/generateTrackInfoPageContent.js | |
parent | 3a5b49cf3a10702c0dae1190c9baabd8a2c2ef3b (diff) |
content: generateAlbumSidebar + misc fixes
This restores the CSS for sticky sidebars, but removes the specific lines applying that effect (for the album sidebar). There's also an experimental new splitter for the joined group info box but we might go back on that or do something different. No tests for the new stuff here yet!
Diffstat (limited to 'src/content/dependencies/generateTrackInfoPageContent.js')
-rw-r--r-- | src/content/dependencies/generateTrackInfoPageContent.js | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/src/content/dependencies/generateTrackInfoPageContent.js b/src/content/dependencies/generateTrackInfoPageContent.js index 0ebb4121..3f37a0c9 100644 --- a/src/content/dependencies/generateTrackInfoPageContent.js +++ b/src/content/dependencies/generateTrackInfoPageContent.js @@ -33,6 +33,10 @@ export default { } else if (album.hasCoverArt) { relations.cover = relation('generateCoverArtwork', album.artTags); + relations.coverArtistLinks = null; + } else { + relations.cover = null; + relations.coverArtistLinks = null; } relations.artistLinks = @@ -95,6 +99,15 @@ export default { }) { const content = {}; + const formatContributions = contributionLinks => + language.formatConjunctionList( + contributionLinks.map(link => + link + .slots({ + showContribution: true, + showIcons: true, + }))); + if (data.hasUniqueCoverArt) { content.cover = relations.cover .slots({ @@ -114,6 +127,8 @@ export default { data.coverArtFileExtension, ], }); + } else { + content.cover = null; } content.main = { @@ -125,10 +140,14 @@ export default { [html.joinChildren]: html.tag('br'), }, [ !empty(relations.artistLinks) && - language.$('releaseInfo.by', {artists: relations.artistLinks}), + language.$('releaseInfo.by', { + artists: formatContributions(relations.artistLinks), + }), !empty(relations.coverArtistLinks) && - language.$('releaseInfo.coverArtBy', {artists: relations.coverArtistLinks}), + language.$('releaseInfo.coverArtBy', { + artists: formatContributions(relations.coverArtistLinks), + }), data.date && language.$('releaseInfo.released', { |