« get me outta code hell

hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/content/dependencies/generateCoverArtwork.js4
-rw-r--r--src/content/dependencies/generateStickyHeadingContainer.js2
-rw-r--r--test/snapshot/generateAlbumCoverArtwork.js4
-rw-r--r--test/snapshot/generateCoverArtwork.js4
-rw-r--r--test/snapshot/generateTrackCoverArtwork.js8
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,
   });
 });