mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-26 12:21:36 +03:00
Add close of open section when clicking "Site design" nav heading
refs https://github.com/orgs/TryGhost/projects/51 - always reset the open section when the header link is clicked to collapse any open setting groups
This commit is contained in:
parent
d7fefd70cc
commit
eda694b69f
@ -4,7 +4,7 @@
|
|||||||
<section class="gh-nav-body gh-nav-design">
|
<section class="gh-nav-body gh-nav-design">
|
||||||
<div class="gh-nav-top" {{on "click" this.transitionBackToIndex}}>
|
<div class="gh-nav-top" {{on "click" this.transitionBackToIndex}}>
|
||||||
<div class="gh-nav-list gh-nav-main">
|
<div class="gh-nav-list gh-nav-main">
|
||||||
<LinkTo @route="settings.design" class="gh-nav-menu-title">Site design</LinkTo>
|
<LinkTo @route="settings.design" class="gh-nav-menu-title" {{on "click" this.closeAllSections}}>Site design</LinkTo>
|
||||||
{{#let (eq this.openSection "brand") as |isOpen|}}
|
{{#let (eq this.openSection "brand") as |isOpen|}}
|
||||||
<button class="gh-nav-design-tab {{if isOpen "active"}}" type="button" {{on "click" (fn this.toggleSection "brand")}}>
|
<button class="gh-nav-design-tab {{if isOpen "active"}}" type="button" {{on "click" (fn this.toggleSection "brand")}}>
|
||||||
<span class="gh-nav-button-expand">{{svg-jar (if isOpen "arrow-down-stroke" "arrow-right-stroke")}}</span>
|
<span class="gh-nav-button-expand">{{svg-jar (if isOpen "arrow-down-stroke" "arrow-right-stroke")}}</span>
|
||||||
|
@ -55,4 +55,9 @@ export default class DesignMenuComponent extends Component {
|
|||||||
this.router.transitionTo('settings.design.index');
|
this.router.transitionTo('settings.design.index');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@action
|
||||||
|
closeAllSections() {
|
||||||
|
this.openSection = null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user