summaryrefslogtreecommitdiff
path: root/srv/src/api/tpl/posts.html
diff options
context:
space:
mode:
authorBrian Picciano <mediocregopher@gmail.com>2022-05-20 11:17:31 -0600
committerBrian Picciano <mediocregopher@gmail.com>2022-05-20 11:17:31 -0600
commit09acb111a2b22f5794541fac175b024dd0f9100e (patch)
tree11d4578a42ad4aea968b42a2689f64c799f9176e /srv/src/api/tpl/posts.html
parentf69ed83de73bbfc4b7af0931de6ced8cf12dea61 (diff)
Rename api package to http
Diffstat (limited to 'srv/src/api/tpl/posts.html')
-rw-r--r--srv/src/api/tpl/posts.html61
1 files changed, 0 insertions, 61 deletions
diff --git a/srv/src/api/tpl/posts.html b/srv/src/api/tpl/posts.html
deleted file mode 100644
index 714cf07..0000000
--- a/srv/src/api/tpl/posts.html
+++ /dev/null
@@ -1,61 +0,0 @@
-{{ 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" }}
-
- {{ $csrfFormInput := .CSRFFormInput }}
-
-
- <p style="text-align: center;">
- <a href="{{ BlogURL "posts/" }}?method=edit">
- <button>New Post</button>
- </a>
- </p>
-
- {{ template "posts-nextprev" . }}
-
- <table style="margin-top: 2rem;">
-
- {{ range .Payload.Posts }}
- <tr>
- <td>{{ .PublishedAt }}</td>
- <td><a href="{{ PostURL .ID }}" target="_blank">{{ .Title }}</a></td>
- <td>
- <a href="{{ PostURL .ID }}?method=edit">
- <button>Edit</button>
- </a>
- </td>
- <td>
- <form
- action="{{ PostURL .ID }}?method=delete"
- method="POST"
- >
- {{ $csrfFormInput }}
- <input type="submit" value="Delete" />
- </form>
- </td>
- </tr>
- {{ end }}
-
- </table>
-
- {{ template "posts-nextprev" . }}
-
-{{ end }}
-
-{{ template "base.html" . }}