forked from coracle/flotilla
Add image uploads to classifieds
This commit is contained in:
@@ -1,11 +1,13 @@
|
||||
<script lang="ts">
|
||||
import type {ComponentProps} from "svelte"
|
||||
import {getTagValue} from "@welshman/util"
|
||||
import {getTagValue, getTagValues} from "@welshman/util"
|
||||
import Content from "@app/components/Content.svelte"
|
||||
import ContentLinkBlock from "@app/components/ContentLinkBlock.svelte"
|
||||
|
||||
const props: ComponentProps<typeof Content> = $props()
|
||||
|
||||
const title = getTagValue("title", props.event.tags)
|
||||
const images = getTagValues("image", props.event.tags)
|
||||
</script>
|
||||
|
||||
<div class="flex flex-col gap-2">
|
||||
@@ -15,4 +17,9 @@
|
||||
{#if props.event.content}
|
||||
<Content {...props} />
|
||||
{/if}
|
||||
<div class="grid grid-cols-3 sm:grid-cols-5">
|
||||
{#each images as image (image)}
|
||||
<ContentLinkBlock event={props.event} value={{url: image}} />
|
||||
{/each}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user