{{- /* 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" -}} {{ $title | default $description }} {{- $scratch.Set "lightgallery" true -}} {{- else -}} {{ $title | default $description }} {{- end -}} {{- $scratch.Set "lazysizes" true -}}