Ghost/ghost/admin/app/components/gh-nav-menu.hbs
Kevin Ansfield 8710f5f532 Added animation of sidebar between main and contextual menus
refs https://github.com/TryGhost/Team/issues/1149

- added `ember-css-transitions` library that provides a modifier that adds/removes classes used for animating elements in and out, automatically creating a clone for destroyed elements
- added a wrapper class around the `main` and `design` nav menu contents so they could be individually animated
- used the new `{{css-transition}}` modifier to animate the sidebar menus in/out
- ensured main menu doesn't animate on first render of the parent `<GhNavMenu>` component so there's no animation when Admin is loaded
2021-10-20 13:04:05 +01:00

7 lines
371 B
Handlebars

<nav class="gh-nav {{if this.ui.contextualNavMenu "gh-nav-contextual"}}" {{did-insert (fn (mut this.firstRender) false)}} ...attributes>
{{#if this.ui.contextualNavMenu}}
{{component (concat "gh-nav-menu/" ui.contextualNavMenu)}}
{{else}}
<GhNavMenu::Main @icon={{this.settings.settledIcon}} @firstRender={{this.firstRender}} />
{{/if}}
</nav>