diff --git a/src/lib/images.svelte b/src/lib/images.svelte index 0b50fa2..558c620 100644 --- a/src/lib/images.svelte +++ b/src/lib/images.svelte @@ -2,9 +2,9 @@ import type IImage from '$lib/interfaces/IImage'; let images: IImage[] = [ - { url: 'IMG_5613.jpeg', alt: 'Kevin at beach' }, - { url: 'IMG_4551.jpeg', alt: 'Kevin fishing' }, - { url: 'IMG_1925.jpeg', alt: 'Kevin in a boat with dog' } + { name: 'fish', alt: 'Kevin fishing' }, + { name: 'boat', alt: 'Kevin in a boat with dog' }, + { name: 'sand', alt: 'Kevin at beach' } ]; function cycle() { @@ -20,8 +20,13 @@ role="button" tabindex="0" > - {#each images as image (image.url)} - {image.alt} + {#each images as image (image.name)} + + + + + {image.alt} + {/each} @@ -33,18 +38,28 @@ -webkit-user-select: none; margin-left: 40px; - img { + picture { position: absolute; margin-top: 10vh; - max-height: 80vh; transition: all 0.51s ease; } + img { + max-width: 42vw; + } + @for $i from 0 through 4 { - img:nth-of-type(#{$i}) { + picture:nth-of-type(#{$i}) { left: calc(-10px * $i); top: calc(-10px * $i); } } } + + @media (max-width: 500px) { + div.images img { + margin-bottom: 3rem; + max-width: 80vw; + } + } diff --git a/src/lib/interfaces/IImage.ts b/src/lib/interfaces/IImage.ts index bcd3424..59b3e09 100644 --- a/src/lib/interfaces/IImage.ts +++ b/src/lib/interfaces/IImage.ts @@ -1,6 +1,6 @@ interface IImage { - url: string; + name: string; alt: string; } -export type { IImage }; +export default IImage; diff --git a/static/images/IMG_1925.jpeg b/static/images/IMG_1925.jpeg deleted file mode 100644 index 70434dc..0000000 Binary files a/static/images/IMG_1925.jpeg and /dev/null differ diff --git a/static/images/IMG_4551.jpeg b/static/images/IMG_4551.jpeg deleted file mode 100644 index 91cc349..0000000 Binary files a/static/images/IMG_4551.jpeg and /dev/null differ diff --git a/static/images/IMG_5613.jpeg b/static/images/IMG_5613.jpeg deleted file mode 100644 index 71ca9b2..0000000 Binary files a/static/images/IMG_5613.jpeg and /dev/null differ diff --git a/static/images/boat-300w.jpeg b/static/images/boat-300w.jpeg new file mode 100644 index 0000000..5c14438 Binary files /dev/null and b/static/images/boat-300w.jpeg differ diff --git a/static/images/boat-620w.jpeg b/static/images/boat-620w.jpeg new file mode 100644 index 0000000..3c2d89d Binary files /dev/null and b/static/images/boat-620w.jpeg differ diff --git a/static/images/boat-900w.jpeg b/static/images/boat-900w.jpeg new file mode 100644 index 0000000..ec5da4b Binary files /dev/null and b/static/images/boat-900w.jpeg differ diff --git a/static/images/fish-300w.jpeg b/static/images/fish-300w.jpeg new file mode 100644 index 0000000..b2f1c6f Binary files /dev/null and b/static/images/fish-300w.jpeg differ diff --git a/static/images/fish-620w.jpeg b/static/images/fish-620w.jpeg new file mode 100644 index 0000000..1db86e6 Binary files /dev/null and b/static/images/fish-620w.jpeg differ diff --git a/static/images/fish-900w.jpeg b/static/images/fish-900w.jpeg new file mode 100644 index 0000000..15975f4 Binary files /dev/null and b/static/images/fish-900w.jpeg differ diff --git a/static/images/sand-300w.jpeg b/static/images/sand-300w.jpeg new file mode 100644 index 0000000..49e0f8d Binary files /dev/null and b/static/images/sand-300w.jpeg differ diff --git a/static/images/sand-620w.jpeg b/static/images/sand-620w.jpeg new file mode 100644 index 0000000..95646d0 Binary files /dev/null and b/static/images/sand-620w.jpeg differ diff --git a/static/images/sand-900w.jpeg b/static/images/sand-900w.jpeg new file mode 100644 index 0000000..7ee9a85 Binary files /dev/null and b/static/images/sand-900w.jpeg differ