Ghost/ghost/admin/app/templates/application.hbs
Kevin Ansfield 267ce40945 Refactor general UI state into a service
no issue
- moves general UI state control such as menu display, autonav, settings menu, etc into a `ui` service for easier use within components
- no longer required to jump through hoops passing state and actions down from application controller into components
- removes indirect "route" actions in favour of calling actions/methods directly on the `ui` service
2017-08-15 16:01:12 +01:00

34 lines
1.0 KiB
Handlebars

{{#gh-app showSettingsMenu=ui.showSettingsMenu}}
{{#gh-skip-link anchor=".gh-main"}}Skip to main content{{/gh-skip-link}}
{{gh-alerts notify="topNotificationChange"}}
<div class="gh-viewport {{if ui.autoNav 'gh-autonav'}} {{if ui.showSettingsMenu 'settings-menu-expanded'}} {{if ui.showMobileMenu 'mobile-menu-expanded'}}">
{{#if showNavMenu}}
{{gh-nav-menu
open=ui.autoNavOpen
icon=settings.settledIcon
showMarkdownHelp="toggleMarkdownHelpModal"}}
{{/if}}
{{#gh-main onMouseEnter=(action "closeAutoNav" target=ui) data-notification-count=topNotificationCount}}
{{outlet}}
{{/gh-main}}
{{gh-notifications}}
{{gh-content-cover}}
{{gh-mobile-nav-bar}}
</div>{{!gh-viewport}}
{{/gh-app}}
{{#if showMarkdownHelpModal}}
{{gh-fullscreen-modal "markdown-help"
close=(route-action "toggleMarkdownHelpModal")
modifier="wide"}}
{{/if}}
{{ember-load-remover}}