mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-16 12:16:09 +03:00
c7a9e726e2
- 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
29 lines
533 B
JavaScript
29 lines
533 B
JavaScript
/*
|
|
|
|
Implements a div for covering the page content
|
|
when in a menu context that, for example,
|
|
should be closed when the user clicks elsewhere.
|
|
|
|
Example:
|
|
```
|
|
{{gh-content-cover onClick="closeMenus" onMouseEnter="closeAutoNav"}}
|
|
```
|
|
**/
|
|
|
|
import Ember from 'ember';
|
|
|
|
export default Ember.Component.extend({
|
|
classNames: ['content-cover'],
|
|
|
|
onClick: null,
|
|
onMouseEnter: null,
|
|
|
|
click: function () {
|
|
this.sendAction('onClick');
|
|
},
|
|
|
|
mouseEnter: function () {
|
|
this.sendAction('onMouseEnter');
|
|
}
|
|
});
|