New selector for buttonBox, to allow use of galleries

This commit is contained in:
Luca Beltrame 2021-02-27 01:13:24 +01:00
parent 19e86e2f50
commit 5009bf3eb4
Signed by: einar
GPG key ID: 4707F46E9EC72DEC

View file

@ -70,11 +70,15 @@
</aside>
</article>
<script src="{{ "js/baguetteBox.min.js" | relURL}}" rel="application/javascript"></script>
<script>baguetteBox.run('figure', {
captions: function(element) {
return element.getElementsByTagName('img')[0].title;
}
});</script>
<script src="{{ "js/baguetteBox.min.js" | relURL}}" rel="application/javascript" async></script>
<script>
window.addEventListener('load', function() {
baguetteBox.run('figure,.gallery', {
captions: function(element) {
return element.getElementsByTagName('img')[0].title;
}
});
});
</script>
{{ end }}