From d1861d023baf704d9ffbde73aecd12de0d01ea27 Mon Sep 17 00:00:00 2001 From: Your Name Date: Thu, 20 Apr 2023 09:31:07 -0400 Subject: [PATCH] optimize mobile header --- common/static/sass/_Grid.sass | 11 +++++------ common/static/sass/_Navbar.sass | 27 ++++----------------------- common/templates/partial/_navbar.html | 1 - 3 files changed, 9 insertions(+), 30 deletions(-) diff --git a/common/static/sass/_Grid.sass b/common/static/sass/_Grid.sass index 6fcac292..235b076d 100644 --- a/common/static/sass/_Grid.sass +++ b/common/static/sass/_Grid.sass @@ -8,7 +8,7 @@ padding: 0 2.0rem; width: 100% -.grid +.grid @include container $main-width: 70% @@ -18,7 +18,7 @@ width: $main-width float: left position: relative - + & &__aside width: $aside-width // background-color: $color-bright @@ -30,11 +30,12 @@ justify-content: space-around &::after - @include clear + @include clear // Small devices (landscape phones, 576px and up) @media (max-width: $small-devices) .grid + padding: 0 0.2rem; & &__aside flex-direction: column !important // Medium devices (tablets, 768px and up) @@ -58,9 +59,7 @@ & &__main--reverse-order transform: scaleY(-1) & &__aside--reverse-order - transform: scaleY(-1) + transform: scaleY(-1) // Extra large devices (large desktops, 1200px and up) @media (max-width: $x-large-devices) pass - - diff --git a/common/static/sass/_Navbar.sass b/common/static/sass/_Navbar.sass index dc1751ec..6d6d6e6d 100644 --- a/common/static/sass/_Navbar.sass +++ b/common/static/sass/_Navbar.sass @@ -85,41 +85,22 @@ & &__wrapper display: block & &__logo-img - width: 72px + max-width: 72px + max-height: 26px margin-right: 10px position: relative top: 7px - - // dropdown - & &__link-list - // display: block - margin-top: 7px - max-height: 0 - transition: max-height 0.6s ease-out - overflow: hidden; - & &__dropdown-btn - display: block - position: absolute - right: 5px - top: 3px - - transform: scale(0.7) - &:hover + .navbar__link-list - max-height: 500px - transition: max-height 0.6s ease-in - & &__search-box margin: 0 - width: 46vw + width: 80% $widget-height: 26px & > input[type="search"] height: $widget-height padding: 4px 6px - width: 32vw & .navbar__search-dropdown cursor: pointer height: $widget-height - width: 80px + width: 60px padding-left: 5px .dropdown display: inline diff --git a/common/templates/partial/_navbar.html b/common/templates/partial/_navbar.html index c96ab5d4..84596f66 100644 --- a/common/templates/partial/_navbar.html +++ b/common/templates/partial/_navbar.html @@ -24,7 +24,6 @@ -