diff options
Diffstat (limited to 'src/gmi/tpl/posts')
-rw-r--r-- | src/gmi/tpl/posts/index.gmi | 11 | ||||
-rw-r--r-- | src/gmi/tpl/posts/post.gmi | 24 |
2 files changed, 31 insertions, 4 deletions
diff --git a/src/gmi/tpl/posts/index.gmi b/src/gmi/tpl/posts/index.gmi index 12eb39c..dd4c84c 100644 --- a/src/gmi/tpl/posts/index.gmi +++ b/src/gmi/tpl/posts/index.gmi @@ -1,10 +1,10 @@ # mediocregopher's Posts {{ $page := .GetQueryIntValue "page" 0 -}} -{{ $getPostsRes := .GetPosts $page 20 -}} +{{ $getPostsRes := .GetPosts $page 15 -}} {{ if gt $page 0 -}} -=> /posts.gmi?page={{ .Add $page -1 }} Previous Page +=> /posts/?page={{ .Add $page -1 }} Previous Page {{ end -}} @@ -14,5 +14,8 @@ {{ end -}} {{ if $getPostsRes.HasMore -}} -=> /posts.gmi?page={{ .Add $page 1 }} Next page -{{ end -}} +=> /posts/?page={{ .Add $page 1 }} Next page +{{ end }} +================================================================================ + +=> / Home diff --git a/src/gmi/tpl/posts/post.gmi b/src/gmi/tpl/posts/post.gmi index 52ac5ff..4f58c84 100644 --- a/src/gmi/tpl/posts/post.gmi +++ b/src/gmi/tpl/posts/post.gmi @@ -7,3 +7,27 @@ {{ end -}} {{ $post.Body }} + +-------------------------------------------------------------------------------- + +Published {{ $post.PublishedAt.Format "2006-01-02" }} + +{{- if $post.Series }} + +This post is part of a series! + +{{ $seriesNextPrev := .GetPostSeriesNextPrevious $post -}} + +{{ if $seriesNextPrev.Next -}} +=> /posts/{{ $seriesNextPrev.Next.ID }}.gmi Next: {{ $seriesNextPrev.Next.Title }} +{{ end -}} + +{{ if $seriesNextPrev.Previous -}} +=> /posts/{{ $seriesNextPrev.Previous.ID }}.gmi Previously: {{ $seriesNextPrev.Previous.Title }} +{{ end -}} + +{{ end }} +================================================================================ + +=> /posts/ More posts +=> / Home |