File tree Expand file tree Collapse file tree 2 files changed +28
-0
lines changed
src/lib/shared/ui/components/modern-image Expand file tree Collapse file tree 2 files changed +28
-0
lines changed Original file line number Diff line number Diff line change 1+ <script lang =" ts" >
2+ import type { IModernImage } from ' $models/interfaces/imodern-image.interface' ;
3+
4+ export let modernImages! : IModernImage [];
5+
6+ $ : modernJPEG = modernImages .find ((x ) => x .isJPEG );
7+ </script >
8+
9+ <picture >
10+ {#each modernImages as modernImage , index (modernImage .imageUrl )}
11+ <source
12+ srcset =" {modernImage .imageUrl }"
13+ type =" {modernImage .imageType }"
14+ width =" {modernImage .imageWidth }"
15+ height =" {modernImage .imageHeight }"
16+ />
17+ {/each }
18+ <img
19+ class =" {modernJPEG .css }"
20+ alt =" {modernJPEG .imageAlt }"
21+ loading =" eager"
22+ decoding =" async"
23+ width =" {modernJPEG .imageWidth }"
24+ height =" {modernJPEG .imageHeight }"
25+ src =" {modernJPEG .imageUrl }"
26+ />
27+ </picture >
Original file line number Diff line number Diff line change 1+ export { default as ModernImage } from './ModernImage.svelte' ;
You can’t perform that action at this time.
0 commit comments