29 lines
866 B
HTML
29 lines
866 B
HTML
|
{{ define "main" }}
|
||
|
<div class="container" role="main">
|
||
|
<div class="posts-list">
|
||
|
{{ if .IsHome }}
|
||
|
{{ $pag := .Paginate (where site.RegularPages "Type" "in" site.Params.mainSections) }}
|
||
|
{{ else }}
|
||
|
{{ $pag := .Paginator.Pages }}
|
||
|
{{ end }}
|
||
|
|
||
|
{{ range .Paginator.Pages }}
|
||
|
{{ partial "preview.html" . }}
|
||
|
{{ end }}
|
||
|
</div>
|
||
|
{{ if or (.Paginator.HasPrev) (.Paginator.HasNext) }}
|
||
|
<ul class="pager">
|
||
|
{{ if .Paginator.HasPrev }}
|
||
|
<li class="previous">
|
||
|
<a href="{{ .Permalink }}page/{{ .Paginator.Prev.PageNumber }}/">← Newer</a>
|
||
|
</li>
|
||
|
{{ end }}
|
||
|
{{ if .Paginator.HasNext }}
|
||
|
<li class="next">
|
||
|
<a href="{{ .Permalink }}page/{{ .Paginator.Next.PageNumber }}/">Older →</a>
|
||
|
</li>
|
||
|
{{ end }}
|
||
|
</ul>
|
||
|
{{ end }}
|
||
|
</div>
|
||
|
{{ end }}
|