изменила футер в соответствии с дизайном фигеме

This commit is contained in:
xomimishka committed 2025-03-25 13:17:05 +03:00
1 parent f7103fde56
commit 49cd129b52
3 files changed
+127 -56

No files matched your search

+34 -11
View File
@@ -1,4 +1,5 @@
import { useState, useEffect } 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';
@@ -9,14 +10,14 @@ import { iconIctis, iconSfedu, iconVK } from '../../assets/images/footer';
import './Footer.styles.scss'; import './Footer.styles.scss';
const mockLinks = { const mockLinks = {
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",
@@ -29,7 +30,7 @@ const mockContacts = {
), ),
address: ( address: (
<a style={{ color: 'inherit' }} href="https://yandex.ru/maps/?text=г.%20Таганрог,%20пер.%20Тургеневский,%2044" target="_blank" rel="noopener noreferrer"> <a style={{ color: 'inherit' }} href="https://yandex.ru/maps/?text=г.%20Таганрог,%20пер.%20Тургеневский,%2044" target="_blank" rel="noopener noreferrer">
г. Таганрог, пер. Тургеневский, 44 <a style={{ color: '#898989' }}>Таганрог</a><br />пер. Тургеневский, 44
</a> </a>
), ),
phone: ( phone: (
@@ -37,7 +38,7 @@ const mockContacts = {
), ),
}; };
function Footer({ links = mockLinks, contacts = mockContacts }) { function Footer({ links = mockLinks, contacts = mockContacts }) {
const [mediaList, setMediaList] = useState(links); const [mediaList, setMediaList] = useState(links);
useEffect(() => { useEffect(() => {
@@ -52,13 +53,35 @@ function Footer({ links = mockLinks, contacts = mockContacts }) {
return ( return (
<footer id="footer"> <footer id="footer">
<div className="logo-container"> <div className="logo-container">
<img className="logo" alt="logo" src={ logo } /> <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>
<FooterContacts contacts={ contacts } /> <div className="footer-links-container">
<div className="links"> <div className="footer-links">
{ Object.keys(mediaList).map(link => <FooterLink link={ mediaList[link] } key={ mediaList[link].id } />) } <div className="footer-column">
<Link href="#" to="/news">НОВОСТИ</Link>
<Link href="#" to="/projects">ПРОЕКТЫ</Link>
<Link href="#" to="/labs">ЛАБОРАТОРИИ</Link>
<Link href="#" to="/aboutus">О НАС</Link>
</div>
<div className="footer-column">
<Link href="#" >НАША КОМАНДА</Link>
<Link href="#" to="/contact">КОНТАКТЫ</Link>
<Link href="#" to="https://ictis.sfedu.ru">ИКТИБ</Link>
</div>
</div>
<Link style={{ color: 'white', fontSize: '14px', alignItems: 'flex-end', lineHeight: 'none' }} href="#" to="https://www.study.sfedu.ru/privacypolicy?ysclid=m8anp507sz44008873">Политика конфиденциальности</Link>
</div> </div>
</footer>
<div className="footer-content">
<FooterContacts contacts={contacts} />
<div className="links">
{Object.keys(mediaList).map(link => <FooterLink link={mediaList[link]} key={mediaList[link].id} />)}
</div>
</div>
</footer >
); );
} }
+90 -42
View File
@@ -1,13 +1,14 @@
@import "../../assets/styles/theme.scss"; @import "../../assets/styles/theme.scss";
@import "bootstrap/scss/bootstrap"; // Подключение Bootstrap @import "bootstrap/scss/bootstrap"; // Подключение Bootstrap
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;700&display=swap');
#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;
@@ -22,12 +23,15 @@
} }
.logo-container { .logo-container {
height: 52%; display: flex;
max-width: 22%; flex-direction: column;
justify-content: space-between;
align-items: flex-start;
height: 100%;
.logo { .logo {
height: 100%; height: auto;
width: 100%; width: 256px;
} }
} }
@@ -37,27 +41,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;
@@ -70,6 +75,15 @@
} }
} }
.footer-content {
display: flex;
flex-direction: column;
height: 100%;
gap: 32px;
justify-content: center;
}
@media (max-width: 768px) { @media (max-width: 768px) {
flex-direction: column; flex-direction: column;
justify-content: center; justify-content: center;
@@ -78,7 +92,7 @@
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;
@@ -86,47 +100,81 @@
gap: 2rem; gap: 2rem;
} }
.logo-container { .logo-container {
height: auto;
max-width: 60%;
display: flex;
justify-content: center;
.logo {
height: auto; height: auto;
max-height: 100%;
max-width: 60%;
display: flex;
justify-content: center;
.logo {
height: auto;
width: 100%;
}
}
.contacts {
text-align: center;
gap: 0.5em;
width: 100%; width: 100%;
padding: 10px 0;
p {
font-size: 16px;
}
} }
}
.contacts { .links {
text-align: center; display: flex;
gap: 0.5em;
width: 100%;
padding: 10px 0;
p {
font-size: 16px;
}
}
.links {
display: flex;
justify-content: center; justify-content: center;
gap: 10px; gap: 10px;
.link { .link {
width: 45px; width: 45px;
transition: background 0.3s ease; transition: background 0.3s ease;
&:hover { &:hover {
background-color: darken($bg-primary, 10%);// background-color: darken($bg-primary, 10%); //
} }
.icon { .icon {
width: 65%; width: 65%;
height: 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 { #root:has(#mainpageheader) #footer {
+3 -3
View File
@@ -1,9 +1,9 @@
function FooterContacts({ contacts }) { function FooterContacts({ contacts }) {
return ( return (
<div className="contacts"> <div className="contacts">
<p>{ contacts.email }</p> <p style={{ fontSize: '24px', fontWeight: '500', textDecoration: 'underline', textDecorationThickness: '1px', textUnderlineOffset: '2px' }}>{ contacts.email }</p>
<p>{ contacts.address }</p> <p style={{ fontSize: '24px' }}>{ contacts.phone }</p>
<p>{ contacts.phone }</p> <p style={{ fontSize: '16px', lineHeight: '25px', fontWeight: '300' }}>{ contacts.address }</p>
</div> </div>
); );
} }