{{- /* lazysizes and lightgallery.js */ -}}
{{- $src := index . "src" -}}
{{- $small := index . "src-s" | default $src -}}
{{- $large := index . "src-l" | default $src -}}
{{- $title := index . "title" -}}
{{- $description := index . "description" -}}
{{- $context := index . "context" -}}
{{- $scratch := $context.Scratch.Get "scratch" -}}
{{- $loading := resources.Get "svg/loading.svg" | minify -}}
{{- if not (index . "src") | and (index . "src-s") -}}
{{- $loading = resources.Get "svg/loading.small.svg" | minify -}}
{{- end -}}
{{- if index . "lightgallery" -}}
{{- $scratch.Set "lightgallery" true -}}
{{- else -}}
{{- end -}}
{{- $scratch.Set "lazysizes" true -}}