{{- .Title -}} {{ if and (ne .Params.when "") (ne .Params.when nil) }} {{ .Params.when }} {{ end }} {{ if and (ne .Params.price "") (ne .Params.price nil) }} {{ if eq .Params.price "free" }} Der Eintritt ist frei. {{ else }} Eintritt: {{ .Params.price }} {{ end }} {{ end }} {{- if .Resources.ByType "image" -}} {{- $pic := index (.Resources.ByType "image") 0 -}} {{ $thumb := "" }} {{ if eq .Content "" }} {{- $thumb = $pic.Resize "1024x" }} {{ else }} {{- $thumb = $pic.Resize "2048x" }} {{ end }} {{- end }} {{- if .Params.description -}} {{- .Params.description -}} {{- else -}} {{- .Summary -}} {{- end }} {{ if .Truncated }} {{- i18n "readmore" -}}.. {{ end }} {{- end }} {{ $adjacent_links := 2 }} {{ $max_links := (add (mul $adjacent_links 2) 1) }} {{ $lower_limit := (add $adjacent_links 1) }} {{ $upper_limit := (sub $paginator.TotalPages $adjacent_links) }} {{ if gt $paginator.TotalPages 1 }} {{ if ne $paginator.PageNumber 1 }} «« {{ end }} {{ if $paginator.HasPrev }} « {{ end }} {{ range $paginator.Pagers }} {{ $.Scratch.Set "page_number_flag" false }} {{ if gt $paginator.TotalPages $max_links }} {{ if le $paginator.PageNumber $lower_limit }} {{ if le .PageNumber $max_links }} {{ $.Scratch.Set "page_number_flag" true }} {{ end }} {{ else if ge $paginator.PageNumber $upper_limit }} {{ if gt .PageNumber (sub $paginator.TotalPages $max_links) }} {{ $.Scratch.Set "page_number_flag" true }} {{ end }} {{ else }} {{ if and ( ge .PageNumber (sub $paginator.PageNumber $adjacent_links) ) ( le .PageNumber (add $paginator.PageNumber $adjacent_links) ) }} {{ $.Scratch.Set "page_number_flag" true }} {{ end }} {{ end }} {{ else }} {{ $.Scratch.Set "page_number_flag" true }} {{ end }} {{ if eq ($.Scratch.Get "page_number_flag") true }} {{ .PageNumber }} {{ end }} {{ end }} {{ if $paginator.HasNext }} » {{ end }} {{ if ne $paginator.PageNumber $paginator.TotalPages }} »» {{ end }} {{ end }} {{ end }} {{ define "sidebar" }} {{- partial "sidebar" . }} {{ end }}