mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-04 04:10:33 +03:00
c757ddbef8
* Admin UI update basics Added the basics for the Admin UI/style update. Very far from being done... * Admin style updates - exploring menu - enabling full width content (integrations selection bg) - updated main screens
114 lines
6.0 KiB
Handlebars
114 lines
6.0 KiB
Handlebars
<header class="gh-nav-menu">
|
|
<div class="gh-nav-menu-details">
|
|
<div class="gh-nav-menu-icon" style={{this.iconStyle}}></div>
|
|
<div class="gh-nav-menu-details-sitetitle">{{this.config.blogTitle}}</div>
|
|
</div>
|
|
<div class="gh-nav-menu-search">
|
|
<button class="gh-nav-btn-search" {{action "toggleSearchModal"}} title="Search site (Ctrl/⌘ + K)"><span>{{svg-jar "search"}}</span></button>
|
|
</div>
|
|
</header>
|
|
|
|
{{#if this.showSearchModal}}
|
|
<GhFullscreenModal @modal="search"
|
|
@close={{action "toggleSearchModal"}}
|
|
@modifier="action wide" />
|
|
{{/if}}
|
|
|
|
<section class="gh-nav-body">
|
|
<div class="gh-nav-top">
|
|
<ul class="gh-nav-list gh-nav-main">
|
|
<li class="relative">
|
|
<LinkTo @route="dashboard" @alt="Dashboard" @title="Dashboard" data-test-nav="dashboard">{{svg-jar "house"}} Dashboard</LinkTo>
|
|
</li>
|
|
<li class="relative">
|
|
<span {{action "transitionToOrRefreshSite" on="click"}}>
|
|
<LinkTo @route="site" data-test-nav="site" @current-when={{this.isOnSite}} @preventDefault={{false}}>
|
|
{{svg-jar "page"}} View site
|
|
</LinkTo>
|
|
</span>
|
|
<a href="{{this.config.blogUrl}}/" class="gh-secondary-action" title="Open site in new tab" target="_blank">
|
|
<span>{{svg-jar "expand"}}</span>
|
|
</a>
|
|
</li>
|
|
</ul>
|
|
<ul class="gh-nav-list gh-nav-manage">
|
|
<li class="gh-nav-list-new relative">
|
|
<GhLinkToCustomViewsIndex @route="posts" @query={{reset-query-params "posts"}} data-test-nav="posts">{{svg-jar "posts"}}Posts</GhLinkToCustomViewsIndex>
|
|
<LinkTo @route="editor.new" @model="post" @classNames="gh-secondary-action gh-nav-new-post" @alt="New post" @title="New post" data-test-nav="new-story"><span>{{svg-jar "add-stroke"}}</span></LinkTo>
|
|
{{#if this.customViews.forPosts}}
|
|
<button type="button" class="gh-nav-button-expand {{if this.navigation.settings.expanded.posts "expanded"}}" {{on "click" (fn this.navigation.toggleExpansion "posts")}} aria-label="{{if this.navigation.settings.expanded.posts "Collapse custom post types" "Expand custom post types"}}">
|
|
{{svg-jar (if this.navigation.settings.expanded.posts "arrow-down-stroke" "arrow-right-stroke")}}
|
|
</button>
|
|
{{#liquid-if this.navigation.settings.expanded.posts}}
|
|
<ul class="gh-nav-view-list">
|
|
{{#each this.customViews.forPosts as |view|}}
|
|
<li>
|
|
<LinkTo @route="posts" @query={{reset-query-params "posts" view.filter}} data-test-nav-custom="{{view.route}}-{{view.name}}" title="{{view.name}}">
|
|
<span class="flex items-center svg-{{view.color}}">
|
|
{{#unless view.icon}}
|
|
<span class="circle"></span>
|
|
{{/unless}}
|
|
</span>
|
|
<span class="gh-nav-viewname">{{view.name}}</span>
|
|
</LinkTo>
|
|
</li>
|
|
{{/each}}
|
|
</ul>
|
|
{{/liquid-if}}
|
|
{{/if}}
|
|
</li>
|
|
<li>
|
|
{{!-- clicking the Content link whilst on the content screen should reset the filter --}}
|
|
{{#if (eq this.router.currentRouteName "pages")}}
|
|
<LinkTo @route="pages" @query={{reset-query-params "pages"}} @classNames="active" data-test-nav="pages">{{svg-jar "page"}}Pages</LinkTo>
|
|
{{else}}
|
|
<LinkTo @route="pages" data-test-nav="pages">{{svg-jar "page"}}Pages</LinkTo>
|
|
{{/if}}
|
|
</li>
|
|
{{#if this.showTagsNavigation}}
|
|
<li><LinkTo @route="tags" data-test-nav="tags">{{svg-jar "tag"}}Tags</LinkTo></li>
|
|
{{/if}}
|
|
{{#if (gh-user-can-admin this.session.user)}}
|
|
<li>
|
|
{{#if (eq this.router.currentRouteName "members.index")}}
|
|
<LinkTo @route="members" @current-when="members member" @query={{reset-query-params "members.index"}} data-test-nav="members">{{svg-jar "members"}}Members</LinkTo>
|
|
{{else}}
|
|
<LinkTo @route="members" @current-when="members member" data-test-nav="members">{{svg-jar "members"}}Members</LinkTo>
|
|
{{/if}}
|
|
</li>
|
|
<li>
|
|
<LinkTo @route="integrations" @alt="Integrations" @title="Integrations" data-test-nav="dashboard">{{svg-jar "modules"}}Integrations</LinkTo>
|
|
</li>
|
|
{{/if}}
|
|
<li><LinkTo @route="staff" data-test-nav="staff">{{svg-jar "staff"}}Staff</LinkTo></li>
|
|
</ul>
|
|
|
|
{{#if this.showMenuExtension}}
|
|
<ul class="gh-nav-list gh-nav-settings">
|
|
{{#if this.config.clientExtensions.menu.title}}
|
|
<li class="gh-nav-list-h">{{this.config.clientExtensions.menu.title}}</li>
|
|
{{/if}}
|
|
{{#each this.config.clientExtensions.menu.items as |menuItem| }}
|
|
<li>
|
|
<a href="{{menuItem.href}}" target="_blank">{{svg-jar menuItem.icon}}{{menuItem.text}}</a>
|
|
</li>
|
|
{{/each}}
|
|
</ul>
|
|
{{/if}}
|
|
|
|
{{#if this.showScriptExtension}}
|
|
{{{this.config.clientExtensions.script.container}}}
|
|
<script src="{{this.config.clientExtensions.script.src}}"></script>
|
|
{{/if}}
|
|
</div>
|
|
|
|
<GhNavMenu::Footer />
|
|
|
|
</section>
|
|
|
|
<GhTourItem @throbberId="getting-started"
|
|
@target=".gh-nav-main"
|
|
@throbberAttachment="middle right"
|
|
@popoverTriangleClass="left-top"
|
|
@throbberOffset="0px 0px"
|
|
/> |