« get me outta code hell

hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/content/dependencies/image.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/content/dependencies/image.js')
-rw-r--r--src/content/dependencies/image.js22
1 files changed, 5 insertions, 17 deletions
diff --git a/src/content/dependencies/image.js b/src/content/dependencies/image.js
index af4b7fdd..4c945a20 100644
--- a/src/content/dependencies/image.js
+++ b/src/content/dependencies/image.js
@@ -19,11 +19,6 @@ export default {
             .filter(artTag => artTag.isContentWarning)
             .map(artTag => artTag.name)
         : null),
-
-    dimensions:
-      (artwork
-        ? artwork.dimensions
-        : null),
   }),
 
   slots: {
@@ -33,7 +28,6 @@ export default {
 
     reveal: {type: 'boolean', default: true},
     lazy: {type: 'boolean', default: false},
-    square: {type: 'boolean', default: false},
 
     link: {
       validate: v => v.anyOf(v.isBoolean, v.isString),
@@ -72,15 +66,15 @@ export default {
       mutable: false,
     },
 
+    dimensions: {
+      validate: v => v.isDimensions,
+    },
+
     // These will also be used from the artwork if not specified as slots.
 
     warnings: {
       validate: v => v.looseArrayOf(v.isString),
     },
-
-    dimensions: {
-      validate: v => v.isDimensions,
-    },
   },
 
   generate(data, relations, slots, {
@@ -123,7 +117,7 @@ export default {
       (typeof slots.link === 'string' || slots.link);
 
     const warnings = slots.warnings ?? data.warnings;
-    const dimensions = slots.dimensions ?? data.dimensions;
+    const dimensions = slots.dimensions;
 
     const willReveal =
       slots.reveal &&
@@ -352,16 +346,10 @@ export default {
 
       wrapped =
         html.tag('div', {class: 'image-outer-area'},
-          slots.square &&
-            {class: 'square-content'},
-
           wrapped);
 
       wrapped =
         html.tag('div', {class: 'image-container'},
-          slots.square &&
-            {class: 'square'},
-
           typeof slots.link === 'string' &&
             {class: 'no-image-preview'},