Skip to content

Commit

Permalink
fix: display default image if provided link is dead
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonStier authored Sep 24, 2023
1 parent eb1058f commit 6bb6c33
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/mod/templates/main_index.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ <h1>
<div class="submenu-img">
<a href="{{ app.subpage }}">
{% if app.logo %}
<img src="{{ app.logo }}" alt="{{ app.metadata.title }}">
<!-- img with error handler for dead links (fallback to big-map logo) -->
<img src="{{ app.logo }}" alt="{{ app.metadata.title }}"
onerror="this.src='static/img/big-map-white-transparent.png';this.onerror='';">
{% else %}
<img src="static/img/big-map-white-transparent.png" alt="{{ app.metadata.title }}">
{% endif %}
Expand Down

0 comments on commit 6bb6c33

Please sign in to comment.