2021-10-31 16:23:47 +00:00
|
|
|
{{- define "main" -}}
|
|
|
|
|
2022-01-06 14:22:03 +00:00
|
|
|
<h1 class='events-list-title body-width'>Próximos eventos</h2>
|
2021-10-31 16:23:47 +00:00
|
|
|
|
2022-01-06 14:22:03 +00:00
|
|
|
{{ $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" }}
|
2021-10-31 16:23:47 +00:00
|
|
|
<ul class="events-list body-width">
|
2022-01-06 14:22:03 +00:00
|
|
|
{{ 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 }}
|
2021-10-31 16:23:47 +00:00
|
|
|
{{ range $paginator.Pages }}
|
2022-01-06 14:22:03 +00:00
|
|
|
<li>{{ partial "evento" . }}</li>
|
2021-10-31 16:23:47 +00:00
|
|
|
{{ end }}
|
|
|
|
</ul>
|
|
|
|
|
2023-09-28 12:34:45 +00:00
|
|
|
{{ partial "pagination" . }}
|
|
|
|
|
2021-10-31 16:23:47 +00:00
|
|
|
{{- end -}}
|