From 7e2407a75e2f927bae932ef33308c9a67ab04b46 Mon Sep 17 00:00:00 2001 From: Anthony Ettinger Date: Mon, 5 Nov 2018 02:41:30 -0800 Subject: [PATCH 1/2] position search-bar properly according to window refs https://github.com/imusify/imusify-web/issues/124 --- src/components/CategoriesMenu.vue | 39 +++++++++++++++++++++++++++---- src/components/SearchBar.vue | 5 ++-- 2 files changed, 37 insertions(+), 7 deletions(-) diff --git a/src/components/CategoriesMenu.vue b/src/components/CategoriesMenu.vue index 5e3b704..abe5d9b 100644 --- a/src/components/CategoriesMenu.vue +++ b/src/components/CategoriesMenu.vue @@ -165,14 +165,19 @@ export default { justify-content: flex-start; flex-grow: 0; position: sticky; - top: 0; + top: -1px; z-index: 1; + background-color: #131314; > section { display: flex; justify-content: flex-start; align-items: center; overflow: hidden; + + &.categories { + width: 66vw; + } } ul a { @@ -230,14 +235,40 @@ export default { } @media (min-width: 480px) { + .topnav { + width: calc(100vw - 19rem); + } + .categories, .sub-categories { width: calc(100vw - 19rem); + + &.categories { + width: 40vw !important; + } } } - @media (min-width: 1200px) { - a.prev, a.next { - display: none !important; + @media (min-width: 800px) { + .categories, .sub-categories { + &.categories { + width: 60vw !important; + } + } + } + + @media (min-width: 1024px) { + .categories, .sub-categories { + &.categories { + width: 66vw !important; + } + } + } + + @media (min-width: 1440px) { + .categories, .sub-categories { + &.categories { + width: 75vw !important; + } } } diff --git a/src/components/SearchBar.vue b/src/components/SearchBar.vue index 76c9ea3..27fad46 100644 --- a/src/components/SearchBar.vue +++ b/src/components/SearchBar.vue @@ -2,7 +2,7 @@