{{/* When the page contains images.
Note: will NOT work for default markdown images since we cannot add a scratch for them... not allowed in a goldmark context. */}}
{{/* Hugo server does not take scratch properly into account. */}}
{{ if or (.Scratch.Get "hasImages") $.Site.IsServer }}
{{ $thirdPartyLazysizesJS := resources.Get "js/thirdParty/lazysizes.min.js" }}
{{ $thirdPartyPhotoSwipeJS := resources.Get "js/thirdParty/photoswipe.js" }}
{{ $thirdPartyPhotoSwipeUIJS := resources.Get "js/thirdParty/photoswipe-ui-default.js" }}
{{ $gliderJS := resources.Get "js/thirdParty/glider.min.js" }}
{{ $imageSliderJS := resources.Get "js/content/image-slider.js" }}
{{ $imageGalleryJS := resources.Get "js/content/image-gallery.js" }}
{{ $imageModalJS := resources.Get "js/content/image-modal.js" }}
{{ if $.Site.IsServer }}
{{ else }}
{{ with slice $thirdPartyLazysizesJS $thirdPartyPhotoSwipeJS $thirdPartyPhotoSwipeUIJS $gliderJS $imageSliderJS $imageGalleryJS $imageModalJS | resources.Concat "js/images.js" | minify | fingerprint }}
{{ end }}
{{ end }}