simoncor.net/themes/hugo-coder/assets/scss/_navigation.scss

152 lines
2.5 KiB
SCSS
Raw Permalink Normal View History

2020-07-16 22:43:30 +02:00
.navigation {
2024-08-26 17:13:18 +02:00
height: 6rem;
2020-07-16 22:43:30 +02:00
width: 100%;
2024-08-26 17:13:18 +02:00
a,
span {
2020-07-16 22:43:30 +02:00
display: inline;
2024-08-26 17:13:18 +02:00
font-size: 1.7rem;
font-family: $font-family;
font-weight: 600;
2020-07-16 22:43:30 +02:00
color: $fg-color;
}
2024-08-26 17:13:18 +02:00
2020-07-16 22:43:30 +02:00
a {
2024-08-26 17:13:18 +02:00
2020-07-16 22:43:30 +02:00
&:hover,
&:focus {
2024-08-26 17:13:18 +02:00
color: $link-color;
2020-07-16 22:43:30 +02:00
}
}
2024-08-26 17:13:18 +02:00
2020-07-16 22:43:30 +02:00
.navigation-title {
letter-spacing: 0.1rem;
text-transform: uppercase;
}
2024-08-26 17:13:18 +02:00
2020-07-16 22:43:30 +02:00
.navigation-list {
float: right;
list-style: none;
margin-bottom: 0;
margin-top: 0;
2024-08-26 17:13:18 +02:00
@media only screen and (max-width: 768px) {
position: relative;
top: 2rem;
2020-07-16 22:43:30 +02:00
right: 0;
z-index: 5;
visibility: hidden;
opacity: 0;
padding: 0;
max-height: 0;
width: 100%;
background-color: $bg-color;
border-top: solid 2px $alt-bg-color;
border-bottom: solid 2px $alt-bg-color;
transition: opacity 0.25s, max-height 0.15s linear;
}
2024-08-26 17:13:18 +02:00
2020-07-16 22:43:30 +02:00
.navigation-item {
float: left;
margin: 0;
position: relative;
2024-08-26 17:13:18 +02:00
@media only screen and (max-width: 768px) {
2020-07-16 22:43:30 +02:00
float: none !important;
text-align: center;
2024-08-26 17:13:18 +02:00
a,
span {
line-height: 5rem;
2020-07-16 22:43:30 +02:00
}
}
2024-08-26 17:13:18 +02:00
a,
span {
margin-left: 1rem;
margin-right: 1rem;
}
}
.separator {
@media only screen and (max-width: 768px) {
display: none;
2020-07-16 22:43:30 +02:00
}
}
2024-08-26 17:13:18 +02:00
2020-07-16 22:43:30 +02:00
.menu-separator {
2024-08-26 17:13:18 +02:00
@media only screen and (max-width: 768px) {
2020-07-16 22:43:30 +02:00
border-top: 2px solid $fg-color;
2024-08-26 17:13:18 +02:00
margin: 0 8rem;
2020-07-16 22:43:30 +02:00
span {
display: none;
}
}
}
}
2024-08-26 17:13:18 +02:00
#dark-mode-toggle {
margin: 1.7rem 0;
font-size: 2.4rem;
line-height: inherit;
bottom: 2rem;
left: 2rem;
z-index: 100;
position: fixed;
}
2020-07-16 22:43:30 +02:00
#menu-toggle {
display: none;
2024-08-26 17:13:18 +02:00
@media only screen and (max-width: 768px) {
display: initial;
position: relative;
visibility: hidden;
&:checked+label>i {
2020-07-16 22:43:30 +02:00
color: $alt-bg-color;
}
2024-08-26 17:13:18 +02:00
&:checked+label+ul {
2020-07-16 22:43:30 +02:00
visibility: visible;
opacity: 1;
max-height: 100rem;
}
2024-08-26 17:13:18 +02:00
&:focus-visible+label {
outline-style: auto;
}
2020-07-16 22:43:30 +02:00
}
}
2024-08-26 17:13:18 +02:00
2020-07-16 22:43:30 +02:00
.menu-button {
display: none;
2024-08-26 17:13:18 +02:00
@media only screen and (max-width: 768px) {
position: relative;
2020-07-16 22:43:30 +02:00
display: block;
font-size: 2.4rem;
font-weight: 400;
2024-08-26 17:13:18 +02:00
}
i {
2020-07-16 22:43:30 +02:00
&:hover,
&:focus {
2024-08-26 17:13:18 +02:00
color: $alt-fg-color;
2020-07-16 22:43:30 +02:00
}
}
}
2024-08-26 17:13:18 +02:00
i {
color: $fg-color;
cursor: pointer;
&:hover,
&:focus {
color: $link-color;
}
}
2020-07-16 22:43:30 +02:00
}