Merge branch 'styles/card'

This commit is contained in:
ifraimka1 committed 2025-04-18 14:44:33 +03:00
commit 3c4a08d73c
1 file changed
+92 -46
+92 -46
View File
@@ -10,84 +10,141 @@
border: 1px solid transparent; border: 1px solid transparent;
color: $text-secondary; color: $text-secondary;
.image {
position: absolute;
width: 100%;
height: 100%;
object-fit: cover;
transition: filter 0.3s ease;
pointer-events: none;
z-index: 0;
}
.content { .content {
position: absolute; position: absolute;
bottom: 10px; bottom: -10px;
left: 20px; left: 0;
right: 20px; padding: 0 30px;
z-index: 2; z-index: 2;
transition: bottom 0.3s ease; transition: bottom 0.3s ease;
} }
&::before {
content: "";
position: absolute;
bottom: 0;
left: 0;
width: 100%;
height: 60%;
background: linear-gradient(to top, rgba(0, 0, 0, 0.6), transparent);
z-index: 1;
pointer-events: none;
}
.description { .description {
max-height: 0; max-height: 0;
opacity: 0; opacity: 0;
transition: max-height 0.3s ease, opacity 0.3s ease; margin: 0;
overflow: hidden; overflow: hidden;
transition: max-height 0.3s ease, opacity 0.3s ease;
} }
.link { .link {
opacity: 0; opacity: 0;
transition: opacity 0.3s ease; transform: translateY(10px);
transition: opacity 0.3s ease, transform 0.3s ease;
} }
&:hover { &:hover {
.image {
filter: brightness(0.7);
}
.content {
bottom: 20px;
}
.description { .description {
max-height: 200px; max-height: 200px;
opacity: 1; opacity: 1;
margin-top: 10px;
} }
.link { .link {
opacity: 1; opacity: 1;
transform: translateY(0);
}
.image {
filter: brightness(0.7);
}
.content {
bottom: 20px;
} }
} }
} }
&__news { &__news {
height: 250px; height: 250px;
position: relative;
.image {
position: absolute;
width: 100%;
height: 100%;
object-fit: cover;
transition: filter 0.3s ease;
pointer-events: none;
z-index: 0;
}
.content { .content {
position: absolute; position: absolute;
bottom: 0; bottom: 0;
left: 0; left: 0;
right: 0; right: 0;
padding: 12px 16px; padding: 20px 20px;
color: white; color: white;
z-index: 2;
}
&::before { &::before {
content: ""; content: "";
position: absolute; position: absolute;
bottom: 0; bottom: 0;
left: 0; left: 0;
width: 100%; width: 100%;
height: 40%; height: 60%;
background: linear-gradient( background: linear-gradient(to top, rgba(0, 0, 0, 0.6), transparent);
to top, z-index: 1;
rgba(0, 0, 0, 0.6), pointer-events: none;
rgba(0, 0, 0, 0)
);
z-index: -1;
}
} }
} }
&__project { &__project {
height: 250px; height: 250px;
position: relative;
.image {
position: absolute;
width: 100%;
height: 100%;
object-fit: cover;
transition: filter 0.3s ease;
pointer-events: none;
z-index: 0;
}
.content { .content {
position: absolute; position: absolute;
left: 11px; left: 11px;
bottom: 0; bottom: 0;
padding: clamp(12px, 3vw, 22px) clamp(6px, 1.5vw, 16px); padding: 20px 20px;
color: $text-card-project; color: $text-card-project;
z-index: 2;
}
&::before {
content: "";
position: absolute;
bottom: 0;
left: 0;
width: 100%;
height: 60%;
background: linear-gradient(to top, rgba(0, 0, 0, 0.6), transparent);
z-index: 1;
pointer-events: none;
} }
} }
} }
@@ -99,10 +156,11 @@
object-fit: cover; object-fit: cover;
transition: filter 0.3s ease; transition: filter 0.3s ease;
pointer-events: none; pointer-events: none;
z-index: 0;
} }
.title { .title {
margin: 0 0 12px;
font-size: clamp(1.25rem, 1.0011rem + 0.5199vw, 1.625rem); font-size: clamp(1.25rem, 1.0011rem + 0.5199vw, 1.625rem);
font-weight: 600; font-weight: 600;
} }
@@ -136,39 +194,27 @@
} }
} }
} }
.card__lab { .card__lab {
&:hover { &:hover {
.title { .title {
font-size: 20px; font-size: 20px;
@include mediaMax($mobile-max-widthGosBlock) {
font-size: 16px;
}
} }
} }
} }
.title { .title {
font-size: 22px; font-size: 22px;
@include mediaMax($mobile-max-widthGosBlock) {
font-size: 20px;
}
} }
.description { .description {
p { p {
font-size: 16px; font-size: 16px;
line-height: 26px; line-height: 26px;
@include mediaMax($mobile-max-widthGosBlock) {
font-size: 15px;
line-height: 22px;
}
} }
} }
.link { .link {
font-size: 18px; font-size: 18px;
@include mediaMax($mobile-max-widthGosBlock) {
font-size: 16px;
}
} }
} }