club home promo on cards

This commit is contained in:
Jérémy Munsch 2024-06-28 10:23:11 +02:00
parent 0f20b6e811
commit 2de95ca830
No known key found for this signature in database
GPG key ID: 18361AF3BFEC0FEC
5 changed files with 44 additions and 21 deletions

View file

@ -17,3 +17,4 @@
@import "./pages/home";
// * PARTIALS
@import "./partials/card-club-home";

View file

@ -1,24 +1,5 @@
.page.home {
.card-club-home {
position: relative;
width: 17.062rem;
height: 25.687rem;
color: inherit;
.card-img-top {
width: 100%;
height: 100%;
object-fit: cover;
}
.card-body {
position: absolute;
bottom: 0;
.lines {
position: relative;
bottom: -2rem;
left: -1rem;
}
}
}
}

View file

@ -0,0 +1,35 @@
.card-club-home {
position: relative;
width: 17.062rem;
height: 25.687rem;
.card-img-top {
width: 100%;
height: 100%;
object-fit: cover;
}
.card-body {
position: absolute;
bottom: 0;
.lines {
position: absolute;
top: -3rem;
left: -1rem;
}
.promo-badge {
position: absolute;
top: -1rem;
right: .5rem;
padding: .2rem .3rem;
background-color: $color-danger;
font-family: Catamaran, sans-serif;
font-weight: bold;
transform: rotateZ(2deg);
@include rfs(1.8rem, font-size);
}
}
}

View file

@ -21,6 +21,7 @@
'line2' => __('Dès aujourd’hui'),
'line2Class' => 'fs-4',
'content' => __('Spécial étudiant, Spécial famille, Spécial membre'),
'promoAmount' => 770,
])
@include('club.partials.card-club-home', [
'outterClass' => 'm-3',

View file

@ -11,9 +11,14 @@
$line2Class ?? '',
])>{{ $line2 }}</div>
</div>
@if (!empty($promoAmount))
<span class="promo-badge">{{ @money($promoAmount) }}</span>
@endif
<div @class([
'ck-content rounded-5 p-3 pb-4 pt-5',
$contentClass ?? 'text-bg-secondary',
])>{{ clean($content) }}</div>
])>{{ clean($content) }} asd asd sdfgv szdfg sdf sdg szdfg sdf sdg szdfg sdf sdg szdfg sdf sdg szdfg
sdf sdg szdfg sdf sdg szdfg sdf sdg sdfg sdg dsfhg sdefhg sdgfh df dsf d fffgdf g
</div>
</div>
</div>