diff options
author | (quasar) nebula <qznebula@protonmail.com> | 2024-11-19 15:56:40 -0400 |
---|---|---|
committer | (quasar) nebula <qznebula@protonmail.com> | 2024-11-19 16:05:41 -0400 |
commit | c31d38c4778e51fb90958c40af93519661538889 (patch) | |
tree | c9d7b42e9a26657efebb22495424c26b19848a5e /src/content/dependencies/generateAlbumCoverArtwork.js | |
parent | d746ff26c3e7517c8aaff7615ae4da06fa2d01c0 (diff) |
content, css: cover artwork reference details, non-unique art line
Diffstat (limited to 'src/content/dependencies/generateAlbumCoverArtwork.js')
-rw-r--r-- | src/content/dependencies/generateAlbumCoverArtwork.js | 41 |
1 files changed, 35 insertions, 6 deletions
diff --git a/src/content/dependencies/generateAlbumCoverArtwork.js b/src/content/dependencies/generateAlbumCoverArtwork.js index d52d57ce..1e11c0ac 100644 --- a/src/content/dependencies/generateAlbumCoverArtwork.js +++ b/src/content/dependencies/generateAlbumCoverArtwork.js @@ -3,7 +3,10 @@ export default { 'generateCoverArtwork', 'generateCoverArtworkArtTagDetails', 'generateCoverArtworkArtistDetails', + 'generateCoverArtworkReferenceDetails', 'image', + 'linkAlbumReferencedArtworks', + 'linkAlbumReferencingArtworks', ], extraDependencies: ['html', 'language'], @@ -20,6 +23,17 @@ export default { artistDetails: relation('generateCoverArtworkArtistDetails', album.coverArtistContribs), + + referenceDetails: + relation('generateCoverArtworkReferenceDetails', + album.referencedArtworks, + album.referencedByArtworks), + + referencedArtworksLink: + relation('linkAlbumReferencedArtworks', album), + + referencingArtworksLink: + relation('linkAlbumReferencingArtworks', album), }), data: (album) => ({ @@ -40,6 +54,11 @@ export default { validate: v => v.is('tags', 'artists'), default: 'tags', }, + + showReferenceLinks: { + type: 'boolean', + default: false, + }, }, generate: (data, relations, slots, {language}) => @@ -55,11 +74,21 @@ export default { dimensions: data.dimensions, - details: - (slots.details === 'tags' - ? relations.artTagDetails - : slots.details === 'artists' - ? relations.artistDetails - : null), + details: [ + slots.details === 'tags' && + relations.artTagDetails, + + slots.details === 'artists' && + relations.artistDetails, + + slots.showReferenceLinks && + relations.referenceDetails.slots({ + referencedLink: + relations.referencedArtworksLink, + + referencingLink: + relations.referencingArtworksLink, + }), + ], }), }; |