added admin page, adjusted way of creating posts

This commit is contained in:
rawleyIfowler
2022-03-02 07:42:14 -06:00
parent cefeeec11a
commit 402f36534f
9 changed files with 274 additions and 65 deletions

View File

@@ -0,0 +1,10 @@
{{ template "header.tmpl" . }}
<h2>Create post</h2>
<form action="/admin/post" method="POST">
<input type="text" placeholder="url" name="url" />
<input type="text" placeholder="title" name="title" />
<textarea placeholder="post" name="content" />
<button type="submit">Make post</button>
<button type="clear">Clear form</button>
</form>
{{ template "footer.tmpl" . }}

8
templates/login.tmpl Normal file
View File

@@ -0,0 +1,8 @@
{{ template "header.tmpl" . }}
<h2>Admin Login</h2>
<form action="/admin/login" method="POST">
<input type="text" name="username" placeholder="username" />
<input type="password" name="password" placeholder="password" />
<button type="submit">Login</button>
</form>
{{ template "footer.tmpl" . }}