|
30 | 30 |
|
31 | 31 | {{ $showExif := .Get "showExif" | default (.Site.Params.galleryShowExif | default false) }} |
32 | 32 |
|
| 33 | +{{ $swipeboxParameters := .Get "swipeboxParameters" | default (.Site.Params.gallerySwipeboxParameters | default "") }} |
| 34 | + |
33 | 35 | {{ $justifiedGalleryParameters := .Get "justifiedGalleryParameters" | default (.Site.Params.galleryJustifiedGalleryParameters | default "") }} |
34 | 36 |
|
35 | 37 | {{ $previewType := .Get "previewType" | default (.Site.Params.galleryPreviewType | default "blur") }} |
|
228 | 230 |
|
229 | 231 | swipeboxInstance = $('.galleryImg').swipebox( |
230 | 232 | $.extend({}, |
231 | | - { {{ $justifiedGalleryParameters | safeJS }} } |
| 233 | + { {{ $swipeboxParameters | safeJS }} } |
232 | 234 | ) |
233 | 235 | ); |
234 | 236 | }); |
235 | 237 |
|
236 | 238 | // initialize the justified gallery |
237 | | - gallery.justifiedGallery({ |
238 | | - rowHeight : {{ $rowHeight }}, |
239 | | - margins : {{ $margins }}, |
240 | | - border : 0, |
241 | | - randomize : {{ $randomize }}, |
242 | | - waitThumbnailsLoad : false, |
243 | | - lastRow : {{ $lastRowJustification }}, |
244 | | - captions : false, |
245 | | - // if there is at least one filter option |
246 | | - {{ if not (eq $filterOptions "[]") }} |
247 | | - // we first show no images at all |
248 | | - // till the code way below selects a filter and applies it |
249 | | - // this prevent creating the layout twice |
250 | | - filter : () => false |
251 | | - {{ end }} |
252 | | - }); |
| 239 | + gallery.justifiedGallery($.extend( |
| 240 | + { |
| 241 | + rowHeight : {{ $rowHeight }}, |
| 242 | + margins : {{ $margins }}, |
| 243 | + border : 0, |
| 244 | + randomize : {{ $randomize }}, |
| 245 | + waitThumbnailsLoad : false, |
| 246 | + lastRow : {{ $lastRowJustification }}, |
| 247 | + captions : false, |
| 248 | + // if there is at least one filter option |
| 249 | + {{ if not (eq $filterOptions "[]") }} |
| 250 | + // we first show no images at all |
| 251 | + // till the code way below selects a filter and applies it |
| 252 | + // this prevent creating the layout twice |
| 253 | + filter : () => false |
| 254 | + {{ end }} |
| 255 | + }, |
| 256 | + { {{ $justifiedGalleryParameters | safeJS }} } |
| 257 | + )); |
253 | 258 |
|
254 | 259 | // only include JS code for filter options if there at least one filter option |
255 | 260 | {{ if not (eq $filterOptions "[]") }} |
|
0 commit comments