Skip to content

Commit

Permalink
Use a grey placeholder if Featured Topic/Innovation images fail (#728)
Browse files Browse the repository at this point in the history
Co-authored-by: Camille Villa <[email protected]>
  • Loading branch information
camillevilla and camillevilla authored Oct 26, 2023
1 parent 68d00a0 commit 4ddbe04
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion app/views/home/_featured_section.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@
<img
class="display-block"
src="<%= image_source %>"
alt="<%= image_alt_text %>"/>
alt="<%= image_alt_text %>"
onerror="this.classList.add('display-none');
this.parentNode.parentNode.classList.add('bg-base-lightest');"
/>
</a>
</div>
<div class="display-none desktop:display-block desktop:grid-col-1"></div>
Expand Down

0 comments on commit 4ddbe04

Please sign in to comment.