From f4e8e354a795eea9f6e3d08daaedde9901464207 Mon Sep 17 00:00:00 2001 From: William Diakite Date: Wed, 11 Oct 2023 09:54:09 -0400 Subject: [PATCH] add Carousel component --- src/lib/components/Carousel.svelte | 201 +++++++++++++++++++++++++++++ src/lib/styles/style.css | 15 +++ 2 files changed, 216 insertions(+) create mode 100644 src/lib/components/Carousel.svelte diff --git a/src/lib/components/Carousel.svelte b/src/lib/components/Carousel.svelte new file mode 100644 index 0000000..9ffe15b --- /dev/null +++ b/src/lib/components/Carousel.svelte @@ -0,0 +1,201 @@ + + + + + diff --git a/src/lib/styles/style.css b/src/lib/styles/style.css index c42d942..14da3cf 100644 --- a/src/lib/styles/style.css +++ b/src/lib/styles/style.css @@ -34,6 +34,8 @@ --presentation-stroke: solid 0.4rem rgba(245, 245, 245, 0.631); } + + * { box-sizing: border-box; inline-size: auto; @@ -387,6 +389,19 @@ footer, margin-top: 3rem; } +/* Carousel image */ +img.incoming { + opacity: 1; +} + +img.outgoing-right { + transform: translateX(100%); +} + +img.outgoing-left { + transform: translateX(-100%); +} + /** All touch screens */ @media screen and (max-width: 1024px) {