mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-15 19:52:01 +03: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
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
|
|
};
|