You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
412 B
18 lines
412 B
# 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 -}}
|
|
|