summaryrefslogtreecommitdiff
path: root/layouts/_partials/scripts
diff options
context:
space:
mode:
authorEltrac <hi@guhub.cn>2025-09-17 22:09:54 +0800
committerEltrac <hi@guhub.cn>2025-09-17 22:09:54 +0800
commit418aa1702a718b08c415d98b751563c5b2580bb1 (patch)
tree979a1056e2c03eb2fcfdc0f16936afd47be0a480 /layouts/_partials/scripts
parentb81ee0578fc2d461fa48cec00de79c33e3bee4e9 (diff)
fix: lightbox shifts horizontally
For unknown reasons, the lightbox (powered by Libra.js) shifts a little downwards on the y axis. The temporary solution is to leverage new features of Libra.js to add an offset to the lightbox.
Diffstat (limited to 'layouts/_partials/scripts')
-rw-r--r--layouts/_partials/scripts/libra-js.html4
1 files changed, 1 insertions, 3 deletions
diff --git a/layouts/_partials/scripts/libra-js.html b/layouts/_partials/scripts/libra-js.html
index 7a7fe428..07e0c0e6 100644
--- a/layouts/_partials/scripts/libra-js.html
+++ b/layouts/_partials/scripts/libra-js.html
@@ -1,6 +1,4 @@
<script type="module">
import LightBox from '/js/libra.min.js';
- const lightbox = new LightBox({
- selector: 'img[data-libra]'
- });
+ const lightbox = new LightBox({ offset: { y: -80 } });
</script>