Skip to content

Commit

Permalink
Add pagination for groups showing last 30 entries
Browse files Browse the repository at this point in the history
  • Loading branch information
cblte committed May 25, 2021
1 parent 361631c commit 7ffc1dc
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions themes/zn80/layouts/microblog/list.html
@@ -1,9 +1,10 @@
{{ define "main" }}
<h1>{{ .Title }} </h1>
{{ .Content }}
{{ template "_internal/pagination.html" . }}

{{ range .Pages.GroupByPublishDate "2006-01-02" "desc" }}

{{ range (.Paginate (.Pages.GroupByPublishDate "2006-01-02" "desc") 30).PageGroups }}

<h2 style="margin:0; padding-top:30px;">
{{ .Key }}
</h2>
Expand All @@ -12,6 +13,7 @@ <h2 style="margin:0; padding-top:30px;">
{{ end }}
{{ end }}

{{ template "_internal/pagination.html" . }}


{{ end }}

0 comments on commit 7ffc1dc

Please sign in to comment.