summaryrefslogtreecommitdiff
path: root/layouts/_partials/scripts
diff options
context:
space:
mode:
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>