diff options
author | (quasar) nebula <qznebula@protonmail.com> | 2023-06-14 12:45:17 -0300 |
---|---|---|
committer | (quasar) nebula <qznebula@protonmail.com> | 2023-06-14 12:45:17 -0300 |
commit | 13c449ccbee3b8cf87ffd8ab546565d5b2f970b7 (patch) | |
tree | 01ffa8e00a137b7c4428b05c29f28b272d8b58d0 | |
parent | 3657d69aeb50092f210943a3a00ff147ec48c633 (diff) |
content: generateCoverArtwork: displayMode -> mode
-rw-r--r-- | src/content/dependencies/generateCoverArtwork.js | 4 | ||||
-rw-r--r-- | src/content/dependencies/generateStickyHeadingContainer.js | 2 | ||||
-rw-r--r-- | test/snapshot/generateAlbumCoverArtwork.js | 4 | ||||
-rw-r--r-- | test/snapshot/generateCoverArtwork.js | 4 | ||||
-rw-r--r-- | test/snapshot/generateTrackCoverArtwork.js | 8 |
5 files changed, 11 insertions, 11 deletions
diff --git a/src/content/dependencies/generateCoverArtwork.js b/src/content/dependencies/generateCoverArtwork.js index e9c91cf7..503bd120 100644 --- a/src/content/dependencies/generateCoverArtwork.js +++ b/src/content/dependencies/generateCoverArtwork.js @@ -31,14 +31,14 @@ export default { type: 'string', }, - displayMode: { + mode: { validate: v => v.is('primary', 'thumbnail'), default: 'primary', }, }, generate(relations, slots, {html, language}) { - switch (slots.displayMode) { + switch (slots.mode) { case 'primary': return html.tag('div', {id: 'cover-art-container'}, [ relations.image diff --git a/src/content/dependencies/generateStickyHeadingContainer.js b/src/content/dependencies/generateStickyHeadingContainer.js index e5f7cc5d..5ea10765 100644 --- a/src/content/dependencies/generateStickyHeadingContainer.js +++ b/src/content/dependencies/generateStickyHeadingContainer.js @@ -23,7 +23,7 @@ export default { hasCover && html.tag('div', {class: 'content-sticky-heading-cover-container'}, html.tag('div', {class: 'content-sticky-heading-cover'}, - slots.cover.slot('displayMode', 'thumbnail'))), + slots.cover.slot('mode', 'thumbnail'))), ]), html.tag('div', {class: 'content-sticky-subheading-row'}, diff --git a/test/snapshot/generateAlbumCoverArtwork.js b/test/snapshot/generateAlbumCoverArtwork.js index 015838c7..150b12bc 100644 --- a/test/snapshot/generateAlbumCoverArtwork.js +++ b/test/snapshot/generateAlbumCoverArtwork.js @@ -22,14 +22,14 @@ testContentFunctions(t, 'generateAlbumCoverArtwork (snapshot)', async (t, evalua evaluate.snapshot('display: primary', { name: 'generateAlbumCoverArtwork', args: [album], - slots: {displayMode: 'primary'}, + slots: {mode: 'primary'}, extraDependencies, }); evaluate.snapshot('display: thumbnail', { name: 'generateAlbumCoverArtwork', args: [album], - slots: {displayMode: 'thumbnail'}, + slots: {mode: 'thumbnail'}, extraDependencies, }); }); diff --git a/test/snapshot/generateCoverArtwork.js b/test/snapshot/generateCoverArtwork.js index 7c56f04d..025a6d0d 100644 --- a/test/snapshot/generateCoverArtwork.js +++ b/test/snapshot/generateCoverArtwork.js @@ -20,14 +20,14 @@ testContentFunctions(t, 'generateCoverArtwork (snapshot)', async (t, evaluate) = evaluate.snapshot('display: primary', { name: 'generateCoverArtwork', args: [artTags], - slots: {path, displayMode: 'primary'}, + slots: {path, mode: 'primary'}, extraDependencies, }); evaluate.snapshot('display: thumbnail', { name: 'generateCoverArtwork', args: [artTags], - slots: {path, displayMode: 'thumbnail'}, + slots: {path, mode: 'thumbnail'}, extraDependencies, }); }); diff --git a/test/snapshot/generateTrackCoverArtwork.js b/test/snapshot/generateTrackCoverArtwork.js index 88ff75dd..bfefb5fb 100644 --- a/test/snapshot/generateTrackCoverArtwork.js +++ b/test/snapshot/generateTrackCoverArtwork.js @@ -36,28 +36,28 @@ testContentFunctions(t, 'generateTrackCoverArtwork (snapshot)', async (t, evalua evaluate.snapshot('display: primary - unique art', { name: 'generateTrackCoverArtwork', args: [track1], - slots: {displayMode: 'primary'}, + slots: {mode: 'primary'}, extraDependencies, }); evaluate.snapshot('display: thumbnail - unique art', { name: 'generateTrackCoverArtwork', args: [track1], - slots: {displayMode: 'thumbnail'}, + slots: {mode: 'thumbnail'}, extraDependencies, }); evaluate.snapshot('display: primary - no unique art', { name: 'generateTrackCoverArtwork', args: [track2], - slots: {displayMode: 'primary'}, + slots: {mode: 'primary'}, extraDependencies, }); evaluate.snapshot('display: thumbnail - no unique art', { name: 'generateTrackCoverArtwork', args: [track2], - slots: {displayMode: 'thumbnail'}, + slots: {mode: 'thumbnail'}, extraDependencies, }); }); |