Skip to content

Commit

Permalink
Merge pull request #34 from DREDGE-Mods/dev
Browse files Browse the repository at this point in the history
Added aberrated question mark when no thumbnail is available
  • Loading branch information
xen-42 authored Jan 27, 2024
2 parents f2246bc + 49073b1 commit c3e937c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
Binary file added public/images/AberratedQuestionMark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 7 additions & 5 deletions src/components/ModPreview.astro
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,13 @@ const { mod: mod } = Astro.props;
<div class="d-flex flex-column text-center h-100">
<a href={"/mods/" + mod.name.toLowerCase().trim().split(" ").join("_")}>
<h5 class="text-center">{mod.name}</h5>
{(mod.thumbnail != undefined && mod.thumbnail != "") &&
<div class="pb-2">
<img class="bg-black bg-opacity-50" style="object-fit: contain" src={"https://raw.githubusercontent.com/DREDGE-Mods/DredgeModDatabase/database/thumbnails/" + mod.thumbnail} alt={mod.name} width="400" height="200" loading="eager">
</div>
}
<div class="pb-2">
<img class="bg-black bg-opacity-50" style="object-fit: contain" src={
(mod.thumbnail != undefined && mod.thumbnail != "")
? "https://raw.githubusercontent.com/DREDGE-Mods/DredgeModDatabase/database/thumbnails/" + mod.thumbnail
: "/images/AberratedQuestionMark.png"
} alt={mod.name} width="400" height="200" loading="eager">
</div>
</a>
<div class="flex-grow-1"></div>
<div class="bg-black bg-opacity-25 p-1 mb-1">
Expand Down

0 comments on commit c3e937c

Please sign in to comment.