perf(shian): switch back to usual nav menu

BREAKING CHANGE: please update your stylesheets accordingly
This commit is contained in:
Damillora 2021-07-11 00:24:55 +07:00
parent 4f53496885
commit 6def68f493
4 changed files with 70 additions and 8 deletions

View File

@ -34,6 +34,8 @@
z-index: 1; z-index: 1;
width: 100%; width: 100%;
height: 100%; height: 100%;
display: flex;
flex-direction: column;
@include transition; @include transition;
} }
@ -48,12 +50,16 @@
.header { .header {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
height: 100%;
@include transition; @include transition;
@include screen(md) {
height: 4rem;
flex-direction: row;
}
&__top { &__top {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
flex-grow: 1;
height: 3rem; height: 3rem;
@include screen(md) { @include screen(md) {
height: 4rem; height: 4rem;
@ -89,8 +95,10 @@
cursor: pointer; cursor: pointer;
text-align: center; text-align: center;
white-space: nowrap; white-space: nowrap;
@include transition; @include transition;
@include screen(md) {
display: none;
}
&:hover { &:hover {
background-color: $theme-blue; background-color: $theme-blue;
} }

View File

@ -1,11 +1,48 @@
.menu { .menu {
max-height: 0px;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
@include transition; @include transition;
overflow: hidden;
&.enabled { @include screen(md) {
max-height: 100vh; flex-direction: row;
}
// Dark mode special menu
&--dark-mode {
.menu__text {
display: block;
@include screen(md) {
display: none;
}
}
.menu__icon {
display: inline-block;
}
}
&__nav {
display: flex;
flex-direction: column;
@include screen(md) {
flex-direction: row;
}
}
&__nav-main {
display: flex;
flex-direction: column;
@include screen(md) {
flex-direction: row;
}
&.hidden {
display: none;
@include screen(md) {
display: flex;
}
}
} }
&__item { &__item {
color: $white; color: $white;
@ -16,6 +53,10 @@
cursor: pointer; cursor: pointer;
@include transition; @include transition;
@include screen(md) {
height: 4rem;
}
&:hover { &:hover {
background-color: $theme-blue; background-color: $theme-blue;
} }
@ -42,6 +83,10 @@
text-align: center; text-align: center;
@include px(0.5rem); @include px(0.5rem);
@include py(0.75rem); @include py(0.75rem);
@include screen(md) {
display: none;
}
} }
&__text { &__text {
display: inline-block; display: inline-block;
@ -94,4 +139,4 @@
text-decoration: underline; text-decoration: underline;
} }
} }
} }

View File

@ -8,7 +8,7 @@
align-items: center; align-items: center;
} }
&--tag-text { &--tag-text {
margin-left: 0.5rem; margin-right: 0.5rem;
color: $white; color: $white;
} }
&--tag-color { &--tag-color {

View File

@ -131,3 +131,12 @@
white-space: nowrap; white-space: nowrap;
} }
} }
#darkMode {
.menu__text {
display: block;
@include screen(md) {
display: none;
}
}
}