7
1
mirror of https://gitlab.com/ansol/web-ansol.org.git synced 2024-12-26 13:50:21 +00:00
web-ansol.org/themes/academic/layouts/noticias/list.html
2023-09-28 13:34:45 +01:00

37 lines
931 B
HTML

{{- define "main" -}}
<h1 class='news-list-title body-width'>Notícias</h1>
<ul class="news-list body-width">
{{ $paginator := .Paginate .Data.Pages }}
{{ range $paginator.Pages }}
<li>
<a class='cover' href="{{ .Permalink }}">
{{ $cover := (index (.Resources.ByType "image") 0) }}
{{ if not $cover }}
{{ $cover = resources.Get "images/default-news-cover.png" }}
{{ end }}
{{ with $cover }}
<img class='news-cover' src="{{ .Permalink }}" />
{{ end }}
</a>
<div class='text'>
<h3><a href="{{ .Permalink }}">{{ .Title }}</a></h3>
<p class="published-date">{{ time.Format "2 de January de 2006" .PublishDate }}</p>
<div class="summary">
{{ .Summary }}
<p><a href="{{ .Permalink }}">Ler tudo</a></p>
</div>
</div>
</li>
{{ end }}
</ul>
{{ partial "pagination" . }}
{{- end -}}