fix(shian): only fix height of the title row of the header

This commit is contained in:
Damillora 2021-04-16 20:42:13 +07:00
parent b2a4a3868a
commit 3359eb9575

View File

@ -1,122 +1,121 @@
.site-header { .site-header {
position: fixed; position: fixed;
z-index: 10; z-index: 10;
height: 3rem; height: 3rem;
width: 100%; width: 100%;
overflow: hidden; overflow: hidden;
@include transition;
&.enabled {
height: 100vh;
}
@include screen(md) {
height: 4rem;
}
&__background {
z-index: -1;
width: 100vw;
height: 100vh;
position: absolute;
@include transition; @include transition;
&.enabled {
height: 100vh;
}
@include screen(md) {
height: 4rem;
}
&__background { opacity: 0%;
z-index: -1; top: -23vh;
width: 100vw; &--enabled {
height: 100vh; opacity: 100%;
position: absolute; top: 0;
@include transition; }
}
&__overlay {
background-color: rgba(0, 0, 0, 0.5);
}
opacity: 0%; &__inner {
top: -23vh; z-index: 1;
&--enabled { width: 100%;
opacity: 100%; height: 100%;
top: 0; @include transition;
} }
}
&__overlay {
background-color: rgba(0,0,0,0.5);
}
&__inner { &.enabled &__inner {
z-index: 1; background: rgba(0, 0, 0, 0.5);
width: 100%; }
height: 100%; &.detached &__inner {
@include transition; background: rgba(0, 0, 0, 0.5);
} }
&.enabled &__inner {
background: rgba(0,0,0,0.5);
}
&.detached &__inner {
background: rgba(0,0,0,0.5);
}
} }
.header { .header {
display: flex;
flex-direction: column;
@include transition;
height: 100%;
&__top {
display: flex; display: flex;
flex-direction: column; flex-direction: row;
@include transition;
height: 3rem; height: 3rem;
@include screen(md) { @include screen(md) {
height: 4rem; height: 4rem;
} }
}
&__top { &__title {
display: flex; flex-grow: 1;
flex-direction: row; @include transition;
height: 100%; a {
display: flex;
flex-direction: row;
align-items: center;
@include py(0.5rem);
@include screen(md) {
@include py(1rem);
}
color: $white;
font-size: $text-lg;
padding-left: 1rem;
height: 100%;
} }
&:hover {
background-color: $theme-blue;
}
}
&__title { &__nav-button {
flex-grow: 1; display: flex;
@include transition; flex-direction: row;
a { align-items: center;
display: flex; height: 100%;
flex-direction: row; position: relative;
align-items: center; cursor: pointer;
@include py(0.5rem); padding: 0.5rem;
@include screen(md) { @include screen(md) {
@include py(1rem); @include py(1rem);
}
color: $white;
font-size: $text-lg;
padding-left: 1rem;
height: 100%;
}
&:hover {
background-color: $theme-blue;
}
} }
text-align: center;
&__nav-button { white-space: nowrap;
display: flex; @include transition;
flex-direction: row; &:hover {
align-items: center; background-color: $theme-blue;
height: 100%;
position: relative;
cursor: pointer;
padding: 0.5rem;
@include screen(md) {
@include py(1rem);
}
text-align: center;
white-space: nowrap;
@include transition;
&:hover {
background-color: $theme-blue;
}
p {
color: $white;
margin-right: 0.5rem;
display: none;
@include screen(md) {
display: block;
}
}
} }
&__icon { p {
width: 3rem; color: $white;
color: $white; margin-right: 0.5rem;
display: inline-block; display: none;
@include px(0.50rem); @include screen(md) {
vertical-align: middle; display: block;
// @include py(0.25rem); }
// @include screen(md) {
// @include py(0.75rem);
// }
} }
}
&__icon {
width: 3rem;
color: $white;
display: inline-block;
@include px(0.5rem);
vertical-align: middle;
// @include py(0.25rem);
// @include screen(md) {
// @include py(0.75rem);
// }
}
} }