From a703b26ac20957f391af8ae34a412cc753ef71ea Mon Sep 17 00:00:00 2001 From: Eliot Berriot Date: Thu, 15 Feb 2018 22:34:59 +0100 Subject: [PATCH 1/5] 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']) From 28c0121c89909bc0c805dee413401f2e1ce12cac Mon Sep 17 00:00:00 2001 From: Eliot Berriot Date: Thu, 15 Feb 2018 22:34:14 +0100 Subject: [PATCH 2/5] Smaller padding in menu and sections on small resolutions --- front/src/App.vue | 11 ++++++----- front/src/components/library/Library.vue | 11 +++++++++-- 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/front/src/App.vue b/front/src/App.vue index fb1c27a89..d310c3ca9 100644 --- a/front/src/App.vue +++ b/front/src/App.vue @@ -40,6 +40,7 @@ export default { // and we end up with CSS rules not applied, // see https://github.com/webpack/webpack/issues/215 @import 'semantic/semantic.css'; +@import 'style/vendor/media'; #app { @@ -56,11 +57,11 @@ export default { .main-pusher { padding: 1.5rem 0; } -#footer { - padding: 4em; -} -.ui.stripe.segment { - padding: 4em; +.ui.stripe.segment, #footer { + padding: 2em; + @include media(">tablet") { + padding: 4em; + } } .ui.small.text.container { diff --git a/front/src/components/library/Library.vue b/front/src/components/library/Library.vue index c27313dc3..5fe192022 100644 --- a/front/src/components/library/Library.vue +++ b/front/src/components/library/Library.vue @@ -22,8 +22,12 @@ export default {