mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-24 19:33:02 +03:00
21 lines
663 B
JavaScript
21 lines
663 B
JavaScript
|
import {responsiveAction} from 'ghost/utils/mobile-utils';
|
||
|
|
||
|
var ApplicationView = Ember.View.extend({
|
||
|
|
||
|
mobileInteractions: function () {
|
||
|
var body = $('body');
|
||
|
// ### Toggle the mobile sidebar menu
|
||
|
$('[data-off-canvas]').on('click', function (event) {
|
||
|
responsiveAction(event, '(max-width: 650px)', function () {
|
||
|
body.toggleClass('off-canvas');
|
||
|
});
|
||
|
});
|
||
|
// #### Navigating within the sidebar closes it.
|
||
|
$('.js-close-sidebar').on('click', function () {
|
||
|
body.removeClass('off-canvas');
|
||
|
});
|
||
|
}.on('didInsertElement')
|
||
|
});
|
||
|
|
||
|
export default ApplicationView;
|