mirror of
https://git.rdcenter.ru/RDCenter/skb-kit.git
synced 2026-12-05 05:29:45 +00:00
Пофиксин масштаб,немного изменена галеря, футер и прочее
This commit is contained in:
1 parent
134f05214e
commit
6332da4db9
13 files changed
+94
-41
No files matched your search
@@ -87,7 +87,7 @@ header h1 {
|
|||||||
font-size: 36px;
|
font-size: 36px;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
line-height: 44px;
|
line-height: 44px;
|
||||||
margin-top: 48px;
|
margin-top: 24px;
|
||||||
|
|
||||||
@media (max-width: 768px) {
|
@media (max-width: 768px) {
|
||||||
margin-top: 0;
|
margin-top: 0;
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ const mockContacts = {
|
|||||||
</a>
|
</a>
|
||||||
),
|
),
|
||||||
phone: (
|
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>
|
||||||
),
|
),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
||||||
height: 100px;
|
height: 192px;
|
||||||
padding: 0 10%;
|
padding: 0 10%;
|
||||||
margin: 2em 0 0;
|
margin: 2em 0 0;
|
||||||
background: $bg-footer;
|
background: $bg-footer;
|
||||||
@@ -37,7 +37,7 @@
|
|||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
|
|
||||||
max-height: 70%;
|
max-height: 70%;
|
||||||
height: 70%;
|
height: 40%;
|
||||||
|
|
||||||
p {
|
p {
|
||||||
color: $text-secondary;
|
color: $text-secondary;
|
||||||
@@ -75,20 +75,20 @@
|
|||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
width: 100vw;
|
width: 100vw;
|
||||||
height: auto; // Теперь футер адаптируется по контенту
|
height: auto;
|
||||||
padding: 1.5em 10%; // Увеличьте отступы для мобильной версии
|
padding: 1.5em 10%;
|
||||||
position: relative; // Исправление проблемы с заливкой
|
position: relative;
|
||||||
|
|
||||||
.container-fluid {
|
.container-fluid {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 2rem; // Регулирует расстояние между блоками
|
gap: 2rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.logo-container {
|
.logo-container {
|
||||||
height: auto;
|
height: auto;
|
||||||
max-width: 60%; // Увеличен логотип в мобильной версии
|
max-width: 60%;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
|
||||||
|
|||||||
@@ -101,7 +101,7 @@
|
|||||||
|
|
||||||
&:hover .image {
|
&:hover .image {
|
||||||
transition: opacity .3s ease-in;
|
transition: opacity .3s ease-in;
|
||||||
filter: brightness(0.5);
|
filter: brightness(0.7);
|
||||||
/* Затемняем изображение */
|
/* Затемняем изображение */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -31,13 +31,13 @@
|
|||||||
.bar .nav-link {
|
.bar .nav-link {
|
||||||
color: $text-secondary;
|
color: $text-secondary;
|
||||||
|
|
||||||
@media (max-width: 768px) {
|
@media (max-width: 1200px) {
|
||||||
color: black;
|
color: black;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width: 768px) {
|
@media (max-width: 1200px) {
|
||||||
.burger .line {
|
.burger .line {
|
||||||
background-color: #ffffff;
|
background-color: #ffffff;
|
||||||
&.open {
|
&.open {
|
||||||
@@ -83,13 +83,13 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width: 768px) {
|
@media (max-width: 1200px) {
|
||||||
height: $navbar-height;
|
// height: $navbar-height;
|
||||||
padding: $navbar-padding-tb 5%;
|
// padding: $navbar-padding-tb 5%;
|
||||||
|
|
||||||
.nav-link:has(> .logo) .logo {
|
// .nav-link:has(> .logo) .logo {
|
||||||
width: $navbar-logo-mini-height;
|
// width: $navbar-logo-mini-height;
|
||||||
}
|
// }
|
||||||
|
|
||||||
.bar {
|
.bar {
|
||||||
display: none;
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -13,7 +13,6 @@ $news-card-gap: 1em;
|
|||||||
position: relative;
|
position: relative;
|
||||||
border: none;
|
border: none;
|
||||||
margin-bottom: 1em; // Отступ снизу
|
margin-bottom: 1em; // Отступ снизу
|
||||||
|
|
||||||
@media (max-width: 768px) {
|
@media (max-width: 768px) {
|
||||||
width: 100%; // 1 карточка в ряд на мобильных
|
width: 100%; // 1 карточка в ряд на мобильных
|
||||||
height: 215px; // Меньшая высота для мобильных
|
height: 215px; // Меньшая высота для мобильных
|
||||||
@@ -47,7 +46,7 @@ $news-card-gap: 1em;
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
object-fit: cover;
|
object-fit: cover;
|
||||||
object-position: top; // Устанавливаем позицию обрезки сверху
|
object-position: center; // Устанавливаем позицию обрезки сверху
|
||||||
border-radius: 8px; // Округление углов изображения
|
border-radius: 8px; // Округление углов изображения
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ import './Slider.styles.scss';
|
|||||||
function Slider({ autoPlay = false, autoPlayTime = 3000, images = false }) {
|
function Slider({ autoPlay = false, autoPlayTime = 3000, images = false }) {
|
||||||
const [mediaList, setMediaList] = useState([]);
|
const [mediaList, setMediaList] = useState([]);
|
||||||
const [itemsPerSlide, setItemsPerSlide] = useState(window.innerWidth <= 768 ? 1 : 2);
|
const [itemsPerSlide, setItemsPerSlide] = useState(window.innerWidth <= 768 ? 1 : 2);
|
||||||
|
const [enableButtons, setEnableButtons] = useState(false);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const handleResize = () => {
|
const handleResize = () => {
|
||||||
@@ -23,31 +24,48 @@ function Slider({ autoPlay = false, autoPlayTime = 3000, images = false }) {
|
|||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const loadData = async () => {
|
const loadData = async () => {
|
||||||
|
console.log('hello');
|
||||||
const newMediaList = images
|
const newMediaList = images
|
||||||
? images.map((value, key) => ({ id: key, src: value }))
|
? images.map((value, key) => ({ id: key, src: value }))
|
||||||
: await getMedia('gallery');
|
: await getMedia('gallery');
|
||||||
|
|
||||||
setMediaList(newMediaList);
|
setMediaList(newMediaList);
|
||||||
|
|
||||||
|
const numberOfSlides = newMediaList.length;
|
||||||
|
if (numberOfSlides > 2) {
|
||||||
|
setEnableButtons(true);
|
||||||
|
} else if (numberOfSlides == 1) {
|
||||||
|
setItemsPerSlide(1);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
loadData();
|
loadData();
|
||||||
}, [images]);
|
}, [images]);
|
||||||
|
|
||||||
|
// Условие для проверки количества слайдов
|
||||||
|
const totalSlides = mediaList.length;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="slider">
|
<div className="slider">
|
||||||
<Swiper
|
<Swiper
|
||||||
modules={[Navigation, Pagination]}
|
modules={[Navigation, Pagination]}
|
||||||
spaceBetween={20}
|
spaceBetween={20}
|
||||||
slidesPerView={itemsPerSlide} // Количество картинок в видимой зоне
|
slidesPerView={itemsPerSlide}
|
||||||
slidesPerGroup={1} // Перелистывать сразу по 2
|
slidesPerGroup={1}
|
||||||
loop={true} // Зацикленный слайдер
|
loop={enableButtons}
|
||||||
navigation // Стрелки
|
navigation={enableButtons}
|
||||||
pagination={{ clickable: true }}
|
pagination={{ clickable: enableButtons }}
|
||||||
autoplay={autoPlay ? { delay: autoPlayTime, disableOnInteraction: false } : false}
|
autoplay={autoPlay ? { delay: autoPlayTime, disableOnInteraction: false } : false}
|
||||||
>
|
>
|
||||||
{mediaList.map((media) => (
|
{mediaList.map((media, index) => (
|
||||||
<SwiperSlide key={media.id}>
|
<SwiperSlide
|
||||||
<img src={media.src} alt="slide" className="slide-image" />
|
key={media.id} className={totalSlides === 1 ? 'swiper-slide single' : 'swiper-slide'}
|
||||||
|
>
|
||||||
|
<img
|
||||||
|
src={media.src}
|
||||||
|
alt={`slide-${index}`}
|
||||||
|
className='slide-image'
|
||||||
|
/>
|
||||||
</SwiperSlide>
|
</SwiperSlide>
|
||||||
))}
|
))}
|
||||||
</Swiper>
|
</Swiper>
|
||||||
|
|||||||
@@ -2,14 +2,14 @@
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
padding: 10px 0;
|
||||||
|
|
||||||
.swiper-slide {
|
.swiper-slide {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
height: 50vh;
|
height: 50vh;
|
||||||
}
|
bottom: 10px;
|
||||||
|
|
||||||
.slide-image {
|
.slide-image {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
@@ -20,6 +20,26 @@
|
|||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
pointer-events: none;
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* стрелки */
|
/* стрелки */
|
||||||
.swiper-button-prev,
|
.swiper-button-prev,
|
||||||
@@ -44,6 +64,7 @@
|
|||||||
/* Позиционирование стрелок */
|
/* Позиционирование стрелок */
|
||||||
.swiper-button-prev {
|
.swiper-button-prev {
|
||||||
left: 5px;
|
left: 5px;
|
||||||
|
|
||||||
@media (max-width: 768px) {
|
@media (max-width: 768px) {
|
||||||
left: 0px;
|
left: 0px;
|
||||||
}
|
}
|
||||||
@@ -51,6 +72,7 @@
|
|||||||
|
|
||||||
.swiper-button-next {
|
.swiper-button-next {
|
||||||
right: 5px;
|
right: 5px;
|
||||||
|
|
||||||
@media (max-width: 768px) {
|
@media (max-width: 768px) {
|
||||||
right: 0px;
|
right: 0px;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,8 +11,8 @@ body {
|
|||||||
|
|
||||||
#mainpageheader {
|
#mainpageheader {
|
||||||
position: relative;
|
position: relative;
|
||||||
|
overflow: hidden;
|
||||||
height: 100vh;
|
min-height: 100vh;
|
||||||
padding: 0 10%;
|
padding: 0 10%;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ $news-card-gap: 1em;
|
|||||||
aspect-ratio: 5 / 1;
|
aspect-ratio: 5 / 1;
|
||||||
@media (max-width: 768px) {
|
@media (max-width: 768px) {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}height: 325px;
|
||||||
.pic .label {
|
.pic .label {
|
||||||
font-size: clamp(18px, 2vw, 28px);
|
font-size: clamp(18px, 2vw, 28px);
|
||||||
@media (max-width: 768px) {
|
@media (max-width: 768px) {
|
||||||
@@ -22,7 +22,7 @@ $news-card-gap: 1em;
|
|||||||
/* Для последующих карточек (на второй и третьей позиции) в первой строке */
|
/* Для последующих карточек (на второй и третьей позиции) в первой строке */
|
||||||
.card:nth-child(2), .card:nth-child(3) {
|
.card:nth-child(2), .card:nth-child(3) {
|
||||||
width: calc(33.333% - $news-card-gap);
|
width: calc(33.333% - $news-card-gap);
|
||||||
aspect-ratio: 3 / 2.6;
|
aspect-ratio: 3 / 2.6;height: 325px;
|
||||||
@media (max-width: 768px) {
|
@media (max-width: 768px) {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
@@ -31,7 +31,7 @@ $news-card-gap: 1em;
|
|||||||
/* Для всех остальных строк карточки остаются по 3 штуки в строке */
|
/* Для всех остальных строк карточки остаются по 3 штуки в строке */
|
||||||
.card:nth-child(n+4) {
|
.card:nth-child(n+4) {
|
||||||
width: calc(33.333% - $news-card-gap);
|
width: calc(33.333% - $news-card-gap);
|
||||||
aspect-ratio: 3 / 2.6;
|
aspect-ratio: 3 / 2.6;height: 325px;
|
||||||
@media (max-width: 768px) {
|
@media (max-width: 768px) {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -37,8 +37,7 @@ function NewsItem() {
|
|||||||
{news.photos.length !== 0 && <Slider images={news.photos} />}
|
{news.photos.length !== 0 && <Slider images={news.photos} />}
|
||||||
{news.text.map(textRow => <p dangerouslySetInnerHTML={{ __html: textRow }}></p>)}
|
{news.text.map(textRow => <p dangerouslySetInnerHTML={{ __html: textRow }}></p>)}
|
||||||
<div className="row">
|
<div className="row">
|
||||||
<p><a href={newsUrl} target="_blank" rel="noreferrer">Ссылка на новость <img class="icon" src={extLink} /></a></p>
|
<p><a href={newsUrl} target="_blank" rel="noreferrer">Ссылка на новость <img class="icon" src={extLink} /></a><span className="date">Дата публикации: {news.date}</span></p>
|
||||||
<p className="date">Дата публикации: {news.date}</p>
|
|
||||||
</div>
|
</div>
|
||||||
</PageContent>
|
</PageContent>
|
||||||
</>
|
</>
|
||||||
|
|||||||
@@ -5,6 +5,11 @@
|
|||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
margin-top: 2em;
|
margin-top: 2em;
|
||||||
|
|
||||||
|
p {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
|
|
||||||
.icon {
|
.icon {
|
||||||
height: $main-font-size;
|
height: $main-font-size;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -51,8 +51,8 @@
|
|||||||
margin-top: calc($navbar-height + 5 * $navbar-padding-tb);
|
margin-top: calc($navbar-height + 5 * $navbar-padding-tb);
|
||||||
|
|
||||||
.header, .content {
|
.header, .content {
|
||||||
margin-left: 10%;
|
margin-left: 8%;
|
||||||
margin-right: 10%;
|
margin-right: 8%;
|
||||||
|
|
||||||
@media (max-width: 768px) {
|
@media (max-width: 768px) {
|
||||||
margin-left: 5%;
|
margin-left: 5%;
|
||||||
@@ -61,9 +61,12 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.content {
|
.content {
|
||||||
//background: $bg-primary;
|
background: $bg-primary;
|
||||||
|
//padding: 0 1em;
|
||||||
|
border-radius: 8px;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
//box-shadow: 0px 6px 15px rgba(0, 0, 0, 0.1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -98,7 +101,7 @@
|
|||||||
.scroll-to-top {
|
.scroll-to-top {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
right: 2vw; // Используем vw для адаптивности
|
right: 2vw; // Используем vw для адаптивности
|
||||||
bottom: 5vh; // Используем vh для адаптивности
|
bottom: 7.5vh; // Используем vh для адаптивности
|
||||||
background-color: white;
|
background-color: white;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
width: 61px;
|
width: 61px;
|
||||||
|
|||||||
Reference in new issue
Block a user