[wip] Add Image component

This commit is contained in:
2021-09-24 21:52:04 +02:00
parent bf70c133c8
commit 2211c74c99
2 changed files with 28 additions and 2 deletions

View File

@@ -1,12 +1,15 @@
<script lang="ts">
// Components
import Image from '$components/atoms/Image.svelte'
export let location: any
const { name, slug, country, last_updated } = location
</script>
<div class="location" role="listitem">
<a href="/location/{country.slug}/{slug}" rel="prefetch" sveltekit-noscroll>
<img src="//api.housesof.localhost:8055/assets/{country.flag.id}" alt="Flag of {country.name}">
<a href="/{country.slug}/{slug}" rel="prefetch" sveltekit-noscroll>
<Image id={country.flag.id} alt="Flag of {country.name}" width={32} height={32} />
<h3 class="location__name">
{name}
</h3>