mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-29 15:12:58 +03:00
cf36851265
replaces #41, #60 - update ember-suave and grunt-jscs to 3.0 - standardize Ember global de-structuring rules across app & tests
50 lines
997 B
JavaScript
50 lines
997 B
JavaScript
import Ember from 'ember';
|
|
|
|
const {
|
|
Component,
|
|
String: {htmlSafe},
|
|
inject: {service},
|
|
computed
|
|
} = Ember;
|
|
|
|
export default Component.extend({
|
|
tagName: 'nav',
|
|
classNames: ['gh-nav'],
|
|
classNameBindings: ['open'],
|
|
|
|
open: false,
|
|
|
|
navMenuIcon: computed('ghostPaths.subdir', function () {
|
|
let url = `${this.get('ghostPaths.subdir')}/ghost/img/ghosticon.jpg`;
|
|
|
|
return htmlSafe(`background-image: url(${url})`);
|
|
}),
|
|
|
|
config: service(),
|
|
session: service(),
|
|
ghostPaths: service(),
|
|
feature: service(),
|
|
|
|
mouseEnter() {
|
|
this.sendAction('onMouseEnter');
|
|
},
|
|
|
|
actions: {
|
|
toggleAutoNav() {
|
|
this.sendAction('toggleMaximise');
|
|
},
|
|
|
|
showMarkdownHelp() {
|
|
this.sendAction('showMarkdownHelp');
|
|
},
|
|
|
|
closeMobileMenu() {
|
|
this.sendAction('closeMobileMenu');
|
|
},
|
|
|
|
openAutoNav() {
|
|
this.sendAction('openAutoNav');
|
|
}
|
|
}
|
|
});
|