fediparty/themes/starter/source/assets/scss/modules/_navbar.scss
2018-03-12 22:31:14 +03:00

185 lines
2.7 KiB
SCSS

.navbar {
position: fixed;
top: 0;
right: 0;
z-index: $zIndex--4;
padding: .4em;
color: $white;
font-family: $font-secondary;
}
.navbar svg {
fill: $white;
}
.nav svg {
height: 10px;
width: 10px;
margin-right: 4px;
}
.navbar .menu {
display: flex;
justify-content: flex-end;
flex: 96% 0 0;
padding-right: 1.5em;
}
.navbar li {
text-transform: uppercase;
font-family: $font-secondary;
color: $grey;
line-height: 2.2;
}
.navbar li.todo {
text-align: center;
}
.navbar li:not(:last-child) {
margin: 0 .8em;
}
.navbar a {
transition: color .2s ease;
border-bottom: none;
}
.navbar a:hover,
.navbar a:focus {
color: $golden;
}
.navbar li:not(:last-child):hover svg {
fill: $golden;
}
.overlay,
.control,
.control ~ .slideout {
display: none;
}
.control ~ .slideout {
position: absolute;
top: 0;
right: 0;
width: 200px;
height: 100vh;
padding: 8em 22px 1em 22px;
background-color: $white;
display: inline-block;
transform: matrix(1, 0, 0, 1, 220, 0);
transition: all .3s cubic-bezier(.77, 0, .175, 1);
}
.control:checked ~ .slideout {
transform: matrix(1, 0, 0, 1, 0, 0);
}
.slideout label {
position: fixed;
top: 0;
right: 200px;
width: 0;
height: 0;
z-index: -1;
background-color: rgba(0, 0, 0, .5);
}
.control:checked ~ .slideout label {
width: 100vw;
height: 100vh;
}
.slideout a {
color: $black;
}
.hamburger {
position: absolute;
width: 200px;
height: 165px;
top: -70px;
right: -85px;
background-color: $black;
border-radius: 50%;
display: inline-flex;
align-items: center;
z-index: $zIndex--4;
padding: .4em;
color: $white;
font-family: $font-secondary;
}
.hamburg-box {
cursor: pointer;
position: relative;
left: 3px;
top: 33px;
width: 120px;
height: 70px;
text-align: center;
}
.hamburger svg {
fill: $white;
width: 28px;
height: 28px;
margin-left: 5px;
margin-top: -10px;
}
.hamburger svg:last-of-type {
display: none;
margin-left: 47px;
margin-top: 1px;
}
.hamburger:hover svg {
fill: $golden;
}
.overlay:not(:checked) ~ .hamburger svg:first-of-type {
display: none;
}
.overlay:not(:checked) ~ .hamburger svg:last-of-type {
display: block;
}
.source {
position: absolute;
bottom: 1.8em;
width: 100%;
margin: 0 -25px;
text-align: center;
font-size: .85rem;
}
.source a {
display: block;
}
.source__toggle button {
font-family: $font-secondary;
cursor: pointer;
background: none;
color: $golden;
border: 0;
border-bottom: 1px solid transparent;
&:hover,
&:focus,
&:active {
outline: none;
border-bottom: 1px solid $golden;
}
}
@media screen and (max-width: $mq-small) {
.navbar li:not(:last-child) {
line-height: 2.5;
}
}