2022-09-28 12:11:14 +00:00
|
|
|
{{ define "main" }}
|
|
|
|
<main>
|
|
|
|
<section class='entries'>
|
|
|
|
|
|
|
|
{{ $now := (now.Format "060102" ) }}
|
2022-09-29 14:03:36 +00:00
|
|
|
|
|
|
|
{{ $upcoming := slice }}
|
|
|
|
{{ $past := slice}}
|
|
|
|
|
|
|
|
{{ range .Pages }}
|
2022-09-28 12:11:14 +00:00
|
|
|
{{ $t := (substr .Params.event_end 2 8) }}
|
|
|
|
{{ $time := ( replace $t "-" "") }}
|
|
|
|
{{ if ge $time $now }}
|
2022-09-29 14:03:36 +00:00
|
|
|
{{ $upcoming = $upcoming | append . }}
|
|
|
|
{{ else if gt $now $time }}
|
|
|
|
{{ $past = $past | append . }}
|
2022-09-28 12:11:14 +00:00
|
|
|
{{ end }}
|
|
|
|
{{ end }}
|
2022-09-29 14:03:36 +00:00
|
|
|
|
|
|
|
{{ with $upcoming }}
|
|
|
|
<div class="upcoming event-list">
|
|
|
|
<div class='tape-label'><span>upcoming events</span></div>
|
|
|
|
{{ range $upcoming}}
|
|
|
|
{{- partial "event_list_item.html" . -}}
|
|
|
|
{{end}}
|
|
|
|
</div>
|
|
|
|
{{end}}
|
|
|
|
{{ with $past }}
|
2022-09-28 12:11:14 +00:00
|
|
|
<div class="past event-list">
|
|
|
|
<div class='tape-label'><span>past events</span></div>
|
2022-09-29 14:03:36 +00:00
|
|
|
{{ range $past }}
|
|
|
|
{{- partial "event_list_item.html" . -}}
|
2022-09-28 12:11:14 +00:00
|
|
|
{{ end }}
|
|
|
|
</div>
|
2022-09-29 14:03:36 +00:00
|
|
|
{{ end }}
|
2022-09-28 12:11:14 +00:00
|
|
|
|
|
|
|
</section>
|
|
|
|
</main>
|
|
|
|
{{ end }}
|