{{ if eq ($.Scratch.Get "Path_Files_exist") "true" }}
{{- if eq .Page.BundleType "leaf" -}}
{{- $.Scratch.Set "tempXX" (strings.TrimLeft "/" ($.Scratch.Get "RelPathIs")) -}}
{{- $.Scratch.Add "tempXX" "/**.jpg" -}}
{{- $image := .Page.Resources.Match ($.Scratch.Get "tempXX") -}}
{{- with $image -}}
{{- range $image -}}
{{- with .Exif -}}
{{ with .Date }}- Date: {{ .Format "January 02, 2006" }}
{{ end }}
{{ with .Tags.ApertureValue }}- Aperture: {{ lang.FormatNumber 2 . }}
{{ end }}
{{ with .Tags.BrightnessValue }}- Brightness: {{ lang.FormatNumber 2 . }}
{{ end }}
{{ with .Tags.ExposureTime }}- Exposure Time: {{ . }}
{{ end }}
{{ with .Tags.FNumber }}- F Number: {{ . }}
{{ end }}
{{ with .Tags.FocalLength }}- Focal Length: {{ . }}
{{ end }}
{{ with .Tags.ISOSpeedRatings }}- ISO Speed Ratings: {{ . }}
{{ end }}
{{ with .Tags.LensModel }}- Lens Model: {{ . }}
{{ end }}
{{- end -}}
{{- end -}}
{{- end -}}
{{- else -}}
{{- $files := readDir ($.Scratch.Get "Path_Files") -}}
{{- range $files -}}
{{- if or (eq (path.Ext .Name) ".png") (eq (path.Ext .Name) ".jpg") (eq (path.Ext .Name) ".jpeg") }}
{{- end -}}
{{- end -}}
{{- end -}}
{{- end -}}
{{ "" }}
{{ "" }}