diff options
author | nacho <nacho@ownyourbits.com> | 2019-04-23 15:13:11 -0600 |
---|---|---|
committer | John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> | 2019-05-30 08:28:30 +0200 |
commit | 3c30d293fa1d52ff51581091e3d39a30ac7474d3 (patch) | |
tree | 8dde36e30baf8d5f9b1dcda40bfe8cc5f9f6700f /core/src | |
parent | 89c701382f7a3dfaae3a45d1001ab26fb08cdd8a (diff) | |
download | nextcloud-server-3c30d293fa1d52ff51581091e3d39a30ac7474d3.tar.gz nextcloud-server-3c30d293fa1d52ff51581091e3d39a30ac7474d3.zip |
CSS: adjust media query breakpoint to improve tablet readability
see https://github.com/nextcloud/news/pull/467
Diffstat (limited to 'core/src')
-rw-r--r-- | core/src/init.js | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/core/src/init.js b/core/src/init.js index ebf99ffd640..b6cdf319739 100644 --- a/core/src/init.js +++ b/core/src/init.js @@ -30,6 +30,9 @@ import {setUp as setUpMainMenu} from './components/MainMenu' import {setUp as setUpUserMenu} from './components/UserMenu' import PasswordConfirmation from './OC/password-confirmation' +// keep in sync with core/css/variables.scss +const breakpoint_mobile_width = 1024; + const resizeMenu = () => { const appList = $('#appmenu li') const rightHeaderWidth = $('.header-right').outerWidth() @@ -37,7 +40,7 @@ const resizeMenu = () => { const usePercentualAppMenuLimit = 0.33 const minAppsDesktop = 8 let availableWidth = headerWidth - $('#nextcloud').outerWidth() - (rightHeaderWidth > 210 ? rightHeaderWidth : 210) - const isMobile = $(window).width() < 768 + const isMobile = $(window).width() < breakpoint_mobile_width if (!isMobile) { availableWidth = availableWidth * usePercentualAppMenuLimit } @@ -279,7 +282,7 @@ export const initCore = () => { } const toggleSnapperOnSize = () => { - if ($(window).width() > 768) { + if ($(window).width() > breakpoint_mobile_width) { snapper.close() snapper.disable() |