7
1
mirror of https://gitlab.com/ansol/web-ansol.org.git synced 2024-12-27 22:30:20 +00:00
web-ansol.org/themes/academic/layouts/eventos/list.html

28 lines
911 B
HTML
Raw Normal View History

2021-10-31 16:23:47 +00:00
{{- define "main" -}}
<h1 class='events-list-title body-width'>Próximos eventos</h2>
2021-10-31 16:23:47 +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">
{{ 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 }}
<li>{{ partial "evento" . }}</li>
2021-10-31 16:23:47 +00:00
{{ end }}
{{ partial "pagination" . }}
</ul>
{{- end -}}