blob: 12eb39caefb1802d823aa160f31b7dcfaaacc4c4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
# mediocregopher's Posts
{{ $page := .GetQueryIntValue "page" 0 -}}
{{ $getPostsRes := .GetPosts $page 20 -}}
{{ if gt $page 0 -}}
=> /posts.gmi?page={{ .Add $page -1 }} Previous Page
{{ end -}}
{{ range $getPostsRes.Posts -}}
=> /posts/{{ .ID }}.gmi {{ .PublishedAt.Format "2006-01-02" }} - {{ .Title }}
{{ end -}}
{{ if $getPostsRes.HasMore -}}
=> /posts.gmi?page={{ .Add $page 1 }} Next page
{{ end -}}
|