mirror of
https://github.com/writefreely/writefreely
synced 2024-11-24 17:43:05 +00:00
Use normal nav on user pages when SimpleNav
This shows About, Reader, Log out links on backend user pages when logged in. It also adds "New post" buttons on the backend pages and blogs.
This commit is contained in:
parent
81847fbbcc
commit
90ad50c7f5
4 changed files with 47 additions and 4 deletions
|
@ -405,6 +405,31 @@ body {
|
|||
}
|
||||
}
|
||||
|
||||
nav#full-nav {
|
||||
margin: 0;
|
||||
|
||||
.left-side {
|
||||
display: inline-block;
|
||||
|
||||
a:first-child {
|
||||
margin-left: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.right-side {
|
||||
float: right;
|
||||
}
|
||||
}
|
||||
|
||||
nav#full-nav a.simple-btn {
|
||||
font-family: @sansFont;
|
||||
border: 1px solid #ccc !important;
|
||||
padding: .5rem 1rem;
|
||||
margin: 0;
|
||||
.rounded(.25em);
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.post-title {
|
||||
a {
|
||||
&:link {
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
<nav class="tabs">
|
||||
<a href="/about"{{if eq .Path "/about"}} class="selected"{{end}}>About</a>
|
||||
{{if and (and (not .SingleUser) .LocalTimeline) .CanViewReader}}<a href="/read"{{if eq .Path "/read"}} class="selected"{{end}}>Reader</a>{{end}}
|
||||
{{if and (not .SingleUser) (not .Username)}}<a href="/login"{{if eq .Path "/login"}} class="selected"{{end}}>Log in</a>{{end}}
|
||||
{{if and (not .SingleUser) (not .Username)}}<a href="/login"{{if eq .Path "/login"}} class="selected"{{end}}>Log in</a>{{else if .SimpleNav}}<a href="/me/logout">Log out</a>{{end}}
|
||||
</nav>
|
||||
</nav>
|
||||
{{end}}
|
||||
|
|
|
@ -48,6 +48,7 @@
|
|||
{{else}}
|
||||
<li><a href="/#{{.Alias}}" class="write">{{.SiteName}}</a></li>
|
||||
{{end}}
|
||||
{{if .SimpleNav}}<li><a href="/new#{{.Alias}}">New Post</a></li>{{end}}
|
||||
<li><a href="/me/c/{{.Alias}}">Customize</a></li>
|
||||
<li><a href="/me/c/{{.Alias}}/stats">Stats</a></li>
|
||||
<li class="separator"><hr /></li>
|
||||
|
|
|
@ -38,7 +38,13 @@
|
|||
</nav>
|
||||
</nav>
|
||||
{{else}}
|
||||
<h1><a href="/" title="Return to editor">{{.SiteName}}</a></h1>
|
||||
{{ if .SimpleNav }}<nav id="full-nav">
|
||||
<div class="left-side">
|
||||
<h1><a href="/" title="Return to editor">{{.SiteName}}</a></h1>
|
||||
</div>
|
||||
{{ else }}
|
||||
<h1><a href="/" title="Return to editor">{{.SiteName}}</a></h1>
|
||||
{{ end }}
|
||||
<nav id="user-nav">
|
||||
<nav class="dropdown-nav">
|
||||
<ul><li><a>{{.Username}}</a> <img class="ic-18dp" src="/img/ic_down_arrow_dark@2x.png" /><ul>
|
||||
|
@ -52,10 +58,21 @@
|
|||
</ul>
|
||||
</nav>
|
||||
<nav class="tabs">
|
||||
<a href="/me/c/"{{if eq .Path "/me/c/"}} class="selected"{{end}}>Blogs</a>
|
||||
<a href="/me/posts/"{{if eq .Path "/me/posts/"}} class="selected"{{end}}>Drafts</a>
|
||||
{{if .SimpleNav}}
|
||||
<a href="/about">About</a>
|
||||
{{if and (and (not .SingleUser) .LocalTimeline) .CanViewReader}}<a href="/read">Reader</a>{{end}}
|
||||
<a href="/me/logout">Log out</a>
|
||||
{{else}}
|
||||
<a href="/me/c/"{{if eq .Path "/me/c/"}} class="selected"{{end}}>Blogs</a>
|
||||
<a href="/me/posts/"{{if eq .Path "/me/posts/"}} class="selected"{{end}}>Drafts</a>
|
||||
{{end}}
|
||||
</nav>
|
||||
</nav>
|
||||
{{if .SimpleNav}}<div class="right-side">
|
||||
<a class="simple-btn" href="/new">New Post</a>
|
||||
</div>
|
||||
</nav>
|
||||
{{end}}
|
||||
{{end}}
|
||||
</header>
|
||||
<div id="official-writing">
|
||||
|
|
Loading…
Reference in a new issue