Ghost/core/client/app/components/gh-nav-menu.js
2016-01-19 07:03:27 -06:00

40 lines
701 B
JavaScript

import Ember from 'ember';
const {
Component,
inject: {service}
} = Ember;
export default Component.extend({
tagName: 'nav',
classNames: ['gh-nav'],
classNameBindings: ['open'],
open: false,
config: service(),
session: service(),
mouseEnter() {
this.sendAction('onMouseEnter');
},
actions: {
toggleAutoNav() {
this.sendAction('toggleMaximise');
},
showMarkdownHelp() {
this.sendAction('showMarkdownHelp');
},
closeMobileMenu() {
this.sendAction('closeMobileMenu');
},
openAutoNav() {
this.sendAction('openAutoNav');
}
}
});