gcg-website/layouts/schulchronik/single.html

67 lines
2.7 KiB
HTML
Raw Normal View History

2022-03-18 13:35:57 +01:00
{{ define "main" }}
{{ range .Params.topics }}
{{ partial "modal" . }}
{{ end }}
{{ if .Params.pretext.enable }}
{{ partial "modal" (dict "title" .Title "content" .Params.pretext.content) }}
{{ end }}
2023-09-23 22:40:36 +02:00
<section class="section" data-pagefind-body>
2022-03-18 13:35:57 +01:00
<div class="container">
{{ if or .Params.cantorpreisträger (where .Site.RegularPages "Title" (print "Abiturienten " .Params.Title ) ) }}
2023-07-29 13:16:25 +02:00
<div class="card-group">
{{ range where (where .Site.RegularPages "Title" .Params.Title ) "Type" "=" "cantorpreis" }}
<div class="card d-flex flex-row flex-wrap">
<a href="{{ .Permalink }}">
<img src="{{ .Params.Image | relURL }}" class="rounded-circle object-cover m-3" width="128px" height="128px">
</a>
2023-07-29 13:16:25 +02:00
<div class="flex-grow card-body min-w-0">
2023-11-21 21:16:47 +01:00
<a href="/cantorpreis"><h3 class="card-title">Cantorpreisträger</h3></a>
<a href="{{ .Permalink }}" class="h4 card-text">{{ .Params.name }}</a>
</div>
2023-01-11 11:32:19 +01:00
</div>
{{ end }}
{{ range where .Site.RegularPages "Title" (print "Abiturienten " .Params.Title ) }}
2023-07-29 13:16:25 +02:00
<div class="card d-flex flex-row flex-wrap-reverse">
<div class="flex-grow card-body min-w-0">
<a href="{{ .Permalink }}"><h3 class="card-title">{{ .Title }}</h3></a>
{{ range (getJSON "static/data/abiturdurchschnitte.json").abiturdurchschnitte }}
{{ if eq (string .jahr) $.Title }}<a href="/chronikseiten/abiturdurchschnitte" class="h4 card-text">Abiturdurchschnitt: {{ .schnitt }}</a>{{ end }}
{{ end }}
</div>
<a href="{{ .Permalink }}">
<img src="{{ .Params.Image | relURL }}" class="rounded-circle object-cover m-3" width="128px" height="128px">
</a>
2022-03-18 13:35:57 +01:00
</div>
2023-07-29 13:16:25 +02:00
{{ end }}
</div>
2023-07-29 13:16:25 +02:00
{{ end }}
<div class="kh-parent">
<div class="kh-jahr h1"
{{ if .Params.pretext.enable }}
onclick="$('{{ print `#` (md5 .Title) }}').modal('show')"
{{ end }}>
<span>{{ .Title }}</span>
</div>
{{ $topics := slice }}
{{ range .Params.topics }}
{{ $topics = $topics | append (dict "titleLength" (len .title) "topic" .) }}
2023-07-29 13:16:25 +02:00
{{ end }}
{{ range $id, $topic := sort $topics "titleLength" "desc" }}
<div class="kh h3" data-id="{{ $id }}"
{{ if not $topic.topic.superhaufen.enable }}
onclick="$('#{{ md5 $topic.topic.title }}').modal('show');"
{{ else }}
onclick="window.location = '{{ print (`/superhaufen/` | relURL ) ($topic.topic.superhaufen.link | urlize) }}';"
{{ end }}>
<span>{{ $topic.topic.title | safeHTML }}</span>
</div>
{{ end }}
</div>
2022-03-18 13:35:57 +01:00
</div>
</section>
{{ end }}