From c49aca969e118d1d625bb7cbb3f25fa937fb218a Mon Sep 17 00:00:00 2001 From: isUnknown Date: Tue, 17 Sep 2024 15:33:26 +0200 Subject: [PATCH] fix picture problem --- site/snippets/event-card.php | 5 ++++- site/snippets/picture.php | 3 ++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/site/snippets/event-card.php b/site/snippets/event-card.php index 5e7c60c..ce680c4 100644 --- a/site/snippets/event-card.php +++ b/site/snippets/event-card.php @@ -2,7 +2,10 @@
gallery()->toFiles()->count() > 1): ?> - + $event->gallery()->toFiles()->first(), + 'class' => 'image-cover' + ]) ?> gallery()->toFiles()->count() > 1 ? $event->gallery()->toFiles()->nth(1) : $event->gallery()->toFiles()->first(); diff --git a/site/snippets/picture.php b/site/snippets/picture.php index 746aeb2..3a61e65 100644 --- a/site/snippets/picture.php +++ b/site/snippets/picture.php @@ -9,11 +9,12 @@ $src = $crop === 'banner' ? $file->crop(1600, 800)->url() : $file->url(); $width = $crop === 'banner' ? $file->crop(1600, 800)->width() : $file->resize(1800)->width(); $height = $crop === 'banner' ? $file->crop(1600, 800)->height() : $file->resize(1800)->height(); + $class = isset($class) ? 'class="' . $class . '"': ''; ?> - + >