Move coll. navigation to main header for single-user sites
This uses the main navigation bar for the Customize and Stats pages, instead of the collection-navigation bar used for multi-user / multi-collection instances.
This commit is contained in:
parent
9d0ba2bed4
commit
6f8d70043f
|
@ -1265,7 +1265,7 @@ header {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
&.singleuser {
|
&.singleuser {
|
||||||
margin: 0.5em 0.25em;
|
margin: 0.5em 1em 0.5em 0.25em;
|
||||||
nav#user-nav {
|
nav#user-nav {
|
||||||
nav > ul > li:first-child {
|
nav > ul > li:first-child {
|
||||||
img {
|
img {
|
||||||
|
@ -1273,6 +1273,9 @@ header {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.right-side {
|
||||||
|
padding-top: 0.5em;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.dash-nav {
|
.dash-nav {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
|
|
|
@ -1,15 +1,13 @@
|
||||||
{{define "user-navigation"}}
|
{{define "user-navigation"}}
|
||||||
<header class="{{if .SingleUser}}singleuser{{else}}multiuser{{end}}">
|
<header class="{{if .SingleUser}}singleuser{{else}}multiuser{{end}}">
|
||||||
|
<nav id="full-nav">
|
||||||
{{if .SingleUser}}
|
{{if .SingleUser}}
|
||||||
<nav id="user-nav">
|
<nav id="user-nav">
|
||||||
<nav class="dropdown-nav">
|
<nav class="dropdown-nav">
|
||||||
<ul><li><a href="/" title="View blog" class="title">{{.SiteName}}</a> <img class="ic-18dp" src="/img/ic_down_arrow_dark@2x.png" />
|
<ul><li><a href="/" title="View blog" class="title">{{.SiteName}}</a> <img class="ic-18dp" src="/img/ic_down_arrow_dark@2x.png" />
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="/me/c/{{.Username}}">Customize</a></li>
|
{{if .IsAdmin}}<li><a href="/admin">Admin dashboard</a></li>{{end}}
|
||||||
<li><a href="/me/c/{{.Username}}/stats">Stats</a></li>
|
<li><a href="/me/settings">Account settings</a></li>
|
||||||
<li class="separator"><hr /></li>
|
|
||||||
{{if .IsAdmin}}<li><a href="/admin">Admin</a></li>{{end}}
|
|
||||||
<li><a href="/me/settings">Settings</a></li>
|
|
||||||
<li><a href="/me/import">Import posts</a></li>
|
<li><a href="/me/import">Import posts</a></li>
|
||||||
<li><a href="/me/export">Export</a></li>
|
<li><a href="/me/export">Export</a></li>
|
||||||
<li class="separator"><hr /></li>
|
<li class="separator"><hr /></li>
|
||||||
|
@ -18,12 +16,15 @@
|
||||||
</ul>
|
</ul>
|
||||||
</nav>
|
</nav>
|
||||||
<nav class="tabs">
|
<nav class="tabs">
|
||||||
|
<a href="/me/c/{{.Username}}" {{if and (hasPrefix .Path "/me/c/") (hasSuffix .Path .Username)}}class="selected"{{end}}>Customize</a>
|
||||||
|
<a href="/me/c/{{.Username}}/stats" {{if hasSuffix .Path "/stats"}}class="selected"{{end}}>Stats</a>
|
||||||
<a href="/me/posts/"{{if eq .Path "/me/posts/"}} class="selected"{{end}}>Drafts</a>
|
<a href="/me/posts/"{{if eq .Path "/me/posts/"}} class="selected"{{end}}>Drafts</a>
|
||||||
<a href="/me/new">New Post</a>
|
|
||||||
</nav>
|
</nav>
|
||||||
</nav>
|
</nav>
|
||||||
|
<div class="right-side">
|
||||||
|
<a class="simple-btn" href="/me/new">New Post</a>
|
||||||
|
</div>
|
||||||
{{else}}
|
{{else}}
|
||||||
<nav id="full-nav">
|
|
||||||
<div class="left-side">
|
<div class="left-side">
|
||||||
<h1><a href="/" title="Return to editor">{{.SiteName}}</a></h1>
|
<h1><a href="/" title="Return to editor">{{.SiteName}}</a></h1>
|
||||||
</div>
|
</div>
|
||||||
|
@ -65,12 +66,13 @@
|
||||||
{{end}}
|
{{end}}
|
||||||
</nav>
|
</nav>
|
||||||
</nav>
|
</nav>
|
||||||
{{if .Chorus}}{{if .Username}}<div class="right-side">
|
{{if .Username}}
|
||||||
<a class="simple-btn" href="/new">New Post</a>
|
<div class="right-side">
|
||||||
</div>{{end}}
|
<a class="simple-btn" href="/{{if .CollAlias}}#{{.CollAlias}}{{end}}">New Post</a>
|
||||||
|
</div>
|
||||||
|
{{end}}
|
||||||
|
{{end}}
|
||||||
</nav>
|
</nav>
|
||||||
{{end}}
|
|
||||||
{{end}}
|
|
||||||
</header>
|
</header>
|
||||||
{{end}}
|
{{end}}
|
||||||
{{define "header"}}<!DOCTYPE HTML>
|
{{define "header"}}<!DOCTYPE HTML>
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|
||||||
{{define "collection-nav"}}
|
{{define "collection-nav"}}
|
||||||
|
{{if not .SingleUser}}
|
||||||
<header class="admin">
|
<header class="admin">
|
||||||
<nav class="pager">
|
<nav class="pager">
|
||||||
<a href="{{if .SingleUser}}/me/new{{else}}/#{{.Alias}}{{end}}" class="btn gentlecta">New Post</a>
|
<a href="{{if .SingleUser}}/me/new{{else}}/#{{.Alias}}{{end}}" class="btn gentlecta">New Post</a>
|
||||||
|
@ -12,3 +13,4 @@
|
||||||
</nav>
|
</nav>
|
||||||
</header>
|
</header>
|
||||||
{{end}}
|
{{end}}
|
||||||
|
{{end}}
|
||||||
|
|
Loading…
Reference in New Issue