Ghost/ghost/admin/app/templates/settings/navigation.hbs
Peter Zimon 04d9caefed Updated navigation (#1832)
no issue

Updated settings navigation to a completely redesigned flow for Ghost 4.0 🎉

Co-authored-by: Kevin Ansfield <kevin@lookingsideways.co.uk>
Co-authored-by: Fabien O'Carroll <fabien@allou.is>
Co-authored-by: Rish <zrishabhgarg@gmail.com>
2021-02-02 16:08:06 +00:00

79 lines
3.7 KiB
Handlebars

<section class="gh-canvas">
<GhCanvasHeader class="gh-canvas-header">
<h2 class="gh-canvas-title" data-test-screen-title>
<LinkTo @route="settings">Settings</LinkTo>
<span>{{svg-jar "arrow-right"}}</span>
Navigation
</h2>
<section class="view-actions">
<GhTaskButton @task={{this.save}} @class="gh-btn gh-btn-blue gh-btn-icon" data-test-save-button={{true}} />
</section>
</GhCanvasHeader>
{{#if this.showLeaveSettingsModal}}
<GhFullscreenModal @modal="leave-settings"
@confirm={{action "leaveSettings"}}
@close={{action "toggleLeaveSettingsModal"}}
@modifier="action wide" />
{{/if}}
<section class="view-container gh-settings-design">
<div class="gh-setting-header gh-first-header">Primary Navigation</div>
<div class="gh-blognav-container pa5 pt6 bg-grouped-table shadow-1 br3">
<form id="settings-navigation" class="gh-blognav" novalidate="novalidate">
<SortableObjects @sortableObjectList={{this.settings.navigation}} @useSwap={{false}}>
{{#each this.settings.navigation as |navItem index|}}
<DraggableObject @content={{navItem}} @dragHandle=".gh-blognav-grab" @isSortable={{true}}>
<GhNavitem
@navItem={{navItem}}
@baseUrl={{this.blogUrl}}
@addItem={{action "addNavItem"}}
@deleteItem={{action "deleteNavItem"}}
@updateUrl={{action "updateUrl"}}
@updateLabel={{action "updateLabel"}}
data-test-navitem={{index}} />
</DraggableObject>
{{/each}}
</SortableObjects>
<GhNavitem
@navItem={{this.newNavItem}}
@baseUrl={{this.blogUrl}}
@addItem={{action "addNavItem"}}
@updateUrl={{action "updateUrl"}}
@updateLabel={{action "updateLabel"}}
data-test-navitem="new" />
</form>
</div>
<div class="gh-setting-header">Secondary Navigation</div>
<div class="gh-blognav-container pa5 pt6 bg-grouped-table shadow-1 br3">
<form id="secondary-navigation" class="gh-blognav" novalidate="novalidate">
<SortableObjects @sortableObjectList={{this.settings.secondaryNavigation}} @useSwap={{false}}>
{{#each this.settings.secondaryNavigation as |navItem index|}}
<DraggableObject @content={{navItem}} @dragHandle=".gh-blognav-grab" @isSortable={{true}}>
<GhNavitem
@navItem={{navItem}}
@baseUrl={{this.blogUrl}}
@addItem={{action "addNavItem"}}
@deleteItem={{action "deleteNavItem"}}
@updateUrl={{action "updateUrl"}}
@updateLabel={{action "updateLabel"}}
data-test-navitem={{index}} />
</DraggableObject>
{{/each}}
</SortableObjects>
<GhNavitem
@navItem={{this.newSecondaryNavItem}}
@baseUrl={{this.blogUrl}}
@addItem={{action "addNavItem"}}
@updateUrl={{action "updateUrl"}}
@updateLabel={{action "updateLabel"}}
data-test-navitem="new" />
</form>
</div>
</section>
</section>
{{outlet}}