summaryrefslogtreecommitdiffstats
path: root/baguette/baguetteLoad.js
diff options
context:
space:
mode:
authordanix <danix@danix.xyz>2020-10-20 14:14:36 +0200
committerdanix <danix@danix.xyz>2020-10-20 14:14:36 +0200
commit2f370882455238578d210f1189dd10cc357c06e4 (patch)
tree7959fe0eddcf059294ff4d1f9254c432307eede1 /baguette/baguetteLoad.js
parent9afa258735262dea2104b6391afceb2b84eb6059 (diff)
downloaddanixland-site-plugin-2f370882455238578d210f1189dd10cc357c06e4.tar.gz
danixland-site-plugin-2f370882455238578d210f1189dd10cc357c06e4.zip
Added baguette.js to display a lightbox for images and galleriesrelease_20102020-1415
nuovo file: baguette/baguetteBox.min.css nuovo file: baguette/baguetteBox.min.js nuovo file: baguette/baguetteLoad.js modificato: danixland-site-plugin.php
Diffstat (limited to 'baguette/baguetteLoad.js')
-rw-r--r--baguette/baguetteLoad.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/baguette/baguetteLoad.js b/baguette/baguetteLoad.js
new file mode 100644
index 0000000..a7178eb
--- /dev/null
+++ b/baguette/baguetteLoad.js
@@ -0,0 +1,10 @@
+window.addEventListener("load", function() {
+ var options = {
+ captions : function(t) {
+ var e=t.parentElement.getElementsByTagName("figcaption")[0];
+ return!!e&&e.textContent
+ }
+ };
+ baguetteBox.run( ".wp-block-gallery", options);
+ baguetteBox.run( ".wp-block-image", options);
+}); \ No newline at end of file