summaryrefslogtreecommitdiff
path: root/srv/src/http/tpl/posts.html
diff options
context:
space:
mode:
authorBrian Picciano <mediocregopher@gmail.com>2022-08-16 21:32:50 -0600
committerBrian Picciano <mediocregopher@gmail.com>2022-08-16 21:32:50 -0600
commitbf8412969a60b5da29d622418e8a4efd9d444a12 (patch)
tree143dc1a4bbde5622705d732ad1d56aac637d9c38 /srv/src/http/tpl/posts.html
parent5bc4c2fe4eb2dd401380493d95e05badd7f2bf5d (diff)
finish switching to classless, got a color scheme worked out too
Diffstat (limited to 'srv/src/http/tpl/posts.html')
-rw-r--r--srv/src/http/tpl/posts.html36
1 files changed, 13 insertions, 23 deletions
diff --git a/srv/src/http/tpl/posts.html b/srv/src/http/tpl/posts.html
index 885018d..7416ee6 100644
--- a/srv/src/http/tpl/posts.html
+++ b/srv/src/http/tpl/posts.html
@@ -1,36 +1,22 @@
-{{ define "posts-nextprev" }}
-
- {{ if or (ge .Payload.PrevPage 0) (ge .Payload.NextPage 0) }}
- <div id="page-turner">
-
- {{ if ge .Payload.PrevPage 0 }}
- <a style="float: left;" href="?p={{ .Payload.PrevPage}}">Newer</a>
- {{ end }}
-
- {{ if ge .Payload.NextPage 0 }}
- <a style="float:right;" href="?p={{ .Payload.NextPage}}">Older</a>
- {{ end }}
-
- </div>
- {{ end }}
-
-{{ end }}
-
{{ define "body" }}
- <p style="text-align: center;">
+ <p>
<a href="{{ BlogURL "posts/" }}?edit">
<button>New Post</button>
</a>
</p>
- {{ template "posts-nextprev" . }}
+ {{ if ge .Payload.PrevPage 0 }}
+ <p>
+ <a href="?p={{ .Payload.PrevPage}}">&lt; &lt; Previous Page</a>
+ </p>
+ {{ end }}
- <table style="margin-top: 2rem;">
+ <table>
{{ range .Payload.Posts }}
<tr>
- <td>{{ .PublishedAt }}</td>
+ <td>{{ .PublishedAt.Local.Format "2006-01-02 15:04:05 MST" }}</td>
<td><a href="{{ PostURL .ID }}" target="_blank">{{ .Title }}</a></td>
<td>
<a href="{{ PostURL .ID }}?edit">
@@ -50,7 +36,11 @@
</table>
- {{ template "posts-nextprev" . }}
+ {{ if ge .Payload.NextPage 0 }}
+ <p>
+ <a href="?p={{ .Payload.NextPage}}">Next Page &gt; &gt;</a>
+ </p>
+ {{ end }}
{{ end }}