mirror of
https://github.com/yusufipk/natours-react.git
synced 2026-09-11 11:06:10 +00:00
120 lines
2.1 KiB
SCSS
120 lines
2.1 KiB
SCSS
.navigation {
|
|
&__checkbox {
|
|
display: none;
|
|
}
|
|
|
|
&__button {
|
|
background-color: $color-white;
|
|
height: 7rem;
|
|
width: 7rem;
|
|
position: fixed;
|
|
top: 6rem;
|
|
right: 6rem;
|
|
border-radius: 50%;
|
|
z-index: 2000;
|
|
box-shadow: $shadow-light;
|
|
cursor: pointer;
|
|
|
|
&--bars,
|
|
&--times {
|
|
@include center-horizontal-vertical;
|
|
font-size: 3.5rem;
|
|
text-align: center;
|
|
transition: opacity 0.2s;
|
|
}
|
|
&--times {
|
|
opacity: 0;
|
|
}
|
|
}
|
|
|
|
&__background {
|
|
height: 6rem;
|
|
width: 6rem;
|
|
border-radius: 50%;
|
|
position: fixed;
|
|
top: 6.5rem;
|
|
right: 6.5rem;
|
|
background-image: radial-gradient(
|
|
$color-primary-light,
|
|
$color-primary-dark
|
|
);
|
|
z-index: 1000;
|
|
transition: all 0.8s cubic-bezier(0.85, 0, 0.15, 1);
|
|
}
|
|
|
|
&__nav {
|
|
height: 100vh;
|
|
width: 100%;
|
|
position: fixed;
|
|
top: 0;
|
|
left: 0;
|
|
z-index: 1500;
|
|
|
|
opacity: 0;
|
|
width: 0;
|
|
transition: all 0.8s cubic-bezier(0.68, -0.6, 0.32, 1.6);
|
|
}
|
|
|
|
&__list {
|
|
@include center-horizontal-vertical;
|
|
list-style: none;
|
|
text-align: center;
|
|
width: 100%;
|
|
}
|
|
|
|
&__item {
|
|
margin: 1rem;
|
|
}
|
|
|
|
&__link {
|
|
&:link,
|
|
&:visited {
|
|
display: inline-block;
|
|
font-size: $medium-font-size;
|
|
font-weight: 300;
|
|
color: $color-white;
|
|
text-decoration: none;
|
|
text-transform: uppercase;
|
|
padding: 1rem 2rem;
|
|
background-image: linear-gradient(
|
|
120deg,
|
|
transparent 0%,
|
|
transparent 50%,
|
|
$color-white 50%
|
|
);
|
|
background-size: 230%;
|
|
transition: all 0.4s;
|
|
|
|
span {
|
|
margin-right: 1.5rem;
|
|
display: inline-block;
|
|
}
|
|
}
|
|
|
|
&:hover,
|
|
&:active {
|
|
background-position: 100%;
|
|
color: $color-primary;
|
|
transform: translateX(1rem);
|
|
}
|
|
}
|
|
|
|
&__checkbox:checked ~ &__background {
|
|
transform: scale(80);
|
|
}
|
|
|
|
&__checkbox:checked ~ &__nav {
|
|
opacity: 1;
|
|
width: 100%;
|
|
}
|
|
|
|
//ICON
|
|
&__checkbox:checked ~ &__button &__button--times {
|
|
opacity: 1;
|
|
}
|
|
|
|
&__checkbox:checked ~ &__button &__button--bars {
|
|
opacity: 0;
|
|
}
|
|
}
|