перенес структуру Севы со своими правками

This commit is contained in:
ifraimka1 committed 2025-04-01 15:25:46 +03:00
1 parent 3a1cac0dfe
commit 808d97eb4b
331 files changed
+12260 -19950

No files matched your search

+130
View File
@@ -0,0 +1,130 @@
#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;
max-height: 70%;
height: 40%;
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;
.container-fluid {
display: flex;
flex-direction: column;
align-items: center;
gap: 2rem;
}
.logo-container {
height: auto;
max-width: 60%;
display: flex;
justify-content: center;
.logo {
height: auto;
width: 100%;
}
}
.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%;
}
}
}
}
}
#root:has(#mainpageheader) #footer {
background-image: url("../../assets/images/backround/bg_footer_gray.svg");
}
+87
View File
@@ -0,0 +1,87 @@
import { useState } from "react";
import FooterLink from "./FooterLink";
import FooterContacts from "./FooterContacts";
import logo from "@/shared/assets/images/scb.svg";
import iconIctis from "@/shared/assets/images/footer/iconIctis.png";
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
}
// Тип для контактов
interface ContactsType {
email: JSX.Element;
address: JSX.Element;
phone: JSX.Element;
}
// Тип для пропсов компонента Footer
interface FooterProps {
links?: Record<string, LinkType>; // Объект с ключами-строками и значениями типа LinkType
contacts?: ContactsType;
}
const mockLinks: Record<string, LinkType> = {
ictis: {
src: iconIctis,
to: "https://ictis.sfedu.ru",
},
sfedu: {
src: iconSfedu,
to: "https://sfedu.ru",
},
vk: {
src: iconVK,
to: "https://vk.com/skbkit",
},
};
const mockContacts: ContactsType = {
email: (
<a style={{ color: "inherit" }} href="mailto:skb@sfedu.ru">
skb@sfedu.ru
</a>
),
address: (
<a
style={{ color: "inherit" }}
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
</a>
),
};
function Footer({ links = mockLinks, contacts = mockContacts }: FooterProps) {
const [mediaList] = useState(links);
return (
<footer id="footer">
<div className="logo-container">
<img className="logo" alt="logo" src={logo} />
</div>
<FooterContacts contacts={contacts} />
<div className="links">
{Object.keys(mediaList).map((linkKey) => (
<FooterLink link={mediaList[linkKey]} key={linkKey} />
))}
</div>
</footer>
);
}
export default Footer;
+20
View File
@@ -0,0 +1,20 @@
// Тип для пропсов компонента FooterContacts
interface FooterContactsProps {
contacts: {
email: JSX.Element;
address: JSX.Element;
phone: JSX.Element;
};
}
function FooterContacts({ contacts }: FooterContactsProps) {
return (
<div className="contacts">
<p>{contacts.email}</p>
<p>{contacts.address}</p>
<p>{contacts.phone}</p>
</div>
);
}
export default FooterContacts;
+19
View File
@@ -0,0 +1,19 @@
import { Link } from "react-router-dom";
// Тип для пропсов компонента FooterLink
interface FooterLinkProps {
link: {
src: string;
to: string;
};
}
function FooterLink({ link }: FooterLinkProps) {
return (
<Link to={link.to} className="link" target="_blank">
<img src={link.src} alt="icon" className="icon" />
</Link>
);
}
export default FooterLink;
+1
View File
@@ -0,0 +1 @@
export { default } from './Footer';