6
0
Fork 0

Sortering op event_start ipv datum van aanmaak

This commit is contained in:
Michael Boelen 2023-06-16 20:37:32 +02:00
parent a67dab4d07
commit 8538c95d08

View file

@ -2,10 +2,9 @@
{{ $.Scratch.Set "highlighted_events" slice }} {{ $.Scratch.Set "highlighted_events" slice }}
{{ range .Pages }} {{ range (.Pages.ByParam "event_start").Reverse }}
{{ if isset .Params "event_start" }} {{ if isset .Params "event_start" }}
{{ $event_start := .Params.event_start | time }} {{ $event_start := .Params.event_start | time }}
{{ if le now $event_start }} {{ if le now $event_start }}
{{ $.Scratch.Add "highlighted_events" . }} {{ $.Scratch.Add "highlighted_events" . }}
{{ end }} {{ end }}
@ -24,7 +23,7 @@
<h2>Overzicht</h2> <h2>Overzicht</h2>
<section> <section>
<ul class="list"> <ul class="list">
{{ range .Pages.ByDate }} {{ range (.Pages.ByParam "event_start").Reverse }}
<li> <li>
<a class="link" href="{{ .Permalink }}" title="{{ .Title }}">{{ .Title }}</a> <a class="link" href="{{ .Permalink }}" title="{{ .Title }}">{{ .Title }}</a>
<hr class="hr-list"> <hr class="hr-list">