fix card image height

This commit is contained in:
isUnknown 2024-09-05 12:23:07 +02:00
parent 0aae5777fb
commit 06a2e81c66
3 changed files with 8 additions and 8 deletions

View file

@ -15,6 +15,7 @@
} }
.event-card picture { .event-card picture {
height: calc(((100vw - 9 * var(--space-m)) / 12) * var(--span));
margin-bottom: calc(var(--space-m) / 2); margin-bottom: calc(var(--space-m) / 2);
} }
@ -23,7 +24,7 @@
} }
.event-card__infos .ticket { .event-card__infos .ticket {
z-index: 0; z-index: 5;
margin-top: 0.3rem; margin-top: 0.3rem;
} }
@ -35,8 +36,8 @@
margin-bottom: calc(var(--space-m) / 2); margin-bottom: calc(var(--space-m) / 2);
} }
.event-card__link::after { .event-card__link {
content: "";
position: absolute; position: absolute;
inset: 0; inset: 0;
z-index: 3;
} }

View file

@ -31,7 +31,7 @@
position: sticky; position: sticky;
top: 0; top: 0;
background-color: #fff; background-color: #fff;
z-index: 3; z-index: 10;
} }
/* Nav */ /* Nav */
@ -42,7 +42,7 @@
width: 100%; width: 100%;
box-sizing: border-box; box-sizing: border-box;
top: -34rem; top: -34rem;
z-index: 4; z-index: 11;
background-color: var(--color-brown-light); background-color: var(--color-brown-light);
display: grid; display: grid;
grid-template-columns: 2fr 8fr 1fr; grid-template-columns: 2fr 8fr 1fr;

View file

@ -1,10 +1,9 @@
<div class="event-card grid__item" style="--span: <?= $span ?>"> <div class="event-card grid__item" style="--span: <?= $span ?>">
<a class="event-card__link" href="<?= $event->url() ?>" title="Voir l'événément"></a>
<?php snippet('picture', ["file" => $event->gallery()->toFiles()->first()]) ?> <?php snippet('picture', ["file" => $event->gallery()->toFiles()->first()]) ?>
<div class="event-card__infos"> <div class="event-card__infos">
<div> <div>
<a class="event-card__link" href="<?= $event->url() ?>" title="Voir l'événément"> <h5><?= $event->title() ?></h5>
<h5><?= $event->title() ?></h5>
</a>
<?php if ($event->isMapadoEvent() == 'true'): ?> <?php if ($event->isMapadoEvent() == 'true'): ?>
<?php snippet('ticket', ['link' => option('ticketingUrl') . 'event/' . $event->mapadoSlug()]) ?> <?php snippet('ticket', ['link' => option('ticketingUrl') . 'event/' . $event->mapadoSlug()]) ?>
<?php endif ?> <?php endif ?>