Skip to content

Commit

Permalink
Adding desaturated image when logo is missing
Browse files Browse the repository at this point in the history
  • Loading branch information
giovannipizzi committed Feb 14, 2024
1 parent 9531133 commit 1bf0549
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/mod/templates/main_index.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ <h1>
{% if code.metadata.logo %}
<!-- img with error handler for dead links (fallback to ecosystem logo) -->
<img src="{{ code.metadata.logo }}" alt="{{ code.metadata.title }}"
onerror="this.src='static/img/ecosystem-logo.png';this.onerror='';">
onerror="this.src='static/img/ecosystem-missing-logo.png';this.onerror='';">
{% else %}
<img src="static/img/ecosystem-logo.png" alt="{{ code.metadata.title }}">
<img src="static/img/ecosystem-missing-logo.png" alt="{{ code.metadata.title }}">
{% endif %}
</a>
</div>
Expand Down
4 changes: 2 additions & 2 deletions src/mod/templates/singlepage.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
<div class="submenu-entry">
<div class="submenu-img">
{% if metadata.logo %}
<img src="{{ metadata.logo }}" alt="{{ metadata.title }}">
<img src="{{ metadata.logo }}" alt="{{ metadata.title }}" onerror="this.src='../static/img/ecosystem-missing-logo.png';this.onerror='';">
{% else %}
<img src="../static/img/ecosystem-logo.png" alt="{{ metadata.title }}">
<img src="../static/img/ecosystem-missing-logo.png" alt="{{ metadata.title }}">
{% endif %}
</div>
<div class="code-card-text">
Expand Down
Binary file added src/static/img/ecosystem-missing-logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 1bf0549

Please sign in to comment.