improve navigation around admin pages

This commit is contained in:
Brian Picciano 2022-08-19 21:57:05 -06:00
parent f365b09757
commit 61d4e959b5
4 changed files with 25 additions and 15 deletions

View File

@ -1,5 +1,9 @@
{{ define "body" }}
<p>
<a href="{{ BlogURL "admin" }}">Back to Admin</a>
</p>
<h1>Assets</h1>
<h2>Upload Asset</h2>

View File

@ -1,11 +1,13 @@
{{ define "body" }}
<p>
<a href="{{ BlogURL "admin" }}">Back to Admin</a>
</p>
<h1>Drafts</h1>
<p>
<a href="{{ BlogURL "drafts/" }}?edit">
New Draft
</a>
<a href="{{ BlogURL "drafts/" }}?edit">New Draft</a>
</p>
{{ if ge .Payload.PrevPage 0 }}

View File

@ -1,5 +1,17 @@
{{ define "body" }}
<p>
{{ if .Payload.IsDraft }}
<a href="{{ BlogURL "drafts/" }}">
Back to Drafts
</a>
{{ else }}
<a href="{{ BlogURL "posts/" }}">
Back to Posts
</a>
{{ end }}
</p>
<form method="POST" action="{{ BlogURL "posts/" }}">
<table>
@ -125,18 +137,6 @@
</form>
<p>
{{ if .Payload.IsDraft }}
<a href="{{ BlogURL "drafts/" }}">
Back to Drafts
</a>
{{ else }}
<a href="{{ BlogURL "posts/" }}">
Back to Posts
</a>
{{ end }}
</p>
{{ end }}
{{ template "base.html" . }}

View File

@ -1,5 +1,9 @@
{{ define "body" }}
<p>
<a href="{{ BlogURL "admin" }}">Back to Admin</a>
</p>
<h1>Posts</h1>
{{ if ge .Payload.PrevPage 0 }}