website/styles/Navbar.module.scss
TheClashFruit 6fdc97b98b
All checks were successful
Deploy Website / build (push) Successful in 1m28s
feat: navbar, homepage header
2024-04-21 16:48:51 +02:00

150 lines
2.3 KiB
SCSS

@import 'variables.module';
.navBar {
position: fixed;
top: 0;
left: 0;
right: 0;
> .container {
display: flex;
justify-content: space-between;
align-items: center;
padding-top: 0.5rem;
padding-bottom: 0.5rem;
> .navMain {
display: flex;
justify-content: space-between;
align-items: center;
> button {
display: none;
justify-content: center;
align-items: center;
padding: 0.15rem;
background: none;
border: none;
cursor: pointer;
> svg {
width: 1.5rem;
height: 1.5rem;
fill: rgba(#0f172a, .75);
[data-theme='dark'] & {
fill: rgba(#f8fafc, .75);
}
}
@media (max-width: 768px) {
display: flex;
}
}
}
> .navCollapse {
> .navLinks {
list-style: none;
display: flex;
gap: 0.5rem;
> li {
padding: 1rem;
> a {
text-decoration: none;
color: rgba(#0f172a, .75);
[data-theme='dark'] & {
color: rgba(#f8fafc, .75);
}
&:hover, &.active {
color: #3B0764;
[data-theme='dark'] & {
color: #f8fafc;
}
}
}
}
}
}
}
&[data-scrolled='true'] {
background: rgba(#f8fafc, .95);
[data-theme='dark'] & {
background: rgba(#0f172a, .95);
}
}
@media (max-width: 768px) {
> .container {
flex-direction: column;
justify-content: flex-start;
padding: 1rem !important;
height: 100%;
> .navMain {
width: 100%;
}
}
.navCollapse {
display: none;
flex: 1;
width: 100%;
margin-top: 1rem;
> .navLinks {
flex-direction: column;
justify-content: center;
align-items: flex-end;
height: 100%;
> li {
padding: 0.75rem 0 !important;
}
}
}
&[data-open='true'] {
height: 100dvh;
background: rgba(#f8fafc, .95);
.navCollapse {
display: block;
}
[data-theme='dark'] & {
background: rgba(#0f172a, .95);
}
}
}
}