summaryrefslogtreecommitdiff
path: root/src/gmi/tpl/posts/index.gmi
blob: dd4c84ce35113d6e63b41e710e3bf0bc8f62bc1b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# mediocregopher's Posts

{{ $page := .GetQueryIntValue "page" 0 -}}
{{ $getPostsRes := .GetPosts $page 15 -}}

{{ if gt $page 0 -}}
=> /posts/?page={{ .Add $page -1 }} Previous Page

{{ end -}}

{{ range $getPostsRes.Posts -}}
=> /posts/{{ .ID }}.gmi {{ .PublishedAt.Format "2006-01-02" }} - {{ .Title }}

{{ end -}}

{{ if $getPostsRes.HasMore -}}
=> /posts/?page={{ .Add $page 1 }} Next page
{{ end }}
================================================================================

=> / Home