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

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
background-repeat: no-repeat;
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;
z-index: 0; // Задний план
opacity: 0; // Сделаем #root видимым сразу
@@ -17,7 +17,7 @@
left: 0; // Слева
width: 100%; // На всю ширину
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-position: left center;
background-size: contain;
@@ -31,7 +31,7 @@
// Для главной страницы
#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 {
background-image: none;
}
@@ -65,6 +65,7 @@ body {
margin-top: 24px;
}
}
}
.block {
@@ -127,108 +128,44 @@ body {
}
}
#news-list {
.LabListContainer {
position: relative;
&::before {
content: "";
content: '';
position: absolute;
top: 0%;
bottom: 5%;
left: 0;
width: 100%;
height: 364px;
background-image: url("/src/shared/assets/images/backround/bg_news_block.svg");
height: 363px;
background-image: url('/src/shared/assets/images/backround/bg_news_block.svg');
background-repeat: no-repeat;
background-position: left center;
background-size: contain;
z-index: -1;
transform: translateX(-12.6%);
@media (max-width: 768px) {
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;
&::before {
content: "";
content: '';
position: absolute;
top: 35%;
bottom: 5%;
left: 0;
width: 100%; // Увеличиваем ширину на 10%, чтобы занять отступ
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%, чтобы занять отступ
width: 100%;
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-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;
z-index: -1;
transform: translateX(12.5%);
transform: translateX(-12.5%);
@media (max-width: 768px) {
display: none;
}
@@ -44,10 +44,14 @@ const MainPage = () => {
</div>
<NewsList />
<ProjectsList />
<div className={styles.LabListContainer}>
<LabsList />
</div>
<div className={styles.mainContainer}>
<Partners />
<div className={styles.GalleryContainer}>
<Gallery />
</div>
<ContactUs />
</div>
</div>
+86 -15
View File
@@ -1,15 +1,16 @@
#footer {
display: flex;
justify-content: space-between;
align-items: center;
//align-items: center;
height: 192px;
padding: 0 10%;
height: 309px;
padding: 45px 10%;
margin: 2em 0 0;
background: $bg-footer;
// Добавление 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-position: center bottom;
background-size: cover; // или `contain` в зависимости от эффекта
@@ -19,12 +20,15 @@
}
.logo-container {
height: 70%;
max-width: 30%;
display: flex;
flex-direction: column;
justify-content: space-between;
align-items: flex-start;
height: 100%;
.logo {
height: 100%;
width: 100%;
height: auto;
width: 256px;
}
}
@@ -34,27 +38,28 @@
justify-content: space-between;
max-height: 70%;
height: 40%;
height: 100%;
p {
color: $text-secondary;
font-size: 16px;
//font-size: 16px;
font-family: Montserrat, sans-serif;
font-weight: 400;
line-height: 16px;
line-height: 20px;
margin: 0;
}
}
.links {
display: flex;
gap: 20px;
gap: 17px;
.link {
display: flex;
justify-content: center;
align-items: center;
width: 60px;
width: 42px;
aspect-ratio: 1;
border-radius: 100%;
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) {
flex-direction: column;
justify-content: center;
@@ -75,6 +95,18 @@
height: auto;
padding: 1.5em 10%;
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 {
display: flex;
@@ -85,24 +117,32 @@
.logo-container {
height: auto;
max-width: 60%;
max-height: 100%;
max-width: 100%;
display: flex;
justify-content: center;
gap: 20px;
.logo {
height: auto;
width: 100%;
}
}
.logo-container label {
display: none !important; // Скрываем текст в мобильной версии
}
.contacts {
text-align: center;
gap: 0.5em;
width: 100%;
padding: 10px 0;
p {
font-size: 16px;
}
}
.links {
display: flex;
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 {
+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 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 "./Footer.styles.scss";
// Тип для ссылок
interface LinkType {
src: string;
to: string;
id?: string; // Добавляем опциональное поле id
id?: string;
}
// Тип для контактов
interface ContactsType {
email: JSX.Element;
address: JSX.Element;
phone: JSX.Element;
}
// Тип для пропсов компонента Footer
interface FooterProps {
links?: Record<string, LinkType>; // Объект с ключами-строками и значениями типа LinkType
links?: Record<string, LinkType>;
contacts?: ContactsType;
}
const mockLinks: Record<string, LinkType> = {
ictis: {
src: iconIctis,
to: "https://ictis.sfedu.ru",
},
sfedu: {
src: iconSfedu,
to: "https://sfedu.ru",
},
ictis: {
src: iconIctis,
to: "https://ictis.sfedu.ru",
},
vk: {
src: iconVK,
to: "https://vk.com/skbkit",
@@ -45,40 +43,73 @@ const mockLinks: Record<string, LinkType> = {
const mockContacts: ContactsType = {
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
</a>
),
phone: (
<a style={{ color: "inherit", fontSize: "24px", }} href="tel:+79780095480">
+7 (978) 009-54-80
</a>
),
address: (
<a
style={{ color: "inherit" }}
style={{ color: "inherit", fontSize: "16px" }}
href="https://yandex.ru/maps/?text=г.%20Таганрог,%20пер.%20Тургеневский,%2044"
target="_blank"
rel="noopener noreferrer"
>
г. Таганрог, пер. Тургеневский, 44
</a>
),
phone: (
<a style={{ color: "inherit" }} href="tel:+79780095480">
+7 (978) 009-54-80
<div style={{ marginBottom: "5px" }}>
<span style={{ color: "#898989" }}>Таганрог</span>
</div>
пер. Тургеневский, 44
</a>
),
};
function Footer({ links = mockLinks, contacts = mockContacts }: FooterProps) {
const [mediaList] = useState(links);
const [mediaList, setMediaList] = useState(links);
return (
<footer id="footer">
<div className="logo-container">
<div className="logo-container" style={{ alignItems: 'flex-start' }}>
<img className="logo" alt="logo" src={logo} />
</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} />
<div className="links">
{Object.keys(mediaList).map((linkKey) => (
<FooterLink link={mediaList[linkKey]} key={linkKey} />
))}
{Object.keys(mediaList).map(link => <FooterLink link={mediaList[link]} key={mediaList[link].id} />)}
</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>
</footer >
);
+1 -1
View File
@@ -11,8 +11,8 @@ function FooterContacts({ contacts }: FooterContactsProps) {
return (
<div className="contacts">
<p>{contacts.email}</p>
<p>{contacts.address}</p>
<p>{contacts.phone}</p>
<p>{contacts.address}</p>
</div>
);
}