{{ $photos := . }} {{ $size := len $photos }} {{ $scratch := newScratch }} {{ range $index, $photo := $photos }} {{ if $photo.Exif }} {{ $orientation := index $photo.Exif.Tags "Orientation" }} {{ if eq $orientation 6 }} {{ $scratch.Set "image_rotation" "r270" }} {{ else if eq $orientation 8 }} {{ $scratch.Set "image_rotation" "r90" }} {{ else if eq $orientation 3 }} {{ $scratch.Set "image_rotation" "r180" }} {{ else }} {{ $scratch.Set "image_rotation" "" }} {{ end }} {{ else }} {{ $scratch.Set "image_rotation" "" }} {{ end }} {{ $tint := $photo.Fill "1x1 Box png" }} {{ $thumbnail := $photo.Fit (print "800x800 Lanczos q80 " ($scratch.Get "image_rotation")) }} {{ $large := $photo.Fit (print "2048x2048 Lanczos q85 " ($scratch.Get "image_rotation")) }}
  • {{ i18n "open" }} Close {{ if $index }} {{ $previous_photo := (index $photos (sub $index 1)) }} {{ end }} {{ if lt $index (sub $size 1) }} {{ $next_photo := (index $photos (add $index 1)) }} {{ end }}
  • {{ end }}