Ghost/ghost/admin/templates/-navbar.hbs

54 lines
2.4 KiB
Handlebars
Raw Normal View History

2014-08-05 13:17:20 +04:00
<nav class="global-nav" role="navigation">
<a class="ghost-logo nav-item" {{bind-attr href=ghostPaths.blogRoot title=ghostPaths.blogRoot}}>
<div class="nav-label"><i class="icon-ghost"></i> <span>Visit blog</span> </div>
</a>
{{#link-to "posts" classNames="nav-item"}}
<div class="nav-label"><i class="icon-content"></i> Content</div>
{{/link-to}}
{{#link-to "editor.new" classNames="nav-item"}}
<div class="nav-label"><i class="icon-add"></i> New Post</div>
{{/link-to}}
2014-08-05 13:17:20 +04:00
{{#unless session.user.isAuthor}}
{{#link-to "settings" classNames="nav-item"}}
<div class="nav-label"><i class="icon-settings2"></i> Settings</div>
{{/link-to}}
{{/unless}}
{{! TODO: Mobile-only menu items
<a class="nav-item thing" href="#">
<div class="nav-label">Thing</div>
</a>
2014-08-05 13:17:20 +04:00
<a class="nav-item thing2" href="#">
<div class="nav-label">Thing2</div>
</a>
}}
2014-08-05 13:17:20 +04:00
<div class="nav-item user-menu" data-href="#">
{{#gh-popover-button popoverName="user-menu" tagName="div" classNames="nav-label"}}
{{#if session.user.image}}
<div class="image"><img {{bind-attr src="session.user.image"}} alt="{{session.user.name}}'s profile picture" /></div>
{{else}}
<div class="image"><img src="/shared/img/user-image.png" alt="Profile picture" /></div>
{{/if}}
<div class="name">
{{session.user.name}} <i class="icon-chevron-down"></i>
<small>Profile &amp; Settings</small>
</div>
{{/gh-popover-button}}
{{#gh-popover tagName="div" classNames="dropdown" name="user-menu" closeOnClick="true"}}
<ul class="dropdown-menu dropdown-triangle-top-right" role="menu">
2014-08-05 13:17:20 +04:00
<li role="presentation">{{#link-to "settings.users.user" session.user.slug classNames="dropdown-item" role="menuitem" tabindex="-1"}}Your Profile{{/link-to}}</li>
<li role="presentation"><a class="dropdown-item" role="menuitem" tabindex="-1" href="http://support.ghost.org/">Help / Support</a></li>
<li class="divider"></li>
<li role="presentation">{{#link-to "signout" classNames="dropdown-item" role="menuitem" tabindex="-1"}}Sign Out{{/link-to}}</li>
</ul>
{{/gh-popover}}
</div>{{! .user-menu }}
2014-08-05 13:17:20 +04:00
</nav>{{! .global-nav }}