gallery/assets/js/gallery.js

37 lines
974 B
JavaScript
Raw Permalink Normal View History

$(function(){
$.get('./index.json', function(data) {
var items = $.map(data.images, function(img) {
return {
src: img.url,
srct: img.thumbnail,
height: img.height,
width: img.width,
}
});
$('#gallery').nanogallery2({
thumbnailHeight: 200,
thumbnailWidth: 'auto',
thumbnailGutterWidth: 10,
thumbnailGutterHeight: 10,
thumbnailDisplayTransition: 'scaleUp',
thumbnailDisplayTransitionDuration: 700,
thumbnailHoverEffect2: 'toolsAppear|scale120|borderLighter',
// thumbnailToolbarImage: {
// topLeft: 'share|download',
// },
viewerGallery: 'bottom',
viewerTools: {
topRight: 'zoomButton, fullscreenButton, downloadButton, closeButton',
},
items,
})
})
})