{{/* The following is a fallback: you may want to copy the full upstream gallery.html here for more advanced features. */}}
{{ .Inner }}
{{ $currentPage := . }} {{ $images := slice }} {{ $globalMatch := .Get "globalMatch" }} {{ $localMatch := .Get "match" }} {{ if $localMatch }} {{ $images = (.Page.Resources.Match $localMatch )}} {{ else if $globalMatch }} {{ $images = (resources.Match (.Get "globalMatch")) }} {{ else }} {{ $images = (.Page.Resources.ByType "image") }} {{ end }} {{ $filterOptions := .Get "filterOptions" | default (.Site.Params.galleryFilterOptions | default "[]") }} {{ if not $filterOptions }} {{ $filterOptions = "[]" }} {{ end }} {{ $storeSelectedFilterInUrl := .Get "storeSelectedFilterInUrl" | default (.Site.Params.storeSelectedFilterInUrl | default false) }} {{ $sortOrder := .Get "sortOrder" | default (.Site.Params.gallerySortOrder | default "asc") }} {{ $rowHeight := .Get "rowHeight" | default (.Site.Params.galleryRowHeight | default 150) }} {{ $margins := .Get "margins" | default (.Site.Params.galleryRowMargins | default 5) }} {{ $randomize := .Get "randomize" | default (.Site.Params.galleryRandomize | default false) }} {{ $thumbnailResizeOptions := .Get "thumbnailResizeOptions" | default (.Site.Params.galleryThumbnailResizeOptions | default "300x150 q85 Lanczos") }} {{ $imageResizeOptions := .Get "imageResizeOptions" | default .Site.Params.galleryImageResizeOptions }} {{ $loadJQuery := .Get "loadJQuery" | default (.Site.Params.galleryLoadJQuery | default false) }} {{ $showExif := .Get "showExif" | default (.Site.Params.galleryShowExif | default false) }} {{ $swipeboxParameters := .Get "swipeboxParameters" | default (.Site.Params.gallerySwipeboxParameters | default "") }} {{ $justifiedGalleryParameters := .Get "justifiedGalleryParameters" | default (.Site.Params.galleryJustifiedGalleryParameters | default "") }} {{ $previewType := .Get "previewType" | default (.Site.Params.galleryPreviewType | default "blur") }} {{ $embedPreview := .Get "embedPreview" | default (.Site.Params.galleryEmbedPreview | default true) }} {{ $thumbnailHoverEffect := .Get "thumbnailHoverEffect" | default (.Site.Params.galleryThumbnailHoverEffect | default "none") }} {{ $thumbnailResourceDir := printf "%s%s" (.Site.Params.resourceDir | default "resources") "/_gen/images/" }} {{ if not (.Page.Scratch.Get "galleryLoaded") }} {{ .Page.Scratch.Set "galleryLoaded" true }} {{ if not (eq $previewType "none") }} {{ end }} {{ end }} {{ $galleryId := (printf "gallery-%v-%v" .Page.File.UniqueID .Ordinal)}} {{ $galleryWrapperId := (printf "gallery-%v-%v-wrapper" .Page.File.UniqueID .Ordinal)}}