summaryrefslogtreecommitdiff
path: root/layouts/_partials/scripts/fancybox-js.html
diff options
context:
space:
mode:
authorEltrac <hi@guhub.cn>2025-07-18 18:46:45 +0800
committerEltrac <hi@guhub.cn>2025-07-18 18:46:45 +0800
commit70cfd74bcfab6a74dd9755c1946109e6576158a8 (patch)
tree83d44f5645e49d3bfc948d0aa0ecc399c4fe3cab /layouts/_partials/scripts/fancybox-js.html
parent9bea54b8d6e25b2c194e8555210fb6df16e3c851 (diff)
refactor: make partials of all embeded JavaScript code
Diffstat (limited to 'layouts/_partials/scripts/fancybox-js.html')
-rw-r--r--layouts/_partials/scripts/fancybox-js.html4
1 files changed, 4 insertions, 0 deletions
diff --git a/layouts/_partials/scripts/fancybox-js.html b/layouts/_partials/scripts/fancybox-js.html
new file mode 100644
index 00000000..c9543a01
--- /dev/null
+++ b/layouts/_partials/scripts/fancybox-js.html
@@ -0,0 +1,4 @@
+{{- if or (in .Section "posts") (in .Section "cards") (in .Section "library") (eq .Type "single") }}
+ <script src="/js/fancybox.umd.js"></script>
+ <script>Fancybox.bind("[data-fancybox]");</script>
+{{- end }}