1
0
Fork 0
hugo-paper/layouts/_default/list.html

33 lines
848 B
HTML
Raw Normal View History

2021-08-20 13:21:20 +02:00
{{ partial "header.html" . }}
2019-03-31 14:32:06 +02:00
2021-08-20 13:21:20 +02:00
{{ if .Title }}
<h1 class="page-title">{{ .Title }}</h1>
2020-03-09 18:50:02 +01:00
{{ end }}
2020-03-09 16:56:13 +01:00
2021-08-20 13:21:20 +02:00
{{ $pages := union .RegularPages .Sections }}
{{ if .IsHome }}
{{ $pages = where site.RegularPages "Type" "in" site.Params.mainSections }}
{{ end }}
{{ $paginator := .Paginate $pages }}
2019-03-31 14:32:06 +02:00
2021-08-20 13:21:20 +02:00
{{ range $index, $page := $paginator.Pages }}
<article class="post-entry">
<h2>{{ .Title }}</h2>
<time>{{ .Date.Format "January 2, 2006" }}</time>
<a href="{{ .Permalink }}"></a>
2018-01-08 17:28:39 +01:00
</article>
2021-08-20 13:21:20 +02:00
{{ end }}
2019-03-31 14:32:06 +02:00
2021-08-20 13:21:20 +02:00
{{ if gt $paginator.TotalPages 1 }}
<nav class="page-nav">
{{ if $paginator.HasPrev }}
<a class="prev" href="{{ $paginator.Prev.URL }}">← {{ i18n "prev_page" }}</a>
{{ end }}
{{ if $paginator.HasNext }}
<a class="next" href="{{ $paginator.Next.URL }}">{{ i18n "next_page" }} →</a>
{{ end }}
</nav>
{{ end }}
2019-03-31 14:32:06 +02:00
2021-08-20 13:21:20 +02:00
{{ partial "footer.html" . }}