149 lines
2.7 KiB
CSS
149 lines
2.7 KiB
CSS
.header {
|
|
position: fixed;
|
|
top: 0;
|
|
left: 50%;
|
|
width: 100%;
|
|
margin: 0 auto 20px auto;
|
|
padding: 20px 10px 0 10px;
|
|
display: flex;
|
|
flex-flow: row nowrap;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
max-width: 980px;
|
|
opacity: 0;
|
|
z-index: 99;
|
|
transform: translateX(-50%);
|
|
transition-property: opacity, background-color;
|
|
transition-duration: 0.3s;
|
|
transition-timing-function: ease;
|
|
}
|
|
|
|
.header.isVisible {
|
|
opacity: 1;
|
|
}
|
|
/* header.hasBackground {
|
|
background-color: var(--dark);
|
|
} */
|
|
|
|
.logo {
|
|
display: flex;
|
|
flex-flow: row nowrap;
|
|
align-items: center;
|
|
z-index: 10;
|
|
}
|
|
.logo-background {
|
|
fill: transparent;
|
|
transition: fill 0.3s ease;
|
|
}
|
|
.logo-chain {
|
|
fill: var(--dark);
|
|
transition: fill 0.3s ease;
|
|
}
|
|
.hasBackground .logo-chain {
|
|
fill: var(--white);
|
|
}
|
|
|
|
.burger-menu {
|
|
padding: 10px;
|
|
position: relative;
|
|
z-index: 10;
|
|
}
|
|
|
|
.navbar {
|
|
margin: 0;
|
|
padding: 20px 40px;
|
|
position: fixed;
|
|
top: 0;
|
|
left: 0;
|
|
bottom: 0;
|
|
visibility: hidden;
|
|
display: flex;
|
|
flex-flow: column nowrap;
|
|
justify-content: center;
|
|
align-items: center;
|
|
width: 100%;
|
|
background-color: var(--dark);
|
|
color: white;
|
|
pointer-events: none;
|
|
}
|
|
.navbar.isOpen {
|
|
height: 100vh;
|
|
visibility: visible;
|
|
pointer-events: all;
|
|
z-index: 9;
|
|
}
|
|
|
|
.header__link {
|
|
position: relative;
|
|
display: inline-block;
|
|
text-decoration: none;
|
|
text-align: center;
|
|
}
|
|
.header__link::after {
|
|
content: "";
|
|
position: absolute;
|
|
left: 0;
|
|
bottom: -2px;
|
|
width: 100%;
|
|
height: 2px;
|
|
text-decoration: none;
|
|
transform: scaleX(1);
|
|
transform-origin: 0% 50%;
|
|
background-color: var(--dark);
|
|
transition: transform 0.4s cubic-bezier(0.77, 0, 0.175, 1), color 0.3s ease;
|
|
}
|
|
.header__link:hover::after {
|
|
transform: scaleX(0);
|
|
}
|
|
.hasBackground .header__link::after {
|
|
background-color: white;
|
|
}
|
|
|
|
@media screen and (min-width: 700px) {
|
|
.header {
|
|
display: flex;
|
|
margin: 0;
|
|
padding: 20px;
|
|
flex-flow: row nowrap;
|
|
}
|
|
.header::before {
|
|
content: "";
|
|
position: absolute;
|
|
top: 0;
|
|
left: 50%;
|
|
height: 100%;
|
|
width: 100vw;
|
|
transform: translateX(-50%);
|
|
opacity: 0;
|
|
background-color: var(--dark);
|
|
transition: opacity 0.3s ease;
|
|
}
|
|
.header.hasBackground::before {
|
|
opacity: 1;
|
|
}
|
|
.header__nav {
|
|
flex-grow: 1;
|
|
}
|
|
.burger-menu {
|
|
display: none;
|
|
}
|
|
.navbar {
|
|
padding: 0;
|
|
position: relative;
|
|
flex-flow: row nowrap;
|
|
justify-content: flex-end;
|
|
visibility: visible;
|
|
font-size: 1.6rem;
|
|
background-color: transparent;
|
|
pointer-events: all;
|
|
color: var(--dark);
|
|
transition: color 0.3s ease;
|
|
}
|
|
.header.hasBackground .navbar {
|
|
color: white;
|
|
}
|
|
.navbar__item:not(:last-child) {
|
|
padding-right: 12px;
|
|
}
|
|
}
|