From 79fc2eeb98126276b76f6eca4c3cf1ad9129908f Mon Sep 17 00:00:00 2001 From: xomimishka Date: Fri, 11 Apr 2025 14:13:07 +0300 Subject: [PATCH] =?UTF-8?q?=D0=B8=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=B8?= =?UTF-8?q?=D0=BB=D0=B0=20=D1=84=D1=83=D1=82=D0=B5=D1=80=20=D0=B8=20=D0=B4?= =?UTF-8?q?=D0=BE=D0=B1=D0=B0=D0=B2=D0=B8=D0=BB=D0=B0=20=D0=BA=D0=B0=D1=80?= =?UTF-8?q?=D1=82=D0=B8=D0=BD=D0=BA=D0=B8=20=D0=BD=D0=B0=20=D0=B7=D0=B0?= =?UTF-8?q?=D0=B4=D0=BD=D0=B8=D0=B9=20=D0=BF=D0=BB=D0=B0=D0=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/Layout/Root.styles.scss | 6 +- .../MainPage/ui/MainPage/MainPage.module.scss | 89 +----- src/pages/MainPage/ui/MainPage/MainPage.tsx | 6 +- src/widgets/Footer/Footer.styles.scss | 287 +++++++++++------- src/widgets/Footer/Footer.tsx | 83 +++-- src/widgets/Footer/FooterContacts.tsx | 2 +- 6 files changed, 258 insertions(+), 215 deletions(-) diff --git a/src/app/Layout/Root.styles.scss b/src/app/Layout/Root.styles.scss index 081d425..bde2d5f 100644 --- a/src/app/Layout/Root.styles.scss +++ b/src/app/Layout/Root.styles.scss @@ -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; } diff --git a/src/pages/MainPage/ui/MainPage/MainPage.module.scss b/src/pages/MainPage/ui/MainPage/MainPage.module.scss index 8086452..0dd0a54 100644 --- a/src/pages/MainPage/ui/MainPage/MainPage.module.scss +++ b/src/pages/MainPage/ui/MainPage/MainPage.module.scss @@ -65,6 +65,7 @@ body { margin-top: 24px; } } + } .block { @@ -127,110 +128,46 @@ 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; } } -} +} \ No newline at end of file diff --git a/src/pages/MainPage/ui/MainPage/MainPage.tsx b/src/pages/MainPage/ui/MainPage/MainPage.tsx index 2f937a5..51c0cba 100644 --- a/src/pages/MainPage/ui/MainPage/MainPage.tsx +++ b/src/pages/MainPage/ui/MainPage/MainPage.tsx @@ -44,10 +44,14 @@ const MainPage = () => { - +
+ +
+
+
diff --git a/src/widgets/Footer/Footer.styles.scss b/src/widgets/Footer/Footer.styles.scss index 693de1a..c6ce441 100644 --- a/src/widgets/Footer/Footer.styles.scss +++ b/src/widgets/Footer/Footer.styles.scss @@ -1,130 +1,201 @@ + #footer { - display: flex; - justify-content: space-between; - align-items: center; - - height: 192px; - padding: 0 10%; - margin: 2em 0 0; - background: $bg-footer; - - // Добавление SVG-фона - background-image: url("../../assets/images/backround/bg_footer_gray_02.svg"); - background-repeat: no-repeat; - background-position: center bottom; - background-size: cover; // или `contain` в зависимости от эффекта - - .container-fluid { - width: 100%; - } - - .logo-container { - height: 70%; - max-width: 30%; - - .logo { - height: 100%; - width: 100%; - } - } - - .contacts { display: flex; - flex-direction: column; justify-content: space-between; + //align-items: center; - max-height: 70%; - height: 40%; + height: 309px; + padding: 45px 10%; + margin: 2em 0 0; + background: $bg-footer; - p { - color: $text-secondary; - font-size: 16px; - font-weight: 400; - line-height: 16px; - margin: 0; - } - } - - .links { - display: flex; - gap: 20px; - - .link { - display: flex; - justify-content: center; - align-items: center; - - width: 60px; - aspect-ratio: 1; - border-radius: 100%; - background-color: $bg-primary; - - .icon { - width: 80%; - height: 80%; - object-fit: contain; - } - } - } - - @media (max-width: 768px) { - flex-direction: column; - justify-content: center; - align-items: center; - width: 100vw; - height: auto; - padding: 1.5em 10%; - position: relative; + // Добавление 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` в зависимости от эффекта .container-fluid { - display: flex; - flex-direction: column; - align-items: center; - gap: 2rem; + width: 100%; } .logo-container { - height: auto; - max-width: 60%; - display: flex; - justify-content: center; + display: flex; + flex-direction: column; + justify-content: space-between; + align-items: flex-start; + height: 100%; - .logo { - height: auto; - width: 100%; - } + .logo { + height: auto; + width: 256px; + } } + .contacts { - text-align: center; - gap: 0.5em; - width: 100%; - padding: 10px 0; - p { - font-size: 16px; - } + display: flex; + flex-direction: column; + justify-content: space-between; + + max-height: 70%; + height: 100%; + + p { + color: $text-secondary; + //font-size: 16px; + font-family: Montserrat, sans-serif; + font-weight: 400; + line-height: 20px; + margin: 0; + } } + .links { - display: flex; - justify-content: center; - gap: 10px; + display: flex; + gap: 17px; - .link { - width: 45px; - transition: background 0.3s ease; + .link { + display: flex; + justify-content: center; + align-items: center; - &:hover { - background-color: darken($bg-primary, 10%); // + width: 42px; + aspect-ratio: 1; + border-radius: 100%; + background-color: $bg-primary; + + .icon { + width: 80%; + height: 80%; + object-fit: contain; + } } - - .icon { - width: 65%; - height: 65%; - } - } } - } + + .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; + align-items: center; + width: 100vw; + 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; + flex-direction: column; + align-items: center; + gap: 2rem; + } + + .logo-container { + height: auto; + 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; + gap: 10px; + + .link { + width: 45px; + transition: background 0.3s ease; + + &:hover { + background-color: darken($bg-primary, 10%); // + } + + .icon { + width: 65%; + height: 65%; + } + } + } + } + + .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 { - background-image: url("../../assets/images/backround/bg_footer_gray.svg"); -} + background-image: url("../../assets/images/backround/bg_footer_gray.svg"); +} \ No newline at end of file diff --git a/src/widgets/Footer/Footer.tsx b/src/widgets/Footer/Footer.tsx index 146d43d..71e4758 100644 --- a/src/widgets/Footer/Footer.tsx +++ b/src/widgets/Footer/Footer.tsx @@ -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; // Объект с ключами-строками и значениями типа LinkType + links?: Record; contacts?: ContactsType; } const mockLinks: Record = { - 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,42 +43,75 @@ const mockLinks: Record = { const mockContacts: ContactsType = { email: ( - + skb@sfedu.ru ), + phone: ( + + +7 (978) 009-54-80 + + ), address: ( - г. Таганрог, пер. Тургеневский, 44 - - ), - phone: ( - - +7 (978) 009-54-80 +
+ Таганрог +
+ пер. Тургеневский, 44 +
), }; function Footer({ links = mockLinks, contacts = mockContacts }: FooterProps) { - const [mediaList] = useState(links); + const [mediaList, setMediaList] = useState(links); return (
- logo +
+ logo +
+
- -
- {Object.keys(mediaList).map((linkKey) => ( - - ))} +
+
+
+ НОВОСТИ + ПРОЕКТЫ + ЛАБОРАТОРИИ + О НАС +
+
+ НАША КОМАНДА + КОНТАКТЫ + ИКТИБ +
+
+ Политика конфиденциальности
-
+ +
+ +
+ {Object.keys(mediaList).map(link => )} +
+
+ + Политика конфиденциальности +
+ ©СКБ «КИТ» 2015–2025 +
+ ); } diff --git a/src/widgets/Footer/FooterContacts.tsx b/src/widgets/Footer/FooterContacts.tsx index dfa0cfb..66039e4 100644 --- a/src/widgets/Footer/FooterContacts.tsx +++ b/src/widgets/Footer/FooterContacts.tsx @@ -11,8 +11,8 @@ function FooterContacts({ contacts }: FooterContactsProps) { return (

{contacts.email}

-

{contacts.address}

{contacts.phone}

+

{contacts.address}

); }