diff options
| author | Eltrac <hi@guhub.cn> | 2025-09-15 17:51:59 +0800 |
|---|---|---|
| committer | Eltrac <hi@guhub.cn> | 2025-09-15 17:51:59 +0800 |
| commit | 1bf6de58ab13fc385a24467c84b9047bddea24da (patch) | |
| tree | 59807122f56103a6566a5cb75fde8d6426e2fcb2 /layouts/_partials/scripts | |
| parent | b792bbf06fd202aea6e42fd6310e3cd670532c1e (diff) | |
refactor: replace fancybox with libra
Diffstat (limited to 'layouts/_partials/scripts')
| -rw-r--r-- | layouts/_partials/scripts/fancybox-js.html | 10 | ||||
| -rw-r--r-- | layouts/_partials/scripts/libra-js.html | 6 |
2 files changed, 6 insertions, 10 deletions
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> |
