1
0
Fork 0
mirror of https://github.com/seanmorley15/AdventureLog.git synced 2025-07-29 09:49:38 +02:00

Image upload for adventures

This commit is contained in:
Sean Morley 2024-06-14 16:04:02 +00:00
parent 4c1bdf5faf
commit 2acfc1defb
5 changed files with 185 additions and 15 deletions

View file

@ -42,12 +42,20 @@
>
<figure>
<!-- svelte-ignore a11y-img-redundant-alt -->
<img
src={adventure.imageUrl ||
"https://placehold.co/300?text=No%20Image%20Found&font=roboto"}
alt="No image available"
class="w-full h-48 object-cover"
/>
{#if adventure.imageUrl && adventure.imageUrl !== ""}
<img
src="/cdn/adventures/{adventure.imageUrl}"
alt="No image available"
class="w-full h-48 object-cover"
crossorigin="anonymous"
/>
{:else}
<img
src={"https://placehold.co/300?text=No%20Image%20Found&font=roboto"}
alt="No image available"
class="w-full h-48 object-cover"
/>
{/if}
</figure>
<div class="card-body">