32 lines
1.0 KiB
Twig
32 lines
1.0 KiB
Twig
{# add javascript for gallery and lightbox configuration #}
|
|
$("#{{ id }}").justifiedGallery({
|
|
rowHeight: {{ rowHeight }},
|
|
margins: {{ margins }},
|
|
lastRow: "{{ lastRow }}",
|
|
captions: {{ captions }},
|
|
border: {{ border }},
|
|
{#~ use given width and height, don't load "src" attribute #}
|
|
waitThumbnailsLoad: false,
|
|
thumbnailPath: function (currentPath, width, height, image) {
|
|
{#~ don't try to reload image from "src" #}
|
|
return image.currentSrc;
|
|
},
|
|
});
|
|
|
|
GLightbox({
|
|
selector: ".glightbox-{{ id }}",
|
|
openEffect: "{{ openEffect }}",
|
|
closeEffect: "{{ closeEffect }}",
|
|
slideEffect: "{{ slideEffect }}",
|
|
closeButton: {{ closeButton }},
|
|
touchNavigation: {{ touchNavigation }},
|
|
touchFollowAxis: {{ touchFollowAxis }},
|
|
keyboardNavigation: {{ keyboardNavigation }},
|
|
closeOnOutsideClick: {{ closeOnOutsideClick }},
|
|
loop: {{ loop }},
|
|
draggable: {{ draggable }},
|
|
descPosition: "{{ descPosition }}",
|
|
moreText: "{{ descMoreText }}",
|
|
moreLength: {{ descMoreLength }},
|
|
});
|