Generateurv2/frontend/styles/NavBar.module.scss
2022-06-24 13:42:16 +02:00

237 lines
4.6 KiB
SCSS

@import "./variables";
@import "./mixins";
.link {
cursor: pointer;
margin: 0 10px;
color: $primary-dark;
text-decoration: none;
position: relative;
font-weight: 600;
transition: color 0.3s;
font-size: 16px;
&::before {
content: "";
position: absolute;
width: 100%;
height: 2px;
background: currentColor;
top: 100%;
left: 0;
pointer-events: none;
transform-origin: 100% 50%;
transform: scale3d(0, 1, 1);
transition: transform 0.3s;
}
&:hover {
color: $primary;
transform: scale(1.05);
&::before {
transform-origin: 0% 50%;
transform: scale3d(1, 1, 1);
}
}
}
.selected {
font-weight: bolder;
color: $primary;
transform: scale(1.05);
&::before {
content: none;
}
}
.navbar {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 10px;
padding: 30px 0;
//margin-left: 30px;
height: 60px;
border-bottom: 1px $border solid;
width: 100%;
gap: 10px;
height: 30px;
}
.home {
border-right: 2px solid $border;
padding-right: 16px;
margin-right: 16px;
& svg {
width: 20px;
height: 20px;
fill: $primary-dark;
transition: 0.3s;
&:hover {
fill: $primary;
}
}
}
.links {
display: flex;
align-items: center;
gap: 14px;
overflow: hidden;
flex-wrap: wrap;
height: 30px;
& li {
height: 30px;
display: flex;
align-items: center;
white-space: nowrap;
}
}
.session-links {
display: flex;
gap: 12px;
& li {
display: flex;
height: 30px;
align-items: center;
white-space: nowrap;
}
}
.auth-links {
@include down(750px) {
display: none !important;
}
& .logout{
margin-left: 10px;
}
}
.dashboard {
gap: 2px;
display: flex;
align-items: center;
}
.logout {
height: 30px;
display: flex;
align-items: center;
cursor: pointer;
& svg {
width: 20px;
height: 20px;
fill: $primary-dark;
transition: 0.3s;
&:hover {
fill: $primary;
}
}
}
.burger {
background: 0 0;
@include up(750px) {
display: none;
}
border: none;
width: 20px;
height: 20px;
display: flex;
justify-content: center;
align-items: center;
cursor: pointer;
color: $primary-dark;
&:hover {
color: $primary;
}
& span {
font-size: 0;
transition: 0.2s ease-in-out;
width: 12px;
height: 2px;
background-color: currentColor;
display: block;
position: relative;
transition: 0.2s ease-in-out;
&::before,
&::after {
transition: 0.2s ease-in-out;
content: "";
display: block;
width: 12px;
height: 2px;
background-color: currentColor;
position: relative;
}
&::after {
top: -6px;
}
&::before {
bottom: -4px;
}
}
}
.isOpen {
@include down(980px) {
& .links {
& li:nth-child(1) {
display: none;
}
display: grid;
grid-template-columns: 1fr;
align-content: center;
justify-items: center;
height: 100%;
transition: .2s;
transition: all .2s, height 0s;
background: rgba($background-dark, 0.8);
position: fixed;
top: 0;
bottom: 0;
right: 0;
left: 0;
margin: 0;
z-index: 3;
gap: 40px;
grid-template-rows: repeat(auto, min-content);
& li {
width: 200px;
display: block;
}
}
& .session-links {
display: flex;
& .auth-links {
display: flex !important;
}
z-index: 4;
position: fixed;
top: 0;
right: 20px;
gap: 5px;
& .burger {
display: block;
& span::before {
bottom: 0;
transform: rotate(-90deg);
}
& span::after {
transform: rotate(0);
top: -2px;
}
& span {
transform: rotate(135deg);
}
}
}
}
}