diff --git a/src/images/index.js b/src/images/index.js index d063ace..2a6fe29 100755 --- a/src/images/index.js +++ b/src/images/index.js @@ -2,4 +2,5 @@ export { default as car } from './car.jpeg'; export { default as newsMock } from './newsMock.png'; export { default as scb } from './scb.svg'; export { default as fileUpload } from './fileUpload.svg'; -export { default as arrow } from './arrow.svg'; \ No newline at end of file +export { default as arrow } from './arrow.svg'; +export { default as labMock } from './labMock.jpeg'; \ No newline at end of file diff --git a/src/images/labMock.jpeg b/src/images/labMock.jpeg new file mode 100644 index 0000000..e798169 Binary files /dev/null and b/src/images/labMock.jpeg differ diff --git a/src/pages/Main/components/Labs/LabCard.jsx b/src/pages/Main/components/Labs/LabCard.jsx index 210317b..f19f145 100755 --- a/src/pages/Main/components/Labs/LabCard.jsx +++ b/src/pages/Main/components/Labs/LabCard.jsx @@ -2,12 +2,15 @@ import { Link } from 'react-router-dom'; function LabCard({ lab }) { return ( - -
-

{ lab.name }

-

{ lab.desc }

+ + +
+

{lab.name}

+
+

{lab.desc}

+
Перейти →
+
-
Перейти →
); } diff --git a/src/pages/Main/components/Labs/Labs.jsx b/src/pages/Main/components/Labs/Labs.jsx index c40841e..8b689d6 100755 --- a/src/pages/Main/components/Labs/Labs.jsx +++ b/src/pages/Main/components/Labs/Labs.jsx @@ -1,5 +1,7 @@ import BlockHeading from '../BlockHeading'; import LabCard from './LabCard'; + +import { labMock } from '../../../../images'; import './Labs.styles.scss'; const mock = [ @@ -7,31 +9,37 @@ const mock = [ name: "Лаборатория кибернетики", desc: "Управление робототехническими системами, создание аппаратных и программных продуктов, а также проектирование программных систем.", link: "/labs", + img: labMock, }, { name: "Лаборатория компьютерного зрения", desc: "Работа с методами и технологиями сегментации изображений, ИИ и нейронными сетями.", link: "/labs", + img: labMock, }, { name: "Лаборатория SmartTech", desc: "Проектирование систем в концепции “Интернета вещей” и технологии “Умного дома”.", link: "/labs", + img: labMock, }, { name: "Лаборатория VR и AR", desc: "Разработка приложений для виртуальной и дополненной реальности, 3D-моделирование.", link: "/labs", + img: labMock, }, { name: "Лаборатория мобильной разработки", desc: "Разработка приложений для портативных устройств, создание дизайна и проектов мобильных приложений.", link: "/labs", + img: labMock, }, { name: "Лаборатория 3D-печати и прототипирования", desc: "Проектирование 3D-модели, работа с 3D-принтером и создание качественных трёхмерных макетов.", link: "/labs", + img: labMock, }, ]; diff --git a/src/pages/Main/components/Labs/Labs.styles.scss b/src/pages/Main/components/Labs/Labs.styles.scss index a2955f9..53a7a56 100755 --- a/src/pages/Main/components/Labs/Labs.styles.scss +++ b/src/pages/Main/components/Labs/Labs.styles.scss @@ -3,46 +3,80 @@ display: flex; flex-wrap: wrap; justify-content: space-between; - row-gap: 32px; + gap: 26px; .card { - display: flex; - flex-direction: column; - justify-content: space-between; + flex: 1 1 30%; + height: 300px; - max-width: calc(100%/3 - 64px); - min-height: max-content; - padding: 16px 24px; + overflow: hidden; + position: relative; border-radius: 8px; border-width: 1px; border-style: solid; border-color: #D9D9D9; - color: black; + color: white; + background: black; + + .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; - .text { h2 { - margin-top: 0; + margin: 0; + font-size: 24px; font-weight: 600; - line-height: 29px; + line-height: 28px; } - p { - font-size: 16px; - font-weight: 400; - line-height: 24px; + .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; + } } } - .link-label { - text-align: right; - font-size: 20px; - font-weight: 500; - line-height: 24px; - color: #767676; + &: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