From 4a9a3baf94ac7f9ad8c2057992f30ce701532e1f Mon Sep 17 00:00:00 2001 From: ifraimka Date: Fri, 8 Nov 2024 16:01:26 +0300 Subject: [PATCH] =?UTF-8?q?=D0=A4=D0=B8=D0=BA=D1=81=20=D1=81=D1=82=D0=B8?= =?UTF-8?q?=D0=BB=D0=B5=D0=B9=20=D1=81=D0=BF=D0=B8=D1=81=D0=BA=D0=B0=20?= =?UTF-8?q?=D0=BB=D0=B0=D0=B1=D0=BE=D1=80=D0=B0=D1=82=D0=BE=D1=80=D0=B8?= =?UTF-8?q?=D0=B9:=20=D1=83=D0=B1=D1=80=D0=B0=D0=BB=20=D0=BB=D0=B8=D1=88?= =?UTF-8?q?=D0=BD=D0=B8=D0=B9=20=D1=84=D0=B0=D0=B9=D0=BB=20=D1=81=D1=82?= =?UTF-8?q?=D0=B8=D0=BB=D0=B5=D0=B9,=20=D0=BF=D0=B5=D1=80=D0=B5=D0=B4?= =?UTF-8?q?=D0=B5=D0=BB=D0=B0=D0=BB=20=D0=BF=D0=BE=D0=B4=20grid,=20=D0=B2?= =?UTF-8?q?=D1=8B=D0=BD=D0=B5=D1=81=20gap=20=D0=B2=20=D0=B3=D0=BB=D0=BE?= =?UTF-8?q?=D0=B1=D0=B0=D0=BB=D1=8C=D0=BD=D1=83=D1=8E=20=D0=BF=D0=B5=D1=80?= =?UTF-8?q?=D0=B5=D0=BC=D0=B5=D0=BD=D0=BD=D1=83=D1=8E=20row-gap?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/assets/styles/theme.scss | 4 +- src/components/Labs/LabList.styles.scss | 7 +- src/pages/Main/components/Labs/Labs.jsx | 2 - .../Main/components/Labs/Labs.styles.scss | 81 ------------------- 4 files changed, 6 insertions(+), 88 deletions(-) delete mode 100755 src/pages/Main/components/Labs/Labs.styles.scss diff --git a/src/assets/styles/theme.scss b/src/assets/styles/theme.scss index 765088c..115ceab 100644 --- a/src/assets/styles/theme.scss +++ b/src/assets/styles/theme.scss @@ -19,4 +19,6 @@ $btn-primary-bg: linear-gradient(93.25deg, #4942E4 0%, #11009E 50%, #4942E4 100% // Размеры $navbar-height: 60px; $navbar-height-mini: 30px; -$navbar-padding-tb: 10px; \ No newline at end of file +$navbar-padding-tb: 10px; + +$row-gap: 26px; \ No newline at end of file diff --git a/src/components/Labs/LabList.styles.scss b/src/components/Labs/LabList.styles.scss index 09b2ac7..2c99d8b 100644 --- a/src/components/Labs/LabList.styles.scss +++ b/src/components/Labs/LabList.styles.scss @@ -1,13 +1,12 @@ @import "../../assets/styles/theme.scss"; .row.lab-list { - display: flex; - flex-wrap: wrap; + display: grid; + grid-template-columns: repeat(3, calc((100% - $row-gap * 2) / 3)); justify-content: space-between; - gap: 26px; + gap: $row-gap; .card { - flex: 1 1 30%; height: 300px; overflow: hidden; diff --git a/src/pages/Main/components/Labs/Labs.jsx b/src/pages/Main/components/Labs/Labs.jsx index ee9add0..6abaa44 100755 --- a/src/pages/Main/components/Labs/Labs.jsx +++ b/src/pages/Main/components/Labs/Labs.jsx @@ -1,8 +1,6 @@ import BlockHeading from '../BlockHeading'; import { LabList } from '../../../../components'; -import './Labs.styles.scss'; - function Labs() { return ( diff --git a/src/pages/Main/components/Labs/Labs.styles.scss b/src/pages/Main/components/Labs/Labs.styles.scss deleted file mode 100755 index 0bae36c..0000000 --- a/src/pages/Main/components/Labs/Labs.styles.scss +++ /dev/null @@ -1,81 +0,0 @@ -@import "../../../../assets/styles/theme.scss"; - -#labs { - .row { - display: flex; - flex-wrap: wrap; - justify-content: space-between; - gap: 26px; - - .card { - flex: 1 1 30%; - height: 300px; - - overflow: hidden; - position: relative; - - border-radius: 8px; - - color: $text-secondary; - background: $bg-card-lab; - - .image { - position: absolute; - object-fit: cover; - width: 100%; - height: 100%; - opacity: 0.9; - transition: opacity .2s ease-out; - } - - .content { - position: absolute; - inset: auto 20px 10px 20px; - transition: inset .3s; - background: none !important; - - h2 { - margin: 0; - - font-size: 24px; - font-weight: 600; - line-height: 28px; - } - - .hidden { - max-height: 0; - transition: max-height 0.3s ease-out, opacity 0.3s 0.3s ease-out; - opacity: 0; - max-width: 80%; - - p { - font-size: 16px; - font-weight: 400; - line-height: 20px; - } - - .link-label { - font-size: 20px; - font-weight: 500; - line-height: 24px; - } - } - } - - &:hover .content { - bottom: 20px; - } - - &:hover .content .hidden { - max-height: 200px; - opacity: 1; - transition: max-height 0.3s ease-out, opacity .1s ease-in; - } - - &:hover .image { - transition: opacity .3s ease-in; - opacity: 0.5; - } - } - } -} \ No newline at end of file