7
1
mirror of https://gitlab.com/ansol/web-ansol.org.git synced 2024-12-13 15:57:11 +00:00
web-ansol.org/themes/academic/layouts/noticias/list.html

37 lines
934 B
HTML
Raw Normal View History

2021-10-31 02:21:57 +00:00
{{- define "main" -}}
<h1 class='news-list-title body-width'>Notícias</h1>
<ul class="news-list body-width">
2023-11-15 11:19:27 +00:00
{{ $paginator := .Paginate .Data.Pages 12 }}
2021-10-31 02:21:57 +00:00
{{ 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>
2023-09-28 12:34:45 +00:00
{{ partial "pagination" . }}
2021-10-31 02:21:57 +00:00
{{- end -}}