增加分页功能 2024.7.23
This commit is contained in:
1 parent
6eff722775
commit
cd78805af3
55 files changed
+5913
-311
No files matched your search
@@ -5,27 +5,27 @@
|
||||
<h2 class="section-header">随笔<i class="ri-quill-pen-line"></i></h2>
|
||||
<div class="posts">
|
||||
{{ range .Pages }}
|
||||
{{ if eq .Type "post" }}
|
||||
<div class="post">
|
||||
<div class="time">{{ .Date.Format "January 2, 2006" }}</div>
|
||||
<a href="{{ .Permalink }}">{{ .Title }}</a>
|
||||
</div>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
</article>
|
||||
<ul class="pagination">
|
||||
{{ if .Paginator.HasNext }}
|
||||
<li class="page-item page-previous">
|
||||
<a class="next" title="" href="{{ .Paginator.Next.URL }}">下一页</a>
|
||||
{{ if .Paginator.HasPrev }}
|
||||
<a class="prev" title="上一页" href="{{ .Paginator.Prev.URL }}">上一页</a>
|
||||
{{ end }}
|
||||
</li>
|
||||
{{ end }}
|
||||
{{ if .Paginator.HasPrev }}
|
||||
<li class="page-item page-next">
|
||||
<a class="next" title="" href="{{ .Paginator.Prev.URL }}">上一页</a>
|
||||
{{ if .Paginator.HasNext }}
|
||||
<a class="next" title="下一页" href="{{ .Paginator.Next.URL }}">下一页</a>
|
||||
{{ end }}
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
|
||||
Reference in new issue
Block a user