lumbung.space/themes/lumbung-theme/layouts/events/list.html

29 lines
1002 B
HTML

{{ define "main" }}
<main>
<section class='entries'>
{{ $now := (now.Format "060102" ) }}
<div class="upcoming event-list">
<div class='tape-label'><span>upcoming events</span></div>
{{ range .Pages }}
{{ $t := (substr .Params.event_end 2 8) }}
{{ $time := ( replace $t "-" "") }}
{{ if ge $time $now }}
{{- partial "event_list_item.html" . -}}
{{ end }}
{{ end }}
</div>
<div class="past event-list">
<div class='tape-label'><span>past events</span></div>
{{ range .Pages }}
{{ $t := (substr .Params.event_end 2 8) }}
{{ $time := ( replace $t "-" "") }}
{{ if gt $now $time }}
{{- partial "event_list_item.html" . -}}
{{ end }}
{{ end }}
</div>
</section>
</main>
{{ end }}