исправила футер и добавила картинки на задний план

This commit is contained in:
xomimishka committed 2025-04-11 14:13:07 +03:00
1 parent a86f51a8eb
commit 79fc2eeb98
6 files changed
+159 -116

No files matched your search

+3 -3
View File
@@ -3,7 +3,7 @@
position: relative; // Убедитесь, что #root имеет relative position: relative; // Убедитесь, что #root имеет relative
background-repeat: no-repeat; background-repeat: no-repeat;
background-position: center bottom; background-position: center bottom;
background-image: url("/assets/images/backround/bg_footer_02.svg"); background-image: url("../../shared/assets/images/backround/bg_footer_02.svg");
background-size: 100% auto; background-size: 100% auto;
z-index: 0; // Задний план z-index: 0; // Задний план
opacity: 0; // Сделаем #root видимым сразу opacity: 0; // Сделаем #root видимым сразу
@@ -17,7 +17,7 @@
left: 0; // Слева left: 0; // Слева
width: 100%; // На всю ширину width: 100%; // На всю ширину
height: 364px; // Ограничиваем максимальную высоту height: 364px; // Ограничиваем максимальную высоту
background-image: url("../../assets/images/backround/bg_news_block.svg"); // Картинка background-image: url("../../shared/assets/images/backround/bg_news_block.svg"); // Картинка
background-repeat: no-repeat; background-repeat: no-repeat;
background-position: left center; background-position: left center;
background-size: contain; background-size: contain;
@@ -31,7 +31,7 @@
// Для главной страницы // Для главной страницы
#root:has(> #react-page #mainpageheader) { #root:has(> #react-page #mainpageheader) {
background-image: url("/assets/images/backround/bg_footer.svg"); background-image: url("../../shared/assets/images/backround/bg_footer.svg");
&::before { &::before {
background-image: none; background-image: none;
} }
@@ -65,6 +65,7 @@ body {
margin-top: 24px; margin-top: 24px;
} }
} }
} }
.block { .block {
@@ -127,108 +128,44 @@ body {
} }
} }
#news-list { .LabListContainer {
position: relative; position: relative;
&::before { &::before {
content: ""; content: '';
position: absolute; position: absolute;
top: 0%; bottom: 5%;
left: 0; left: 0;
width: 100%; width: 100%;
height: 364px; height: 363px;
background-image: url("/src/shared/assets/images/backround/bg_news_block.svg"); background-image: url('/src/shared/assets/images/backround/bg_news_block.svg');
background-repeat: no-repeat; background-repeat: no-repeat;
background-position: left center; background-position: left center;
background-size: contain; background-size: contain;
z-index: -1; z-index: -1;
transform: translateX(-12.6%);
@media (max-width: 768px) { @media (max-width: 768px) {
display: none; display: none;
} }
} }
.row .card {
width: calc(25% - $news-card-gap); // 4 карточки в ряд
aspect-ratio: 1 / 0.8973; // Карточка всегда квадратная
@media (max-width: 768px) {
width: 100%; // 1 карточка в ряд на мобильных
margin-bottom: 1em;
}
}
} }
.project-list { .GalleryContainer {
position: relative; position: relative;
&::before { &::before {
content: ""; content: '';
position: absolute; position: absolute;
top: 35%; bottom: 5%;
left: 0; left: 0;
width: 100%; // Увеличиваем ширину на 10%, чтобы занять отступ width: 100%;
height: 465px;
background-image: url("/src/shared/assets/images/backround/bg_projects_block.svg");
background-repeat: no-repeat;
background-position: right center;
background-size: contain; // Или cover, если нужно заполнить область
z-index: -1;
transform: translateX(11.3%); // Смещаем влево, компенсируя padding
@media (max-width: 768px) {
display: none; // Скрываем картинку на мобильных
}
}
}
.row.lab-list {
position: relative;
&::before {
content: "";
position: absolute;
top: 10%;
left: 0;
width: 100%; // Увеличиваем ширину на 10%, чтобы занять отступ
height: 436px; height: 436px;
background-image: url("/src/shared/assets/images/backround/bg_labs_block.svg"); background-image: url('/src/shared/assets/images/backround/bg_labs_block.svg');
background-repeat: no-repeat; background-repeat: no-repeat;
background-position: left center; background-position: left center;
background-size: contain; // Или cover, если нужно заполнить область
z-index: -1;
transform: translateX(-11.6%); // Смещаем влево, компенсируя padding
@media (max-width: 768px) {
display: none; // Скрываем картинку на мобильных
}
}
}
#gallery {
margin-left: 0;
margin-right: 0;
position: relative;
&::before {
content: "";
position: absolute;
top: 35%;
left: 0;
width: 100%;
height: 307px;
background-image: url("/src/shared/assets/images/backround/bg_gallery_block.svg");
background-repeat: no-repeat;
background-position: right center;
background-size: contain; background-size: contain;
z-index: -1; z-index: -1;
transform: translateX(12.5%); transform: translateX(-12.5%);
@media (max-width: 768px) { @media (max-width: 768px) {
display: none; display: none;
} }
@@ -44,10 +44,14 @@ const MainPage = () => {
</div> </div>
<NewsList /> <NewsList />
<ProjectsList /> <ProjectsList />
<div className={styles.LabListContainer}>
<LabsList /> <LabsList />
</div>
<div className={styles.mainContainer}> <div className={styles.mainContainer}>
<Partners /> <Partners />
<div className={styles.GalleryContainer}>
<Gallery /> <Gallery />
</div>
<ContactUs /> <ContactUs />
</div> </div>
</div> </div>
+86 -15
View File
@@ -1,15 +1,16 @@
#footer { #footer {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; //align-items: center;
height: 192px; height: 309px;
padding: 0 10%; padding: 45px 10%;
margin: 2em 0 0; margin: 2em 0 0;
background: $bg-footer; background: $bg-footer;
// Добавление SVG-фона // Добавление SVG-фона
background-image: url("../../assets/images/backround/bg_footer_gray_02.svg"); background-image: url("../../shared/assets/images/backround/bg_footer_gray_02.svg");
background-repeat: no-repeat; background-repeat: no-repeat;
background-position: center bottom; background-position: center bottom;
background-size: cover; // или `contain` в зависимости от эффекта background-size: cover; // или `contain` в зависимости от эффекта
@@ -19,12 +20,15 @@
} }
.logo-container { .logo-container {
height: 70%; display: flex;
max-width: 30%; flex-direction: column;
justify-content: space-between;
align-items: flex-start;
height: 100%;
.logo { .logo {
height: 100%; height: auto;
width: 100%; width: 256px;
} }
} }
@@ -34,27 +38,28 @@
justify-content: space-between; justify-content: space-between;
max-height: 70%; max-height: 70%;
height: 40%; height: 100%;
p { p {
color: $text-secondary; color: $text-secondary;
font-size: 16px; //font-size: 16px;
font-family: Montserrat, sans-serif;
font-weight: 400; font-weight: 400;
line-height: 16px; line-height: 20px;
margin: 0; margin: 0;
} }
} }
.links { .links {
display: flex; display: flex;
gap: 20px; gap: 17px;
.link { .link {
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
width: 60px; width: 42px;
aspect-ratio: 1; aspect-ratio: 1;
border-radius: 100%; border-radius: 100%;
background-color: $bg-primary; background-color: $bg-primary;
@@ -67,6 +72,21 @@
} }
} }
.footer-content {
display: flex;
flex-direction: column;
height: 100%;
gap: 32px;
justify-content: center;
}
.copyright {
display: none;
}
.visible {
display: block;
}
@media (max-width: 768px) { @media (max-width: 768px) {
flex-direction: column; flex-direction: column;
justify-content: center; justify-content: center;
@@ -75,6 +95,18 @@
height: auto; height: auto;
padding: 1.5em 10%; padding: 1.5em 10%;
position: relative; position: relative;
gap: 20px;
.visible {
display: none !important;
}
.copyright {
display: block !important; // Показываем текст внизу только в мобильной версии
text-align: center;
font-size: 14px;
color: white;
margin-top: 10px;
}
.container-fluid { .container-fluid {
display: flex; display: flex;
@@ -85,24 +117,32 @@
.logo-container { .logo-container {
height: auto; height: auto;
max-width: 60%; max-height: 100%;
max-width: 100%;
display: flex; display: flex;
justify-content: center; justify-content: center;
gap: 20px;
.logo { .logo {
height: auto; height: auto;
width: 100%; width: 100%;
} }
} }
.logo-container label {
display: none !important; // Скрываем текст в мобильной версии
}
.contacts { .contacts {
text-align: center; text-align: center;
gap: 0.5em; gap: 0.5em;
width: 100%; width: 100%;
padding: 10px 0; padding: 10px 0;
p { p {
font-size: 16px; font-size: 16px;
} }
} }
.links { .links {
display: flex; display: flex;
justify-content: center; justify-content: center;
@@ -123,6 +163,37 @@
} }
} }
} }
.footer-links-container {
display: flex;
flex-direction: column; /* Arrange links vertically */
justify-content: space-between; /* Spread out the items */
height: 100%; /* Make sure the container takes up full height */
}
.footer-links {
display: flex;
justify-content: space-between;
gap: 30px; // Между столбиками будет отступ
.footer-column {
display: flex;
flex-direction: column;
gap: 20px; // Расстояние между ссылками в одном столбике
a {
color: white; // Белый цвет текста
text-decoration: none; // Убираем подчеркивание
font-size: 16px; // Размер текста
}
}
}
.privacy-policy {
align-self: flex-end; /* Align the "Политика конфиденциальности" link to the bottom */
margin-top: auto; /* Ensure the link is pushed to the bottom */
}
} }
#root:has(#mainpageheader) #footer { #root:has(#mainpageheader) #footer {
+53 -22
View File
@@ -1,4 +1,5 @@
import { useState } from "react"; import { useState, useEffect } from "react";
import { Link } from "react-router-dom";
import FooterLink from "./FooterLink"; import FooterLink from "./FooterLink";
import FooterContacts from "./FooterContacts"; import FooterContacts from "./FooterContacts";
@@ -8,35 +9,32 @@ import iconSfedu from "@/shared/assets/images/footer/iconSfedu.png";
import iconVK from "@/shared/assets/images/footer/iconVK.svg"; import iconVK from "@/shared/assets/images/footer/iconVK.svg";
import "./Footer.styles.scss"; import "./Footer.styles.scss";
// Тип для ссылок
interface LinkType { interface LinkType {
src: string; src: string;
to: string; to: string;
id?: string; // Добавляем опциональное поле id id?: string;
} }
// Тип для контактов
interface ContactsType { interface ContactsType {
email: JSX.Element; email: JSX.Element;
address: JSX.Element; address: JSX.Element;
phone: JSX.Element; phone: JSX.Element;
} }
// Тип для пропсов компонента Footer
interface FooterProps { interface FooterProps {
links?: Record<string, LinkType>; // Объект с ключами-строками и значениями типа LinkType links?: Record<string, LinkType>;
contacts?: ContactsType; contacts?: ContactsType;
} }
const mockLinks: Record<string, LinkType> = { const mockLinks: Record<string, LinkType> = {
ictis: {
src: iconIctis,
to: "https://ictis.sfedu.ru",
},
sfedu: { sfedu: {
src: iconSfedu, src: iconSfedu,
to: "https://sfedu.ru", to: "https://sfedu.ru",
}, },
ictis: {
src: iconIctis,
to: "https://ictis.sfedu.ru",
},
vk: { vk: {
src: iconVK, src: iconVK,
to: "https://vk.com/skbkit", to: "https://vk.com/skbkit",
@@ -45,40 +43,73 @@ const mockLinks: Record<string, LinkType> = {
const mockContacts: ContactsType = { const mockContacts: ContactsType = {
email: ( email: (
<a style={{ color: "inherit" }} href="mailto:skb@sfedu.ru"> <a style={{
fontSize: "24px",
color: "inherit",
fontWeight: "500",
}} href="mailto:skb@sfedu.ru">
skb@sfedu.ru skb@sfedu.ru
</a> </a>
), ),
phone: (
<a style={{ color: "inherit", fontSize: "24px", }} href="tel:+79780095480">
+7 (978) 009-54-80
</a>
),
address: ( address: (
<a <a
style={{ color: "inherit" }} style={{ color: "inherit", fontSize: "16px" }}
href="https://yandex.ru/maps/?text=г.%20Таганрог,%20пер.%20Тургеневский,%2044" href="https://yandex.ru/maps/?text=г.%20Таганрог,%20пер.%20Тургеневский,%2044"
target="_blank" target="_blank"
rel="noopener noreferrer" rel="noopener noreferrer"
> >
г. Таганрог, пер. Тургеневский, 44 <div style={{ marginBottom: "5px" }}>
</a> <span style={{ color: "#898989" }}>Таганрог</span>
), </div>
phone: ( пер. Тургеневский, 44
<a style={{ color: "inherit" }} href="tel:+79780095480">
+7 (978) 009-54-80
</a> </a>
), ),
}; };
function Footer({ links = mockLinks, contacts = mockContacts }: FooterProps) { function Footer({ links = mockLinks, contacts = mockContacts }: FooterProps) {
const [mediaList] = useState(links); const [mediaList, setMediaList] = useState(links);
return ( return (
<footer id="footer"> <footer id="footer">
<div className="logo-container"> <div className="logo-container">
<div className="logo-container" style={{ alignItems: 'flex-start' }}>
<img className="logo" alt="logo" src={logo} /> <img className="logo" alt="logo" src={logo} />
</div> </div>
<label style={{ color: 'white', fontSize: '14px', alignItems: 'flex-end', lineHeight: 'none' }}>©СКБ «КИТ» 2015–2025</label>
</div>
<div className="footer-links-container">
<div className="footer-links">
<div className="footer-column">
<Link to="/news">НОВОСТИ</Link>
<Link to="/projects">ПРОЕКТЫ</Link>
<Link to="/labs">ЛАБОРАТОРИИ</Link>
<Link to="/aboutus">О НАС</Link>
</div>
<div className="footer-column">
<Link to="/contact" >НАША КОМАНДА</Link>
<Link to="/contact">КОНТАКТЫ</Link>
<Link to="https://ictis.sfedu.ru">ИКТИБ</Link>
</div>
</div>
<Link className="visible" style={{ color: 'white', fontSize: '14px', alignItems: 'flex-end', lineHeight: 'none' }} to="https://www.study.sfedu.ru/privacypolicy?ysclid=m8anp507sz44008873">Политика конфиденциальности</Link>
</div>
<div className="footer-content">
<FooterContacts contacts={contacts} /> <FooterContacts contacts={contacts} />
<div className="links"> <div className="links">
{Object.keys(mediaList).map((linkKey) => ( {Object.keys(mediaList).map(link => <FooterLink link={mediaList[link]} key={mediaList[link].id} />)}
<FooterLink link={mediaList[linkKey]} key={linkKey} /> </div>
))} </div>
<Link className="copyright" style={{ color: 'white', fontSize: '14px', lineHeight: 'none' }} to="https://www.study.sfedu.ru/privacypolicy?ysclid=m8anp507sz44008873">Политика конфиденциальности</Link>
<div className="copyright">
©СКБ «КИТ» 2015–2025
</div> </div>
</footer > </footer >
); );
+1 -1
View File
@@ -11,8 +11,8 @@ function FooterContacts({ contacts }: FooterContactsProps) {
return ( return (
<div className="contacts"> <div className="contacts">
<p>{contacts.email}</p> <p>{contacts.email}</p>
<p>{contacts.address}</p>
<p>{contacts.phone}</p> <p>{contacts.phone}</p>
<p>{contacts.address}</p>
</div> </div>
); );
} }