Touren des Jahres {{ .Title }}!
{{ partial "statistic-summary.html" ( dict "total_nr" $total_nr_of_tours "distance" $total_distance "ascent" $total_ascent ) }}{{ define "main" }}
{{ $pages := .Pages }}
{{ $year := .Title}}
{{ $all_pages := where .Site.RegularPages "Type" "in" (slice "posts") }}
{{ $all_pages = sort $all_pages "Date" }}
{{ $previous_year := "" }}
{{ $next_year := "" }}
{{ range $all_pages }}
{{ if lt (dateFormat "2006" .Params.Date) $year }}
{{ $previous_year = dateFormat "2006" .Params.Date }}
{{ end }}
{{ end }}
{{ range ( sort $all_pages "Date" "desc" ) }}
{{ if gt (dateFormat "2006" .Params.Date) $year }}
{{ $next_year = dateFormat "2006" .Params.Date }}
{{ end }}
{{ end }}
{{ partial "navigation-bar.html" ( dict "context" . "items" (slice "years" ) )}}
{{ $next := printf "../%s" $next_year }}
{{ $previous := printf "../%s" $previous_year }}
Touren des Jahres {{ .Title }}!