File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
resources/views/components/articles Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change 5
5
<div class =" h-full rounded-lg shadow-lg bg-white" >
6
6
<div class =" flex flex-col h-full gap-x-8" >
7
7
<a href =" {{ route (' articles.show' , $article -> slug ()) } }" class =" block" >
8
- <div
9
- class =" w-full h-32 rounded-t-lg bg-center {{ $article -> hasHeroImage () ? ' bg-cover' : ' ' } } bg-gray-800 lg:h-40"
10
- style =" background-image : url ({{ $article->heroImage( ) }});"
8
+ <img class =" w-full h-32 rounded-t-lg bg-center bg-gray-800 lg:h-40 object-cover"
9
+ src =" {{ $article -> heroImage () } }"
10
+ alt =" Article Hero Image"
11
+ onerror ="
12
+ this.onerror=null;
13
+ this.src='{{ asset (' images/default-background.svg' ) } } '"
11
14
>
12
- </div >
13
15
</a >
14
16
15
17
<div class =" flex flex-col h-full gap-y-3 p-4" >
You can’t perform that action at this time.
0 commit comments