fix picture problem
This commit is contained in:
parent
c65f5f228b
commit
c49aca969e
2 changed files with 6 additions and 2 deletions
|
|
@ -2,7 +2,10 @@
|
|||
<a class="event-card__link" href="<?= $event->url() ?>"></a>
|
||||
<div class="image-wrapper">
|
||||
<?php if ($event->gallery()->toFiles()->count() > 1): ?>
|
||||
<img class="image-cover" src="<?= $event->gallery()->toFiles()->first()->url() ?>" alt="">
|
||||
<?php snippet('picture', [
|
||||
'file' => $event->gallery()->toFiles()->first(),
|
||||
'class' => 'image-cover'
|
||||
]) ?>
|
||||
<?php endif ?>
|
||||
<?php
|
||||
$file = $event->gallery()->toFiles()->count() > 1 ? $event->gallery()->toFiles()->nth(1) : $event->gallery()->toFiles()->first();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue