First version, for githup; UNSTABLE, DO NOT USE!
This commit is contained in:
24
www/intern/js/gallery.js
Normal file
24
www/intern/js/gallery.js
Normal file
@@ -0,0 +1,24 @@
|
||||
jQuery(document).ready(function ($) {
|
||||
$('.justified').justifiedGallery({
|
||||
rowHeight: 250,
|
||||
margins: 5,
|
||||
lastRow: 'center',
|
||||
captions: false
|
||||
}).on('jg.complete', function () {
|
||||
$('.justified').css('opacity', 1);
|
||||
|
||||
const leftArrowSVGString = '<svg aria-hidden="true" class="pswp__icn" viewBox="0 0 100 125" width="100" height="125"><path d="M5,50L50,5l3,3L11,50l42,42l-3,3L5,50z M92,95l3-3L53,50L95,8l-3-3L47,50L92,95z"/></svg>';
|
||||
|
||||
const lightbox = new PhotoSwipeLightbox({
|
||||
arrowPrevSVG: leftArrowSVGString,
|
||||
arrowNextSVG: leftArrowSVGString,
|
||||
gallery: '.imgGallery',
|
||||
children: 'a.imgLink',
|
||||
pswpModule: PhotoSwipe,
|
||||
captionContent: (slide) => {
|
||||
return slide.data.element.dataset.pswpCaption || '';
|
||||
}
|
||||
});
|
||||
lightbox.init();
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user