342 lines
6.3 KiB
Stylus
342 lines
6.3 KiB
Stylus
$header-progress-height = 2.8px;
|
|
$logo-title-font-size = 2.2rem;
|
|
$pc-search-icon-font-size = 1.5rem;
|
|
$menu-bar-line-height = 2.5px;
|
|
|
|
.header-wrapper {
|
|
width: 100%;
|
|
height: 100%;
|
|
box-sizing: border-box;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
background: var(--background-color);
|
|
padding-top: $header-progress-height;
|
|
|
|
hover-style(1.02, 1.02);
|
|
|
|
.header-content {
|
|
position: relative;
|
|
height: 100%;
|
|
width: $main-content-width;
|
|
max-width: $content-max-width;
|
|
display: flex;
|
|
flex-direction: row;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
z-index: $z-index-5;
|
|
transition();
|
|
|
|
&.has-first-screen {
|
|
max-width: $content-max-width * 1.2;
|
|
}
|
|
|
|
+keep-tablet() {
|
|
width: $main-content-width-tablet;
|
|
}
|
|
|
|
+keep-mobile() {
|
|
width: $main-content-width-mobile;
|
|
}
|
|
|
|
.left {
|
|
display: flex;
|
|
align-items: center;
|
|
|
|
.logo-title {
|
|
font-size: $logo-title-font-size;
|
|
font-weight: bold;
|
|
letter-spacing: 1px;
|
|
color: var(--first-text-color);
|
|
transition();
|
|
|
|
+keep-tablet() {
|
|
font-size: $logo-title-font-size * 0.9;
|
|
}
|
|
|
|
+keep-mobile() {
|
|
font-size: $logo-title-font-size * 0.8;
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
.right {
|
|
|
|
.pc {
|
|
.menu-list {
|
|
display: flex;
|
|
align-items: center;
|
|
|
|
+keep-tablet() {
|
|
display: none;
|
|
}
|
|
|
|
|
|
.menu-item {
|
|
float: left;
|
|
position: relative;
|
|
margin-left: 30px;
|
|
font-size: 1rem;
|
|
cursor: pointer;
|
|
|
|
&:first-child {
|
|
margin-left: 0;
|
|
}
|
|
|
|
a {
|
|
|
|
&:hover {
|
|
|
|
color: var(--default-text-color);
|
|
|
|
&::after {
|
|
content: '';
|
|
position: absolute;
|
|
bottom: -10px;
|
|
left: 50%;
|
|
width: 100%;
|
|
height: 2px;
|
|
transform: translateX(-50%);
|
|
background: var(--primary-color);
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
|
|
.active {
|
|
color: var(--second-text-color);
|
|
|
|
&::after {
|
|
content: '';
|
|
position: absolute;
|
|
bottom: -10px;
|
|
left: 50%;
|
|
width: 100%;
|
|
height: 2px;
|
|
transform: translateX(-50%);
|
|
background: var(--primary-color)
|
|
}
|
|
}
|
|
|
|
|
|
&.search {
|
|
font-size: $pc-search-icon-font-size;
|
|
margin-left: 26px;
|
|
}
|
|
}
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
.mobile {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
|
|
.icon-item {
|
|
display: none;
|
|
position: relative;
|
|
cursor: pointer;
|
|
font-size: 18px;
|
|
margin-left: 12px;
|
|
width: 20px;
|
|
height: 20px;
|
|
|
|
&:first-child {
|
|
margin-left: 0;
|
|
}
|
|
|
|
+keep-tablet() {
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: center;
|
|
}
|
|
}
|
|
|
|
.menu-bar {
|
|
|
|
.menu-bar-middle {
|
|
width: 18px;
|
|
height: $menu-bar-line-height;
|
|
position: relative;
|
|
background: var(--default-text-color);
|
|
transition();
|
|
|
|
&::before {
|
|
content: '';
|
|
position: absolute;
|
|
top: -6px;
|
|
left: 0;
|
|
width: 100%;
|
|
height: $menu-bar-line-height;
|
|
background: var(--default-text-color);
|
|
transition();
|
|
}
|
|
|
|
&::after {
|
|
content: '';
|
|
position: absolute;
|
|
bottom: -6px;
|
|
left: 0;
|
|
width: 100%;
|
|
height: $menu-bar-line-height;
|
|
background: var(--default-text-color);
|
|
transition();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
.header-drawer {
|
|
width: 100%;
|
|
padding: $header-height 0 20px 0;
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
transform: scaleY(0);
|
|
transform-origin: top;
|
|
background: var(--background-color);
|
|
z-index: $z-index-2;
|
|
|
|
transition();
|
|
|
|
.drawer-menu-list {
|
|
display: flex;
|
|
flex-direction: column;
|
|
justify-content: flex-start;
|
|
align-items: center;
|
|
|
|
.drawer-menu-item {
|
|
font-size: 1rem;
|
|
margin: 6px 0;
|
|
height: 38px;
|
|
|
|
a {
|
|
padding: 6px 20px;
|
|
border-radius: 20px;
|
|
color: var(--default-text-color);
|
|
transition();
|
|
|
|
&:hover {
|
|
color: var(--second-text-color);
|
|
border: 1px solid var(--default-text-color);
|
|
}
|
|
|
|
|
|
&.active {
|
|
border: 1px solid var(--default-text-color);
|
|
color: var(--second-text-color);
|
|
}
|
|
}
|
|
|
|
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
.window-mask {
|
|
position: absolute;
|
|
top: 0;
|
|
width: 100%;
|
|
height: 100vh;
|
|
background: rgba(0, 0, 0, 0.4);
|
|
z-index: $z-index-1;
|
|
visibility: hidden;
|
|
opacity: 0;
|
|
transition();
|
|
}
|
|
|
|
}
|
|
|
|
|
|
.header-drawer-show {
|
|
opacity: 1 !important;
|
|
|
|
.header-content {
|
|
|
|
.right {
|
|
.mobile {
|
|
.menu-bar {
|
|
.menu-bar-middle {
|
|
|
|
background: transparent;
|
|
|
|
&::before {
|
|
transform: translateY(6px) rotate(45deg);
|
|
}
|
|
|
|
|
|
&::after {
|
|
transform: translateY(-6px) rotate(-45deg);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
}
|
|
}
|
|
|
|
.header-drawer {
|
|
transform: scaleY(1);
|
|
}
|
|
|
|
.window-mask {
|
|
visibility: visible;
|
|
opacity: 1;
|
|
}
|
|
|
|
}
|
|
|
|
|
|
.header-wrapper-shrink {
|
|
|
|
.header-content {
|
|
|
|
.left {
|
|
transform: scale(0.86);
|
|
transform-origin: left;
|
|
transition();
|
|
}
|
|
|
|
.right {
|
|
|
|
.pc {
|
|
|
|
.menu-list {
|
|
|
|
.menu-item {
|
|
|
|
a:hover {
|
|
&::after {
|
|
transition();
|
|
bottom: -($header-shrink-height / 2 - 12);
|
|
}
|
|
}
|
|
|
|
.active::after {
|
|
transition();
|
|
bottom: -($header-shrink-height / 2 - 12);
|
|
}
|
|
}
|
|
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
.header-drawer {
|
|
padding: $header-shrink-height 0 20px 0;
|
|
}
|
|
}
|