заглушка для карточки и убрала лишее

This commit is contained in:
xomimishka committed 2025-07-11 11:32:07 +03:00
1 parent e54e2f1ae9
commit f400c1a4dd
3 files changed
+26 -21

No files matched your search

+17 -3
View File
@@ -48,27 +48,29 @@
overflow: hidden;
transition: max-height 0.3s ease, opacity 0.3s ease;
}
.link {
opacity: 0;
transform: translateY(10px);
transition: opacity 0.3s ease, transform 0.3s ease;
}
&:hover {
.description {
max-height: 200px;
opacity: 1;
margin-top: 10px;
}
.link {
opacity: 1;
transform: translateY(0);
}
.image {
filter: brightness(0.7);
}
.content {
bottom: 20px;
}
@@ -218,3 +220,15 @@
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;
}
+6 -2
View File
@@ -16,7 +16,11 @@ export const Card = ({ data }: CardProps) => {
className={classNames(styles.card, {}, [styles[`card__${variant}`]])}
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}>
<h3 className={styles.title}>{name}</h3>
@@ -35,4 +39,4 @@ export const Card = ({ data }: CardProps) => {
</div>
</Link>
);
};
};