diff options
author | Brian Picciano <mediocregopher@gmail.com> | 2022-08-16 21:32:50 -0600 |
---|---|---|
committer | Brian Picciano <mediocregopher@gmail.com> | 2022-08-16 21:32:50 -0600 |
commit | bf8412969a60b5da29d622418e8a4efd9d444a12 (patch) | |
tree | 143dc1a4bbde5622705d732ad1d56aac637d9c38 /srv/src/http/tpl/posts.html | |
parent | 5bc4c2fe4eb2dd401380493d95e05badd7f2bf5d (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.html | 36 |
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}}">< < 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 > ></a> + </p> + {{ end }} {{ end }} |