event card - color on hover
This commit is contained in:
parent
e69dc23c91
commit
a32f0fe843
2 changed files with 6 additions and 2 deletions
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue