0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-13 22:41:32 -05:00
ghost/core/client/app/controllers/application.js
Matt Enlow c7a9e726e2 Add mobile menu open button and close on click outside nav
- Adds gh-view-title component to implement mobile menu button for titles on any page
- Refactors the `content-cover` out into the application template
- Fix various z-index issues with content-cover and gh-alert
- Move `.settings-menu-expanded` application view state from body to `.gh-viewport`
- Unify nav menu / mobile menu actions and code
2015-06-08 22:13:34 +02:00

44 lines
966 B
JavaScript

import Ember from 'ember';
export default Ember.Controller.extend({
dropdown: Ember.inject.service(),
// jscs: disable
signedOut: Ember.computed.match('currentPath', /(signin|signup|setup|reset)/),
// jscs: enable
topNotificationCount: 0,
showMobileMenu: false,
showSettingsMenu: false,
autoNav: false,
autoNavOpen: Ember.computed('autoNav', {
get () {
return false;
},
set (key, value) {
if (this.get('autoNav')) {
return value;
}
return false;
}
}),
actions: {
topNotificationChange (count) {
this.set('topNotificationCount', count);
},
toggleAutoNav () {
this.toggleProperty('autoNav');
},
openAutoNav () {
this.set('autoNavOpen', true);
},
closeAutoNav () {
this.set('autoNavOpen', false);
}
}
});