style: optimize header css

This commit is contained in:
XPoet 2020-09-03 16:47:52 +08:00
parent bb74e232a9
commit 6eaeaf015d
1 changed files with 24 additions and 31 deletions

View File

@ -31,14 +31,25 @@ $header-progress-height = 2.8px;
.header-content { .header-content {
width: $main-content-width;
height: 100%;
transition();
+ils-tablet() {
width: 90%;
}
+ils-mobile() {
width: 95%;
}
display: flex; display: flex;
flex-direction: row; flex-direction: row;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
width: $main-content-width;
height: 100%;
position: relative; position: relative;
transition();
z-index: $z-index-5; z-index: $z-index-5;
.logo-title { .logo-title {
@ -58,9 +69,12 @@ $header-progress-height = 2.8px;
transition(); transition();
} }
.menu-list { .menu-list {
+ils-tablet() {
display: none;
}
.menu-item { .menu-item {
float: left; float: left;
position: relative; position: relative;
@ -70,7 +84,6 @@ $header-progress-height = 2.8px;
margin-left: 0; margin-left: 0;
} }
a { a {
&:hover { &:hover {
@ -120,6 +133,11 @@ $header-progress-height = 2.8px;
position: relative; position: relative;
cursor: pointer; cursor: pointer;
+ils-tablet() {
display: block;
}
.menu-bar-middle { .menu-bar-middle {
width: 18px; width: 18px;
height: 2px; height: 2px;
@ -239,6 +257,7 @@ $header-progress-height = 2.8px;
} }
} }
.header-drawer { .header-drawer {
transform: scaleY(1); transform: scaleY(1);
} }
@ -250,7 +269,6 @@ $header-progress-height = 2.8px;
} }
.header-wrapper-shrink { .header-wrapper-shrink {
if (hexo-config('magic.enable') == false) { if (hexo-config('magic.enable') == false) {
@ -284,29 +302,4 @@ $header-progress-height = 2.8px;
.header-drawer { .header-drawer {
padding: $header-shrink-height 0 20px 0; padding: $header-shrink-height 0 20px 0;
} }
}
@media screen and (max-width: $media-max-width) {
.menu-list {
display: none;
}
.menu-bar {
display: block !important;
}
.header-content {
width: 80% !important;
}
}
@media screen and (max-width: $media-max-width-mobile) {
.header-content {
width: 90% !important;
}
} }