diff --git a/src/shared/api/wp-client.ts b/src/shared/api/wp-client.ts index b0c2562..674c0a7 100644 --- a/src/shared/api/wp-client.ts +++ b/src/shared/api/wp-client.ts @@ -1,7 +1,7 @@ import WPAPI from "wpapi"; export const wp = new WPAPI({ - endpoint: "http://skb-site.local/wp-json/", + endpoint: "https://test.skbkit.ru/wp-json/", username: "admin", password: "admin", }); diff --git a/src/widgets/Card/Card.module.scss b/src/widgets/Card/Card.module.scss index 43402b3..cd3a516 100644 --- a/src/widgets/Card/Card.module.scss +++ b/src/widgets/Card/Card.module.scss @@ -10,84 +10,141 @@ border: 1px solid transparent; 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 { position: absolute; - bottom: 10px; - left: 20px; - right: 20px; + bottom: -10px; + left: 0; + padding: 0 30px; z-index: 2; 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 { max-height: 0; opacity: 0; - transition: max-height 0.3s ease, opacity 0.3s ease; + margin: 0; overflow: hidden; + transition: max-height 0.3s ease, opacity 0.3s ease; } - + .link { opacity: 0; - transition: opacity 0.3s ease; + transform: translateY(10px); + transition: opacity 0.3s ease, transform 0.3s ease; } - + &:hover { - .image { - filter: brightness(0.7); - } - - .content { - bottom: 20px; - } - .description { max-height: 200px; opacity: 1; + margin-top: 10px; } - + .link { opacity: 1; + transform: translateY(0); + } + .image { + filter: brightness(0.7); + } + .content { + bottom: 20px; } } } &__news { 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 { position: absolute; bottom: 0; left: 0; right: 0; - padding: 12px 16px; + padding: 20px 20px; color: white; + z-index: 2; + } - &::before { - content: ""; - position: absolute; - bottom: 0; - left: 0; - width: 100%; - height: 40%; - background: linear-gradient( - to top, - rgba(0, 0, 0, 0.6), - rgba(0, 0, 0, 0) - ); - z-index: -1; - } + &::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; } } &__project { 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 { position: absolute; left: 11px; bottom: 0; - padding: clamp(12px, 3vw, 22px) clamp(6px, 1.5vw, 16px); + padding: 20px 20px; 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; transition: filter 0.3s ease; pointer-events: none; + z-index: 0; } .title { - margin: 0 0 12px; + font-size: clamp(1.25rem, 1.0011rem + 0.5199vw, 1.625rem); font-weight: 600; } @@ -136,39 +194,27 @@ } } } + .card__lab { &:hover { .title { font-size: 20px; - @include mediaMax($mobile-max-widthGosBlock) { - font-size: 16px; - } } } } .title { font-size: 22px; - @include mediaMax($mobile-max-widthGosBlock) { - font-size: 20px; - } } .description { p { font-size: 16px; line-height: 26px; - @include mediaMax($mobile-max-widthGosBlock) { - font-size: 15px; - line-height: 22px; - } } } .link { font-size: 18px; - @include mediaMax($mobile-max-widthGosBlock) { - font-size: 16px; - } } }