blob: 0a4b50e16d3dd2b43c358eed0004729474ee5585 (
plain)
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
<script lang="ts">
import type {
ProductMediaItem,
MediaType,
} from '@jet-app/app-store/api/models';
import Artwork from '~/components/Artwork.svelte';
export let item: ProductMediaItem;
export let mediaType: MediaType | undefined;
</script>
{#if item.screenshot}
<article>
<div
class="artwork-container"
class:apple-watch-2018={mediaType === 'appleWatch_2018'}
class:apple-watch-2021={mediaType === 'appleWatch_2021'}
class:apple-watch-2022={mediaType === 'appleWatch_2022'}
class:apple-watch-2024={mediaType === 'appleWatch_2024'}
>
<Artwork artwork={item.screenshot} profile="screenshot-watch" />
</div>
</article>
{/if}
<style>
.artwork-container {
mask-position: center;
mask-size: contain;
mask-repeat: no-repeat;
border-radius: 12px;
overflow: hidden;
}
.apple-watch-2018 {
mask-image: url('/assets/images/masks/apple-watch-2018-mask.svg');
}
.apple-watch-2021 {
mask-image: url('/assets/images/masks/apple-watch-2021-mask.svg');
}
.apple-watch-2022 {
mask-image: url('/assets/images/masks/apple-watch-2022-mask.svg');
}
.apple-watch-2024 {
mask-image: url('/assets/images/masks/apple-watch-2024-mask.svg');
}
</style>
|