Improve events list page
BIN
assets/images/default-events-cover.png
Normal file
After Width: | Height: | Size: 1.9 KiB |
BIN
content/eventos/2021-02-20-cc-global-summit-2021/cover.png
Normal file
After Width: | Height: | Size: 403 KiB |
After Width: | Height: | Size: 160 KiB |
After Width: | Height: | Size: 16 KiB |
BIN
content/eventos/2021-08-21-foss4g-2021/cover.png
Normal file
After Width: | Height: | Size: 28 KiB |
After Width: | Height: | Size: 64 KiB |
After Width: | Height: | Size: 16 KiB |
|
@ -11,5 +11,5 @@ metadata:
|
|||
finish: 2021-10-31
|
||||
map: {}
|
||||
layout: evento
|
||||
title: 'Wikidata: Data Quality Days 2021'
|
||||
title: 'WikidataCon 2021'
|
||||
---
|
||||
|
|
|
@ -158,6 +158,12 @@ nav.main .nav-search:hover {
|
|||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.events-list-title {
|
||||
margin: 2rem auto;
|
||||
font-weight: 300;
|
||||
font-size: 2.25rem;
|
||||
}
|
||||
|
||||
.events-list {
|
||||
margin-top: 20px;
|
||||
padding: 0px;
|
||||
|
@ -179,6 +185,10 @@ nav.main .nav-search:hover {
|
|||
width: calc(50% - 50px);
|
||||
}
|
||||
|
||||
.events-list.events-list-full-width li {
|
||||
width: calc(100% - 50px);
|
||||
}
|
||||
|
||||
.events-list .event-cover {
|
||||
margin-top: -20px;
|
||||
margin-left: -20px;
|
||||
|
|
46
themes/academic/layouts/eventos/list.html
Normal file
|
@ -0,0 +1,46 @@
|
|||
{{- 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>
|
||||
<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 }}
|
||||
{{ else }}
|
||||
De {{ time.Format "2 de January de 2006" .start }} a {{ time.Format "2 de January de 2006" .finish }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</span>
|
||||
—
|
||||
<span class='location'>{{ .Params.metadata.event.location }}</span>
|
||||
</p>
|
||||
</li>
|
||||
{{ end }}
|
||||
|
||||
{{ partial "pagination" . }}
|
||||
</ul>
|
||||
|
||||
{{- end -}}
|