Ghost/core/client/templates/-navbar.hbs
Robert Jackson 3a912bd89e Refactor navbar to eliminate nested {{link-to}}.
no related issue

This is essentially setting up a binding from the `LinkView`'s `active`
status and whatever is set as `alternativeActive` in the `{{link-to}}`
(in our case the `activating-list-item` component.

Screenshots showing that the proper CSS classes are given:

![screenshot](http://monosnap.com/image/tzOH6n82rIVGNEFAUWVOLN52QuASQ4.png)

![screenshot](http://monosnap.com/image/5gmcwJcj0kgEXt8lnET4OKgIZ8KRpH.png)

![screenshot](http://monosnap.com/image/UCVNukTXLMNfVneLhzwVyhkrVlGSBt.png)
2014-04-01 22:36:16 -04:00

30 lines
1.4 KiB
Handlebars

<header id="global-header" class="navbar">
<a class="ghost-logo" href="/" data-off-canvas="left" title="/">
<span class="hidden">Ghost </span>
</a>
<nav id="global-nav" role="navigation">
<ul id="main-menu" >
{{activating-list-item route="posts" title="Content" classNames="content"}}
{{activating-list-item route="new" title="New post" classNames="content"}}
{{activating-list-item route="settings" title="Settings" classNames="content"}}
<li id="usermenu" class="usermenu subnav">
<a href="#" class="dropdown">
{{!-- @TODO: show avatar of logged in user --}}
<img class="avatar" src="/shared/img/user-image.png" alt="Avatar" />
{{!-- @TODO: show logged in user name or email --}}
<span class="name">Fake Ghost</span>
</a>
{{!-- @TODO: add functionality to allow for dropdown to work --}}
<ul class="overlay">
<li class="usermenu-profile"><a href="#">Your Profile</a></li>
<li class="divider"></li>
<li class="usermenu-help"><a href="http://ghost.org/forum/">Help / Support</a></li>
<li class="divider"></li>
<li class="usermenu-signout"><a href="#">Sign Out</a></li>
</ul>
</li>
</ul>
</nav>
</header>