event card - color on hover

This commit is contained in:
isUnknown 2024-09-19 08:06:58 +02:00
parent e69dc23c91
commit a32f0fe843
2 changed files with 6 additions and 2 deletions

View file

@ -14,6 +14,10 @@
position: relative;
}
.event-card:hover .event-card__infos {
color: var(--color);
}
.event-card picture {
height: calc(((100vw - 9 * var(--space-m)) / 12) * var(--span));
margin-bottom: calc(var(--space-m) / 2);

View file

@ -1,6 +1,6 @@
<div class="event-card grid__item" style="--span: <?= $span ?>">
<div class="event-card grid__item" style="--span: <?= $span ?>; --color: <?= $event->color()->isEmpty() || $event->color() == '#fff' ? 'var(--color-season)' : $event->color() ?>">
<a class="event-card__link" href="<?= $event->url() ?>"></a>
<div class="image-wrapper" style="--color: <?= $event->color()->isNotEmpty() ? $event->color() : 'var(--color-season)' ?>">
<div class="image-wrapper">
<?php if ($event->gallery()->toFiles()->count() > 1): ?>
<?php snippet('picture', [
'file' => $event->gallery()->toFiles()->first(),