diff options
author | Brian Picciano <mediocregopher@gmail.com> | 2023-01-22 14:12:54 +0100 |
---|---|---|
committer | Brian Picciano <mediocregopher@gmail.com> | 2023-01-22 14:12:54 +0100 |
commit | acec797048301c7d8713d9c914d776929c51b088 (patch) | |
tree | 5339ede42c5f07760b2d4a27f4b920bdbf27f328 /src/gmi/tpl/posts | |
parent | 5b5a0438682ecb69bbc8d7cb9904ad4b049033a3 (diff) |
Final fleshing out of gemini content
Diffstat (limited to 'src/gmi/tpl/posts')
-rw-r--r-- | src/gmi/tpl/posts/index.gmi | 19 | ||||
-rw-r--r-- | src/gmi/tpl/posts/post.gmi | 10 |
2 files changed, 19 insertions, 10 deletions
diff --git a/src/gmi/tpl/posts/index.gmi b/src/gmi/tpl/posts/index.gmi index 9d0f6e2..60a62fd 100644 --- a/src/gmi/tpl/posts/index.gmi +++ b/src/gmi/tpl/posts/index.gmi @@ -1,10 +1,17 @@ # mediocregopher's Posts {{ $page := .GetQueryIntValue "page" 0 -}} -{{ $getPostsRes := .GetPosts $page 15 -}} + +{{ if eq $page 0 -}} +Here you'll find an archive of all published posts. The content varies almost as +much as the quality! + +{{ end -}} + +{{ $getPostsRes := .GetPosts $page 20 -}} {{ if gt $page 0 -}} -=> /posts/?page={{ .Add $page -1 }} Previous Page +=> {{ BlogURL "posts" }}/?page={{ .Add $page -1 }} Previous Page {{ end -}} @@ -14,8 +21,10 @@ {{ end -}} {{ if $getPostsRes.HasMore -}} -=> /posts/?page={{ .Add $page 1 }} Next page +=> {{ BlogURL "posts" }}/?page={{ .Add $page 1 }} Next page {{ end }} -================================================================================ +-------------------------------------------------------------------------------- + +=> {{ BlogURL "feed.xml" }} Subscribe to the RSS feed for updates -=> / Home +{{ template "footer.gmi" . }} diff --git a/src/gmi/tpl/posts/post.gmi b/src/gmi/tpl/posts/post.gmi index 7d1719b..e95cb53 100644 --- a/src/gmi/tpl/posts/post.gmi +++ b/src/gmi/tpl/posts/post.gmi @@ -4,6 +4,7 @@ {{ if ne $post.Description "" -}} > {{ $post.Description }} + {{ end -}} {{ .PostBody $post }} @@ -19,15 +20,14 @@ This post is part of a series! {{ $seriesNextPrev := .GetPostSeriesNextPrevious $post -}} {{ if $seriesNextPrev.Next -}} -=> /posts/{{ $seriesNextPrev.Next.ID }}.gmi Next: {{ $seriesNextPrev.Next.Title }} +=> {{ BlogURL "posts" }}/{{ $seriesNextPrev.Next.ID }}.gmi Next in the series: {{ $seriesNextPrev.Next.Title }} {{ end -}} {{ if $seriesNextPrev.Previous -}} -=> /posts/{{ $seriesNextPrev.Previous.ID }}.gmi Previously: {{ $seriesNextPrev.Previous.Title }} +=> {{ BlogURL "posts" }}/{{ $seriesNextPrev.Previous.ID }}.gmi Prevous in the series: {{ $seriesNextPrev.Previous.Title }} {{ end -}} {{ end }} -================================================================================ +=> {{ BlogURL "posts/" }} Browse all posts -=> /posts/ More posts -=> / Home +{{ template "footer.gmi" . }} |