From 1622a1bc509341da11e06e389e13d629e4fc0ffb Mon Sep 17 00:00:00 2001 From: xomimishka Date: Fri, 11 Jul 2025 11:35:04 +0300 Subject: [PATCH] =?UTF-8?q?=D0=BB=D0=BE=D0=B3=D0=B8=D0=BA=D0=B0=20=D0=B4?= =?UTF-8?q?=D0=BB=D1=8F=20=D0=B7=D0=B0=D0=BC=D0=B5=D0=BD=D1=8B=20=D0=BA?= =?UTF-8?q?=D0=B0=D1=80=D1=82=D0=B8=D0=BD=D0=BA=D0=B8=20=D0=BD=D0=B0=20?= =?UTF-8?q?=D0=B3=D0=B8=D1=84=20=D0=BF=D1=80=D0=B8=20=D0=BD=D0=B0=D0=B2?= =?UTF-8?q?=D0=B5=D0=B4=D0=B5=D0=BD=D0=B8=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/shared/assets/images/numbers/index.ts | 3 ++- src/widgets/Numbers/Numbers.styles.scss | 26 ++++++++++++++++++++++- src/widgets/Numbers/Numbers.tsx | 17 +++++++++++++-- 3 files changed, 42 insertions(+), 4 deletions(-) diff --git a/src/shared/assets/images/numbers/index.ts b/src/shared/assets/images/numbers/index.ts index 87d9df3..51db61a 100644 --- a/src/shared/assets/images/numbers/index.ts +++ b/src/shared/assets/images/numbers/index.ts @@ -1 +1,2 @@ -export { default as Illustration } from './Illustration.svg'; \ No newline at end of file +export { default as Illustration } from './Illustration.svg'; +export { default as Illustration2 } from './Illustration2.gif'; \ No newline at end of file diff --git a/src/widgets/Numbers/Numbers.styles.scss b/src/widgets/Numbers/Numbers.styles.scss index f374fc3..354e70a 100644 --- a/src/widgets/Numbers/Numbers.styles.scss +++ b/src/widgets/Numbers/Numbers.styles.scss @@ -2,7 +2,27 @@ margin-bottom: 60px; 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 { @@ -50,9 +70,11 @@ @media (max-width: 768px) { margin-bottom: 24px; + .block-content { margin-top: 24px; } + .numbers-grid { grid-template-columns: repeat(2, 1fr); // 2 колонки на мобильных (2x3) } @@ -60,9 +82,11 @@ @media (max-width: 500px) { margin-bottom: 24px; + .block-content { margin-top: 24px; } + label { font-size: 14px; margin-top: 5px; diff --git a/src/widgets/Numbers/Numbers.tsx b/src/widgets/Numbers/Numbers.tsx index 03da71d..238ac7a 100644 --- a/src/widgets/Numbers/Numbers.tsx +++ b/src/widgets/Numbers/Numbers.tsx @@ -1,9 +1,11 @@ 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 currentYear = new Date().getFullYear(); const yearsSince2015 = currentYear - 2015; + const [isHovered, setIsHovered] = useState(false); return (
@@ -35,7 +37,18 @@ const Numbers = () => {
- Illustration +
setIsHovered(true)} + onMouseLeave={() => setIsHovered(false)} + > + СКБ КИТ +
);