diff options
| author | Eltrac <hi@guhub.cn> | 2025-09-17 22:09:54 +0800 |
|---|---|---|
| committer | Eltrac <hi@guhub.cn> | 2025-09-17 22:09:54 +0800 |
| commit | f2fb7db4638dc4cb030da05a992962831f8d6f25 (patch) | |
| tree | ab09a47940fdede765bdd496bdb487621802a1f0 /layouts/_partials/scripts/libra-js.html | |
| parent | dc04dda81150c7a1841efdb51e4ec5c87520b189 (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.
Former-commit-id: 418aa1702a718b08c415d98b751563c5b2580bb1
Diffstat (limited to 'layouts/_partials/scripts/libra-js.html')
| -rw-r--r-- | layouts/_partials/scripts/libra-js.html | 4 |
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> |
