diff options
Diffstat (limited to 'src/content/dependencies/generateCoverArtwork.js')
-rw-r--r-- | src/content/dependencies/generateCoverArtwork.js | 33 |
1 files changed, 19 insertions, 14 deletions
diff --git a/src/content/dependencies/generateCoverArtwork.js b/src/content/dependencies/generateCoverArtwork.js index 50089f69..27133b9d 100644 --- a/src/content/dependencies/generateCoverArtwork.js +++ b/src/content/dependencies/generateCoverArtwork.js @@ -34,25 +34,31 @@ export default { ? {square: true} : {dimensions: slots.dimensions}); - return html.tags([ - (slots.mode === 'primary' - ? slots.image.slots({ + switch (slots.mode) { + case 'primary': + return html.tags([ + slots.image.slots({ thumb: 'medium', reveal: true, link: true, ...sizeSlots, - }) + }), - : slots.mode === 'thumbnail' - ? slots.image.slots({ + slots.details, + ]); + + case 'thumbnail': + return ( + slots.image.slots({ thumb: 'small', reveal: false, link: false, ...sizeSlots, - }) + })); - : slots.mode === 'commentary' - ? slots.image.slots({ + case 'commentary': + return ( + slots.image.slots({ thumb: 'medium', reveal: true, link: true, @@ -61,11 +67,10 @@ export default { attributes: {class: 'commentary-art'}, - }) - - : html.blank()), + })); - html.tags([slots.details], {[html.onlyIfSiblings]: true}), - ]); + default: + return html.blank(); + } }, }; |