пофикины размер контактной формы, цвет бургера в моб. версии, убрана анимация ToTop

This commit is contained in:
mimi committed 2025-03-06 16:16:23 +03:00
1 parent a6ce0fc330
commit cba5165193
4 files changed
+54 -50

No files matched your search

+30 -18
View File
@@ -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;
}
}
}
+4 -20
View File
@@ -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 (
<RootContext.Provider value={{ setRef }}>
<Navbar />