Skip to content

Commit

Permalink
Add fallback image (fixes opengaming#2102)
Browse files Browse the repository at this point in the history
  • Loading branch information
cxong committed May 13, 2023
1 parent a4fa236 commit 70c2756
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
15 changes: 15 additions & 0 deletions static/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,21 @@ pre { margin: 0 0 1em 1em; overflow: auto; }
text-align: center;
vertical-align: middle;
}
/* Fallback image style */
img.thumb::before {
position: absolute;
top: 0;
left: 0;
bottom: 0;
right: 0;
background-color: #999;
text-align: center;
line-height: 2;
display: block;
width: 96px;
height: 64px;
overflow: hidden;
}
.fa.thumb-icon {
height: 64px;
width: 96px;
Expand Down
2 changes: 1 addition & 1 deletion templates/games.html
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@
href="{{ imageUrl }}"
data-fancybox="gallery-{{ game['name'] }}"
>
<img class="thumb" src="{{ imageUrl }}" itemprop="image" alt="{{ game['name'] }}">
<img class="thumb fa-solid fa-image" src="{{ imageUrl }}" itemprop="image" alt="{{ game['name'] }}">
</a>
{% endfor %}
</script>
Expand Down

0 comments on commit 70c2756

Please sign in to comment.