File size: 511 Bytes
65b4f03
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
34660c6
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<script lang="ts">
	import type { Picture } from '$lib/types/Picture';

	export let picture: Picture | undefined;
	export let minStorage = 0;
</script>

{#if picture}
	<img
		alt={picture.name}
		srcset={picture.storage
			.slice(minStorage)
			.map((format) => `/photos/raw/${format._id} ${format.width}w`)
			.join(', ')}
		{...$$restProps}
		on:click
		on:load
	/>
{/if}

<style>
	img.hover-zoom {
		transition: 400ms;

		transform: scale(1);
	}

	img:hover.hover-zoom {
		transform: scale(1.2);
	}
</style>