2020-04-01 12:09:06 +08:00
|
|
|
@require "../common/variables.styl"
|
|
|
|
|
2020-04-01 10:14:18 +08:00
|
|
|
.header-wrapper {
|
|
|
|
width: 100%;
|
|
|
|
height: 100%;
|
|
|
|
box-sizing: border-box;
|
|
|
|
background: #fff;
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
justify-content: center;
|
|
|
|
transition: height 0.5s ease, max-width 0.5s cubic-bezier(0, 0.2, 0.8, 1);
|
|
|
|
|
|
|
|
.header-content {
|
2020-04-01 22:42:24 +08:00
|
|
|
display: flex;
|
|
|
|
flex-direction: row;
|
|
|
|
justify-content: space-between;
|
|
|
|
align-items: center;
|
2020-04-01 17:55:34 +08:00
|
|
|
width: $main-content-width;
|
2020-04-01 10:14:18 +08:00
|
|
|
height: 100%;
|
|
|
|
position: relative;
|
|
|
|
transition: transform 0.5s ease;
|
2020-04-01 22:42:24 +08:00
|
|
|
z-index: $z-index-5;
|
2020-04-01 10:14:18 +08:00
|
|
|
|
2020-04-01 15:28:01 +08:00
|
|
|
.logo-title {
|
2020-04-01 10:14:18 +08:00
|
|
|
font-size: 28px;
|
|
|
|
font-weight: bold;
|
2020-04-01 22:42:24 +08:00
|
|
|
letter-spacing: 1px;
|
|
|
|
color: $first-text-color;
|
|
|
|
transform-origin: left center;
|
|
|
|
transition: all 0.5s ease;
|
2020-04-01 10:14:18 +08:00
|
|
|
}
|
|
|
|
|
2020-04-01 15:28:01 +08:00
|
|
|
|
2020-04-01 10:14:18 +08:00
|
|
|
.menu-list {
|
|
|
|
|
2020-04-01 15:28:01 +08:00
|
|
|
.menu-item {
|
2020-04-01 10:14:18 +08:00
|
|
|
float: left;
|
2020-04-01 15:28:01 +08:00
|
|
|
position: relative;
|
|
|
|
margin-left: 30px;
|
|
|
|
|
|
|
|
&:first-child {
|
|
|
|
margin-left: 0;
|
|
|
|
}
|
|
|
|
|
2020-04-01 22:42:24 +08:00
|
|
|
|
2020-04-01 15:28:01 +08:00
|
|
|
a {
|
|
|
|
|
|
|
|
&:hover {
|
|
|
|
|
2020-04-01 22:42:24 +08:00
|
|
|
color: $normal-text-color;
|
|
|
|
|
2020-04-01 15:28:01 +08:00
|
|
|
&::after {
|
|
|
|
content: '';
|
|
|
|
position: absolute;
|
|
|
|
bottom: -10px;
|
|
|
|
left: 50%;
|
|
|
|
width: 100%;
|
|
|
|
height: 2px;
|
|
|
|
transform: translateX(-50%);
|
2020-04-01 22:42:24 +08:00
|
|
|
background: $primary-color;
|
2020-04-01 15:28:01 +08:00
|
|
|
transition: all 0.5s ease;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.active {
|
2020-04-01 22:42:24 +08:00
|
|
|
color: $second-text-color;
|
|
|
|
font-weight: bold;
|
2020-04-01 15:28:01 +08:00
|
|
|
transition: all 0.5s ease;
|
|
|
|
|
|
|
|
&::after {
|
|
|
|
content: '';
|
|
|
|
position: absolute;
|
|
|
|
bottom: -10px;
|
|
|
|
left: 50%;
|
|
|
|
width: 100%;
|
|
|
|
height: 2px;
|
|
|
|
transform: translateX(-50%);
|
2020-04-01 22:42:24 +08:00
|
|
|
background: $primary-color;
|
2020-04-01 15:28:01 +08:00
|
|
|
transition: all 0.5s ease;
|
|
|
|
}
|
|
|
|
}
|
2020-04-01 10:14:18 +08:00
|
|
|
}
|
2020-04-01 15:28:01 +08:00
|
|
|
|
2020-04-01 10:14:18 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.menu-bar {
|
|
|
|
display: none;
|
2020-04-01 22:42:24 +08:00
|
|
|
position: relative;
|
2020-04-01 10:14:18 +08:00
|
|
|
cursor: pointer;
|
|
|
|
|
2020-04-01 22:42:24 +08:00
|
|
|
.menu-bar-middle {
|
|
|
|
width: 18px;
|
|
|
|
height: 2px;
|
|
|
|
margin: 6px 0;
|
|
|
|
position: relative;
|
|
|
|
background: $normal-text-color;
|
|
|
|
transition: all 0.3s ease;
|
|
|
|
|
|
|
|
&::before {
|
|
|
|
content: '';
|
|
|
|
position: absolute;
|
|
|
|
top: -6px;
|
|
|
|
left: 0;
|
|
|
|
width: 100%;
|
|
|
|
height: 2px;
|
|
|
|
background: $normal-text-color;
|
|
|
|
transition: all 0.3s ease;
|
|
|
|
}
|
|
|
|
|
|
|
|
&::after {
|
|
|
|
content: '';
|
|
|
|
position: absolute;
|
|
|
|
bottom: -6px;
|
|
|
|
left: 0;
|
|
|
|
width: 100%;
|
|
|
|
height: 2px;
|
|
|
|
background: $normal-text-color;
|
|
|
|
transition: all 0.3s ease;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2020-04-01 10:14:18 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.header-drawer {
|
|
|
|
width: 100%;
|
2020-04-01 12:09:06 +08:00
|
|
|
padding: $header-height 0 20px 0;
|
2020-04-01 10:14:18 +08:00
|
|
|
position: absolute;
|
|
|
|
top: 0;
|
|
|
|
left: 0;
|
|
|
|
transform: scaleY(0);
|
|
|
|
transform-origin: top;
|
2020-04-01 22:42:24 +08:00
|
|
|
background: $background-color;
|
2020-04-01 10:14:18 +08:00
|
|
|
transition: all 0.5s ease;
|
2020-04-01 22:42:24 +08:00
|
|
|
z-index: $z-index-2;
|
2020-04-01 10:14:18 +08:00
|
|
|
|
|
|
|
.drawer-menu-list {
|
|
|
|
display: flex;
|
|
|
|
flex-direction: column;
|
|
|
|
justify-content: flex-start;
|
|
|
|
align-items: center;
|
|
|
|
list-style-type: none;
|
|
|
|
|
|
|
|
.drawer-menu-item {
|
|
|
|
|
2020-04-01 22:42:24 +08:00
|
|
|
a {
|
|
|
|
display: block;
|
|
|
|
margin: 8px auto;
|
|
|
|
padding: 0 20px;
|
|
|
|
border-radius: 20px;
|
|
|
|
text-align: center;
|
|
|
|
line-height: 34px;
|
|
|
|
color: $normal-text-color;
|
|
|
|
transition: all 0.5s ease;
|
|
|
|
|
|
|
|
&:hover {
|
|
|
|
color: $second-text-color;
|
|
|
|
font-weight: bold;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.active {
|
|
|
|
border: 1px solid $primary-color;
|
|
|
|
color: $second-text-color;
|
|
|
|
font-weight: bold;
|
|
|
|
}
|
2020-04-01 10:14:18 +08:00
|
|
|
|
|
|
|
}
|
|
|
|
|
2020-04-01 22:42:24 +08:00
|
|
|
|
2020-04-01 10:14:18 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.window-mask {
|
|
|
|
position: absolute;
|
|
|
|
top: 0;
|
|
|
|
width: 100%;
|
|
|
|
height: 100vh;
|
|
|
|
background: rgba(0, 0, 0, 0.4);
|
2020-04-01 22:42:24 +08:00
|
|
|
z-index: $z-index-1;
|
2020-04-01 10:14:18 +08:00
|
|
|
visibility: hidden;
|
|
|
|
opacity: 0;
|
2020-04-01 22:42:24 +08:00
|
|
|
transition: all 0.3s ease;
|
2020-04-01 10:14:18 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
.header-drawer-show {
|
|
|
|
|
2020-04-01 22:42:24 +08:00
|
|
|
.header-content {
|
|
|
|
.menu-bar {
|
|
|
|
.menu-bar-middle {
|
2020-04-01 10:14:18 +08:00
|
|
|
|
2020-04-01 22:42:24 +08:00
|
|
|
background: transparent;
|
|
|
|
|
|
|
|
&::before {
|
|
|
|
transform: translateY(6px) rotate(45deg);
|
|
|
|
}
|
2020-04-01 10:14:18 +08:00
|
|
|
|
2020-04-01 22:42:24 +08:00
|
|
|
|
|
|
|
&::after {
|
|
|
|
transform: translateY(-6px) rotate(-45deg);
|
|
|
|
}
|
|
|
|
}
|
2020-04-01 10:14:18 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.header-drawer {
|
|
|
|
transform: scaleY(1);
|
|
|
|
}
|
|
|
|
|
|
|
|
.window-mask {
|
|
|
|
visibility: visible;
|
|
|
|
opacity: 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.header-wrapper-shrink {
|
2020-04-01 22:42:24 +08:00
|
|
|
background: $background-color;
|
|
|
|
box-shadow: 0 1px 2px $border-color;
|
2020-04-01 10:14:18 +08:00
|
|
|
|
2020-04-01 15:28:01 +08:00
|
|
|
.header-content {
|
|
|
|
|
2020-04-01 22:42:24 +08:00
|
|
|
.logo-title {
|
|
|
|
transform: scale(0.86);
|
|
|
|
}
|
|
|
|
|
2020-04-01 15:28:01 +08:00
|
|
|
.menu-list {
|
|
|
|
|
|
|
|
.menu-item {
|
|
|
|
a:hover {
|
|
|
|
&::after {
|
2020-04-01 22:42:24 +08:00
|
|
|
bottom: -20px;
|
2020-04-01 15:28:01 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.active::after {
|
2020-04-01 22:42:24 +08:00
|
|
|
bottom: -20px;
|
2020-04-01 15:28:01 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2020-04-01 10:14:18 +08:00
|
|
|
.header-drawer {
|
2020-04-01 12:09:06 +08:00
|
|
|
padding: $header-shrink-height 0 20px 0;
|
2020-04-01 10:14:18 +08:00
|
|
|
}
|
2020-04-01 15:28:01 +08:00
|
|
|
|
|
|
|
|
2020-04-01 10:14:18 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@media screen and (max-width: 760px) {
|
|
|
|
.menu-list {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
|
|
|
|
.menu-bar {
|
|
|
|
display: block !important;
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|