mirror of
https://git.rdcenter.ru/RDCenter/skb-kit.git
synced 2026-12-05 01:49:45 +00:00
Merge remote-tracking branch 'origin/fixes'
This commit is contained in:
commit
a124ec84dc
6 files changed
+103
-54
No files matched your search
@@ -40,17 +40,19 @@ function Contact() {
|
||||
<Map
|
||||
defaultState={{
|
||||
center: [47.20669, 38.929113],
|
||||
zoom: 13,
|
||||
zoom: 17,
|
||||
controls: ["zoomControl", "fullscreenControl"],
|
||||
}}
|
||||
modules={["control.ZoomControl", "control.FullscreenControl"]}
|
||||
width="500px"
|
||||
height="200px"
|
||||
>
|
||||
<Placemark defaultGeometry={[47.20669, 38.929113]} />
|
||||
</Map>
|
||||
</YMaps>
|
||||
</div >
|
||||
<div id="contact-form-anchor"></div>
|
||||
<ContactForm />
|
||||
<ContactForm />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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 (
|
||||
<WithLoading
|
||||
isLoading={isLoading}
|
||||
isError={isError}
|
||||
count={4}
|
||||
gridConfig={gridConfig}
|
||||
>
|
||||
<div className={styles.mainContainer}>
|
||||
{newsData && (
|
||||
<CardListTemplate
|
||||
items={transformNewsToCardData(newsData)}
|
||||
variant="news"
|
||||
gridConfig={gridConfig}
|
||||
title="Новости"
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
</WithLoading>
|
||||
<>
|
||||
<ScrollToTopOnMount />
|
||||
<WithLoading
|
||||
isLoading={isLoading}
|
||||
isError={isError}
|
||||
count={4}
|
||||
gridConfig={gridConfig}
|
||||
>
|
||||
<div className={styles.mainContainer}>
|
||||
{newsData && (
|
||||
<CardListTemplate
|
||||
items={transformNewsToCardData(newsData)}
|
||||
variant="news"
|
||||
gridConfig={gridConfig}
|
||||
title={
|
||||
<Link to="/news" className={styles.title} onClick={() => window.scrollTo(0, 0)}>
|
||||
Новости
|
||||
</Link>
|
||||
}
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
</WithLoading>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
@@ -49,20 +67,27 @@ const LabsList = ({
|
||||
const labs = postsData?.labs ? Object.values(postsData.labs) : [];
|
||||
|
||||
return (
|
||||
<WithLoading
|
||||
isLoading={isLoading}
|
||||
isError={isError}
|
||||
gridConfig={gridConfig}
|
||||
>
|
||||
<div className={styles.mainContainer}>
|
||||
<CardListTemplate
|
||||
items={transformPostsToCardData(labs)}
|
||||
variant="lab"
|
||||
gridConfig={gridConfig}
|
||||
title="Наши лаборатории"
|
||||
/>
|
||||
</div>
|
||||
</WithLoading>
|
||||
<>
|
||||
<ScrollToTopOnMount />
|
||||
<WithLoading
|
||||
isLoading={isLoading}
|
||||
isError={isError}
|
||||
gridConfig={gridConfig}
|
||||
>
|
||||
<div className={styles.mainContainer}>
|
||||
<CardListTemplate
|
||||
items={transformPostsToCardData(labs)}
|
||||
variant="lab"
|
||||
gridConfig={gridConfig}
|
||||
title={
|
||||
<Link to="/labs" className={styles.title} onClick={() => window.scrollTo(0, 0)}>
|
||||
Наши лаборатории
|
||||
</Link>
|
||||
}
|
||||
/>
|
||||
</div>
|
||||
</WithLoading>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
@@ -74,22 +99,28 @@ const ProjectsList = ({
|
||||
const projects = data ?? [];
|
||||
|
||||
return (
|
||||
<WithLoading
|
||||
isLoading={isLoading}
|
||||
isError={isError}
|
||||
gridConfig={gridConfig}
|
||||
>
|
||||
<div className={styles.mainContainer}>
|
||||
<CardListTemplate
|
||||
//@ts-ignore
|
||||
items={transformPostsToCardData(projects)}
|
||||
variant="project"
|
||||
gridConfig={gridConfig}
|
||||
title="Наши проекты"
|
||||
/>
|
||||
</div>
|
||||
</WithLoading>
|
||||
<>
|
||||
<ScrollToTopOnMount />
|
||||
<WithLoading
|
||||
isLoading={isLoading}
|
||||
isError={isError}
|
||||
gridConfig={gridConfig}
|
||||
>
|
||||
<div className={styles.mainContainer}>
|
||||
<CardListTemplate
|
||||
items={transformPostsToCardData(projects)}
|
||||
variant="project"
|
||||
gridConfig={gridConfig}
|
||||
title={
|
||||
<Link to="/projects" className={styles.title} onClick={() => window.scrollTo(0, 0)}>
|
||||
Наши проекты
|
||||
</Link>
|
||||
}
|
||||
/>
|
||||
</div>
|
||||
</WithLoading>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
export { NewsList, LabsList, ProjectsList };
|
||||
export { NewsList, LabsList, ProjectsList };
|
||||
@@ -18,5 +18,5 @@ export interface CardListProps {
|
||||
items: Record<string, CardData>; // Объект объектов
|
||||
variant?: "lab" | "news" | "project";
|
||||
gridConfig?: GridConfig;
|
||||
title: string;
|
||||
title: string | React.ReactNode;
|
||||
}
|
||||
@@ -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 <div>Нет изображений</div>;
|
||||
|
||||
return (
|
||||
<SliderContext.Provider value={{ slideNumber, mediaList: filteredMedia }}>
|
||||
<SliderContext.Provider
|
||||
value={{
|
||||
slideNumber,
|
||||
mediaList: filteredMedia,
|
||||
goToSlide: (index: number) => {
|
||||
carouselRef.current?.slideTo(index);
|
||||
setSlideNumber(index);
|
||||
},
|
||||
slidesCount: filteredMedia.length,
|
||||
}}
|
||||
>
|
||||
<div className="slider-container">
|
||||
{shouldShowControls && (
|
||||
<div className="sliderNav">
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user