mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-18 16:01:40 +03:00
dc14ea0115
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
18 lines
438 B
JavaScript
18 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
|
|
};
|