diff options
| author | (quasar) nebula <qznebula@protonmail.com> | 2025-03-31 17:44:50 -0300 |
|---|---|---|
| committer | (quasar) nebula <qznebula@protonmail.com> | 2025-04-10 16:02:36 -0300 |
| commit | 963c84f1bb9fd88cc0873dd6da77da1896c6b5ea (patch) | |
| tree | 7b6da9b5e2ec6c4d7ca2bc495bc8b7d314da8851 /src/content/dependencies/generateAlbumArtInfoBox.js | |
| parent | 05c3b2ad399081cac88c8ac7fddf233c01d79e98 (diff) | |
content, css: generateAlbumArtInfoBox
Diffstat (limited to 'src/content/dependencies/generateAlbumArtInfoBox.js')
| -rw-r--r-- | src/content/dependencies/generateAlbumArtInfoBox.js | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/src/content/dependencies/generateAlbumArtInfoBox.js b/src/content/dependencies/generateAlbumArtInfoBox.js new file mode 100644 index 00000000..f0bfd1b6 --- /dev/null +++ b/src/content/dependencies/generateAlbumArtInfoBox.js @@ -0,0 +1,35 @@ +export default { + contentDependencies: ['generateReleaseInfoContributionsLine'], + extraDependencies: ['html', 'language'], + + relations: (relation, album) => ({ + wallpaperArtistContributionsLine: + relation('generateReleaseInfoContributionsLine', + album.wallpaperArtistContribs), + + bannerArtistContributionsLine: + relation('generateReleaseInfoContributionsLine', + album.bannerArtistContribs), + }), + + generate: (relations, {html, language}) => + language.encapsulate('releaseInfo', capsule => + html.tag('div', {class: 'album-art-info'}, + {[html.onlyIfContent]: true}, + + html.tag('p', + {[html.onlyIfContent]: true}, + {[html.joinChildren]: html.tag('br')}, + + [ + relations.wallpaperArtistContributionsLine.slots({ + stringKey: capsule + '.wallpaperArtBy', + chronologyKind: 'wallpaperArt', + }), + + relations.bannerArtistContributionsLine.slots({ + stringKey: capsule + '.bannerArtBy', + chronologyKind: 'bannerArt', + }), + ]))), +}; |