diff --git a/src/components/ContactForm/ContactForm.styles.scss b/src/components/ContactForm/ContactForm.styles.scss index 0a344d5..f908f58 100644 --- a/src/components/ContactForm/ContactForm.styles.scss +++ b/src/components/ContactForm/ContactForm.styles.scss @@ -6,11 +6,8 @@ $color-file-button: rgb(7, 42, 200); .contact-form { padding: 20px 22px; border-radius: 16px; - height: 730px; + height: 100%; background-color: $bg-form; - @media (max-width: 768px) { - height: 100%; - } h2 { margin-top: 0; @@ -122,7 +119,6 @@ $color-file-button: rgb(7, 42, 200); } .submit-container { - //overflow: hidden; .submit { width: 100%; cursor: pointer; @@ -132,6 +128,7 @@ $color-file-button: rgb(7, 42, 200); line-height: normal; } } + margin-bottom: 5%; } } diff --git a/src/components/Navbar/Navbar.styles.scss b/src/components/Navbar/Navbar.styles.scss index 6ab3018..01ddada 100755 --- a/src/components/Navbar/Navbar.styles.scss +++ b/src/components/Navbar/Navbar.styles.scss @@ -7,7 +7,7 @@ width: 100%; height: 108px; padding: $navbar-padding-tb 10%; - background-color:rgb(255, 255, 255); + background-color: rgb(255, 255, 255); z-index: 100; display: flex; @@ -15,7 +15,7 @@ align-items: center; transition: transform 0.3s ease-out, height 0.3s ease-out, background-color 0.8s ease-out; - + &.hidden { transform: translateY(-110%); // Убираем navbar вверх } @@ -27,13 +27,25 @@ &.transparent { background-color: transparent !important; transition: none; - .bar .nav-link { + + .bar .nav-link { color: $text-secondary; + @media (max-width: 768px) { - color:black; + color: black; } } + + @media (max-width: 768px) { + .burger .line { + background-color: #ffffff; + &.open { + background-color: #072ac8; // Синий цвет, когда меню открыто + } + } + } + .logo { filter: brightness(0) invert(1); } @@ -71,15 +83,14 @@ } } - // Телефонна версия @media (max-width: 768px) { height: $navbar-height; padding: $navbar-padding-tb 5%; .nav-link:has(> .logo) .logo { - width: $navbar-logo-mini-height; // 100% + width: $navbar-logo-mini-height; } - + .bar { display: none; flex-direction: column; diff --git a/src/pages/Main/Main.styles.scss b/src/pages/Main/Main.styles.scss index 0c2d195..eb8d1e4 100644 --- a/src/pages/Main/Main.styles.scss +++ b/src/pages/Main/Main.styles.scss @@ -29,22 +29,21 @@ body { display: flex; flex-direction: column; - // Телефонная версия @media (max-width: 768px) { top: 30%; padding: $navbar-padding-tb 5%; } h1 { - font-size: 52px; // + font-size: 52px; font-weight: 600; - line-height: 63px; // + line-height: 63px; margin: 0; margin-bottom: 24px; @media (max-width: 768px) { - font-size: 32px; // Уменьшаем размер шрифта на мобильных устройствах - line-height: 40px; // Уменьшаем межстрочное расстояние + font-size: 32px; + line-height: 40px; } } @@ -70,6 +69,7 @@ body { .block { background: transparent !important; + h1 { font-family: Montserrat; font-size: 36px; @@ -79,7 +79,7 @@ body { margin-bottom: 1.5rem; @media (max-width: 768px) { - font-size: 24px; // Уменьшаем размер заголовка на мобильных + font-size: 24px; } @@ -115,12 +115,22 @@ body { @media (max-width: 768px) { #mainpageheader { - padding: 0; // Уменьшаем padding на мобильных устройствах + padding: 0; + } + } + + .block:not(:last-child) { + margin-bottom: 32px; + } + + @media (max-width: 768px) { + #mainpageheader { + padding: 0; } } #news-list { - position: relative; // Убедитесь, что у #news есть relative + position: relative; &::before { content: ""; @@ -142,17 +152,19 @@ body { } .row .card { - width: calc(25% - $news-card-gap); // 4 карточки в ряд - aspect-ratio: 1 / 0.8973; // Карточка всегда квадратная - @media (max-width: 768px) { - width: 100%; // 1 карточка в ряд на мобильных - margin-bottom: 1em; - } + width: calc(25% - $news-card-gap); // 4 карточки в ряд + aspect-ratio: 1 / 0.8973; // Карточка всегда квадратная + + @media (max-width: 768px) { + width: 100%; // 1 карточка в ряд на мобильных + margin-bottom: 1em; + } } } .project-list { position: relative; + &::before { content: ""; position: absolute; @@ -210,18 +222,18 @@ body { position: absolute; top: 35%; left: 0; - width: 100%; // Увеличиваем ширину на 10%, чтобы занять отступ + width: 100%; height: 307px; background-image: url('../../assets/images/backround/bg_gallery_block.svg'); background-repeat: no-repeat; background-position: right center; - background-size: contain; // Или cover, если нужно заполнить область + background-size: contain; z-index: -1; - transform: translateX(12.5%); // Смещаем влево, компенсируя padding + transform: translateX(12.5%); @media (max-width: 768px) { - display: none; // Скрываем картинку на мобильных + display: none; } } } diff --git a/src/pages/Root/Root.jsx b/src/pages/Root/Root.jsx index eb04f13..6e82ebf 100755 --- a/src/pages/Root/Root.jsx +++ b/src/pages/Root/Root.jsx @@ -55,28 +55,12 @@ function Root() { // Ускоренный плавный скролл вверх const scrollToTop = () => { - const startPosition = window.scrollY; - const startTime = performance.now(); - const scrollDuration = 800; // Увеличили время для суперплавности - - // Функция плавного ускорения и замедления (easeInOutCubic) - const easeInOutCubic = (t) => t < 0.5 ? 4 * t * t * t : 1 - Math.pow(-2 * t + 2, 3) / 2; - - const animateScroll = (currentTime) => { - const elapsedTime = currentTime - startTime; - const progress = Math.min(elapsedTime / scrollDuration, 1); // От 0 до 1 - - window.scrollTo(0, startPosition * (1 - easeInOutCubic(progress))); // Гладкий скролл - - if (progress < 1) { - requestAnimationFrame(animateScroll); - } - }; - - requestAnimationFrame(animateScroll); + window.scrollTo({ + top: 0, + behavior: 'instant' + }); }; - return (