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" }} {{ define "body" }}
<p>
<a href="{{ BlogURL "admin" }}">Back to Admin</a>
</p>
<h1>Assets</h1> <h1>Assets</h1>
<h2>Upload Asset</h2> <h2>Upload Asset</h2>

View File

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

View File

@ -1,5 +1,17 @@
{{ define "body" }} {{ 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/" }}"> <form method="POST" action="{{ BlogURL "posts/" }}">
<table> <table>
@ -125,18 +137,6 @@
</form> </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 }} {{ end }}
{{ template "base.html" . }} {{ template "base.html" . }}

View File

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