120 lines
2.1 KiB
CSS
120 lines
2.1 KiB
CSS
.nav {
|
|
--background: var(--dark);
|
|
|
|
position: sticky;
|
|
top: 0;
|
|
overflow: hidden;
|
|
padding: 0 var(--space-small);
|
|
}
|
|
|
|
.nav--content {
|
|
max-width: var(--width);
|
|
margin: 0 auto;
|
|
display: grid;
|
|
grid-template-columns: auto 1fr auto;
|
|
grid-template-rows: auto auto;
|
|
}
|
|
|
|
.nav--title {
|
|
grid-area: 1 / 1 / 3 / 2;
|
|
background: var(--background);
|
|
padding-top: var(--space-small);
|
|
}
|
|
|
|
.nav--menu {
|
|
grid-area: 1 / 2 / 2 / 3;
|
|
overflow: hidden;
|
|
background: var(--background);
|
|
display: grid;
|
|
grid-template-columns: 1fr auto;
|
|
/* make the nav background full page width */
|
|
margin: 0 -50vw;
|
|
padding: 0 50vw;
|
|
}
|
|
|
|
.nav--menu-section {
|
|
display: flex;
|
|
flex-direction: row;
|
|
justify-content: space-around;
|
|
padding: 0;
|
|
margin: 0;
|
|
}
|
|
|
|
.nav--menu-item {
|
|
list-style: none;
|
|
flex-grow: 1;
|
|
display: flex;
|
|
}
|
|
|
|
.nav--menu-link {
|
|
flex-grow: 1;
|
|
padding: var(--space-large) var(--space-small);
|
|
|
|
font-family: Knewave;
|
|
font-size: var(--fz-4);
|
|
color: var(--primary-color);
|
|
text-transform: uppercase;
|
|
text-align: center;
|
|
text-decoration: none;
|
|
}
|
|
|
|
.nav--menu-link:hover {
|
|
background: var(--primary-color);
|
|
color: var(--on-primary);
|
|
}
|
|
|
|
toggle-menu-button {
|
|
width: 34px;
|
|
height: 34px;
|
|
position: absolute;
|
|
top: 0;
|
|
right: 0;
|
|
display: none;
|
|
cursor: pointer;
|
|
}
|
|
|
|
toggle-menu-button .bar {
|
|
display: block;
|
|
background-color: #777;
|
|
width: 20px;
|
|
height: 2px;
|
|
border-radius: 100px;
|
|
position: absolute;
|
|
top: 18px;
|
|
right: 7px;
|
|
transition: all 0.5s;
|
|
}
|
|
|
|
toggle-menu-button .bar:first-child {
|
|
transform: translateY(-6px);
|
|
}
|
|
|
|
.nav__open toggle-menu-button .bar {
|
|
transform: rotate(45deg);
|
|
}
|
|
|
|
.nav__open toggle-menu-button .bar:first-child {
|
|
transform: rotate(-45deg);
|
|
}
|
|
|
|
@media (max-width: 768px) {
|
|
.nav--menu {
|
|
max-height: 0;
|
|
display: flex;
|
|
flex-direction: column;
|
|
transition: all 0.2s ease-out;
|
|
}
|
|
|
|
.nav--menu-section {
|
|
flex-direction: column;
|
|
}
|
|
|
|
.nav--toggle-button {
|
|
display: block;
|
|
}
|
|
|
|
.nav__open .nav--menu {
|
|
max-height: 100vh;
|
|
}
|
|
}
|