summaryrefslogtreecommitdiff
path: root/layouts/_partials
diff options
context:
space:
mode:
authorEltrac <hi@guhub.cn>2025-09-15 17:51:59 +0800
committerEltrac <hi@guhub.cn>2025-09-15 17:51:59 +0800
commit1bf6de58ab13fc385a24467c84b9047bddea24da (patch)
tree59807122f56103a6566a5cb75fde8d6426e2fcb2 /layouts/_partials
parentb792bbf06fd202aea6e42fd6310e3cd670532c1e (diff)
refactor: replace fancybox with libra
Diffstat (limited to 'layouts/_partials')
-rw-r--r--layouts/_partials/scripts.html2
-rw-r--r--layouts/_partials/scripts/fancybox-js.html10
-rw-r--r--layouts/_partials/scripts/libra-js.html6
3 files changed, 7 insertions, 11 deletions
diff --git a/layouts/_partials/scripts.html b/layouts/_partials/scripts.html
index 414b4216..2b84ea3c 100644
--- a/layouts/_partials/scripts.html
+++ b/layouts/_partials/scripts.html
@@ -12,7 +12,7 @@
{{ partial "scripts/toc-js" . }}
{{ partial "scripts/littlefoot-js" . }}
-{{ partial "scripts/fancybox-js" . }}
+{{ partial "scripts/libra-js" . }}
{{ partial "scripts/aplayer-js" . }}
{{ if .File }}
diff --git a/layouts/_partials/scripts/fancybox-js.html b/layouts/_partials/scripts/fancybox-js.html
deleted file mode 100644
index d810dd29..00000000
--- a/layouts/_partials/scripts/fancybox-js.html
+++ /dev/null
@@ -1,10 +0,0 @@
-<script src="/js/fancybox.umd.js"></script>
-<script>
-Fancybox.bind("[data-fancybox]", {
- on: {
- close: () => {
- umami.track('🖼️ Fancybox Closed');
- },
- },
-});
-</script>
diff --git a/layouts/_partials/scripts/libra-js.html b/layouts/_partials/scripts/libra-js.html
new file mode 100644
index 00000000..96a11bbb
--- /dev/null
+++ b/layouts/_partials/scripts/libra-js.html
@@ -0,0 +1,6 @@
+<script type="module">
+ import LightBox from '/js/libra.min.js';
+ const lightbox = new LightBox({
+ container: 'article'
+ });
+</script>