{{ partial "header.html" . }}
{{ partial "navigation.html" . }}

{{ .Title }}

{{ $img := newScratch }} {{ $folder := (print "/content/" .File.Dir "gallery/") }} {{ $files := readDir $folder }} {{ $img.Set "max" 0 }} {{ range sort $files "Name" "asc" }} {{ if not .IsDir }} {{ if not (in .Name "thumb") }} {{ $img.Add "list" (slice .Name) }} {{ $img.Set "max" (add ($img.Get "max") 1) }} {{ end }} {{ end }} {{ end }} {{ range $index, $val := $img.Get "list" }} {{ $curr := index (split $val ".") 0 }} {{ $prec := mod (add (sub $index 1) ($img.Get "max")) ($img.Get "max") }} {{ $next := mod (add $index 1) ($img.Get "max") }} {{ end }}
{{ .Content }}
{{ partial "article-footer.html" . }}