picture - bg color before loading = event color or season color
This commit is contained in:
parent
c49aca969e
commit
cb65669ccc
6 changed files with 7 additions and 5 deletions
|
|
@ -1,6 +1,6 @@
|
|||
<div class="event-card grid__item" style="--span: <?= $span ?>">
|
||||
<a class="event-card__link" href="<?= $event->url() ?>"></a>
|
||||
<div class="image-wrapper">
|
||||
<div class="image-wrapper" style="--color: <?= $event->color()->isNotEmpty() ? $event->color() : 'var(--color-season)' ?>">
|
||||
<?php if ($event->gallery()->toFiles()->count() > 1): ?>
|
||||
<?php snippet('picture', [
|
||||
'file' => $event->gallery()->toFiles()->first(),
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@
|
|||
$span = 3;
|
||||
}
|
||||
}
|
||||
snippet('event-card', ["event" => $event, "span" => $span])
|
||||
snippet('event-card', ["event" => $event, "span" => $span, "color" => $event->color()->isNotEmpty() == 'true' ? $event->color() : null])
|
||||
?>
|
||||
<?php endforeach ?>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue