We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d3e2fab commit cfc0642Copy full SHA for cfc0642
resources/views/components/articles/summary.blade.php
@@ -7,7 +7,14 @@
7
<div class="break-words">
8
@if ($isFeatured)
9
<a href="{{ route('articles.show', $article->slug()) }}">
10
- <div class="w-full h-72 mb-6 rounded-lg bg-center {{ $article->hasHeroImage() ? 'bg-cover' : '' }} bg-gray-800" style="background-image: url({{ $article->heroImage() }});"></div>
+ <img class="w-full h-72 mb-6 rounded-lg bg-center bg-gray-800"
11
+ src="{{ $article->heroImage() }}"
12
+ alt="Example image"
13
+ onerror="
14
+ this.onerror=null;
15
+ this.src='images/default-background.svg';
16
+ this.classList.add('image-error');"
17
+ >
18
</a>
19
@endif
20
0 commit comments