Пофиксин масштаб,немного изменена галеря, футер и прочее

This commit is contained in:
xomimishka committed 2025-03-14 19:54:25 +03:00
1 parent 134f05214e
commit 6332da4db9
13 files changed
+109 -56

No files matched your search

+1 -1
View File
@@ -33,7 +33,7 @@ const mockContacts = {
</a>
),
phone: (
<a style={{ color: 'inherit' }} href="tel:+79118888888">+7 (911) 8888-88-88</a>
<a style={{ color: 'inherit' }} href="tel:+79780095480">+7 (978) 009-54-80</a>
),
};
+7 -7
View File
@@ -6,7 +6,7 @@
justify-content: space-between;
align-items: center;
height: 100px;
height: 192px;
padding: 0 10%;
margin: 2em 0 0;
background: $bg-footer;
@@ -37,7 +37,7 @@
justify-content: space-between;
max-height: 70%;
height: 70%;
height: 40%;
p {
color: $text-secondary;
@@ -75,20 +75,20 @@
justify-content: center;
align-items: center;
width: 100vw;
height: auto; // Теперь футер адаптируется по контенту
padding: 1.5em 10%; // Увеличьте отступы для мобильной версии
position: relative; // Исправление проблемы с заливкой
height: auto;
padding: 1.5em 10%;
position: relative;
.container-fluid {
display: flex;
flex-direction: column;
align-items: center;
gap: 2rem; // Регулирует расстояние между блоками
gap: 2rem;
}
.logo-container {
height: auto;
max-width: 60%; // Увеличен логотип в мобильной версии
max-width: 60%;
display: flex;
justify-content: center;
+1 -1
View File
@@ -101,7 +101,7 @@
&:hover .image {
transition: opacity .3s ease-in;
filter: brightness(0.5);
filter: brightness(0.7);
/* Затемняем изображение */
}
}
+15 -8
View File
@@ -31,13 +31,13 @@
.bar .nav-link {
color: $text-secondary;
@media (max-width: 768px) {
@media (max-width: 1200px) {
color: black;
}
}
@media (max-width: 768px) {
@media (max-width: 1200px) {
.burger .line {
background-color: #ffffff;
&.open {
@@ -83,13 +83,13 @@
}
}
@media (max-width: 768px) {
height: $navbar-height;
padding: $navbar-padding-tb 5%;
@media (max-width: 1200px) {
// height: $navbar-height;
// padding: $navbar-padding-tb 5%;
.nav-link:has(> .logo) .logo {
width: $navbar-logo-mini-height;
}
// .nav-link:has(> .logo) .logo {
// width: $navbar-logo-mini-height;
// }
.bar {
display: none;
@@ -130,5 +130,12 @@
}
}
@media (max-width: 768px) {
height: $navbar-height;
padding: $navbar-padding-tb 5%;
.nav-link:has(> .logo) .logo {
width: $navbar-logo-mini-height;
}
}
}
+1 -2
View File
@@ -13,7 +13,6 @@ $news-card-gap: 1em;
position: relative;
border: none;
margin-bottom: 1em; // Отступ снизу
@media (max-width: 768px) {
width: 100%; // 1 карточка в ряд на мобильных
height: 215px; // Меньшая высота для мобильных
@@ -47,7 +46,7 @@ $news-card-gap: 1em;
width: 100%;
height: 100%;
object-fit: cover;
object-position: top; // Устанавливаем позицию обрезки сверху
object-position: center; // Устанавливаем позицию обрезки сверху
border-radius: 8px; // Округление углов изображения
pointer-events: none;
}
+27 -9
View File
@@ -12,6 +12,7 @@ import './Slider.styles.scss';
function Slider({ autoPlay = false, autoPlayTime = 3000, images = false }) {
const [mediaList, setMediaList] = useState([]);
const [itemsPerSlide, setItemsPerSlide] = useState(window.innerWidth <= 768 ? 1 : 2);
const [enableButtons, setEnableButtons] = useState(false);
useEffect(() => {
const handleResize = () => {
@@ -23,31 +24,48 @@ function Slider({ autoPlay = false, autoPlayTime = 3000, images = false }) {
useEffect(() => {
const loadData = async () => {
console.log('hello');
const newMediaList = images
? images.map((value, key) => ({ id: key, src: value }))
: await getMedia('gallery');
setMediaList(newMediaList);
const numberOfSlides = newMediaList.length;
if (numberOfSlides > 2) {
setEnableButtons(true);
} else if (numberOfSlides == 1) {
setItemsPerSlide(1);
}
};
loadData();
}, [images]);
// Условие для проверки количества слайдов
const totalSlides = mediaList.length;
return (
<div className="slider">
<Swiper
modules={[Navigation, Pagination]}
spaceBetween={20}
slidesPerView={itemsPerSlide} // Количество картинок в видимой зоне
slidesPerGroup={1} // Перелистывать сразу по 2
loop={true} // Зацикленный слайдер
navigation // Стрелки
pagination={{ clickable: true }}
slidesPerView={itemsPerSlide}
slidesPerGroup={1}
loop={enableButtons}
navigation={enableButtons}
pagination={{ clickable: enableButtons }}
autoplay={autoPlay ? { delay: autoPlayTime, disableOnInteraction: false } : false}
>
{mediaList.map((media) => (
<SwiperSlide key={media.id}>
<img src={media.src} alt="slide" className="slide-image" />
{mediaList.map((media, index) => (
<SwiperSlide
key={media.id} className={totalSlides === 1 ? 'swiper-slide single' : 'swiper-slide'}
>
<img
src={media.src}
alt={`slide-${index}`}
className='slide-image'
/>
</SwiperSlide>
))}
</Swiper>
@@ -55,4 +73,4 @@ function Slider({ autoPlay = false, autoPlayTime = 3000, images = false }) {
);
}
export default Slider;
export default Slider;
+38 -16
View File
@@ -2,23 +2,43 @@
width: 100%;
margin: 0 auto;
position: relative;
}
padding: 10px 0;
.swiper-slide {
display: flex;
justify-content: center;
align-items: center;
height: 50vh;
}
.swiper-slide {
display: flex;
justify-content: center;
align-items: center;
height: 50vh;
bottom: 10px;
.slide-image {
width: 100%;
height: auto;
height: 350px;
object-fit: cover;
object-position: center center;
border-radius: 8px;
pointer-events: none;
}
}
.slide-image {
width: 100%;
height: auto;
height: 350px;
object-fit: cover;
object-position: center center;
border-radius: 8px;
pointer-events: none;
.swiper-wrapper:has(.swiper-slide.single) {
justify-content: center;
.swiper-slide.single {
display: flex;
justify-content: center;
align-items: center;
.slide-image {
width: auto;
height: 100%;
object-position: center center;
pointer-events: none;
border-radius: 0px;
}
}
}
}
/* стрелки */
@@ -44,6 +64,7 @@
/* Позиционирование стрелок */
.swiper-button-prev {
left: 5px;
@media (max-width: 768px) {
left: 0px;
}
@@ -51,7 +72,8 @@
.swiper-button-next {
right: 5px;
@media (max-width: 768px) {
right: 0px;
}
}
}