mirror of
https://git.rdcenter.ru/RDCenter/skb-kit.git
synced 2026-12-05 05:09:46 +00:00
заглушка для карточки и убрала лишее
This commit is contained in:
1 parent
e54e2f1ae9
commit
f400c1a4dd
3 files changed
+22
-17
No files matched your search
@@ -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;
|
||||||
|
}
|
||||||
@@ -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}`}
|
||||||
>
|
>
|
||||||
<img src={preview} alt={name} className={styles.image} />
|
{preview ? (
|
||||||
|
<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>
|
||||||
|
|||||||
@@ -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>
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user