hugo-theme-even/layouts/index.html

25 lines
774 B
HTML
Raw Normal View History

2017-08-27 14:38:42 +00:00
{{ define "content" }}
<section id="posts" class="posts">
{{/* (index .Site.Paginate) */}}
{{ $paginator := .Paginate (where .Data.Pages "Type" "post") }}
{{ range $paginator.Pages }}
{{ .Render "summary" }}
{{ end }}
</section>
<!-- pagination -->
<nav class="pagination">
{{- $lang := .Site.Data.even.default -}}
{{ with $paginator.Prev }}
<a class="prev" href="{{ .URL }}">
<i class="iconfont icon-left"></i>
<span class="prev-text">{{ $lang.posts.prev }}</span>
</a>
{{- end }}
{{ with $paginator.Next }}
<a class="next" href="{{ .URL }}">
<span class="next-text">{{ $lang.posts.next }}</span>
<i class="iconfont icon-right"></i>
</a>
{{- end }}
</nav>
{{ end }}