How to use the ghost/utils/mobile.matches function in ghost

To help you get started, we’ve selected a few ghost examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github TryGhost / Ghost-Admin / app / views / mobile / parent-view.js View on Github external
this.set('changeLayout', function changeLayout() {
            if (mobileQuery.matches) {
                // transitioned to mobile layout, so show content
                self.showContent();
            } else {
                // went from mobile to desktop
                self.showAll();
            }
        });
    }.on('init'),
github TryGhost / Ghost-Admin / views / mobile / parent-view.js View on Github external
this.set('changeLayout', function changeLayout() {
            if (mobileQuery.matches) {
                // transitioned to mobile layout, so show content
                self.showContent();
            } else {
                // went from mobile to desktop
                self.showAll();
            }
        });
    }.on('init'),
github TryGhost / Ghost-Admin / views / mobile / content-view.js View on Github external
showContent: function () {
        if (mobileQuery.matches) {
            this.get('parentView').showContent();
        }
    }.on('didInsertElement')
});
github TryGhost / Ghost-Admin / app / views / mobile / index-view.js View on Github external
showMenu: function () {
        if (mobileQuery.matches) {
            this.get('parentView').showMenu();
        }
    }.on('didInsertElement')
});
github TryGhost / Ghost / core / client / views / mobile / content-view.js View on Github external
showContent: function () {
        if (mobileQuery.matches) {
            this.get('parentView').showContent();
        }
    }.on('didInsertElement')
});
github TryGhost / Ghost / core / client / app / views / mobile / index-view.js View on Github external
showMenu: function () {
        if (mobileQuery.matches) {
            this.get('parentView').showMenu();
        }
    }.on('didInsertElement')
});
github TryGhost / Ghost-Admin / views / mobile / index-view.js View on Github external
showMenu: function () {
        if (mobileQuery.matches) {
            this.get('parentView').showMenu();
        }
    }.on('didInsertElement')
});
github TryGhost / Ghost-Admin / views / application.js View on Github external
Ember.run(function () {
                if (mobileQuery.matches) {
                    self.set('controller.showGlobalMobileNav', false);
                }
            });
        });
github TryGhost / Ghost-Admin / app / routes / settings / index.js View on Github external
.then(function () {
                if (!mobileQuery.matches) {
                    self.transitionTo('settings.general');
                }
            });
    },
github TryGhost / Ghost-Admin / app / views / mobile / content-view.js View on Github external
showContent: function () {
        if (mobileQuery.matches) {
            var parent = this.get('parentView');
            if (parent.showContent) {
                parent.showContent();
            }
        }
    }.on('didInsertElement')
});