diff options
| author | eltrac <hi@eltr.ac> | 2026-03-13 22:52:22 +0800 |
|---|---|---|
| committer | eltrac <hi@eltr.ac> | 2026-03-13 22:53:36 +0800 |
| commit | fcb8469c43350e9b9cfafe498969f0162220be5c (patch) | |
| tree | e36e0f34bec422d36ef47c599c290bf2aff8f957 /layouts/_partials | |
| parent | 71f4f14863bea9aaed6d5f8eac32a8cb22b76956 (diff) | |
feat: add option to disable libra.js on certain images
Diffstat (limited to 'layouts/_partials')
| -rw-r--r-- | layouts/_partials/scripts.html | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/layouts/_partials/scripts.html b/layouts/_partials/scripts.html index 8e65c873..158ac812 100644 --- a/layouts/_partials/scripts.html +++ b/layouts/_partials/scripts.html @@ -30,7 +30,10 @@ document.addEventListener("DOMContentLoaded", () => { <script type="module"> document.addEventListener('DOMContentLoaded', async () => { const { default: LightBox } = await import('/js/libra.min.js'); - const lightbox = new LightBox({ offset: { x: -8, y: -80 } }); + const lightbox = new LightBox({ + offset: { x: -8, y: -80 }, + selector: "[data-libra]:not(.disable-libra *)", + }); }); </script> |
