summaryrefslogtreecommitdiff
path: root/src/gmi/tpl/posts
diff options
context:
space:
mode:
authorBrian Picciano <mediocregopher@gmail.com>2023-01-21 16:46:11 +0100
committerBrian Picciano <mediocregopher@gmail.com>2023-01-21 16:46:11 +0100
commit293655452cfc6a106c55384e839f9c07d340b954 (patch)
treec01202bb1722f6f6a0f500f304fa2fbf3c35c34b /src/gmi/tpl/posts
parent7878db5c95e5eb430b7b878fe6eb8084f15441a7 (diff)
Continue to polish up posts pages
Diffstat (limited to 'src/gmi/tpl/posts')
-rw-r--r--src/gmi/tpl/posts/index.gmi11
-rw-r--r--src/gmi/tpl/posts/post.gmi24
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