From 4eb5ea88a8741b8314c8e97e096cf9081450e79d Mon Sep 17 00:00:00 2001 From: AlexanderBoriskin <39219429+AlexanderBoriskin@users.noreply.github.com> Date: Fri, 17 Aug 2018 16:17:50 +0300 Subject: [PATCH] Bug/sidebar (#291) * bug(sidebar): fix routes configuration * bug(sidebar): fix icons path * bug(sidebar): fix problem with link category --- src/sass/_icons-styles.scss | 2 +- src/vuestic-theme/vuestic-directives/Layout.js | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/sass/_icons-styles.scss b/src/sass/_icons-styles.scss index ce34474d8..74454db82 100644 --- a/src/sass/_icons-styles.scss +++ b/src/sass/_icons-styles.scss @@ -1,4 +1,4 @@ -@import url(https://weloveiconfonts.com/api/?family=brandico|entypo|fontelico|iconicfill|iconicstroke|maki|openwebicons|typicons|zocial); +@import url(http://weloveiconfonts.com/api/?family=brandico|entypo|fontelico|iconicfill|iconicstroke|maki|openwebicons|typicons|zocial); /* brandico */ [class*="brandico-"]:before { diff --git a/src/vuestic-theme/vuestic-directives/Layout.js b/src/vuestic-theme/vuestic-directives/Layout.js index 5f8b197a9..1c0532ec0 100644 --- a/src/vuestic-theme/vuestic-directives/Layout.js +++ b/src/vuestic-theme/vuestic-directives/Layout.js @@ -4,13 +4,13 @@ export default { let navbar = el.querySelector('.vuestic-navbar') let sidebar = el.querySelector('.vuestic-sidebar') - const desktopWidth = 992 + const mobileWidth = 415 el.resizeWindow = (evt) => { setTimeout(function () { let openedDropdown = navbar.querySelector('.show') let selector = navbar.querySelector('.header-selector') - if (openedDropdown && document.documentElement.clientWidth < desktopWidth && + if (openedDropdown && document.documentElement.clientWidth < mobileWidth && !evt.target.classList.contains('header-selector')) { sidebar.classList.add('sidebar-hidden') selector.classList.remove('i-menu-expanded') @@ -27,7 +27,7 @@ export default { navbar.addEventListener('click', el.resizeWindow) sidebar.addEventListener('click', () => { - if (document.documentElement.clientWidth < desktopWidth) { + if (document.documentElement.clientWidth < mobileWidth) { sidebar.classList.add('sidebar-hidden') } })