From 75646a6784685b1f197d61d26241e5dcfd6e9a62 Mon Sep 17 00:00:00 2001 From: xomimishka Date: Tue, 8 Jul 2025 16:42:35 +0300 Subject: [PATCH 1/5] =?UTF-8?q?=D0=B8=D0=B7=D0=BC=D0=B5=D0=BD=D0=B8=D0=BB?= =?UTF-8?q?=D0=B0=20=D1=80=D0=B0=D0=B7=D0=BC=D0=B5=D1=80=20=D0=BA=D0=B0?= =?UTF-8?q?=D1=80=D1=82=D1=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/Contact/Contact.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/pages/Contact/Contact.tsx b/src/pages/Contact/Contact.tsx index e0cf22e..d2debde 100644 --- a/src/pages/Contact/Contact.tsx +++ b/src/pages/Contact/Contact.tsx @@ -40,17 +40,19 @@ function Contact() {
- + ); } From 7d69ef0693037f3e23f8a03d646de604bb361a46 Mon Sep 17 00:00:00 2001 From: xomimishka Date: Tue, 8 Jul 2025 16:43:26 +0300 Subject: [PATCH 2/5] =?UTF-8?q?=D0=BA=D0=BB=D0=B8=D0=BA=D0=B0=D0=B1=D0=B5?= =?UTF-8?q?=D0=BB=D1=8C=D0=BD=D1=8B=D0=B9=20=D0=B7=D0=B0=D0=B3=D0=BE=D0=BB?= =?UTF-8?q?=D0=BE=D0=B2=D0=BE=D0=BA=20->=20=D0=BF=D0=B5=D1=80=D0=B5=D1=85?= =?UTF-8?q?=D0=BE=D0=B4=20=D0=BD=D0=B0=20=D1=81=D1=82=D1=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/widgets/CardList/CardList.module.scss | 8 ++ src/widgets/CardList/CardList.tsx | 125 ++++++++++++++-------- 2 files changed, 86 insertions(+), 47 deletions(-) diff --git a/src/widgets/CardList/CardList.module.scss b/src/widgets/CardList/CardList.module.scss index 01b9602..8498dc9 100644 --- a/src/widgets/CardList/CardList.module.scss +++ b/src/widgets/CardList/CardList.module.scss @@ -6,6 +6,14 @@ line-height: 44px; margin-top: 0; margin-bottom: 8px; + color: inherit; + text-decoration: none; + transition: color 0.2s ease; + cursor: pointer; + + &:hover { + color: #072AC8; + } @include mediaMax($tablet-max-width) { font-size: 24px; diff --git a/src/widgets/CardList/CardList.tsx b/src/widgets/CardList/CardList.tsx index 4a11929..20e0726 100644 --- a/src/widgets/CardList/CardList.tsx +++ b/src/widgets/CardList/CardList.tsx @@ -10,6 +10,17 @@ import { transformPostsToCardData, } from "@/widgets/CardList/CardListFunctions"; import { usePostProjects } from "@/modules/posts/hooks/usePostProjects"; +import { Link } from "react-router-dom"; +import { useEffect } from "react"; + +// Компонент для прокрутки вверх при переходе +const ScrollToTopOnMount = () => { + useEffect(() => { + window.scrollTo(0, 0); + }, []); + + return null; +}; interface ListProps { gridConfig?: GridConfig; @@ -22,23 +33,30 @@ const NewsList = ({ const { data: newsData, isLoading, isError } = useNews(); return ( - -
- {newsData && ( - - )} -
-
+ <> + + +
+ {newsData && ( + window.scrollTo(0, 0)}> + Новости + + } + /> + )} +
+
+ ); }; @@ -49,20 +67,27 @@ const LabsList = ({ const labs = postsData?.labs ? Object.values(postsData.labs) : []; return ( - -
- -
-
+ <> + + +
+ window.scrollTo(0, 0)}> + Наши лаборатории + + } + /> +
+
+ ); }; @@ -74,22 +99,28 @@ const ProjectsList = ({ const projects = data ?? []; return ( - -
- -
-
+ <> + + +
+ window.scrollTo(0, 0)}> + Наши проекты + + } + /> +
+
+ ); }; -export { NewsList, LabsList, ProjectsList }; +export { NewsList, LabsList, ProjectsList }; \ No newline at end of file From a03806c901bb435bdd9305bea499e83d976dbc1c Mon Sep 17 00:00:00 2001 From: xomimishka Date: Tue, 8 Jul 2025 17:10:51 +0300 Subject: [PATCH 3/5] =?UTF-8?q?=D1=83=D0=B1=D1=80=D0=B0=D0=BB=D0=B0=20?= =?UTF-8?q?=D0=B7=D0=B0=D0=BA=D1=80=D1=83=D0=B3=D0=BB=D0=B5=D0=BD=D0=B8?= =?UTF-8?q?=D0=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/widgets/Partners/Partners.module.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/widgets/Partners/Partners.module.scss b/src/widgets/Partners/Partners.module.scss index 595a361..769e606 100644 --- a/src/widgets/Partners/Partners.module.scss +++ b/src/widgets/Partners/Partners.module.scss @@ -48,7 +48,7 @@ $logo-size: 200px; .logo { width: $logo-size; height: $logo-size; - border-radius: 50%; + //border-radius: 50%; object-fit: cover; pointer-events: none; } From 5edfb7178b06f0a862fed24e1a24517cf5b8f4e1 Mon Sep 17 00:00:00 2001 From: xomimishka Date: Tue, 8 Jul 2025 17:23:57 +0300 Subject: [PATCH 4/5] =?UTF-8?q?=D0=B8=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D0=B8=D0=B5=20=D0=BE=D1=88=D0=B8=D0=B1=D0=BA=D0=B8?= =?UTF-8?q?=20title?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/widgets/CardList/types.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/widgets/CardList/types.ts b/src/widgets/CardList/types.ts index 49d8837..eb9a095 100644 --- a/src/widgets/CardList/types.ts +++ b/src/widgets/CardList/types.ts @@ -18,5 +18,5 @@ export interface CardListProps { items: Record; // Объект объектов variant?: "lab" | "news" | "project"; gridConfig?: GridConfig; - title: string; + title: string | React.ReactNode; } From 7a3f176e7911ecfa43285a553405c477e43228c3 Mon Sep 17 00:00:00 2001 From: xomimishka Date: Tue, 8 Jul 2025 17:38:50 +0300 Subject: [PATCH 5/5] =?UTF-8?q?=D0=B8=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D0=B8=D0=B5=20=D0=BE=D1=88=D0=B8=D0=B1=D0=BA=D0=B8?= =?UTF-8?q?=20=D0=B1=D0=B8=D0=BB=D0=B4=D0=B8=D0=BD=D0=B3=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/Contact/Contact.tsx | 2 +- src/widgets/NewSlider/NewSlider.tsx | 14 +++++++++++--- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/src/pages/Contact/Contact.tsx b/src/pages/Contact/Contact.tsx index d2debde..ccba046 100644 --- a/src/pages/Contact/Contact.tsx +++ b/src/pages/Contact/Contact.tsx @@ -45,7 +45,7 @@ function Contact() { }} modules={["control.ZoomControl", "control.FullscreenControl"]} width="500px" - height="400px" + height="200px" > diff --git a/src/widgets/NewSlider/NewSlider.tsx b/src/widgets/NewSlider/NewSlider.tsx index b8b2bed..c9e54d6 100644 --- a/src/widgets/NewSlider/NewSlider.tsx +++ b/src/widgets/NewSlider/NewSlider.tsx @@ -10,8 +10,6 @@ import "./NewSlider.scss"; import { SliderContext, SliderProps } from "@/widgets/NewSlider/context"; function NewSlider({ - autoPlay = false, - autoPlayTime = 3000, images, category = "gallery", }: SliderProps) { @@ -78,7 +76,17 @@ function NewSlider({ if (filteredMedia.length === 0) return
Нет изображений
; return ( - + { + carouselRef.current?.slideTo(index); + setSlideNumber(index); + }, + slidesCount: filteredMedia.length, + }} + >
{shouldShowControls && (