Skip to content

Commit

Permalink
fix: boosted border
Browse files Browse the repository at this point in the history
  • Loading branch information
FireSpirit171 committed Dec 19, 2024
1 parent f90e270 commit 5b6b86c
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 19 deletions.
6 changes: 3 additions & 3 deletions src/components/AdCard/AdCard.hbs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div class='housing-card' id='{{elementId}}'>
<div class='housing-card {{#if (gte priority 50)}}boosted{{/if}}' id='{{elementId}}'>
<!-- ID is used for js not styles -->
<div class='housing-card__main-img-container js-image-container'>
<img
Expand All @@ -16,7 +16,7 @@
{{#each images}}
<div class='housing-card__circle'></div>
{{/each}}
<!-- <div class="circle-empty"></div>-->
<!--<div class="circle-empty"></div>-->
</div>
</div>

Expand Down Expand Up @@ -94,7 +94,7 @@
</div>

<div class='housing-card__info'>
<p class='housing-card__apartment-info {{#if (gte priority 50)}}boosted{{/if}}'>
<p class='housing-card__apartment-info'>
{{roomsNumber}}-комн. кв. · {{squareMeters}}&nbsp;м² · {{floor}} этаж
</p>
<p class='housing-card__address'>{{address}}, {{cityName}}</p>
Expand Down
37 changes: 21 additions & 16 deletions src/components/AdCard/AdCard.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
overflow: hidden;
position: relative;
cursor: pointer;

transition: box-shadow 0.3s;

&:hover {
Expand Down Expand Up @@ -227,25 +226,31 @@
}

.boosted {
background-color: yellow;
position: relative;
border-radius: 12px;
padding: 5px;
background: linear-gradient(90deg, #ff9966, #f59218, #ff9966, #f59218);
background-size: 200% 200%;
animation: border-spin 3s linear infinite;
box-sizing: border-box;
}

.boosted > * {
background: white;
border-radius: 12px;
overflow: hidden;
}

// &:hover::after {
// content: 'Рекомендуем!';
// position: absolute;
// top: -30px;
// left: 50%;
// transform: translateX(-50%);
// background-color: green;
// color: white;
// padding: 5px 10px;
// border-radius: 4px;
// white-space: nowrap;
// font-size: 12px;
// z-index: 10;
// }
@keyframes border-spin {
0% {
background-position: 0% 50%;
}
100% {
background-position: 200% 50%;
}
}


@media screen and (max-width: 900px) {
.housing-card {
&__city {
Expand Down

0 comments on commit 5b6b86c

Please sign in to comment.