From a703b26ac20957f391af8ae34a412cc753ef71ea Mon Sep 17 00:00:00 2001 From: Eliot Berriot Date: Thu, 15 Feb 2018 22:34:59 +0100 Subject: [PATCH] Responsive sidebar with a collapse/reveal button on smaller screens --- front/src/App.vue | 4 +- front/src/components/Sidebar.vue | 59 +++++++++++++++++++----- front/src/components/audio/SearchBar.vue | 4 ++ 3 files changed, 55 insertions(+), 12 deletions(-) diff --git a/front/src/App.vue b/front/src/App.vue index d1d63e651..fb1c27a89 100644 --- a/front/src/App.vue +++ b/front/src/App.vue @@ -48,7 +48,9 @@ export default { -moz-osx-font-smoothing: grayscale; } .main.pusher, .footer { - margin-left: 350px !important; + @include media(">desktop") { + margin-left: 350px !important; + } transform: none !important; } .main-pusher { diff --git a/front/src/components/Sidebar.vue b/front/src/components/Sidebar.vue index a315aab19..76fd8abac 100644 --- a/front/src/components/Sidebar.vue +++ b/front/src/components/Sidebar.vue @@ -1,13 +1,17 @@ @@ -25,6 +26,9 @@ export default { onSelect (result, response) { router.push(result.routerUrl) }, + onSearchQuery (query) { + self.$emit('search') + }, apiSettings: { beforeXHR: function (xhrObject) { xhrObject.setRequestHeader('Authorization', self.$store.getters['auth/header'])