Merge remote-tracking branch 'origin/styles/navbar'

This commit is contained in:
ifraimka1 committed 2025-04-18 16:53:56 +03:00
commit d21881169f
1 file changed
+114 -105
+114 -105
View File
@@ -1,131 +1,140 @@
#navbar { #navbar {
position: fixed; position: fixed;
top: 0; top: 0;
width: 100%; width: 100%;
height: 108px; height: 108px;
padding: $navbar-padding-tb 10%; padding: $navbar-padding-tb 10%;
background-color: rgb(255, 255, 255); background-color: rgb(255, 255, 255);
z-index: 100; z-index: 100;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
transition: transform 0.3s ease-out, height 0.3s ease-out, background-color 0.8s ease-out; transition: transform 0.3s ease-out, height 0.3s ease-out, background-color 0.8s ease-out;
&.hidden { &.hidden {
transform: translateY(-110%); // Убираем navbar вверх transform: translateY(-110%); // Убираем navbar вверх
} }
&:not(.hidden) { &:not(.hidden) {
transform: translateY(0); // Показываем navbar transform: translateY(0); // Показываем navbar
} }
&.transparent { &.transparent {
background-color: transparent !important; background-color: transparent !important;
transition: none; transition: none;
.bar .nav-link { .bar .nav-link {
color: $text-secondary; color: $text-secondary;
@media (max-width: 1200px) { @media (max-width: 1200px) {
color: black; color: black;
} }
} }
@media (max-width: 1200px) { @media (max-width: 1200px) {
.burger .line { .burger .line {
background-color: #ffffff; background-color: #ffffff;
&.open {
background-color: #072ac8; // Синий цвет, когда меню открыто
}
}
}
.logo { &.open {
filter: brightness(0) invert(1); background-color: #072ac8; // Синий цвет, когда меню открыто
} }
} }
}
.nav-link:has(> .logo) { .logo {
display: flex; filter: brightness(0) invert(1);
height: 100%; }
align-items: center; }
.logo { .nav-link:has(> .logo) {
width: $navbar-logo-height; display: flex;
height: auto; height: 100%;
} align-items: center;
}
.bar { .logo {
display: flex; width: $navbar-logo-height;
align-items: center; height: auto;
}
}
.nav-link { .bar {
font-size: 16px; display: flex;
font-weight: 500; align-items: center;
line-height: 20px;
letter-spacing: 0em;
padding: .25em;
margin-left: 40px;
color: black;
text-decoration: none;
text-wrap: nowrap;
}
.nav-link::after { .nav-link {
background: $text-secondary; font-size: 16px;
} font-weight: 500;
} line-height: 20px;
letter-spacing: 0em;
padding: .25em;
margin-left: 40px;
color: black;
text-decoration: none;
text-wrap: nowrap;
}
@media (max-width: 1200px) { .nav-link::after {
height: $navbar-height; background: black;
padding: $navbar-padding-tb 5%; }
}
.nav-link:has(> .logo) .logo { @media (max-width: 1200px) {
width: $navbar-logo-mini-height; height: $navbar-height;
} padding: $navbar-padding-tb 5%;
.bar { .nav-link:has(> .logo) .logo {
display: none; width: $navbar-logo-mini-height;
flex-direction: column; }
position: fixed;
top: 0;
right: 0;
background-color: white;
width: 50%;
height: 200vh;
z-index: 9;
padding: 60px 0px;
&.open { .bar {
display: flex; display: none;
} flex-direction: column;
position: fixed;
top: 0;
right: 0;
background-color: white;
width: 50%;
height: 200vh;
z-index: 9;
padding: 60px 0px;
.nav-link { &.open {
padding: 10px 5px; display: flex;
width: 100%; }
text-align: left;
}
}
.burger { .nav-link {
position: relative; padding: 10px 5px;
display: flex; width: 100%;
flex-direction: column; text-align: left;
z-index: 10; }
.line { .nav-link::after {
width: 25px; background: none;
height: 3px; }
background-color: #072ac8; }
margin: 4px 0;
transition: all 0.3s ease;
}
}
} .burger {
position: relative;
display: flex;
flex-direction: column;
z-index: 10;
.line {
width: 25px;
height: 3px;
background-color: #072ac8;
margin: 4px 0;
transition: all 0.3s ease;
}
}
}
} }
#navbar.transparent .bar .nav-link::after {
background-color: $text-secondary;
}