34 lines
651 B
Svelte
Raw Normal View History

2020-11-08 12:07:17 +01:00
<script context="module">
import { initialize } from 'svelte-cloudinary'
initialize({ cloud_name: 'cupcakearmy' })
</script>
2020-09-23 15:37:12 +02:00
<script>
2020-11-08 12:07:17 +01:00
import { image } from 'svelte-cloudinary'
2020-11-02 15:55:59 +01:00
2020-09-23 15:37:12 +02:00
export let src
export let alt
2020-11-08 12:07:17 +01:00
$: cleaned = src.replace('https://api.nicco.io', '/nicco')
2020-09-23 15:37:12 +02:00
</script>
<style>
2020-11-08 12:07:17 +01:00
img {
2020-09-23 15:37:12 +02:00
width: calc(100% - 0.25em);
object-fit: cover;
object-position: center;
border: 0.125em solid var(--clr-primary);
transition: var(--animation);
transform: scale(1);
margin: 0;
}
2020-11-08 12:07:17 +01:00
img {
2020-09-23 15:37:12 +02:00
transform: scale(1.1);
margin: 1em 0;
}
</style>
2020-11-08 12:07:17 +01:00
<img use:image={{ src: cleaned, bind: { width: true } }} {alt} />