{{ .Page.Scratch.Add "hasImages" "true" }} {{- $width := .Get "width" -}} {{- $height := .Get "height" -}} {{/* First image */}} {{- $img := .Get "src1" -}} {{- $isRemote := strings.HasPrefix $img "http" -}} {{- $originalImg := "" -}} {{- $isResized := false -}} {{- if not $isRemote -}} {{- $img = .Page.Resources.GetMatch $img -}} {{- if and (not $img) .Page.File -}} {{ $path := path.Join .Page.File.Dir $img }} {{- $img = resources.Get $path -}} {{- end -}} {{- $originalImg = $img -}} {{- if or $width $height }} {{- $isResized = true -}} {{- if and $width $height -}} {{- $img = ($img.Resize (print $width "x" $height)).RelPermalink -}} {{- else if $width -}} {{- $img = ($img.Resize (print $width "x")).RelPermalink -}} {{- else if $height -}} {{- $img = ($img.Resize (print "x" $height)).RelPermalink -}} {{- end -}} {{- end -}} {{- end -}} {{/* Second image */}} {{- $img2 := .Get "src2" -}} {{- $isRemote2 := strings.HasPrefix $img2 "http" -}} {{- $originalImg2 := "" -}} {{- $isResized2 := false -}} {{- if not $isRemote2 -}} {{- $img2 = .Page.Resources.GetMatch $img2 -}} {{- if and (not $img2) .Page.File -}} {{ $path := path.Join .Page.File.Dir $img2 }} {{- $img2 = resources.Get $path -}} {{- end -}} {{- $originalImg2 = $img2 -}} {{- if or $width $height }} {{- $isResized2 = true -}} {{- if and $width $height -}} {{- $img2 = ($img2.Resize (print $width "x" $height)).RelPermalink -}} {{- else if $width -}} {{- $img2 = ($img2.Resize (print $width "x")).RelPermalink -}} {{- else if $height -}} {{- $img2 = ($img2.Resize (print "x" $height)).RelPermalink -}} {{- end -}} {{- end -}} {{- end -}}
{{- if eq "true" (default "true" (.Get "overlay")) -}}
{{ partial "inline-svg" "expand-alt" }}
{{- end -}}
{{- if or (.Get "title") (.Get "caption") -}}
{{ with (.Get "title") -}}

{{ . }}

{{- end -}} {{ with (.Get "caption") -}}

{{ . }}

{{- end -}}
{{- end -}}