mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-13 22:41:32 -05:00
53a4a6a010
Closes #3941 It now matches the mobile MQ in CSS - https://github.com/TryGhost/Ghost/blob/master/core/client/assets/sass/components/navigation.scss#L163
17 lines
438 B
JavaScript
17 lines
438 B
JavaScript
var mobileQuery = matchMedia('(max-width: 900px)'),
|
|
|
|
responsiveAction = function responsiveAction(event, mediaCondition, cb) {
|
|
if (!window.matchMedia(mediaCondition).matches) {
|
|
return;
|
|
}
|
|
|
|
event.preventDefault();
|
|
event.stopPropagation();
|
|
cb();
|
|
};
|
|
|
|
export { mobileQuery, responsiveAction };
|
|
export default {
|
|
mobileQuery: mobileQuery,
|
|
responsiveAction: responsiveAction
|
|
};
|