Skip to content

Commit

Permalink
Merge pull request #8 from archilex/add-default-image
Browse files Browse the repository at this point in the history
Add support for defaultImageUrl()
  • Loading branch information
archilex authored Aug 16, 2023
2 parents 18d445b + 5f531e0 commit f7a88f8
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion resources/views/columns/stacked-image-column.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@
$overlap = $getOverlap() ?? 1;
$imageCount = 0;
$defaultImageUrl = $getDefaultImageUrl();
if ((! count($images)) && filled($defaultImageUrl)) {
$imagesWithPath = [null];
}
$ring = match ($getRing()) {
0 => 'ring-0',
1 => 'ring-1',
Expand Down Expand Up @@ -50,7 +57,7 @@
@endphp

<img
src="{{ $path }}"
src="{{ filled($image) ? $getPath($image) : $defaultImageUrl }}"
style="
{!! $height !== null ? "height: {$height};" : null !!}
{!! $width !== null ? "width: {$width};" : null !!}
Expand Down

0 comments on commit f7a88f8

Please sign in to comment.