Files
blog/themes/Ying/layouts/_default/list.html
T

30 lines
1.1 KiB
HTML
Raw Normal View History

2024-07-11 08:59:32 +08:00
{{ define "main" }}
2026-01-20 20:09:46 +08:00
<div id="pjax-container">
2024-07-23 19:56:26 +08:00
<article>
2026-01-31 18:18:19 +08:00
<div class="post-list section" uk-scrollspy="target: > .post; cls: uk-animation-slide-bottom-small; delay: 100">
2026-06-02 15:37:49 +08:00
{{ $posts := where (where .Site.RegularPages "Type" "posts") "Params.status" "ne" "hidden" }}
2026-06-02 09:45:34 +08:00
{{ $exclude := where $posts "Params.categories" "intersect" (slice "笔记") }}
{{ $posts = $posts | complement $exclude }}
{{ $paginator := .Paginate $posts }}
2024-07-23 19:56:26 +08:00
{{ range $paginator.Pages }}
<div class="post">
<div class="time">{{ .Date.Format "January 2, 2006" }}</div>
2026-05-20 14:33:05 +08:00
<a href="{{ .RelPermalink }}">{{ .Title }}</a>
2024-07-11 08:59:32 +08:00
</div>
2024-07-23 19:56:26 +08:00
{{ 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>
2026-01-20 20:09:46 +08:00
</div>
2024-07-11 08:59:32 +08:00
{{ end }}