mirror of
https://gitlab.com/ansol/web-ansol.org.git
synced 2024-11-22 22:31:32 +00:00
37 lines
934 B
HTML
37 lines
934 B
HTML
{{- define "main" -}}
|
|
|
|
<h1 class='news-list-title body-width'>Notícias</h1>
|
|
|
|
<ul class="news-list body-width">
|
|
{{ $paginator := .Paginate .Data.Pages 12 }}
|
|
{{ 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 -}}
|