feat(shian): allow menu on both sides of header

This commit is contained in:
Damillora 2021-04-15 13:09:45 +07:00
parent 7735874650
commit 80b7edc301
2 changed files with 77 additions and 51 deletions

View File

@ -2,13 +2,15 @@
.site-header { .site-header {
position: fixed; position: fixed;
z-index: 10; z-index: 10;
height: 4rem; height: 3rem;
width: 100vw; width: 100%;
overflow: hidden; overflow: hidden;
@include transition; @include transition;
&.enabled { &.enabled {
height: 100vh; height: 100vh;
width: 100vw; }
@include screen(md) {
height: 4rem;
} }
&__background { &__background {
@ -51,6 +53,7 @@
&__top { &__top {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
height: 100%;
} }
&__title { &__title {
@ -60,7 +63,10 @@
display: flex; display: flex;
flex-direction: row; flex-direction: row;
align-items: center; align-items: center;
@include py(1rem); @include py(0.5rem);
@include screen(md) {
@include py(1rem);
}
color: $white; color: $white;
font-size: $text-lg; font-size: $text-lg;
padding-left: 1rem; padding-left: 1rem;
@ -72,23 +78,41 @@
} }
&__nav-button { &__nav-button {
width: 4rem; display: flex;
height: 4rem; flex-direction: row;
align-items: center;
height: 100%;
position: relative; position: relative;
cursor: pointer; cursor: pointer;
padding: 0.5rem; padding: 0.5rem;
@include screen(md) {
@include py(1rem);
}
text-align: center; text-align: center;
white-space: nowrap; white-space: nowrap;
@include transition; @include transition;
&:hover { &:hover {
background-color: $theme-blue; background-color: $theme-blue;
} }
p {
color: $white;
margin-right: 0.5rem;
display: none;
@include screen(md) {
display: block;
}
}
} }
&__icon { &__icon {
width: 3rem; width: 3rem;
height: 3rem; height: 100%;
color: $white; color: $white;
display: inline-block;
@include px(0.50rem); @include px(0.50rem);
@include py(0.75rem); vertical-align: middle;
// @include py(0.25rem);
// @include screen(md) {
// @include py(0.75rem);
// }
} }
} }

View File

@ -1,50 +1,52 @@
.menu { .menu {
max-height: 0px; max-height: 0px;
display: block; display: block;
@include transition;
overflow: hidden;
&.enabled {
max-height: 100vh;
}
&__item {
color: $white;
height: 3rem;
display: flex;
flex-direction: row;
align-items: center;
cursor: pointer;
@include transition; @include transition;
overflow: hidden; @include screen(md) {
height: 4rem;
&.enabled {
max-height: 100vh;
} }
&__item {
color: $white;
height: 3rem;
display: flex;
flex-direction: row;
align-items: center;
cursor: pointer;
@include transition;
&:hover { &:hover {
background-color: $theme-blue; background-color: $theme-blue;
} }
a { a {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
align-items: center; align-items: center;
width: 100%; width: 100%;
height: 100%; height: 100%;
}
i {
display: inline-block;
width: 4rem;
height: 3rem;
color: $white;
text-align: center;
@include px(0.50rem);
@include py(0.75rem);
}
p {
display: inline-block;
flex-grow: 1;
@include px(1rem);
}
} }
&__separator { i {
margin-left: 5rem; display: inline-block;
margin-right: 4rem; width: 4rem;
border-top: 0.125rem solid $white; height: 3rem;
color: $white;
text-align: center;
@include px(0.5rem);
@include py(0.75rem);
} }
p {
display: inline-block;
flex-grow: 1;
@include px(1rem);
}
}
&__separator {
margin-left: 5rem;
margin-right: 4rem;
border-top: 0.125rem solid $white;
}
} }