2021-10-31 16:23:47 +00:00
|
|
|
{{- define "main" -}}
|
|
|
|
|
|
|
|
<h1 class='events-list-title body-width'>Eventos</h1>
|
|
|
|
|
|
|
|
<ul class="events-list body-width">
|
|
|
|
{{ $paginator := .Paginate (.Data.Pages.ByParam "metadata.event.date.start").Reverse }}
|
|
|
|
{{ range $paginator.Pages }}
|
|
|
|
<li>
|
|
|
|
<a class="img" href="{{ .Permalink }}">
|
|
|
|
{{ $cover := (index (.Resources.ByType "image") 0) }}
|
|
|
|
{{ if not $cover }}
|
|
|
|
{{ $cover = resources.Get "images/default-events-cover.png" }}
|
|
|
|
{{ end }}
|
|
|
|
<img class='event-cover' src="{{ $cover.Permalink }}" />
|
|
|
|
</a>
|
2021-11-01 17:36:46 +00:00
|
|
|
<div class="text">
|
|
|
|
<p class="headline">
|
|
|
|
<a class="title" href="{{ .Permalink }}">{{ .Title }}</a>
|
|
|
|
</p>
|
|
|
|
<p class="subheader">
|
|
|
|
<span class="date">
|
|
|
|
{{ with .Params.metadata.event.date }}
|
|
|
|
{{ if eq (time.Format "2 January 2006" .start) (time.Format "2 January 2006" .finish) }}
|
|
|
|
{{ if eq (time.Format "15:04" .start) (time.Format "15:04" .finish) }}
|
|
|
|
{{ time.Format "2 de January de 2006" .start }}
|
|
|
|
{{ else }}
|
|
|
|
{{ time.Format "2 de January de 2006" .start }} das
|
|
|
|
{{ time.Format "15:04" .start }} às
|
|
|
|
{{ time.Format "15:04" .finish }}
|
|
|
|
{{ end }}
|
|
|
|
{{ else if eq (time.Format "January 2006" .start) (time.Format "January 2006" .finish) }}
|
|
|
|
De {{ time.Format "2" .start }} a {{ time.Format "2 de January de 2006" .finish }}
|
2021-10-31 16:23:47 +00:00
|
|
|
{{ else }}
|
2021-11-01 17:36:46 +00:00
|
|
|
De {{ time.Format "2 de January de 2006" .start }} a {{ time.Format "2 de January de 2006" .finish }}
|
2021-10-31 16:23:47 +00:00
|
|
|
{{ end }}
|
|
|
|
{{ end }}
|
2021-11-01 17:36:46 +00:00
|
|
|
</span>
|
|
|
|
—
|
|
|
|
<span class='location'>{{ .Params.metadata.event.location }}</span>
|
|
|
|
</p>
|
|
|
|
</div>
|
2021-10-31 16:23:47 +00:00
|
|
|
</li>
|
|
|
|
{{ end }}
|
|
|
|
|
|
|
|
{{ partial "pagination" . }}
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
{{- end -}}
|