From 76ff79f47035c11c1e0dfcd283034b738b5c3f0d Mon Sep 17 00:00:00 2001 From: Brian Picciano Date: Thu, 18 Aug 2022 21:11:42 -0600 Subject: add admin page, and spruce up posts and assets --- srv/src/http/api.go | 1 + srv/src/http/tpl/admin.html | 17 +++++++++++++++++ srv/src/http/tpl/assets.html | 6 ++++++ srv/src/http/tpl/posts.html | 2 ++ 4 files changed, 26 insertions(+) create mode 100644 srv/src/http/tpl/admin.html (limited to 'srv') diff --git a/srv/src/http/api.go b/srv/src/http/api.go index 4143200..4ba6450 100644 --- a/srv/src/http/api.go +++ b/srv/src/http/api.go @@ -217,6 +217,7 @@ func (a *api) blogHandler() http.Handler { mux.Handle("/static/", http.FileServer(http.FS(staticFS))) mux.Handle("/follow", a.renderDumbTplHandler("follow.html")) + mux.Handle("/admin", a.renderDumbTplHandler("admin.html")) mux.Handle("/mailinglist/unsubscribe", a.renderDumbTplHandler("unsubscribe.html")) mux.Handle("/mailinglist/finalize", a.renderDumbTplHandler("finalize.html")) mux.Handle("/feed.xml", a.renderFeedHandler()) diff --git a/srv/src/http/tpl/admin.html b/srv/src/http/tpl/admin.html new file mode 100644 index 0000000..24b2770 --- /dev/null +++ b/srv/src/http/tpl/admin.html @@ -0,0 +1,17 @@ +{{ define "body" }} + +

Admin

+ +This is a directory of pages which are used for managing blog content. They are +mostly left open to inspection, but you will not able to change +anything without providing credentials. + + + +{{ end }} + +{{ template "base.html" . }} + diff --git a/srv/src/http/tpl/assets.html b/srv/src/http/tpl/assets.html index 346d125..b439135 100644 --- a/srv/src/http/tpl/assets.html +++ b/srv/src/http/tpl/assets.html @@ -1,5 +1,7 @@ {{ define "body" }} +

Assets

+

Upload Asset

@@ -21,6 +23,8 @@ +{{ if gt (len .Payload.IDs) 0 }} +

Existing Assets

@@ -44,4 +48,6 @@ {{ end }} +{{ end }} + {{ template "base.html" . }} diff --git a/srv/src/http/tpl/posts.html b/srv/src/http/tpl/posts.html index d8f52a6..946c713 100644 --- a/srv/src/http/tpl/posts.html +++ b/srv/src/http/tpl/posts.html @@ -1,5 +1,7 @@ {{ define "body" }} +

Posts

+

New Post -- cgit v1.2.3