mirror of
https://github.com/writefreely/writefreely
synced 2024-11-10 11:24:13 +00:00
Standardize admin navigation
This commit is contained in:
parent
45b01c041b
commit
09fb73bdd5
4 changed files with 19 additions and 4 deletions
|
@ -9,6 +9,19 @@ header.admin {
|
|||
margin-left: 1em;
|
||||
}
|
||||
}
|
||||
nav#admin {
|
||||
display: block;
|
||||
margin: 0.5em 0;
|
||||
a {
|
||||
color: @primary;
|
||||
&:first-child {
|
||||
margin-left: 0;
|
||||
}
|
||||
&.selected {
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
}
|
||||
.pager {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
|
|
|
@ -43,13 +43,13 @@ function savePage(el) {
|
|||
</script>
|
||||
|
||||
<div class="content-container snug">
|
||||
<h1>Admin Dashboard</h1>
|
||||
{{template "admin-header" .}}
|
||||
|
||||
{{if .Message}}<p>{{.Message}}</p>{{end}}
|
||||
|
||||
<h2>On this page</h2>
|
||||
<ul class="pagenav">
|
||||
{{if not .SingleUser}}
|
||||
<li><a href="/admin/users">View Users</a></li>
|
||||
<li><a href="#page-about">Edit About page</a></li>
|
||||
<li><a href="#page-privacy">Edit Privacy page</a></li>
|
||||
{{end}}
|
||||
|
|
|
@ -10,7 +10,6 @@ h3 {
|
|||
</style>
|
||||
<div class="snug content-container">
|
||||
{{template "admin-header" .}}
|
||||
<p><a href="/admin/users">View Users</a></p>
|
||||
|
||||
<h2 id="posts-header">{{.User.Username}}</h2>
|
||||
|
||||
|
|
|
@ -62,6 +62,9 @@
|
|||
{{define "admin-header"}}
|
||||
<header class="admin">
|
||||
<h1>Admin</h1>
|
||||
<a href="/admin">back to dashboard</a>
|
||||
<nav id="admin">
|
||||
<a href="/admin" {{if eq .Path "/admin"}}class="selected"{{end}}>Dashboard</a>
|
||||
{{if not .SingleUser}}<a href="/admin/users" {{if eq .Path "/admin/users"}}class="selected"{{end}}>Users</a>{{end}}
|
||||
</nav>
|
||||
</header>
|
||||
{{end}}
|
||||
|
|
Loading…
Reference in a new issue