Standardize admin navigation

pull/95/head
Matt Baer 6 years ago
parent 45b01c041b
commit 09fb73bdd5
  1. 13
      less/admin.less
  2. 4
      templates/user/admin.tmpl
  3. 1
      templates/user/admin/view-user.tmpl
  4. 5
      templates/user/include/header.tmpl

@ -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…
Cancel
Save