summaryrefslogtreecommitdiff
path: root/layouts/_partials/scripts
diff options
context:
space:
mode:
authorEltrac <hi@guhub.cn>2025-10-30 18:45:58 +0800
committerEltrac <hi@guhub.cn>2025-10-30 18:45:58 +0800
commitfe52d97fa87aca7996802744f330a7a2a40dc62a (patch)
tree3a04e27e1541b09e7b6a9ba8945f3efcda6b61a6 /layouts/_partials/scripts
parent28f48522ec7313074d6c8f89c36570ad9511d3f6 (diff)
parent7818468d60baf186004b7e1c440bea91da1b3448 (diff)
Merge branch 'master' of https://github.com/BigCoke233/geek-death-project
Diffstat (limited to 'layouts/_partials/scripts')
-rw-r--r--layouts/_partials/scripts/libra-js.html6
1 files changed, 4 insertions, 2 deletions
diff --git a/layouts/_partials/scripts/libra-js.html b/layouts/_partials/scripts/libra-js.html
index 0eea3d07..95e121ed 100644
--- a/layouts/_partials/scripts/libra-js.html
+++ b/layouts/_partials/scripts/libra-js.html
@@ -1,4 +1,6 @@
<script type="module">
- import LightBox from '/js/libra.min.js';
- const lightbox = new LightBox({ offset: { x: -8 ,y: -80 } });
+document.addEventListener('DOMContentLoaded', async () => {
+ const { default: LightBox } = await import('/js/libra.min.js');
+ const lightbox = new LightBox({ offset: { x: -8, y: -80 } });
+});
</script>