Merge branch 'Team' into refactoring

This commit is contained in:
ifraimka1 committed 2025-04-17 15:54:53 +03:00
commit 1a0ff4cf56
33 files changed
+1099 -397

No files matched your search

+5 -6
View File
@@ -73,14 +73,13 @@ function Root() {
return (
<RootContext.Provider value={{ setRef }}>
<div id="layout-wrapper">
<Navbar />
<div
id="react-page"
style={{ marginTop: isHomePage ? "0px" : "" }} // Устанавливаем margin-top
>
<main id="react-page" style={{ marginTop: isHomePage ? "0px" : "" }}>
<Outlet />
</div>
</main>
<Footer />
</div>
{hasScrolled && (
<button
className={`scroll-to-top ${isOnTopVisible ? "visible" : "hidden"}`}
@@ -90,7 +89,7 @@ function Root() {
</button>
)}
</RootContext.Provider>
);
);
}
export default Root;
+1
View File
@@ -49,6 +49,7 @@ a {
.btn:hover {
background-position: 100%;
color: $btn-primary-text;
}
.btn[disabled] {
+7 -1
View File
@@ -1,5 +1,11 @@
import { CategoryPage } from "@/widgets/CategoryPage/CategoryPage";
import Team from "@/widgets/Team";
import PhotoGallery from "@/widgets/PhotoGallery";
export default function AboutUs() {
return <CategoryPage category="aboutus" />;
return <>
<CategoryPage category="aboutus" />
< Team />
< PhotoGallery />
</>
}
@@ -65,6 +65,7 @@ body {
margin-top: 24px;
}
}
}
.block {
@@ -127,110 +128,78 @@ 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;
padding: 0 10%;
&::before {
content: "";
position: absolute;
top: 35%;
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; // Скрываем картинку на мобильных
}
@media (max-width: 768px) {
padding: 0 5%;
}
}
.row.lab-list {
position: relative;
&::before {
content: "";
content: '';
position: absolute;
top: 10%;
bottom: 5%;
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%);
@media (max-width: 768px) {
display: none;
}
}
}
.NumbersContainer {
position: relative;
padding: 0 10%;
@media (max-width: 768px) {
padding: 0 5%;
}
&::before {
content: '';
position: absolute;
bottom: 5%;
left: 0;
width: 100%;
height: 459px;
background-image: url('/src/shared/assets/images/backround/bg_projects_block.svg');
background-repeat: no-repeat;
background-position: right center;
background-size: contain;
z-index: -1;
@media (max-width: 768px) {
display: none;
}
}
}
+13 -2
View File
@@ -5,11 +5,13 @@ import { RootContext } from "@/app/Layout/Root";
import Partners from "@/widgets/Partners";
import Gallery from "@/pages/MainPage/ui/components/Gallery";
import ContactUs from "@/widgets/ContactUs";
import {
LabsList,
NewsList,
ProjectsList,
} from "@/widgets/CardList/CardList";
import Numbers from "@/widgets/Numbers";
const MainPage = () => {
const { setRef } = useContext(RootContext);
@@ -43,10 +45,19 @@ const MainPage = () => {
</div>
<NewsList />
<ProjectsList />
<LabsList />
<div className={styles.LabListContainer}>
<LabsList />
</div>
<div className={styles.NumbersContainer}>
<Numbers />
</div>
<div className={styles.GalleryContainer}>
<Gallery />
</div>
<div className={styles.mainContainer}>
<Partners />
<Gallery />
</div>
<div className={styles.mainContainer}>
<ContactUs />
</div>
</div>
@@ -4,8 +4,6 @@ import "./Gallery.styles.scss";
function Gallery() {
return (
<div id="gallery">
<br />
<br />
<h1>
СКБ «КИТ» - реальные технологические
<br />
@@ -98,6 +98,7 @@
height: 100%;
object-fit: cover;
transition: filter 0.3s ease;
pointer-events: none;
}
.title {
+10
View File
@@ -0,0 +1,10 @@
<svg width="256" height="320" viewBox="0 0 256 320" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect width="256" height="320" rx="8" fill="url(#paint0_linear_875_3132)"/>
<path d="M48.5722 153L51.8722 157.68L55.1722 153H58.2122L53.5122 159.72L58.5922 167H55.5122L51.8722 161.9L48.2522 167H45.2522L50.3122 159.82L45.5722 153H48.5722ZM64.6744 167.14C63.5944 167.14 62.621 166.907 61.7544 166.44C60.8877 165.973 60.2077 165.327 59.7144 164.5C59.2344 163.66 58.9944 162.713 58.9944 161.66C58.9944 160.607 59.2344 159.667 59.7144 158.84C60.2077 158.013 60.8877 157.367 61.7544 156.9C62.621 156.433 63.5944 156.2 64.6744 156.2C65.7677 156.2 66.7477 156.433 67.6144 156.9C68.481 157.367 69.1544 158.013 69.6344 158.84C70.1277 159.667 70.3744 160.607 70.3744 161.66C70.3744 162.713 70.1277 163.66 69.6344 164.5C69.1544 165.327 68.481 165.973 67.6144 166.44C66.7477 166.907 65.7677 167.14 64.6744 167.14ZM64.6744 165C65.5944 165 66.3544 164.693 66.9544 164.08C67.5544 163.467 67.8544 162.66 67.8544 161.66C67.8544 160.66 67.5544 159.853 66.9544 159.24C66.3544 158.627 65.5944 158.32 64.6744 158.32C63.7544 158.32 62.9944 158.627 62.3944 159.24C61.8077 159.853 61.5144 160.66 61.5144 161.66C61.5144 162.66 61.8077 163.467 62.3944 164.08C62.9944 164.693 63.7544 165 64.6744 165ZM81.9041 156.32V167H79.4041V162.86C78.3774 163.353 77.3041 163.6 76.1841 163.6C74.8107 163.6 73.7574 163.287 73.0241 162.66C72.2907 162.02 71.9241 161.047 71.9241 159.74V156.32H74.4241V159.58C74.4241 160.26 74.6241 160.767 75.0241 161.1C75.4241 161.433 75.9907 161.6 76.7241 161.6C77.6574 161.6 78.5507 161.4 79.4041 161V156.32H81.9041ZM95.3459 156.32L90.3459 167.86C89.8793 169.02 89.3126 169.833 88.6459 170.3C87.9793 170.78 87.1726 171.02 86.2259 171.02C85.6926 171.02 85.1659 170.933 84.6459 170.76C84.1259 170.587 83.6993 170.347 83.3659 170.04L84.3659 168.2C84.6059 168.427 84.8859 168.607 85.2059 168.74C85.5393 168.873 85.8726 168.94 86.2059 168.94C86.6459 168.94 87.0059 168.827 87.2859 168.6C87.5793 168.373 87.8459 167.993 88.0859 167.46L88.2659 167.04L83.6059 156.32H86.2059L89.5659 164.22L92.9459 156.32H95.3459ZM110.35 161.44C111.67 161.84 112.33 162.693 112.33 164C112.33 164.96 111.97 165.7 111.25 166.22C110.53 166.74 109.463 167 108.05 167H102.61V156.32H107.83C109.136 156.32 110.156 156.56 110.89 157.04C111.623 157.52 111.99 158.2 111.99 159.08C111.99 159.627 111.843 160.1 111.55 160.5C111.27 160.9 110.87 161.213 110.35 161.44ZM104.99 160.78H107.61C108.903 160.78 109.55 160.333 109.55 159.44C109.55 158.573 108.903 158.14 107.61 158.14H104.99V160.78ZM107.85 165.18C109.223 165.18 109.91 164.733 109.91 163.84C109.91 163.373 109.75 163.027 109.43 162.8C109.11 162.56 108.61 162.44 107.93 162.44H104.99V165.18H107.85ZM124.96 162.72H123.02V167H120.52V156.32H123.02V160.64H125.02L128.18 156.32H130.86L126.98 161.46L131.12 167H128.18L124.96 162.72ZM137.292 167.14C136.212 167.14 135.238 166.907 134.372 166.44C133.505 165.973 132.825 165.327 132.332 164.5C131.852 163.66 131.612 162.713 131.612 161.66C131.612 160.607 131.852 159.667 132.332 158.84C132.825 158.013 133.505 157.367 134.372 156.9C135.238 156.433 136.212 156.2 137.292 156.2C138.385 156.2 139.365 156.433 140.232 156.9C141.098 157.367 141.772 158.013 142.252 158.84C142.745 159.667 142.992 160.607 142.992 161.66C142.992 162.713 142.745 163.66 142.252 164.5C141.772 165.327 141.098 165.973 140.232 166.44C139.365 166.907 138.385 167.14 137.292 167.14ZM137.292 165C138.212 165 138.972 164.693 139.572 164.08C140.172 163.467 140.472 162.66 140.472 161.66C140.472 160.66 140.172 159.853 139.572 159.24C138.972 158.627 138.212 158.32 137.292 158.32C136.372 158.32 135.612 158.627 135.012 159.24C134.425 159.853 134.132 160.66 134.132 161.66C134.132 162.66 134.425 163.467 135.012 164.08C135.612 164.693 136.372 165 137.292 165ZM155.961 167V159.92L152.361 165.88H151.281L147.741 159.9V167H145.461V156.32H148.081L151.881 163L155.861 156.32H158.201L158.221 167H155.961ZM165.555 156.2C167.128 156.2 168.328 156.58 169.155 157.34C169.995 158.087 170.415 159.22 170.415 160.74V167H168.055V165.7C167.748 166.167 167.308 166.527 166.735 166.78C166.175 167.02 165.495 167.14 164.695 167.14C163.895 167.14 163.195 167.007 162.595 166.74C161.995 166.46 161.528 166.08 161.195 165.6C160.875 165.107 160.715 164.553 160.715 163.94C160.715 162.98 161.068 162.213 161.775 161.64C162.495 161.053 163.621 160.76 165.155 160.76H167.915V160.6C167.915 159.853 167.688 159.28 167.235 158.88C166.795 158.48 166.135 158.28 165.255 158.28C164.655 158.28 164.061 158.373 163.475 158.56C162.901 158.747 162.415 159.007 162.015 159.34L161.035 157.52C161.595 157.093 162.268 156.767 163.055 156.54C163.841 156.313 164.675 156.2 165.555 156.2ZM165.215 165.32C165.841 165.32 166.395 165.18 166.875 164.9C167.368 164.607 167.715 164.193 167.915 163.66V162.42H165.335C163.895 162.42 163.175 162.893 163.175 163.84C163.175 164.293 163.355 164.653 163.715 164.92C164.075 165.187 164.575 165.32 165.215 165.32ZM173.508 156.32H176.008V160.66H181.388V156.32H183.888V167H181.388V162.78H176.008V167H173.508V156.32ZM198.639 164.88V169.38H196.299V167H188.059V169.38H185.739V164.88H186.239C186.919 164.853 187.379 164.42 187.619 163.58C187.872 162.727 188.039 161.527Line truncated
<defs>
<linearGradient id="paint0_linear_875_3132" x1="0" y1="0" x2="269.98" y2="12.2648" gradientUnits="userSpaceOnUse">
<stop stop-color="#0867F4"/>
<stop offset="1" stop-color="#072AC8"/>
</linearGradient>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 6.0 KiB

+3 -1
View File
@@ -19,4 +19,6 @@ export { default as bg_news_block } from './backround/bg_news_block.svg';
export { default as bg_projects_block } from './backround/bg_projects_block.svg';
export { default as scb } from './scb.svg';
export { default as scb_blue } from './sсb_blue.svg';
export { default as scb_blue } from './sсb_blue.svg';
export { default as photo} from './photo.jpg';
Binary file not shown.

After

Width:  |  Height:  |  Size: 116 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 122 KiB

+34 -13
View File
@@ -3,27 +3,23 @@ $icon-size: 24px;
$color-file-button: rgb(7, 42, 200);
.contact-form {
padding: 20px 22px;
padding: 1.3rem 32px;
border-radius: 16px;
height: 100%;
width: 100%;
background-color: $bg-form;
margin-top: 20px;
align-items: flex-start;
h2 {
margin-top: 0;
min-width: 400px;
font-size: 28px;
font-weight: 500;
line-height: 44px;
@media (max-width: 768px) {
font-size: 20px;
min-width: 0;
}
}
.smart-captcha {
min-width: 0;
}
.inputs {
display: flex;
flex-direction: column;
@@ -41,7 +37,6 @@ $color-file-button: rgb(7, 42, 200);
padding: 12px 16px;
border: none;
border-radius: 8px;
font-size: 16px;
font-weight: 400;
}
@@ -50,6 +45,7 @@ $color-file-button: rgb(7, 42, 200);
height: 300px;
line-height: 30px;
resize: none;
@media (max-width: 768px) {
height: 200px;
}
@@ -77,16 +73,21 @@ $color-file-button: rgb(7, 42, 200);
.upload-file-btn {
display: flex;
align-items: center;
gap: 8px;
cursor: pointer;
background: none;
border: none; // Убрана рамка
padding: 0;
.icon {
filter: invert(15%) sepia(100%) saturate(2861%) hue-rotate(229deg)
brightness(93%) contrast(120%);
filter: invert(15%) sepia(100%) saturate(2861%) hue-rotate(229deg) brightness(93%) contrast(120%);
}
span {
display: inline-block;
font-size: 18px;
@media (max-width: 768px) {
font-size: 16px;
}
@@ -118,7 +119,7 @@ $color-file-button: rgb(7, 42, 200);
}
}
.file-input input:focus + .upload-file-btn {
.file-input input:focus+.upload-file-btn {
outline: -webkit-focus-ring-color auto 1px;
}
@@ -126,11 +127,31 @@ $color-file-button: rgb(7, 42, 200);
.submit {
width: 100%;
cursor: pointer;
padding: 12px;
font-size: 18px;
line-height: normal;
margin-top: 0;
&:disabled {
background-color: #aaaaaa;
color: dimgrey;
cursor: not-allowed;
}
}
}
.agree-checkbox {
display: flex;
align-items: center;
gap: 5px; // Расстояние между чекбоксом и текстом
font-size: 14px;
}
}
}
.checkbox-container {
margin-top: 15px;
display: flex;
align-items: center;
gap: 8px;
}
+64 -6
View File
@@ -17,13 +17,16 @@ import {
const formSchema = z.object({
name: z.string().min(1, "Обязательное поле"),
email: z.string().email("Некорректный email. Пример 123@sfedu.ru"),
phone: z.string()
.min(1, "Обязательное поле")
.regex(/^\+7\s?\(?\d{3}\)?\s?\d{3}[-.\s]?\d{2}[-.\s]?\d{2}$/, "Некорректный номер телефона"),
message: z.string().min(1, "Обязательное поле"),
file: z
.any() // Используем `any`, чтобы избежать ошибки типа
.any()
.optional()
.nullable()
.refine(
(file) => !file || file.length === 0 || file instanceof File, // Проверяем, что это File, если значение есть
(file) => !file || file.length === 0 || file instanceof File,
"Файл должен быть экземпляром File"
)
.refine(
@@ -37,6 +40,7 @@ const formSchema = z.object({
)
.transform((value) => value ?? undefined),
captcha: z.string().min(1, "Требуется проверка капчи"),
agree: z.boolean().refine(val => val, "Необходимо согласие на обработку данных"),
});
type FormData = z.infer<typeof formSchema>;
@@ -55,9 +59,11 @@ function ContactForm() {
defaultValues: {
name: "",
email: "",
phone: "",
message: "",
file: undefined,
captcha: "",
agree: false,
},
});
@@ -65,7 +71,31 @@ function ContactForm() {
const file = watch("file");
const fileAttached = !!file && file instanceof File;
console.log(file);
const agree = watch("agree");
const handlePhoneChange = (e: React.ChangeEvent<HTMLInputElement>) => {
let value = e.target.value.replace(/\D/g, '');
if (value.length === 0 || value === '7') {
setValue("phone", "");
return;
}
if (value.length === 1) {
value = `+7 ${value}`;
} else if (value.length <= 4) {
value = `+7 (${value.slice(1)}`;
} else if (value.length <= 7) {
value = `+7 (${value.slice(1, 4)}) ${value.slice(4)}`;
} else if (value.length <= 9) {
value = `+7 (${value.slice(1, 4)}) ${value.slice(4, 7)}-${value.slice(7)}`;
} else {
value = `+7 (${value.slice(1, 4)}) ${value.slice(4, 7)}-${value.slice(7, 9)}-${value.slice(9, 11)}`;
}
setValue("phone", value, { shouldValidate: true });
};
const handleFileChange = async (e: React.ChangeEvent<HTMLInputElement>) => {
const selectedFile = e.target.files?.[0];
setValue("file", selectedFile || undefined, { shouldValidate: true });
@@ -87,12 +117,18 @@ function ContactForm() {
setValue("captcha", "");
}, [setValue]);
const handleAgreeChange = (e: React.ChangeEvent<HTMLInputElement>) => {
setValue("agree", e.target.checked, { shouldValidate: true });
};
const onSubmit = async (data: FormData) => {
const formData = new FormData();
formData.append("name", data.name);
formData.append("email", data.email);
formData.append("phone", data.phone);
formData.append("message", data.message);
formData.append("captcha", data.captcha);
formData.append("agree", data.agree.toString());
if (data.file instanceof File) {
formData.append("file", data.file);
@@ -133,6 +169,16 @@ function ContactForm() {
register={register("email")}
error={errors.email?.message}
/>
<Field
type="tel"
name="phone"
placeholder="+7 (___) ___-__-__"
disabled={isSubmitting || isPending}
register={register("phone", {
onChange: handlePhoneChange,
})}
error={errors.phone?.message}
/>
<Field
type="textarea"
name="message"
@@ -141,7 +187,6 @@ function ContactForm() {
register={register("message")}
error={errors.message?.message}
/>
<Field
type="file"
name="file"
@@ -153,12 +198,25 @@ function ContactForm() {
})}
error={errors.file?.message}
/>
<div className="checkbox-container">
<input
type="checkbox"
id="agree"
disabled={isSubmitting || isPending}
{...register("agree")}
onChange={handleAgreeChange}
/>
<label htmlFor="agree">
Я согласен с <a href="https://www.study.sfedu.ru/privacypolicy?ysclid=m8anp507sz44008873" target="_blank" rel="noopener noreferrer">обработкой персональных данных</a>
</label>
{errors.agree && <span className="error-message">{errors.agree.message}</span>}
</div>
<div className="submit-container">
{watch("captcha") ? (
<Field
type="submit"
name="submit"
disabled={isSubmitting || isPending}
disabled={isSubmitting || isPending || !agree}
/>
) : (
<div className="captcha-container">
@@ -175,4 +233,4 @@ function ContactForm() {
);
}
export default ContactForm;
export default ContactForm;
@@ -8,6 +8,7 @@
.half {
flex: 1 1 50%;
width: 100%;
font-weight: 600;
}
.contact-form {
+2 -2
View File
@@ -7,8 +7,8 @@ function ContactUs() {
<br />
<div className="block" id="contact-us">
<h1 className="half">
Нужна помощь?
<br /> Команда способных IT-специалистов готова вам помочь!
Есть вопросы?
<br /> Команда способных<br />IT-специалистов готова<br />вам помочь!
</h1>
<ContactForm />
</div>
+179 -108
View File
@@ -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");
}
+57 -26
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,42 +43,75 @@ 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">
<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>
<FooterContacts contacts={contacts} />
<div className="links">
{Object.keys(mediaList).map((linkKey) => (
<FooterLink link={mediaList[linkKey]} key={linkKey} />
))}
<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>
</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>
<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>
);
}
+83 -92
View File
@@ -11,130 +11,121 @@
justify-content: space-between;
align-items: center;
transition: transform 0.3s ease-out, height 0.3s ease-out,
background-color 0.8s ease-out;
transition: transform 0.3s ease-out, height 0.3s ease-out, background-color 0.8s ease-out;
&.hidden {
transform: translateY(-110%); // Убираем navbar вверх
transform: translateY(-110%); // Убираем navbar вверх
}
&:not(.hidden) {
transform: translateY(0); // Показываем navbar
transform: translateY(0); // Показываем navbar
}
&.transparent {
background-color: transparent !important;
transition: none;
background-color: transparent !important;
transition: none;
.bar .nav-link {
color: $text-secondary;
.bar .nav-link {
color: $text-secondary;
@media (max-width: 1200px) {
color: black;
}
}
@media (max-width: 1200px) {
color: black;
.burger .line {
background-color: #ffffff;
&.open {
background-color: #072ac8; // Синий цвет, когда меню открыто
}
}
}
}
@media (max-width: 1200px) {
.burger .line {
background-color: #ffffff;
&.open {
background-color: #072ac8; // Синий цвет, когда меню открыто
}
.logo {
filter: brightness(0) invert(1);
}
}
.logo {
filter: brightness(0) invert(1);
}
}
.nav-link:has(> .logo) {
display: flex;
height: 100%;
align-items: center;
display: flex;
height: 100%;
align-items: center;
.logo {
width: $navbar-logo-height;
height: auto;
}
.logo {
width: $navbar-logo-height;
height: auto;
}
}
.bar {
display: flex;
align-items: center;
flex-wrap: wrap;
justify-content: flex-end;
display: flex;
align-items: center;
.nav-link {
font-size: 16px;
font-weight: 500;
line-height: 20px;
letter-spacing: 0em;
padding: 0.25em;
margin-left: 40px;
color: black;
text-decoration: none;
text-wrap: nowrap;
}
.nav-link {
font-size: 16px;
font-weight: 500;
line-height: 20px;
letter-spacing: 0em;
padding: .25em;
margin-left: 40px;
color: black;
text-decoration: none;
text-wrap: nowrap;
}
.nav-link::after {
background: $text-secondary;
}
.nav-link::after {
background: $text-secondary;
}
}
@media (max-width: 1200px) {
// height: $navbar-height;
// padding: $navbar-padding-tb 5%;
height: $navbar-height;
padding: $navbar-padding-tb 5%;
// .nav-link:has(> .logo) .logo {
// width: $navbar-logo-mini-height;
// }
.bar {
display: none;
flex-direction: column;
position: fixed;
top: 0;
right: 0;
background-color: white;
width: 50%;
height: 200vh;
z-index: 9;
padding: 60px 0px;
&.open {
display: flex;
.nav-link:has(> .logo) .logo {
width: $navbar-logo-mini-height;
}
.nav-link {
padding: 10px 5px;
width: 100%;
text-align: left;
}
}
.bar {
display: none;
flex-direction: column;
position: fixed;
top: 0;
right: 0;
background-color: white;
width: 50%;
height: 200vh;
z-index: 9;
padding: 60px 0px;
.burger {
position: relative;
display: flex;
flex-direction: column;
z-index: 10;
&.open {
display: flex;
}
.line {
width: 25px;
height: 3px;
background-color: #072ac8;
margin: 4px 0;
transition: all 0.3s ease;
.nav-link {
padding: 10px 5px;
width: 100%;
text-align: left;
}
}
}
.burger {
position: relative;
display: flex;
flex-direction: column;
z-index: 10;
.line {
width: 25px;
height: 3px;
background-color: #072ac8;
margin: 4px 0;
transition: all 0.3s ease;
}
}
}
@media (max-width: 768px) {
height: $navbar-height;
padding: $navbar-padding-tb 5%;
.nav-link:has(> .logo) .logo {
width: $navbar-logo-mini-height;
}
}
}
+41 -8
View File
@@ -1,5 +1,6 @@
import { useState, useEffect } from "react";
import NavbarLink from "./NavbarLink";
import { useLocation } from "react-router-dom";
import logo from "@/shared/assets/images/sсb_blue.svg";
import "./Navbar.styles.scss";
@@ -50,6 +51,9 @@ function Navbar({ links = mock }: NavbarProps) {
const [navbarHidden, setNavbarHidden] = useState(false); // true = спрятан, false = виден
const [lastScrollTop, setLastScrollTop] = useState(0);
const THRESHOLD = 400; // navbar не скрывается в первые 400px
const [isTransparent, setIsTransparent] = useState(true);
const [scrolledOnce, setScrolledOnce] = useState(false);
const location = useLocation(); // отслеживаем путь
const toggleMenu = () => {
setIsOpen(!isOpen);
@@ -59,6 +63,17 @@ function Navbar({ links = mock }: NavbarProps) {
setIsOpen(false); // Закрываем меню при клике на ссылку
};
useEffect(() => {
if (location.pathname === "/") {
setIsTransparent(true);
setScrolledOnce(false);
window.scrollTo(0, 0);
} else {
setIsTransparent(false);
}
}, [location]);
// Для навбара
useEffect(() => {
const navbar = document.getElementById("navbar");
@@ -73,25 +88,43 @@ function Navbar({ links = mock }: NavbarProps) {
const handleScroll = () => {
const currentScrollTop = window.pageYOffset;
if (currentScrollTop <= THRESHOLD) {
setNavbarHidden(false);
} else {
if (currentScrollTop > lastScrollTop) {
setNavbarHidden(true);
} else {
if (!isOpen) {
if (currentScrollTop <= THRESHOLD) {
setNavbarHidden(false);
} else {
if (currentScrollTop > lastScrollTop) {
setNavbarHidden(true);
} else {
setNavbarHidden(false);
}
}
}
// Прозрачность исчезает при первом скролле на главной
if (
location.pathname === "/" &&
!scrolledOnce &&
currentScrollTop > 50
) {
setIsTransparent(false);
setScrolledOnce(true);
}
setLastScrollTop(currentScrollTop);
};
window.addEventListener("scroll", handleScroll);
return () => window.removeEventListener("scroll", handleScroll);
}, [lastScrollTop]);
}, [lastScrollTop, scrolledOnce, location.pathname, isOpen]);
return (
<div id="navbar">
<div
id="navbar"
className={`${isTransparent ? "transparent" : ""} ${navbarHidden ? "hidden" : ""
}`}
>
<NavbarLink className="logo-container" link={{ to: "/" }}>
<img src={logo} className="logo" alt="SCB logo" />
</NavbarLink>
+87
View File
@@ -0,0 +1,87 @@
#numbers {
margin-bottom: 48px;
img {
pointer-events: none;
}
.title {
// если нужно — добавь стили заголовка
}
label {
font-weight: 500;
font-size: 20px;
margin-top: 10px;
text-align: center;
display: block;
}
.block-content {
display: flex;
justify-content: space-between;
align-items: center;
margin-top: 24px;
}
.columns {
display: flex;
justify-content: space-between;
gap: 32px;
}
.gap01 {
display: flex;
flex-direction: column;
gap: 32px;
}
.blocks {
padding: 24px;
background-color: #f7f5f5;
border-radius: 8px;
display: flex;
flex-direction: column;
align-items: center;
}
.visible {
display: block !important;
}
@media (max-width: 1200px) {
.visible {
display: none !important;
}
}
@media (max-width: 500px) {
label {
font-size: 14px;
margin-top: 5px;
}
.blocks {
padding: 10px;
background-color: transparent;
width: 100%;
}
.gap01 {
gap: 10px;
}
}
}
.namber {
font-size: 64px;
font-weight: 600;
font-family: 'Montserrat', sans-serif;
background: linear-gradient(to right, #0867F4, #072AC8);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
display: inline-block;
line-height: 1;
margin: 0;
padding: 0;
}
+45
View File
@@ -0,0 +1,45 @@
import "./Numbers.styles.scss";
import { Illustration } from '../../shared/assets/images/numbers';
const Numbers = () => {
return (
<div className="block" id="numbers">
<h2 className="title">СКБ «КИТ» в цифрах"</h2>
<div className="block-content">
<div className="columns">
<div className="gap01">
<div className='blocks'>
<p className="namber">10</p>
<label>лет успешной работы</label>
</div>
<div className='blocks'>
<p className="namber">20+</p>
<label>сотрудников</label>
</div>
<div className='blocks'>
<p className="namber">30+</p>
<label>выполненных проектов</label>
</div>
</div>
<div className="gap01">
<div className='blocks'>
<p className="namber">10</p>
<label>лет успешной работы</label>
</div>
<div className='blocks'>
<p className="namber">20+</p>
<label>сотрудников</label>
</div>
<div className='blocks'>
<p className="namber">30+</p>
<label>выполненных проектов</label>
</div>
</div>
</div>
<img className="visible" src={Illustration} alt="Illustration" />
</div>
</div>
);
};
export default Numbers;
+1
View File
@@ -0,0 +1 @@
export { default } from './Numbers';
+7 -2
View File
@@ -1,5 +1,5 @@
$block-height: 150px;
$logo-size: 150px;
$block-height: 200px;
$logo-size: 200px;
#partners {
margin-left: 0;
@@ -31,6 +31,11 @@ $logo-size: 150px;
height: 100%;
display: flex;
align-items: center;
.rfm-marquee {
justify-content: center;
}
}
}
.partner {
+22 -12
View File
@@ -3,7 +3,7 @@ import Marquee from "react-fast-marquee";
import PartnersLogo from "./PartnersLogo";
import styles from "./Partners.module.scss";
import BlockHeading from "@/widgets/BlockHeading";
// import BlockHeading from "@/widgets/BlockHeading";
// Тип для данных партнёра
interface Partner {
@@ -74,20 +74,28 @@ const mock: Partner[] = [
function Partners({ partners = mock }: PartnersProps) {
const [mediaList, setMediaList] = useState<Partner[]>(partners);
const updateMediaList = async () => {
// Логика для обновления списка медиа
// const newMediaList = await getMedia('partners');
// setMediaList(newMediaList);
};
const [play, setPlay] = useState(false);
useEffect(() => {
updateMediaList();
window.addEventListener("resize", updateMediaList);
return () => {
window.removeEventListener("resize", updateMediaList);
const loadData = async () => {
try {
// Эмуляция загрузки данных
// const newMediaList = await getMedia('partners');
// setMediaList(newMediaList);
// Автозапуск если достаточно элементов
if (mediaList.length >= 5) {
setPlay(true);
}
} catch (error) {
console.error("Error loading partners data:", error);
// Автозапуск с mock-данными
setPlay(true);
}
};
}, []);
loadData();
}, [mediaList.length]);
return (
<div className={styles.block} id={styles.partners}>
@@ -98,8 +106,10 @@ function Partners({ partners = mock }: PartnersProps) {
<Marquee
gradient={false}
pauseOnHover={false}
play={play}
speed={80}
className={styles.marquee}
autoFill={play}
>
{mediaList.map((item, index) => (
<div key={index} className={styles.partner}>
@@ -0,0 +1,92 @@
.mainContainer {
margin: 0 10%;
text-align: left;
display: block;
@include mediaMax($mobile-xs-width) {
margin: 0 5%;
}
}
.title {
font-size: 36px;
font-weight: 600;
line-height: 44px;
margin-top: 0;
margin-bottom: 8px;
@include mediaMax($tablet-max-width) {
font-size: 24px;
}
}
.btn {
margin: 32px auto 0;
display: block;
text-align: center;
}
.images {
display: grid;
grid-template-columns: repeat(6, 1fr);
gap: 32px;
@include mediaMax($tablet-max-width) {
grid-template-columns: repeat(2, 1fr);
}
@include mediaMax($mobile-xs-width) {
grid-template-columns: 1fr;
}
}
.image-container {
height: 352px;
overflow: hidden;
border-radius: 8px;
img {
width: 100%;
height: 100%;
object-fit: cover;
pointer-events: none;
}
}
$tablet-min-width: 768px;
@for $i from 0 through 100 {
@include mediaMin($tablet-min-width) {
@if $i % 2==0 {
// Первый случай: широкая слева
.image-container:nth-child(5n + #{1 + $i * 5}) {
grid-column: span 4;
}
.image-container:nth-child(5n + #{2 + $i * 5}) {
grid-column: span 2;
}
}
@else {
// Второй случай: широкая справа
.image-container:nth-child(5n + #{2 + $i * 5}) {
grid-column: span 4;
}
.image-container:nth-child(5n + #{1 + $i * 5}) {
grid-column: span 2;
}
}
// чётная строка
.image-container:nth-child(5n + #{3 + $i * 5}),
.image-container:nth-child(5n + #{4 + $i * 5}),
.image-container:nth-child(5n + #{5 + $i * 5}) {
grid-column: span 2;
}
}
}
+50
View File
@@ -0,0 +1,50 @@
import { useEffect, useState } from "react";
import { useMedia } from "@/modules/media/hooks/useMedia";
import "./PhotoGallery.style.scss"
interface PhotoGalleryProps {
images?: string[];
category?: string;
}
const PhotoGallery = ({ images, category = "галерея" }: PhotoGalleryProps) => {
const { data: mediaData, isLoading, isError } = useMedia();
const [visibleCount, setVisibleCount] = useState(10);
const filteredMedia = images
? images.map((src, id) => ({ id, src }))
: mediaData || []; // без фильтра
if (isLoading)
return (
<div className="mainContainer">
<span className="loader"></span>
</div>
);
if (isError) return <div>Ошибка при загрузке медиа</div>;
return (
<div className="mainContainer">
<h1 className="title">Фотогалерея</h1>
<div className="images">
{filteredMedia.slice(0, visibleCount).map((media) => (
<div key={media.id} className="image-container">
<img
src={media.src}
alt={`slide-${media.id}`}
className="slide-image"
/>
</div>
))}
</div>
<div className="btn">
Показать еще
</div>
</div>
);
};
export default PhotoGallery;
+1
View File
@@ -0,0 +1 @@
export { default } from './PhotoGallery';
+77 -20
View File
@@ -4,19 +4,24 @@
position: relative;
padding: 10px 0;
&.has-pagination {
.swiper {
padding-bottom: 40px;
}
}
.swiper-slide {
display: flex;
justify-content: center;
align-items: center;
height: 50vh;
bottom: 10px;
.slide-image {
width: 100%;
height: auto;
height: 350px;
object-fit: cover;
object-position: center center;
object-position: center center; //
border-radius: 8px;
pointer-events: none;
}
@@ -24,12 +29,12 @@
.swiper-wrapper:has(.swiper-slide.single) {
justify-content: center;
.swiper-slide.single {
display: flex;
justify-content: center;
align-items: center;
.slide-image {
width: auto;
height: 100%;
@@ -42,8 +47,20 @@
}
/* стрелки */
.swiper-button-prev,
.swiper-button-next {
/* Кастомные стрелки */
.custom-navigation {
display: flex;
justify-content: space-between;
align-items: center;
position: absolute;
top: 50%;
width: 100%;
transform: translateY(-50%);
z-index: 10;
}
.custom-prev,
.custom-next {
width: 60px;
height: 60px;
background-color: white;
@@ -53,27 +70,67 @@
align-items: center;
box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
cursor: pointer;
font-size: 24px;
border: none;
}
&::after {
font-size: 18px;
font-weight: 1000;
color: black;
.custom-prev {
margin-left: -70px;
@media (max-width: 768px) {
margin-left: 0px;
}
}
/* Позиционирование стрелок */
.swiper-button-prev {
left: 5px;
.custom-next {
margin-right: -70px;
@media (max-width: 768px) {
left: 0px;
margin-right: 0px;
}
}
.swiper-button-next {
right: 5px;
.slider.news {
.swiper-slide {
opacity: 0.5;
transition: opacity 0.5s ease-in-out, transform 0.5s ease-in-out;
height: 65vh;
@media (max-width: 768px) {
right: 0px;
.slide-image {
height: 500px;
}
@media (max-width: 768px) {
opacity: 1;
transition: none;
height: 48vh;
.slide-image {
height: 350px;
}
}
}
.swiper-slide-active {
opacity: 1;
}
&.no-animation .swiper-slide {
transition: none;
}
.swiper-wrapper:has(.swiper-slide.single) {
justify-content: center !important;
}
.swiper-slide-prev,
.swiper-slide-next {
opacity: 0.7;
transform: scale(0.9);
@media (max-width: 768px) {
opacity: 1;
transform: none;
}
}
}
+33 -23
View File
@@ -1,14 +1,15 @@
import { useEffect, useState } from "react";
import { useEffect, useState, useRef } from "react";
import { Swiper, SwiperSlide } from "swiper/react";
import { Navigation, Pagination } from "swiper/modules";
import { Pagination } from "swiper/modules";
import { useMedia } from "@/modules/media/hooks/useMedia";
import "swiper/css";
import "swiper/css/navigation";
import "swiper/css/pagination";
import "./Slider.styles.scss";
import arrow from "../../shared/assets/images/arrow.svg";
interface SliderProps {
autoPlay?: boolean;
autoPlayTime?: number;
@@ -27,28 +28,25 @@ function Slider({
window.innerWidth <= 768 ? 1 : 2
);
const [enableButtons, setEnableButtons] = useState(false);
const swiperRef = useRef<any>(null);
// Фильтруем медиа по категории
const filteredMedia = images
? images.map((src, id) => ({ id, src }))
: mediaData?.filter((media) => media.category === category) || [];
console.log(mediaData);
useEffect(() => {
const handleResize = () => {
setItemsPerSlide(window.innerWidth <= 768 ? 1 : 2);
};
window.addEventListener("resize", handleResize);
return () => window.removeEventListener("resize", handleResize);
}, []);
useEffect(() => {
const numberOfSlides = filteredMedia.length;
if (numberOfSlides > 2) {
setEnableButtons(true);
} else if (numberOfSlides === 1) {
setItemsPerSlide(1);
}
}, [filteredMedia]);
useEffect(() => {
const handleResize = () => {
const isMobile = window.innerWidth <= 768;
setItemsPerSlide(isMobile ? 1 : 2);
// Показываем стрелки только если слайдов больше 2
setEnableButtons(!isMobile && filteredMedia.length > 2);
};
window.addEventListener("resize", handleResize);
handleResize(); // сразу вызываем
return () => window.removeEventListener("resize", handleResize);
}, [filteredMedia]);
if (isLoading)
return (
@@ -59,20 +57,32 @@ function Slider({
if (isError) return <div>Ошибка при загрузке медиа</div>;
return (
<div className="slider">
<div className={`slider ${enableButtons ? "has-pagination" : ""}`}>
{/* Кастомные стрелки */}
{enableButtons && (
<div className="custom-navigation">
<button className="custom-prev" onClick={() => swiperRef.current?.slidePrev()}>
<img src={arrow} alt="prev" />
</button>
<button className="custom-next" onClick={() => swiperRef.current?.slideNext()}>
<img src={arrow} alt="next" style={{ transform: "rotate(180deg)" }} />
</button>
</div>
)}
<Swiper
modules={[Navigation, Pagination]}
modules={[Pagination]}
spaceBetween={20}
slidesPerView={itemsPerSlide}
slidesPerGroup={1}
loop={enableButtons}
navigation={enableButtons}
pagination={{ clickable: enableButtons }}
autoplay={
autoPlay
? { delay: autoPlayTime, disableOnInteraction: false }
: false
}
onSwiper={(swiper) => (swiperRef.current = swiper)}
>
{filteredMedia.map((media) => (
<SwiperSlide
+104
View File
@@ -0,0 +1,104 @@
$btn-primary-text: white;
$btn-primary-bg: linear-gradient(
93.25deg,
#4942e4 0%,
#11009e 50%,
#4942e4 100%
);
.mainContainer {
margin: 0 10%;
text-align: left;
display: block;
@include mediaMax($mobile-xs-width) {
margin: 0 5%;
}
}
.title {
font-size: 36px;
font-weight: 600;
line-height: 44px;
margin-top: 0;
margin-bottom: 8px;
@include mediaMax($tablet-max-width) {
font-size: 24px;
}
}
.grid {
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: 32px;
@include mediaMax($tablet-max-width) {
grid-template-columns: repeat(2, 1fr);
}
@include mediaMax($mobile-xs-width) {
grid-template-columns: 1fr;
}
}
.card {
display: flex;
flex-direction: column;
justify-content: space-between;
align-items: flex-start;
text-align: left;
border: 0;
text-decoration: none;
img {
width: 100%;
height: auto;
border-radius: 8px;
object-fit: cover;
pointer-events: none;
}
.caption {
padding-top: 10px;
text-align: left;
font-size: 18px;
color: #000;
font-family: "Montserrat";
font-style: normal;
font-display: swap;
src: url("../fonts/Montserrat/Montserrat-VariableFont_wght.ttf") format("truetype");
}
.bold {
font-size: 22px;
font-weight: 500;
}
}
.joinContent {
width: 100%;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
background: $btn-primary-bg;
border-radius: 8px;
transition: 0.5s;background: $btn-primary-bg;
background-size: 200% 100%;
background-position: 0% 0%;
cursor: pointer;
&:hover {
background-size: 200%;
background-position: 100%;
}
}
.joinText {
color: white;
font-size: 20px;
font-weight: 600;
text-align: center;
font-family: "Montserrat";
}
+36
View File
@@ -0,0 +1,36 @@
import "./Team.style.scss";
import photo from "@/shared/assets/images/photo.png";
import { HashLink } from "react-router-hash-link";
const Team = () => {
const mockTeam = Array.from({ length: 7 }); // 7 обычных участников
return (
<div className="mainContainer">
<h2 className="title">Наша команда</h2>
<div className="grid">
{mockTeam.map((_, index) => (
<div key={index} className="card">
<img src={photo} alt={`Член команды ${index + 1}`} />
<p className="caption">
<span className="bold">Владимир Кутковой</span>
<br />
руководитель СКБ «КИТ»
</p>
</div>
))}
<HashLink smooth to="/contact" className="card">
<div className="joinContent">
<span className="joinText">Хочу в команду</span>
</div>
<p className="caption">
<span className="bold"></span>
<br /><br />
</p>
</HashLink>
</div>
</div>
);
};
export default Team;
+1
View File
@@ -0,0 +1 @@
export { default } from './Team';