forked from ruangrupa/lumbung.space
merge filter & frontpage redesign #1
@ -3,26 +3,36 @@
|
|||||||
<section class='entries'>
|
<section class='entries'>
|
||||||
|
|
||||||
{{ $now := (now.Format "060102" ) }}
|
{{ $now := (now.Format "060102" ) }}
|
||||||
<div class="upcoming event-list">
|
|
||||||
<div class='tape-label'><span>upcoming events</span></div>
|
{{ $upcoming := slice }}
|
||||||
{{ range .Pages }}
|
{{ $past := slice}}
|
||||||
|
|
||||||
|
{{ range .Pages }}
|
||||||
{{ $t := (substr .Params.event_end 2 8) }}
|
{{ $t := (substr .Params.event_end 2 8) }}
|
||||||
{{ $time := ( replace $t "-" "") }}
|
{{ $time := ( replace $t "-" "") }}
|
||||||
{{ if ge $time $now }}
|
{{ if ge $time $now }}
|
||||||
{{- partial "event_list_item.html" . -}}
|
{{ $upcoming = $upcoming | append . }}
|
||||||
|
{{ else if gt $now $time }}
|
||||||
|
{{ $past = $past | append . }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</div>
|
|
||||||
|
{{ 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 }}
|
||||||
<div class="past event-list">
|
<div class="past event-list">
|
||||||
<div class='tape-label'><span>past events</span></div>
|
<div class='tape-label'><span>past events</span></div>
|
||||||
{{ range .Pages }}
|
{{ range $past }}
|
||||||
{{ $t := (substr .Params.event_end 2 8) }}
|
{{- partial "event_list_item.html" . -}}
|
||||||
{{ $time := ( replace $t "-" "") }}
|
|
||||||
{{ if gt $now $time }}
|
|
||||||
{{- partial "event_list_item.html" . -}}
|
|
||||||
{{ end }}
|
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</div>
|
</div>
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
</section>
|
</section>
|
||||||
</main>
|
</main>
|
||||||
|
Loading…
Reference in New Issue
Block a user