Skip to content

Commit

Permalink
Merge pull request #532 from martin-ro/default-image-url
Browse files Browse the repository at this point in the history
defaultImageUrl for CuratorColumn
  • Loading branch information
awcodes authored Aug 24, 2024
2 parents 24378a6 + 13ebfee commit 8e0526e
Showing 1 changed file with 31 additions and 1 deletion.
32 changes: 31 additions & 1 deletion resources/views/components/tables/curator-column.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,18 @@
default => 'ring',
};
$ringClasses = \Illuminate\Support\Arr::toCssClasses([
'ring-white dark:ring-gray-900',
match ($ring) {
0 => null,
1 => 'ring-1',
2 => 'ring-2',
3 => 'ring',
4 => 'ring-4',
default => $ring,
},
]);
$overlap = match ($overlap) {
0 => 'space-x-0',
2 => '-space-x-2',
Expand All @@ -18,6 +30,8 @@
default => '-space-x-1',
};
$defaultImageUrl = $getDefaultImageUrl();
$resolution = $getResolution();
$height = $getHeight();
Expand Down Expand Up @@ -91,5 +105,21 @@ class="h-full w-full"
@endif
</div>
@endforeach
@elseif($defaultImageUrl)
<img
src="{{ $defaultImageUrl }}"
{{
$getExtraImgAttributeBag()
->class([
'max-w-none object-cover object-center',
'rounded-full' => $isCircular,
$ringClasses,
])
->style([
"height: {$height}" => $height,
"width: {$width}" => $width,
])
}}
/>
@endif
</div>
</div>

0 comments on commit 8e0526e

Please sign in to comment.