Ghost/core/client/templates/-navbar.hbs

57 lines
2.6 KiB
Handlebars
Raw Normal View History

2014-08-05 13:17:20 +04:00
<nav class="global-nav" role="navigation">
2014-08-17 23:23:00 +04:00
<a class="nav-item ghost-logo" {{bind-attr href=ghostPaths.blogRoot title=ghostPaths.blogRoot}}>
2014-08-05 13:17:20 +04:00
<div class="nav-label"><i class="icon-ghost"></i> <span>Visit blog</span> </div>
</a>
2014-09-24 15:03:19 +04:00
{{#link-to "posts" classNames="nav-item nav-content js-nav-item"}}
2014-08-05 13:17:20 +04:00
<div class="nav-label"><i class="icon-content"></i> Content</div>
{{/link-to}}
{{#link-to "editor.new" classNames="nav-item nav-new js-nav-item"}}
2014-08-05 13:17:20 +04:00
<div class="nav-label"><i class="icon-add"></i> New Post</div>
{{/link-to}}
2014-09-24 15:03:19 +04:00
2014-08-05 13:17:20 +04:00
{{#unless session.user.isAuthor}}
{{#link-to "settings" classNames="nav-item nav-settings js-nav-item"}}
2014-08-05 13:17:20 +04:00
<div class="nav-label"><i class="icon-settings2"></i> Settings</div>
{{/link-to}}
{{/unless}}
2014-09-24 15:03:19 +04:00
2014-08-05 13:17:20 +04:00
{{! 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 clearfix"}}
2014-08-05 13:17:20 +04:00
{{#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 js-user-menu-dropdown-menu" role="menu">
2014-09-24 15:03:19 +04:00
<li role="presentation">{{#link-to "settings.users.user" session.user.slug classNames="dropdown-item user-menu-profile js-nav-item" role="menuitem" tabindex="-1"}}<i class="icon-user"></i> Your Profile{{/link-to}}</li>
<li role="presentation"><a class="dropdown-item user-menu-support" role="menuitem" tabindex="-1" href="http://support.ghost.org/"><i class="icon-support"></i> Help / Support</a></li>
2014-08-05 13:17:20 +04:00
<li class="divider"></li>
2014-09-24 15:03:19 +04:00
<li role="presentation">{{#link-to "signout" classNames="dropdown-item user-menu-signout" role="menuitem" tabindex="-1"}}<i class="icon-power"></i> Sign Out{{/link-to}}</li>
2014-08-05 13:17:20 +04:00
</ul>
{{/gh-popover}}
</div>{{! .user-menu }}
</nav>{{! .global-nav }}
2014-09-24 15:03:19 +04:00
<div class="nav-cover js-nav-cover"></div>