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:
parent
4c1bdf5faf
commit
2acfc1defb
5 changed files with 185 additions and 15 deletions
|
@ -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">
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue