« get me outta code hell

client: don't show image overlay for iamges with custom links - 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:
author(quasar) nebula <qznebula@protonmail.com>2023-07-30 21:55:22 -0300
committer(quasar) nebula <qznebula@protonmail.com>2023-07-30 21:55:22 -0300
commitc4b6524d51447c388a635c55997d1b5b28ca1ced (patch)
treeda95c9bdc3877bc91a926e2340b651be5741222a /src/content/dependencies/image.js
parentcd35aa4215bec35ee5aee112288e2562b2d7237d (diff)
client: don't show image overlay for iamges with custom links
Diffstat (limited to 'src/content/dependencies/image.js')
-rw-r--r--src/content/dependencies/image.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/content/dependencies/image.js b/src/content/dependencies/image.js
index 745dfe9..4537962 100644
--- a/src/content/dependencies/image.js
+++ b/src/content/dependencies/image.js
@@ -75,6 +75,7 @@ export default {
           : originalSrc);
 
     const willLink = typeof slots.link === 'string' || slots.link;
+    const customLink = typeof slots.link === 'string';
 
     const willReveal =
       slots.reveal &&
@@ -125,6 +126,7 @@ export default {
       width: slots.width,
       height: slots.height,
       'data-original-size': fileSize,
+      'data-no-image-preview': customLink,
     };
 
     const nonlazyHTML =