Files

31 lines
1.1 KiB
HTML

{{ define "main" }}
<div id="pjax-container">
<article>
<div class="post-list section" uk-scrollspy="target: > .post; cls: uk-animation-slide-bottom-small; delay: 100">
{{ $posts := where (where .Site.RegularPages "Type" "posts") "Params.status" "ne" "hidden" }}
{{ $exclude := where $posts "Params.categories" "intersect" (slice "笔记") }}
{{ $posts = $posts | complement $exclude }}
{{ $paginator := .Paginate $posts }}
{{ range $paginator.Pages }}
<div class="post">
<div class="time">{{ .Date.Format "January 2, 2006" }}</div>
<a href="{{ .RelPermalink }}">{{ .Title }}</a>
</div>
{{ end }}
</div>
</article>
<ul class="pagination">
<li class="page-item page-previous">
{{ if $paginator.HasPrev }}
<a class="prev" title="上一页" href="{{ $paginator.Prev.URL }}">上一页</a>
{{ end }}
</li>
<li class="page-item page-next">
{{ if $paginator.HasNext }}
<a class="next" title="下一页" href="{{ $paginator.Next.URL }}">下一页</a>
{{ end }}
</li>
</ul>
</div>
{{ end }}