mirror of
https://gitlab.com/ansol/web-ansol.org.git
synced 2024-11-22 14:21:31 +00:00
28 lines
909 B
HTML
28 lines
909 B
HTML
{{- define "main" -}}
|
|
|
|
<h1 class='events-list-title body-width'>Próximos eventos</h2>
|
|
|
|
{{ $query := where site.RegularPages "Type" "eventos" }}
|
|
{{ $query = where $query "Params.metadata.event.date.finish" ">=" (now.Format "2006-01-02") }}
|
|
{{ $query = sort $query "Params.metadata.event.date.start" }}
|
|
<ul class="events-list body-width">
|
|
{{ range $query }}
|
|
<li>{{ partial "evento" . }}</li>
|
|
{{ end }}
|
|
</ul>
|
|
|
|
<h1 class='events-list-title body-width'>Eventos antigos</h2>
|
|
<ul class="events-list body-width">
|
|
{{ $query := where site.RegularPages "Type" "eventos" }}
|
|
{{ $query = where $query "Params.metadata.event.date.finish" "<" (now.Format "2006-01-02") }}
|
|
{{ $query = sort $query "Params.metadata.event.date.start" "desc" }}
|
|
{{ $paginator := .Paginate $query }}
|
|
{{ range $paginator.Pages }}
|
|
<li>{{ partial "evento" . }}</li>
|
|
{{ end }}
|
|
</ul>
|
|
|
|
{{ partial "pagination" . }}
|
|
|
|
{{- end -}}
|