37 lines
974 B
JavaScript
37 lines
974 B
JavaScript
|
$(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,
|
||
|
})
|
||
|
})
|
||
|
})
|