Merge remote-tracking branch 'origin/fixes'

This commit is contained in:
ifraimka1 committed 2025-07-11 12:12:42 +03:00
commit 278c753460
33 files changed
+419 -76

No files matched your search

+6
View File
@@ -58,6 +58,10 @@
flex: 1; flex: 1;
margin-top: calc($navbar-height + 5 * $navbar-padding-tb); margin-top: calc($navbar-height + 5 * $navbar-padding-tb);
@media (max-width: 768px) {
margin-top: calc($navbar-height + 2 * $navbar-padding-tb);
}
.header, .header,
.content { .content {
margin-left: 10%; margin-left: 10%;
@@ -151,6 +155,7 @@
opacity: 0; opacity: 0;
transform: scale(0); transform: scale(0);
} }
100% { 100% {
opacity: 1; opacity: 1;
transform: scale(1); transform: scale(1);
@@ -162,6 +167,7 @@
opacity: 1; opacity: 1;
transform: scale(1); transform: scale(1);
} }
100% { 100% {
opacity: 0; opacity: 0;
transform: scale(0); transform: scale(0);
+4
View File
@@ -15,6 +15,10 @@
h1 { h1 {
margin-top: 0; margin-top: 0;
font-size: 36px;
@media (max-width: 768px) {
font-size: 24px;
}
} }
div:has(> ymaps) { div:has(> ymaps) {
+1 -1
View File
@@ -32,7 +32,7 @@ function Contact() {
<br /> <br />
Email: skb@sfedu.ru Email: skb@sfedu.ru
<br /> <br />
Адрес: г. Таганрог, пер. Тургеневский, 44, ауд. 208 Адрес: г. Таганрог, пер. Тургеневский, 44
</p> </p>
</div> </div>
</div> </div>
@@ -51,7 +51,7 @@
line-height: 36px; line-height: 36px;
@media (max-width: 768px) { @media (max-width: 768px) {
font-size: 24px; font-size: 20px;
line-height: 28px; line-height: 28px;
} }
} }
@@ -547,3 +547,4 @@
height: 48px; height: 48px;
} }
} }
@@ -230,7 +230,7 @@ function LabBoard() {
</div> </div>
</div> </div>
<div id={styles.padding2} className={styles.sliderWrapper} ref={sliderRef}> <div id={styles.padding2} className={styles.sliderWrapper}>
<button onClick={prevSlide} className={styles.sliderButton2}> <button onClick={prevSlide} className={styles.sliderButton2}>
<img src={Vector} style={{ transform: 'scaleX(-1)' }} alt="Previous" /> <img src={Vector} style={{ transform: 'scaleX(-1)' }} alt="Previous" />
</button> </button>
@@ -243,6 +243,7 @@ function LabBoard() {
preventScrollOnSwipe: true, preventScrollOnSwipe: true,
trackMouse: true, trackMouse: true,
})} })}
ref={sliderRef}
> >
<div className={`${styles.slideActive} ${fade ? styles.fadeOut : ''}`}> <div className={`${styles.slideActive} ${fade ? styles.fadeOut : ''}`}>
<img <img
+28 -1
View File
@@ -3,7 +3,7 @@
justify-content: space-between; justify-content: space-between;
margin-top: 2em; margin-top: 2em;
> * { >* {
display: inline-block; display: inline-block;
width: fit-content; width: fit-content;
} }
@@ -29,3 +29,30 @@
} }
} }
} }
#news-item-page {
.single-image-container {
height: 600px;
display: flex;
justify-content: center;
align-items: center;
margin-bottom: 20px;
img {
max-height: 100%;
width: auto;
max-width: 100%;
object-fit: contain;
pointer-events: none;
}
@media (max-width: 768px) {
height: auto;
img {
width: 100%;
height: auto;
object-fit: contain;
}
}
}
}
+27 -7
View File
@@ -10,6 +10,18 @@ import { useNewsById } from "@/modules/news/hooks/useNewsById";
import { PageContent, PageHeader } from "@/widgets/WpPost"; import { PageContent, PageHeader } from "@/widgets/WpPost";
import Slider from "@/widgets/Slider/Slider"; import Slider from "@/widgets/Slider/Slider";
export const vkWallUrl = "https://vk.com/skbkit?w=wall-172789021"; export const vkWallUrl = "https://vk.com/skbkit?w=wall-172789021";
import { useEffect } from "react";
import { useLocation } from "react-router-dom";
export const ScrollToTop = () => {
const { pathname } = useLocation();
useEffect(() => {
window.scrollTo({ top: 0, left: 0, behavior: "instant" });
}, [pathname]);
return null;
};
function NewsItem() { function NewsItem() {
const params = useParams(); const params = useParams();
@@ -28,6 +40,7 @@ function NewsItem() {
if (isLoading) if (isLoading)
return ( return (
<div className="mainContainer"> <div className="mainContainer">
<ScrollToTop />
{[...Array(1)].map((_, index) => ( {[...Array(1)].map((_, index) => (
<SkeletonPost key={index} /> <SkeletonPost key={index} />
))} ))}
@@ -38,8 +51,8 @@ function NewsItem() {
<> <>
<Helmet> <Helmet>
<title> <title>
Ошибка загрузки новости | СКБ "Компьютерное инновационное Ошибка загрузки новости | СКБ «Компьютерное инновационное
творчество" творчество»
</title> </title>
<meta name="robots" content="noindex,nofollow" /> <meta name="robots" content="noindex,nofollow" />
</Helmet> </Helmet>
@@ -55,8 +68,8 @@ function NewsItem() {
<> <>
<Helmet> <Helmet>
<title> <title>
{news.heading || "Новость"} | СКБ "Компьютерное инновационное {news.heading || "Новость"} | СКБ «Компьютерное инновационное
творчество" творчество»
</title> </title>
<meta <meta
name="description" name="description"
@@ -67,8 +80,7 @@ function NewsItem() {
/> />
<meta <meta
name="keywords" name="keywords"
content={`СКБ, новости, ${ content={`СКБ, новости, ${news.heading || ""
news.heading || ""
}, ИКТИБ, ЮФУ, студенческие проекты, инновации`} }, ИКТИБ, ЮФУ, студенческие проекты, инновации`}
/> />
<meta name="robots" content="index,follow" /> <meta name="robots" content="index,follow" />
@@ -77,7 +89,15 @@ function NewsItem() {
<h1>{news.heading}</h1> <h1>{news.heading}</h1>
</PageHeader> </PageHeader>
<PageContent className="content" id="news-item-page"> <PageContent className="content" id="news-item-page">
{news.photos.length !== 0 && <Slider images={news.photos} category="news"/>} {news.photos.length !== 0 &&
(news.photos.length === 1 ? (
<div className="single-image-container">
<img src={news.photos[0]} alt={news.heading} />
</div>
) : (
<Slider images={news.photos} category="news" />
))
}
{news.text.map((textRow, index) => ( {news.text.map((textRow, index) => (
<p key={index} dangerouslySetInnerHTML={{ __html: textRow }} /> <p key={index} dangerouslySetInnerHTML={{ __html: textRow }} />
))} ))}
@@ -66,9 +66,11 @@
opacity: 1; opacity: 1;
transform: translateY(0); transform: translateY(0);
} }
.image { .image {
filter: brightness(0.7); filter: brightness(0.7);
} }
.content { .content {
bottom: 20px; bottom: 20px;
} }
@@ -218,3 +220,15 @@
font-size: 18px; font-size: 18px;
} }
} }
.placeholder {
position: absolute;
width: 100%;
height: 100%;
background-color: #2A3451;
background-image: url("/src/shared/assets/images/kit.svg");
background-repeat: no-repeat;
background-position: center center;
background-size: 70%;
z-index: 0;
}
+4
View File
@@ -16,7 +16,11 @@ export const Card = ({ data }: CardProps) => {
className={classNames(styles.card, {}, [styles[`card__${variant}`]])} className={classNames(styles.card, {}, [styles[`card__${variant}`]])}
to={link || `/${id || name}`} to={link || `/${id || name}`}
> >
{preview ? (
<img src={preview} alt={name} className={styles.image} /> <img src={preview} alt={name} className={styles.image} />
) : (
<div className={styles.placeholder} />
)}
<div className={styles.content}> <div className={styles.content}>
<h3 className={styles.title}>{name}</h3> <h3 className={styles.title}>{name}</h3>
@@ -3,7 +3,6 @@
margin: 0 10%; margin: 0 10%;
text-align: left; text-align: left;
display: block; display: block;
@media (max-width: $mobile-xs-width) { @media (max-width: $mobile-xs-width) {
margin: 0 5%; margin: 0 5%;
} }
@@ -15,6 +14,7 @@
background-color: #e0e0e0; background-color: #e0e0e0;
border-radius: 4px; border-radius: 4px;
margin-bottom: 16px; margin-bottom: 16px;
margin-top: 20px;
position: relative; position: relative;
overflow: hidden; overflow: hidden;
@@ -1,10 +1,12 @@
import styles from "./SkeletonSlider.module.scss"; import styles from "./SkeletonSlider.module.scss";
export const SkeletonSlider = () => { export const SkeletonSlider = () => {
const skeletonCount = window.innerWidth > 768 ? 2 : 1;
return ( return (
<div className={styles.sliderSkeleton}> <div className={styles.sliderSkeleton}>
<div className={styles.slideContainer}> <div className={styles.slideContainer}>
{[...Array(2)].map((_, index) => ( {[...Array(skeletonCount)].map((_, index) => (
<div key={index} className={styles.slide}> <div key={index} className={styles.slide}>
<div className={styles.image}></div> <div className={styles.image}></div>
</div> </div>
Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.0 KiB

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 58 KiB

After

Width:  |  Height:  |  Size: 101 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

@@ -1,3 +0,0 @@
<svg width="22" height="13" viewBox="0 0 22 13" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M12.0462 12.5637C12.0462 12.5637 12.4312 12.5217 12.6284 12.3138C12.8089 12.1233 12.8027 11.7638 12.8027 11.7638C12.8027 11.7638 12.7787 10.0851 13.5727 9.83727C14.3553 9.59351 15.3601 11.4606 16.4265 12.1786C17.232 12.7215 17.8434 12.6026 17.8434 12.6026L20.693 12.5637C20.693 12.5637 22.183 12.4736 21.4766 11.3234C21.4181 11.2292 21.0644 10.4723 19.3584 8.91753C17.5711 7.29006 17.8111 7.55328 19.9626 4.73772C21.2731 3.02319 21.7969 1.97645 21.6331 1.52887C21.4776 1.10075 20.5135 1.21444 20.5135 1.21444L17.3061 1.2339C17.3061 1.2339 17.0682 1.20214 16.8918 1.30559C16.7197 1.40699 16.608 1.64358 16.608 1.64358C16.608 1.64358 16.1009 2.96993 15.4237 4.09862C13.9953 6.47888 13.4246 6.60486 13.1908 6.45738C12.6472 6.11222 12.7829 5.07264 12.7829 4.33418C12.7829 2.02664 13.1397 1.0649 12.089 0.816017C11.7405 0.733056 11.4838 0.678773 10.5917 0.669555C9.44705 0.658288 8.47877 0.673652 7.92993 0.936874C7.56474 1.11201 7.28301 1.50326 7.45518 1.5258C7.66699 1.55345 8.14696 1.6528 8.40155 1.99284C8.73023 2.43222 8.71875 3.41752 8.71875 3.41752C8.71875 3.41752 8.90761 6.13372 8.27739 6.47069C7.84541 6.70216 7.25275 6.23 5.97875 4.06994C5.32661 2.96379 4.83412 1.74088 4.83412 1.74088C4.83412 1.74088 4.73917 1.51248 4.56909 1.38958C4.36354 1.24106 4.0766 1.19498 4.0766 1.19498L1.02879 1.21444C1.02879 1.21444 0.57073 1.22673 0.40274 1.42235C0.253532 1.59544 0.391262 1.95494 0.391262 1.95494C0.391262 1.95494 2.77755 7.4355 5.47999 10.1978C7.9581 12.7296 10.7711 12.5637 10.7711 12.5637H12.0462Z" fill="#5181B8"/>
</svg>

Before

Width:  |  Height:  |  Size: 1.6 KiB

+1 -1
View File
@@ -1,3 +1,3 @@
export { default as iconIctis } from './iconIctis.png'; export { default as iconIctis } from './iconIctis.png';
export { default as iconSfedu } from './iconSfedu.png'; export { default as iconSfedu } from './iconSfedu.png';
export { default as iconVK } from './iconVK.svg'; export { default as iconVK } from './iconVK.png';
+3
View File
@@ -0,0 +1,3 @@
<svg width="109" height="66" viewBox="0 0 109 66" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M90.4925 4.03918C89.8867 3.59947 89.3907 3.29682 89.2821 3.28982C87.5879 3.2051 86.4791 3.04083 85.0724 2.7105L84.9258 5.31093L84.6785 9.70039C85.2474 10.2008 85.8616 10.6869 86.485 11.1029C88.9954 12.7785 90.79 13.3132 93.7192 13.9368C93.7192 13.9368 93.811 15.2537 93.6776 16.6172L96.6286 16.7943C96.7595 15.1136 96.793 13.7009 96.793 13.7009C97.0492 13.6361 97.3365 13.5393 97.6429 13.4199L93.0045 13.1415L91.5854 11.4782L90.1666 9.81507L90.4925 4.03918ZM98.6829 12.967L93.3201 12.6451L92.0009 11.092L90.6818 9.53869L90.9717 4.39896C91.7701 5.01831 92.6289 5.78653 93.0172 6.40104C93.8704 5.18931 95.864 4.04434 95.864 4.04434C98.626 4.29528 99.5391 4.26383 101.803 3.79031L101.813 3.78815C103.11 3.51693 103.865 3.35901 105.049 2.78396C105.76 2.43866 106.184 2.04393 106.623 1.63477C107.058 1.22915 107.508 0.809366 108.269 0.40952C108.325 1.49272 108.029 3.05331 108.029 3.05331C108.029 3.05331 107.754 5.03983 107.19 6.17261C106.65 7.2585 106.151 7.77774 105.299 8.65664C104.369 9.61591 102.607 10.7964 102.607 10.7964C102.607 10.7964 100.557 12.0805 98.6829 12.967ZM96.4847 18.3315L93.4038 18.1466C93.3749 18.2446 93.3439 18.3397 93.3104 18.4312C92.8795 19.609 92.4621 20.2207 91.6705 21.2063C91.0406 21.99 90.5057 22.5384 89.8707 23.0875L92.1424 23.2238L92.7199 22.7099C93.2173 22.2672 93.3574 22.222 93.7283 22.3839C94.328 22.6456 94.7926 23.4182 94.6239 23.8732C94.4298 24.3966 93.8126 24.8699 93.3601 24.8427C93.1449 24.8298 92.7996 24.6233 92.593 24.3838C92.2345 23.9682 92.1016 23.9388 89.6812 23.7384L89.1353 23.6932C88.9986 23.8013 88.8561 23.9125 88.7065 24.0281C88.4805 24.2031 88.2745 24.3643 88.0815 24.5151C87.5304 24.9459 87.0866 25.2932 86.5857 25.6386L88.0504 25.7265L90.4096 28.4446L92.204 30.5113C92.3409 30.2962 92.4705 30.0848 92.5887 29.8824C93.6527 28.0611 94.2208 26.9532 94.8923 24.9624C95.5254 23.0841 95.8248 22.1598 96.1917 20.3104C96.3108 19.7111 96.4069 19.0271 96.4847 18.3315ZM91.3138 31.8389L89.7665 30.0805L87.4124 27.4057L84.28 27.2178L83.8799 27.1938C82.8016 27.7065 81.8874 27.9965 80.5047 28.4351C80.1462 28.5486 79.7563 28.6724 79.3241 28.8127C77.277 29.4757 74.134 29.4192 74.134 29.4192C74.134 29.4192 71.5313 29.5178 69.784 29.557C70.0421 30.0119 70.031 30.4754 69.7521 30.9603C69.3741 31.6176 68.9143 31.8289 68.1014 31.7189C67.478 31.6349 67.3759 31.6973 65.8243 33.1157L64.1997 34.6011L58.7111 34.2716L53.2222 33.9421L52.2621 32.7832L51.302 31.6238L51.4262 29.42L51.4743 28.5676C49.7855 28.4186 48.0702 28.2694 46.3372 28.1327C46.3334 28.2008 46.3296 28.2713 46.3253 28.344L46.2041 30.5154L47.7975 32.3773C49.2026 34.0186 49.4442 34.2308 49.8379 34.1657C50.4227 34.0697 51.285 34.8711 51.251 35.4786C51.221 36.0108 50.4839 36.6997 49.9845 36.6624C49.2671 36.6092 48.6569 35.714 48.8618 35.0154C48.9539 34.7005 48.6801 34.2927 47.3291 32.7332L45.6846 30.8343L45.8074 28.6554C45.8188 28.4505 45.8288 28.2638 45.8369 28.0932C42.9709 27.8594 40.0807 27.447 37.2212 27.0394C35.1728 26.7473 33.1403 26.4573 31.1437 26.237C27.6751 25.7676 24.6625 25.4957 21.8746 25.2438C19.5255 25.0319 17.3361 24.8341 15.1684 24.545C11.2819 24.1223 7.82036 24.0157 5.5357 24.0398C5.44217 24.0407 5.35049 24.042 5.26061 24.0436L7.57499 26.7384L9.14482 28.5513L24.7246 29.4884L40.304 30.4257L43.5042 34.1346L46.7043 37.8432L54.8278 38.3316L62.9513 38.8203L64.9025 37.0535L66.8535 35.2862L74.1448 35.7262L81.4367 36.1657L81.8434 35.5859C82.4039 34.7884 83.1463 34.4754 84.084 34.6416C85.8719 34.9586 86.4057 37.2492 84.9623 38.4103C84.4774 38.8008 84.2004 38.893 83.618 38.8578C82.5872 38.7962 82.1368 38.4959 81.7421 37.607L81.3992 36.8354L74.1767 36.4021L66.9542 35.9686L65.0281 37.7424L63.102 39.5162L54.7984 39.0178L46.4948 38.5197L43.3157 34.8078L40.1366 31.0959L24.5423 30.16L8.94765 29.2243L7.40182 27.414L4.64543 24.0599C2.93366 24.122 2.001 24.3061 1.69668 24.5382L1.68095 24.5502C1.32235 24.8234 0.62092 25.3578 0.341787 26.1259C0.232803 26.4257 0.142506 26.7773 0.0717938 27.1457L5.46218 27.4692L7.36078 29.6443L9.25938 31.8194L23.9308 32.6997L38.6022 33.58L42.1277 37.6513L45.6533 41.7224L55.5951 42.3227C61.0635 42.6527 65.5586 42.944 65.584 42.97C65.6094 42.9959 66.5082 44.017 67.5814 45.2386L69.5323 47.4597L73.0128 47.6686C73.6481 47.3916 74.2963 47.0849 75.1014 46.6551C76.4211 45.9508 78.1061 44.847 79.1829 44.1194C78.9777 43.69 78.5333 43.1811 77.9231 42.4816V42.4813L77.9226 42.4811C77.716 42.2443 77.4903 41.9857 77.2487 41.7011L75.899 40.1124L73.5106 39.9692L71.1223 39.8259L70.6282 40.3113C70.0286 40.9011 69.5485 40.9005 69.0391 40.3097C68.5444 39.737 68.5871 39.0865 69.153 38.567C69.6919 38.0724 70.3126 38.1862 70.7994 38.8689C71.108 39.3019 71.1596 39.3127 73.6324 39.4611L76.1509 39.6121L77.5824 41.2381L79.0139 42.864L79.7723 43.7173C80.0738 43.5097 80.2531 43.3832 80.2531 43.3832C80.2531 43.3832 83.9212 40.5843 85.0789 39.3943C86.2364 38.2043 88.7249 35.2805 89.7419 33.9765C89.7419 33.9765 90.5022 32.9978 91.3138 31.8389ZM68.3236 49.5913L66.401 47.3576L64.4519 45.0938L54.4903 44.4959L44Line truncated
</svg>

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 MiB

@@ -1 +1,2 @@
export { default as Illustration } from './Illustration.svg'; export { default as Illustration } from './Illustration.svg';
export { default as Illustration2 } from './Illustration2.gif';
+3 -16
View File
@@ -11,16 +11,6 @@ import {
} from "@/widgets/CardList/CardListFunctions"; } from "@/widgets/CardList/CardListFunctions";
import { usePostProjects } from "@/modules/posts/hooks/usePostProjects"; import { usePostProjects } from "@/modules/posts/hooks/usePostProjects";
import { Link } from "react-router-dom"; import { Link } from "react-router-dom";
import { useEffect } from "react";
// Компонент для прокрутки вверх при переходе
const ScrollToTopOnMount = () => {
useEffect(() => {
window.scrollTo(0, 0);
}, []);
return null;
};
interface ListProps { interface ListProps {
gridConfig?: GridConfig; gridConfig?: GridConfig;
@@ -34,7 +24,6 @@ const NewsList = ({
return ( return (
<> <>
<ScrollToTopOnMount />
<WithLoading <WithLoading
isLoading={isLoading} isLoading={isLoading}
isError={isError} isError={isError}
@@ -48,7 +37,7 @@ const NewsList = ({
variant="news" variant="news"
gridConfig={gridConfig} gridConfig={gridConfig}
title={ title={
<Link to="/news" className={styles.title} onClick={() => window.scrollTo(0, 0)}> <Link to="/news" className={styles.title}>
Новости Новости
</Link> </Link>
} }
@@ -68,7 +57,6 @@ const LabsList = ({
return ( return (
<> <>
<ScrollToTopOnMount />
<WithLoading <WithLoading
isLoading={isLoading} isLoading={isLoading}
isError={isError} isError={isError}
@@ -80,7 +68,7 @@ const LabsList = ({
variant="lab" variant="lab"
gridConfig={gridConfig} gridConfig={gridConfig}
title={ title={
<Link to="/labs" className={styles.title} onClick={() => window.scrollTo(0, 0)}> <Link to="/labs" className={styles.title}>
Наши лаборатории Наши лаборатории
</Link> </Link>
} }
@@ -100,7 +88,6 @@ const ProjectsList = ({
return ( return (
<> <>
<ScrollToTopOnMount />
<WithLoading <WithLoading
isLoading={isLoading} isLoading={isLoading}
isError={isError} isError={isError}
@@ -112,7 +99,7 @@ const ProjectsList = ({
variant="project" variant="project"
gridConfig={gridConfig} gridConfig={gridConfig}
title={ title={
<Link to="/projects" className={styles.title} onClick={() => window.scrollTo(0, 0)}> <Link to="/projects" className={styles.title} >
Наши проекты Наши проекты
</Link> </Link>
} }
+14 -1
View File
@@ -25,6 +25,10 @@
align-items: flex-start; align-items: flex-start;
height: 100%; height: 100%;
@media (max-width: 768px) {
padding-bottom: 20px;
}
.logo { .logo {
height: auto; height: auto;
width: 256px; width: 256px;
@@ -53,6 +57,11 @@
display: flex; display: flex;
gap: 17px; gap: 17px;
@media (max-width: 768px) {
padding-top: 20px;
padding-bottom: 20px;
}
.link { .link {
display: flex; display: flex;
justify-content: center; justify-content: center;
@@ -137,13 +146,14 @@
.contacts { .contacts {
text-align: center; text-align: center;
gap: 0.5em; gap: 0.8em;
width: 100%; width: 100%;
padding: 10px 0; padding: 10px 0;
p { p {
font-size: 16px; font-size: 16px;
} }
} }
.links { .links {
@@ -175,6 +185,9 @@
/* Spread out the items */ /* Spread out the items */
height: 100%; height: 100%;
/* Make sure the container takes up full height */ /* Make sure the container takes up full height */
@media (max-width: 768px) {
padding-bottom: 20px;
}
} }
.footer-links { .footer-links {
+3 -3
View File
@@ -6,7 +6,7 @@ import FooterContacts from "./FooterContacts";
import logo from "@/shared/assets/images/scb.svg"; import logo from "@/shared/assets/images/scb.svg";
import iconIctis from "@/shared/assets/images/footer/iconIctis.png"; import iconIctis from "@/shared/assets/images/footer/iconIctis.png";
import iconSfedu from "@/shared/assets/images/footer/iconSfedu.png"; import iconSfedu from "@/shared/assets/images/footer/iconSfedu.png";
import iconVK from "@/shared/assets/images/footer/iconVK.svg"; import iconVK from "@/shared/assets/images/footer/iconVK.png";
import "./Footer.styles.scss"; import "./Footer.styles.scss";
interface LinkType { interface LinkType {
@@ -82,7 +82,7 @@ function Footer({ links = mockLinks, contacts = mockContacts }: FooterProps) {
<div className="logo-container" style={{ alignItems: 'flex-start' }}> <div className="logo-container" style={{ alignItems: 'flex-start' }}>
<img className="logo" alt="logo" src={logo} /> <img className="logo" alt="logo" src={logo} />
</div> </div>
<label style={{ color: 'white', fontSize: '14px', alignItems: 'flex-end', lineHeight: 'none' }}>©СКБ «КИТ» 2015–2025</label> <label style={{ color: 'white', fontSize: '14px', alignItems: 'flex-end', lineHeight: 'none' }}>©СКБ «КИТ» 2015 – 2025</label>
</div> </div>
<div className="footer-links-container"> <div className="footer-links-container">
<div className="footer-links"> <div className="footer-links">
@@ -109,7 +109,7 @@ function Footer({ links = mockLinks, contacts = mockContacts }: FooterProps) {
<Link className="copyright" style={{ color: 'white', fontSize: '14px', lineHeight: 'none' }} to="https://www.study.sfedu.ru/privacypolicy?ysclid=m8anp507sz44008873">Политика конфиденциальности</Link> <Link className="copyright" style={{ color: 'white', fontSize: '14px', lineHeight: 'none' }} to="https://www.study.sfedu.ru/privacypolicy?ysclid=m8anp507sz44008873">Политика конфиденциальности</Link>
<div className="copyright"> <div className="copyright">
©СКБ «КИТ» 2015–2025 ©СКБ «КИТ» 2015 – 2025
</div> </div>
</footer > </footer >
); );
+99 -11
View File
@@ -90,29 +90,41 @@
} }
.bar { .bar {
display: none; display: flex;
flex-direction: column; flex-direction: column;
position: fixed; position: fixed;
top: 0; top: 0;
right: 0; right: -100%;
background-color: white; background-color: white;
width: 50%; width: 100%;
height: 200vh; height: 100vh;
z-index: 9; z-index: 9;
padding: 60px 0px; padding: 100px 30px 30px;
transition: transform 0.3s ease-in-out;
overflow-y: auto;
&.open { &.open {
display: flex; transform: translateX(-100%);
} }
.nav-link { .nav-link {
padding: 10px 5px; margin-left: 0;
padding: 15px 0;
width: 100%; width: 100%;
text-align: left; text-align: left;
font-size: 16px*1.2;
font-weight: 600;
color: black;
transition: color 0.3s ease;
&::after {
display: none;
} }
.nav-link::after { &:hover,
background: none; &:focus {
color: #072ac8;
}
} }
} }
@@ -121,20 +133,96 @@
display: flex; display: flex;
flex-direction: column; flex-direction: column;
z-index: 10; z-index: 10;
cursor: pointer;
.line { .line {
width: 25px; width: 30px;
height: 3px; height: 3px;
background-color: #072ac8; background-color: #072ac8;
margin: 4px 0; margin: 4px 0;
transition: all 0.3s ease; transition: all 0.3s ease;
}
&:nth-child(1).open {
transform: rotate(45deg) translate(5px, 5px);
} }
&:nth-child(2).open {
opacity: 0;
}
&:nth-child(3).open {
transform: rotate(-45deg) translate(10px, -10px);
}
}
}
}
}
.overlay {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.5);
z-index: 8;
opacity: 0;
visibility: hidden;
transition: opacity 0.3s ease, visibility 0.3s ease;
&.open {
opacity: 1;
visibility: visible;
} }
} }
#navbar.transparent .bar .nav-link::after { #navbar.transparent .bar .nav-link::after {
background-color: $text-secondary; background-color: $text-secondary;
}
.mobile-contacts {
display: none;
@media (max-width: 1200px) {
display: flex;
flex-direction: column;
margin-top: auto;
text-align: left;
font-weight: 600;
color: black;
align-self: flex-start;
width: 100%;
a {
display: block;
margin: 4px 0;
}
.btn {
display: block;
width: 100%;
padding: 16px 24px;
margin: 20px auto 0;
border-radius: 8px;
border: none;
font-size: 20px;
font-weight: 600;
line-height: 24px;
color: white;
background: linear-gradient(93.25deg, #4942e4 0%, #11009e 50%, #4942e4 100%);
background-size: 200%;
background-position: 0%;
transition: background-position 0.5s ease, transform 0.3s ease, box-shadow 0.3s ease;
cursor: pointer;
text-align: center;
text-decoration: none;
&:hover {
background-position: 100%;
box-shadow: 0 8px 20px rgba(17, 0, 158, 0.25);
color: #ffffff;
}
}
}
} }
+33 -1
View File
@@ -1,7 +1,7 @@
import { useState, useEffect } from "react"; import { useState, useEffect } from "react";
import NavbarLink from "./NavbarLink"; import NavbarLink from "./NavbarLink";
import { useLocation } from "react-router-dom"; import { useLocation } from "react-router-dom";
import { HashLink } from "react-router-hash-link";
import logo from "@/shared/assets/images/sсb_blue.svg"; import logo from "@/shared/assets/images/sсb_blue.svg";
import "./Navbar.styles.scss"; import "./Navbar.styles.scss";
@@ -46,6 +46,28 @@ const mock: LinkType[] = [
}, },
]; ];
interface ContactsType {
email: JSX.Element;
phone: JSX.Element;
}
const mockContacts: ContactsType = {
email: (
<a style={{
fontSize: "19.2px",
color: "inherit",
fontWeight: "600",
}} href="mailto:skb@sfedu.ru">
skb@sfedu.ru
</a>
),
phone: (
<a style={{ color: "inherit", fontSize: "19.2px", }} href="tel:+79780095480">
+7 (978) 009-54-80
</a>
),
};
function Navbar({ links = mock }: NavbarProps) { function Navbar({ links = mock }: NavbarProps) {
const [isOpen, setIsOpen] = useState(false); const [isOpen, setIsOpen] = useState(false);
const [navbarHidden, setNavbarHidden] = useState(false); const [navbarHidden, setNavbarHidden] = useState(false);
@@ -107,6 +129,7 @@ function Navbar({ links = mock }: NavbarProps) {
return ( return (
<>
<div <div
id="navbar" id="navbar"
className={`${isTransparent ? "transparent" : ""} ${navbarHidden ? "hidden" : "" className={`${isTransparent ? "transparent" : ""} ${navbarHidden ? "hidden" : ""
@@ -128,8 +151,17 @@ function Navbar({ links = mock }: NavbarProps) {
key={index} key={index}
/> />
))} ))}
<div className="mobile-contacts">
{mockContacts.phone}
{mockContacts.email}
<HashLink smooth to="/contact#contact-form-anchor" className={"btn"}>
Связаться с нами
</HashLink>
</div> </div>
</div> </div>
</div>
<div className={`overlay ${isOpen ? "open" : ""}`} onClick={toggleMenu}></div>
</>
); );
} }
+25 -1
View File
@@ -2,7 +2,27 @@
margin-bottom: 60px; margin-bottom: 60px;
img { img {
pointer-events: none; //pointer-events: none;
}
.image-wrapper {
display: inline-block;
position: relative;
img {
display: block;
// Все остальные стили из предыдущего примера
}
// Дополнительная защита для Firefox
&::after {
content: "";
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
}
} }
label { label {
@@ -50,9 +70,11 @@
@media (max-width: 768px) { @media (max-width: 768px) {
margin-bottom: 24px; margin-bottom: 24px;
.block-content { .block-content {
margin-top: 24px; margin-top: 24px;
} }
.numbers-grid { .numbers-grid {
grid-template-columns: repeat(2, 1fr); // 2 колонки на мобильных (2x3) grid-template-columns: repeat(2, 1fr); // 2 колонки на мобильных (2x3)
} }
@@ -60,9 +82,11 @@
@media (max-width: 500px) { @media (max-width: 500px) {
margin-bottom: 24px; margin-bottom: 24px;
.block-content { .block-content {
margin-top: 24px; margin-top: 24px;
} }
label { label {
font-size: 14px; font-size: 14px;
margin-top: 5px; margin-top: 5px;
+15 -2
View File
@@ -1,9 +1,11 @@
import "./Numbers.styles.scss"; import "./Numbers.styles.scss";
import { Illustration } from '@/shared/assets/images/numbers'; import { Illustration, Illustration2 } from '@/shared/assets/images/numbers';
import { useState } from 'react';
const Numbers = () => { const Numbers = () => {
const currentYear = new Date().getFullYear(); const currentYear = new Date().getFullYear();
const yearsSince2015 = currentYear - 2015; const yearsSince2015 = currentYear - 2015;
const [isHovered, setIsHovered] = useState(false);
return ( return (
<div className="block" id="numbers"> <div className="block" id="numbers">
@@ -35,7 +37,18 @@ const Numbers = () => {
<label>обученных студентов</label> <label>обученных студентов</label>
</div> </div>
</div> </div>
<img className="visible" src={Illustration} alt="Illustration" /> <div
className="image-wrapper"
onMouseEnter={() => setIsHovered(true)}
onMouseLeave={() => setIsHovered(false)}
>
<img
className="visible"
src={isHovered ? Illustration : Illustration}
alt="СКБ КИТ"
draggable="false"
/>
</div>
</div> </div>
</div> </div>
); );
+18 -11
View File
@@ -1,8 +1,8 @@
import Marquee from "react-fast-marquee"; import Marquee from "react-fast-marquee";
import { useMedia } from "@/modules/media/hooks/useMedia"; import { useMedia } from "@/modules/media/hooks/useMedia";
import PartnersLogo from "./PartnersLogo"; import PartnersLogo from "./PartnersLogo";
import styles from "./Partners.module.scss"; import styles from "./Partners.module.scss";
import { useEffect, useState } from "react";
interface Partner { interface Partner {
src: string; src: string;
@@ -13,21 +13,28 @@ interface Partner {
function Partners() { function Partners() {
const { data: mediaData, isLoading, isError } = useMedia(); const { data: mediaData, isLoading, isError } = useMedia();
const [isMobile, setIsMobile] = useState(false);
useEffect(() => {
const handleResize = () => {
setIsMobile(window.innerWidth <= 768);
};
// Проверяем сразу при загрузке
handleResize();
// Добавляем слушатель изменения размера окна
window.addEventListener('resize', handleResize);
// Убираем слушатель при размонтировании компонента
return () => window.removeEventListener('resize', handleResize);
}, []);
// Отфильтрованные партнёрские медиа
const mediaList: Partner[] = const mediaList: Partner[] =
mediaData?.filter((item: Partner) => item.category === "partners") || []; mediaData?.filter((item: Partner) => item.category === "partners") || [];
if (isLoading) {
return <div className={styles.loading}>Загрузка партнеров...</div>;
}
if (isError || mediaList.length === 0) {
return <div className={styles.error}>Не удалось загрузить партнеров</div>;
}
// Определяем, нужно ли включать автопрокрутку // Определяем, нужно ли включать автопрокрутку
const shouldAutoScroll = mediaList.length > 5; const shouldAutoScroll = isMobile ? mediaList.length > 1 : mediaList.length > 5;
if (isLoading) { if (isLoading) {
return <div className={styles.loading}>Загрузка партнеров...</div>; return <div className={styles.loading}>Загрузка партнеров...</div>;
@@ -16,6 +16,7 @@
margin-bottom: 16px; margin-bottom: 16px;
@include mediaMax($tablet-max-width) { @include mediaMax($tablet-max-width) {
margin-top: 20px;
font-size: 24px; font-size: 24px;
} }
} }
@@ -95,7 +96,6 @@ $tablet-min-width: 768px;
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
gap: 32px; gap: 32px;
margin-bottom: 64px;
.creativity-text-top { .creativity-text-top {
width: calc(50% - 16px); width: calc(50% - 16px);
+36 -4
View File
@@ -1,4 +1,4 @@
import { useState } from "react"; import { useState, useEffect, useRef, useCallback } from "react";
import { useMedia } from "@/modules/media/hooks/useMedia"; import { useMedia } from "@/modules/media/hooks/useMedia";
import { SkeletonGallery } from "@/shared/Components/SkeletonGallery/SkeletonGallery"; import { SkeletonGallery } from "@/shared/Components/SkeletonGallery/SkeletonGallery";
import "./PhotoGallery.style.scss"; import "./PhotoGallery.style.scss";
@@ -8,9 +8,38 @@ import HWaC2 from "@/shared/assets/images/hard_work_and_creativity/HWaC2.jpg";
const PhotoGallery = () => { const PhotoGallery = () => {
const { data: mediaData, isLoading, isError } = useMedia(); const { data: mediaData, isLoading, isError } = useMedia();
const [visibleCount, setVisibleCount] = useState(10); const [visibleCount, setVisibleCount] = useState(10);
const [isLoadingMore, setIsLoadingMore] = useState(false);
const containerRef = useRef<HTMLDivElement>(null);
const isMobile = window.innerWidth <= 768;
const galleryImages = mediaData?.filter((el) => el.category === "photogallery"); const galleryImages = mediaData?.filter((el) => el.category === "photogallery");
const loadMore = useCallback(() => {
if (isLoadingMore || !galleryImages || visibleCount >= galleryImages.length) return;
setIsLoadingMore(true);
setTimeout(() => {
setVisibleCount(prev => prev + 10);
setIsLoadingMore(false);
}, 800);
}, [galleryImages, isLoadingMore, visibleCount]);
useEffect(() => {
const handleScroll = () => {
if (!containerRef.current) return;
const { scrollTop, scrollHeight, clientHeight } = document.documentElement;
const threshold = isMobile ? 0.98 : 1; // 50% на мобиле, 98% на десктопе
if (scrollTop + clientHeight >= scrollHeight * threshold) {
loadMore();
}
};
window.addEventListener('scroll', handleScroll);
return () => window.removeEventListener('scroll', handleScroll);
}, [loadMore, isMobile]);
if (isLoading) { if (isLoading) {
return <SkeletonGallery />; return <SkeletonGallery />;
} }
@@ -20,7 +49,7 @@ const PhotoGallery = () => {
} }
return ( return (
<div className="mainContainer"> <div className="mainContainer" ref={containerRef}>
<h1 className="title">Трудолюбие и креативность</h1> <h1 className="title">Трудолюбие и креативность</h1>
<div className="creativity-section"> <div className="creativity-section">
<div className="creativity-text-top"> <div className="creativity-text-top">
@@ -55,8 +84,11 @@ const PhotoGallery = () => {
</div> </div>
{visibleCount < galleryImages.length && ( {visibleCount < galleryImages.length && (
<div className="btn" onClick={() => setVisibleCount(visibleCount + 10)}> <div
Загрузить ещё className={`btn ${isLoadingMore ? 'loading' : ''}`}
onClick={loadMore}
>
{isLoadingMore ? 'Загрузка...' : 'Загрузить ещё'}
</div> </div>
)} )}
</div> </div>
+33 -2
View File
@@ -24,12 +24,35 @@
backface-visibility: hidden; backface-visibility: hidden;
perspective: 1000px; perspective: 1000px;
.slide-container {
position: relative;
width: 100%;
height: 100%;
overflow: hidden;
border-radius: 8px;
pointer-events: none;
}
.slide-background {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-size: cover;
background-position: center;
filter: blur(10px);
transform: scale(1.05);
z-index: 1;
}
.slide-image { .slide-image {
position: relative;
width: 100%; width: 100%;
height: 350px; height: 350px;
object-fit: cover; object-fit: contain;
object-position: center; object-position: center;
border-radius: 8px; z-index: 2;
pointer-events: none; pointer-events: none;
transform: translateZ(0); transform: translateZ(0);
backface-visibility: hidden; backface-visibility: hidden;
@@ -124,6 +147,10 @@
min-height: 300px; min-height: 300px;
transform-origin: center center; transform-origin: center center;
.slide-container {
height: 500px;
}
.slide-image { .slide-image {
height: 500px; height: 500px;
transition: transform 0.6s cubic-bezier(0.22, 0.61, 0.36, 1); transition: transform 0.6s cubic-bezier(0.22, 0.61, 0.36, 1);
@@ -135,6 +162,10 @@
height: 48vh; height: 48vh;
min-height: 250px; min-height: 250px;
.slide-container {
height: 350px;
}
.slide-image { .slide-image {
height: 350px; height: 350px;
} }
+7 -1
View File
@@ -125,7 +125,7 @@ const Slider = ({
: false : false
} }
onSwiper={(swiper) => (swiperRef.current = swiper)} onSwiper={(swiper) => (swiperRef.current = swiper)}
onSlideChange={(swiper) => setSlideNumber(swiper.realIndex)} // Обновляем slideNumber при смене слайда onSlideChange={(swiper) => setSlideNumber(swiper.realIndex)}
> >
{mediaList.map((media, index) => ( {mediaList.map((media, index) => (
<SwiperSlide <SwiperSlide
@@ -134,12 +134,18 @@ const Slider = ({
mediaList.length === 1 ? "single" : "" mediaList.length === 1 ? "single" : ""
}`} }`}
> >
<div className="slide-container">
<div
className="slide-background"
style={{ backgroundImage: `url(${media.src})` }}
/>
<img <img
src={media.src} src={media.src}
alt={`slide-${index}`} alt={`slide-${index}`}
className="slide-image" className="slide-image"
loading="lazy" loading="lazy"
/> />
</div>
</SwiperSlide> </SwiperSlide>
))} ))}
</Swiper> </Swiper>
-4
View File
@@ -31,10 +31,6 @@ const Team = () => {
<div className="joinContent"> <div className="joinContent">
<span className="joinText">Хочу в команду</span> <span className="joinText">Хочу в команду</span>
</div> </div>
<p className="caption">
<span className="bold"></span>
<br /><br />
</p>
</HashLink> </HashLink>
</div> </div>
</div> </div>
+35 -1
View File
@@ -31,6 +31,39 @@ $swiper-button-arrow-size: 20px;
margin-bottom: 2em; margin-bottom: 2em;
} }
.wp-block-video,
.wp-block-embed {
width: 100%;
max-width: 100%;
margin: 1em 0;
video,
iframe {
width: 100%;
height: auto;
aspect-ratio: 16 / 9; // Стандартное соотношение сторон для видео
border-radius: $border-raduis;
background: $background-tape;
}
}
// Для случаев, когда нужно фиксированное соотношение сторон
.fixed-aspect-video {
position: relative;
padding-bottom: 56.25%; /* 16:9 соотношение */
height: 0;
overflow: hidden;
iframe,
video {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
}
.is-layout-flex { .is-layout-flex {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
@@ -41,6 +74,7 @@ $swiper-button-arrow-size: 20px;
max-width: 100%; max-width: 100%;
height: auto; height: auto;
object-fit: contain !important; // Wordpress накидывает styles к элементу, приходится перебивать object-fit: contain !important; // Wordpress накидывает styles к элементу, приходится перебивать
pointer-events: none;
} }
} }
@@ -207,7 +241,7 @@ $swiper-button-arrow-size: 20px;
} }
} }
@media (max-width: 768px) { @media (max-width: 1200px) {
.project .is-layout-flex { .project .is-layout-flex {
flex-direction: column !important; flex-direction: column !important;
align-items: stretch !important; align-items: stretch !important;