{{ define "main" }}
{{ if or .Params.cantorpreisträger (where (where .Site.RegularPages "Title" (print "Abiturienten " .Params.Title ) ) "Type" "=" "abiturienten") }}
{{ range where (where .Site.RegularPages "Title" .Params.Title ) "Type" "=" "cantorpreis" }} {{ end }} {{ range where (where .Site.RegularPages "Title" (print "Abiturienten " .Params.Title ) ) "Type" "=" "abiturienten" }}

{{ .Title }}

{{ $abiturdurchschnitte := getJSON "static/data/abiturdurchschnitte.json" }} {{ range $abiturdurchschnitte.abiturdurchschnitte }} {{ if eq (string (index . "jahr")) $.Title }}

Abiturdurchschnitt: {{ .schnitt }}

{{ end }} {{ end }}
{{ end }} {{ end }} {{ range .Params.topics }} {{ partial "modal" . }} {{ end }} {{ if and .Params.pretext (ne .Params.pretext "\n\n\n") }} {{ partial "modal" (dict "title" .Title "content" .Params.pretext) }} {{ end }}
{{ $topics := slice }} {{ if .Params.pretext }} {{ $topics = $topics | append (dict "Title" .Params.Title "Size" (int 200) "ID" (md5 .Title)) }} {{ else }} {{ $topics = $topics | append (dict "Title" .Params.Title "Size" (int 200)) }} {{ end }} {{ range .Params.topics }} {{ if .superhaufen.enable }} {{ $topics = $topics | append (dict "Title" .title "Size" 30 "ID" (.superhaufen.link | urlize) "Superhaufen" true ) }} {{ else }} {{ $topics = $topics | append (dict "Title" .title "Size" 30 "ID" (md5 .title)) }} {{ end }} {{ end }} {{ .Content }}
{{ end }}