2021-11-01 20:48:49 +03:00
|
|
|
<div class="flex flex-column h-100" {{css-transition (unless @firstRender "gh-nav-main")}} data-test-nav-menu="main" ...attributes>
|
2022-04-20 13:08:48 +03:00
|
|
|
|
2022-02-01 20:59:20 +03:00
|
|
|
{{#unless this.session.user.isContributor}}
|
|
|
|
<header class="gh-nav-menu">
|
|
|
|
<div class="gh-nav-menu-details">
|
|
|
|
<div class="gh-nav-menu-icon {{this.iconClass}}" style={{this.iconStyle}}></div>
|
|
|
|
<div class="gh-nav-menu-details-sitetitle">{{this.config.blogTitle}}</div>
|
|
|
|
</div>
|
|
|
|
<div class="gh-nav-menu-search">
|
2022-02-02 19:09:43 +03:00
|
|
|
<button class="gh-nav-btn-search" title="Search site (Ctrl/⌘ + K)" type="button" {{on "click" (action "openSearchModal")}}><span>{{svg-jar "search"}}</span></button>
|
2022-02-01 20:59:20 +03:00
|
|
|
</div>
|
|
|
|
</header>
|
|
|
|
{{/unless}}
|
2021-01-28 18:25:21 +03:00
|
|
|
|
2021-10-20 15:04:05 +03:00
|
|
|
<section class="gh-nav-body">
|
2022-02-01 20:59:20 +03:00
|
|
|
|
|
|
|
{{#unless this.session.user.isContributor}}
|
|
|
|
<div class="gh-nav-top">
|
|
|
|
<ul class="gh-nav-list gh-nav-main">
|
|
|
|
{{#if (gh-user-can-admin this.session.user)}}
|
|
|
|
<li class="relative">
|
2022-02-02 19:09:43 +03:00
|
|
|
<LinkTo @route="dashboard" @alt="Dashboard" title="Dashboard" data-test-nav="dashboard">{{svg-jar "house"}} Dashboard</LinkTo>
|
2022-02-01 20:59:20 +03:00
|
|
|
</li>
|
|
|
|
{{/if}}
|
|
|
|
<li class="relative">
|
|
|
|
<span {{action "transitionToOrRefreshSite" on="click"}}>
|
|
|
|
<LinkTo @route="site" data-test-nav="site" @current-when={{this.isOnSite}} @preventDefault={{false}}>
|
|
|
|
{{svg-jar "view-site"}} View site
|
|
|
|
</LinkTo>
|
|
|
|
</span>
|
2022-02-02 19:09:43 +03:00
|
|
|
<a href="{{this.config.blogUrl}}/" class="gh-secondary-action" title="Open site in new tab" target="_blank" rel="noopener noreferrer">
|
2022-02-01 20:59:20 +03:00
|
|
|
<span>{{svg-jar "external"}}</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>
|
2022-02-02 19:09:43 +03:00
|
|
|
<LinkTo @route="editor.new" @model="post" class="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>
|
2022-02-01 20:59:20 +03:00
|
|
|
{{#if this.session.user.isAuthorOrContributor}}
|
|
|
|
{{#if this.customViews.forPosts}}
|
2022-01-26 17:49:50 +03:00
|
|
|
<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="gh-nav-viewname">{{view.name}}</span>
|
|
|
|
<span class="flex items-center svg-{{view.color}}">
|
|
|
|
{{#unless view.icon}}
|
|
|
|
<span class="absolute circle"></span>
|
|
|
|
{{/unless}}
|
|
|
|
</span>
|
|
|
|
</LinkTo>
|
|
|
|
</li>
|
|
|
|
{{/each}}
|
|
|
|
</ul>
|
2022-02-01 20:59:20 +03:00
|
|
|
{{/if}}
|
2021-10-20 15:04:05 +03:00
|
|
|
{{else}}
|
2022-02-01 20:59:20 +03:00
|
|
|
{{#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="gh-nav-viewname">{{view.name}}</span>
|
|
|
|
<span class="flex items-center svg-{{view.color}}">
|
|
|
|
{{#unless view.icon}}
|
|
|
|
<span class="absolute circle"></span>
|
|
|
|
{{/unless}}
|
|
|
|
</span>
|
|
|
|
</LinkTo>
|
|
|
|
</li>
|
|
|
|
{{/each}}
|
|
|
|
</ul>
|
|
|
|
{{/liquid-if}}
|
|
|
|
{{/if}}
|
2021-10-20 15:04:05 +03:00
|
|
|
{{/if}}
|
|
|
|
</li>
|
|
|
|
<li>
|
2022-02-01 20:59:20 +03:00
|
|
|
{{!-- clicking the Content link whilst on the content screen should reset the filter --}}
|
|
|
|
{{#if (eq this.router.currentRouteName "pages")}}
|
2022-02-02 19:09:43 +03:00
|
|
|
<LinkTo @route="pages" @query={{reset-query-params "pages"}} class="active" data-test-nav="pages">{{svg-jar "page"}}Pages</LinkTo>
|
2022-02-01 20:59:20 +03:00
|
|
|
{{else}}
|
|
|
|
<LinkTo @route="pages" data-test-nav="pages">{{svg-jar "page"}}Pages</LinkTo>
|
|
|
|
{{/if}}
|
2021-10-20 15:04:05 +03:00
|
|
|
</li>
|
2022-02-01 20:59:20 +03:00
|
|
|
{{#if this.showTagsNavigation}}
|
|
|
|
<li><LinkTo @route="tags" data-test-nav="tags">{{svg-jar "tag"}}Tags</LinkTo></li>
|
2021-10-21 18:08:48 +03:00
|
|
|
{{/if}}
|
2022-02-01 20:59:20 +03:00
|
|
|
{{#if (gh-user-can-admin this.session.user)}}
|
|
|
|
<li class="relative">
|
|
|
|
{{#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
|
|
|
|
{{#unless this.memberCountLoading}}
|
|
|
|
<span class="gh-nav-member-count">{{format-number this.memberCount}}</span>
|
|
|
|
{{/unless}}
|
|
|
|
</LinkTo>
|
|
|
|
{{else}}
|
|
|
|
<LinkTo @route="members" @current-when="members member" data-test-nav="members">{{svg-jar "members"}}Members
|
|
|
|
{{#unless this.memberCountLoading}}
|
|
|
|
<span class="gh-nav-member-count">{{format-number this.memberCount}}</span>
|
|
|
|
{{/unless}}
|
|
|
|
</LinkTo>
|
|
|
|
{{/if}}
|
|
|
|
</li>
|
2021-10-20 15:04:05 +03:00
|
|
|
|
2022-02-22 17:18:59 +03:00
|
|
|
{{#if (and this.isStripeConnected (not-eq this.settings.membersSignupAccess "none"))}}
|
2022-03-01 17:57:57 +03:00
|
|
|
<li>
|
|
|
|
<LinkTo @route="offers" @alt="Offers">{{svg-jar "percentage"}}Offers</LinkTo>
|
|
|
|
</li>
|
2022-02-01 20:59:20 +03:00
|
|
|
{{/if}}
|
|
|
|
{{/if}}
|
2021-10-20 15:04:05 +03:00
|
|
|
</ul>
|
|
|
|
|
2022-02-01 20:59:20 +03:00
|
|
|
{{#if this.session.user.isOwnerOnly}}
|
|
|
|
<ul class="gh-nav-list">
|
|
|
|
{{#if this.showBilling}}
|
|
|
|
<li class="relative">
|
|
|
|
<a href="javascript:void(0)" class={{if this.billing.billingWindowOpen "active"}} {{action "toggleBillingModal" }} data-test-nav="billing">
|
|
|
|
{{svg-jar "credit-card"}} Ghost(Pro)
|
|
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="relative gh-nav-pro">
|
|
|
|
<GhBillingUpdateButton />
|
|
|
|
</li>
|
|
|
|
{{/if}}
|
|
|
|
</ul>
|
|
|
|
{{/if}}
|
|
|
|
|
|
|
|
{{#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>
|
2022-02-02 19:09:43 +03:00
|
|
|
<a href="{{menuItem.href}}" target="_blank" rel="noopener noreferrer">{{svg-jar menuItem.icon}}{{menuItem.text}}</a>
|
2022-02-01 20:59:20 +03:00
|
|
|
</li>
|
|
|
|
{{/each}}
|
|
|
|
</ul>
|
|
|
|
{{/if}}
|
|
|
|
|
|
|
|
{{#if this.showScriptExtension}}
|
|
|
|
{{{this.config.clientExtensions.script.container}}}
|
|
|
|
<script src="{{this.config.clientExtensions.script.src}}"></script>
|
|
|
|
{{/if}}
|
|
|
|
</div>
|
|
|
|
{{/unless}}
|
2021-01-28 18:25:21 +03:00
|
|
|
|
2021-10-20 15:04:05 +03:00
|
|
|
<GhNavMenu::Footer />
|
2021-01-28 18:25:21 +03:00
|
|
|
|
2021-10-20 15:04:05 +03:00
|
|
|
</section>
|
2021-10-20 09:21:06 +03:00
|
|
|
</div>
|