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.
19 lines
412 B
19 lines
412 B
1 year ago
|
# 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 -}}
|