diff --git a/.gitignore b/.gitignore index 53eb54cd..f37acbde 100644 --- a/.gitignore +++ b/.gitignore @@ -178,4 +178,5 @@ temp/ .svelte-kit/ dist/ graphics-pack/ -!dist/package.json \ No newline at end of file +!dist/package.json +project-files \ No newline at end of file diff --git a/src/lib/BeforeAfterSlider/docs.svx b/src/lib/BeforeAfterSlider/docs.svx new file mode 100644 index 00000000..20af1d9d --- /dev/null +++ b/src/lib/BeforeAfterSlider/docs.svx @@ -0,0 +1,52 @@ +--- +title: BeforeAfterImageSlider +description: A slider for showing before/after images +slug: before-after-slider +--- + + + +
+ +## {title} + +{description} + +
+ +```svelte + + + +``` + + + + \ No newline at end of file diff --git a/src/lib/BeforeAfterSlider/index.svelte b/src/lib/BeforeAfterSlider/index.svelte new file mode 100644 index 00000000..14a815eb --- /dev/null +++ b/src/lib/BeforeAfterSlider/index.svelte @@ -0,0 +1,178 @@ + + +
+
+
+
+ {fNames[0].label} +
+ Before +
+ +
+
{fNames[1].label}
+ After +
+ + + + +
+
+ + diff --git a/src/lib/ImageTicker/docs.svx b/src/lib/ImageTicker/docs.svx new file mode 100644 index 00000000..0e198ff8 --- /dev/null +++ b/src/lib/ImageTicker/docs.svx @@ -0,0 +1,78 @@ +--- +title: ImageTicker +description: An image slideshow +slug: image-ticker +--- + + + +
+ +## {title} + +{description} + +
+ +```svelte + + + +``` + + +
Autoplay image ticker and label top centre
+ +
+ + +
Button controlled image ticker and label on the bottom left
+ +
diff --git a/src/lib/ImageTicker/index.svelte b/src/lib/ImageTicker/index.svelte new file mode 100644 index 00000000..4787dc05 --- /dev/null +++ b/src/lib/ImageTicker/index.svelte @@ -0,0 +1,210 @@ + + +
+ {#if labelPosition[0] === 't'} +

+ {fNames[currentIndex].label} +

+ {/if} + +
+ {#each fNames as image, index} +
+ {/each} +
+
+ {#each fNames as image, index} + + {/each} + {#if control === 'button'} +
+
+

<

+
+
+

>

+
+
+ {/if} +
+ {#if labelPosition[0] === 'b'} +

+ {fNames[currentIndex].label} +

+ {/if} +
+ + diff --git a/src/lib/index.js b/src/lib/index.js index e94a653b..21646cd0 100644 --- a/src/lib/index.js +++ b/src/lib/index.js @@ -14,3 +14,4 @@ export { default as Hero } from './Hero/index.svelte'; export { default as Ai2svelte } from './Ai2svelte/index.svelte'; export { default as Scroller } from './Scroller/index.svelte'; export { default as LottieScroller } from './LottieScroller/index.svelte'; +export { default as ImageTicker } from './ImageTicker/index.svelte'; diff --git a/src/statics/images/graphics/poyang-after.jpg b/src/statics/images/graphics/poyang-after.jpg new file mode 100644 index 00000000..027426b6 Binary files /dev/null and b/src/statics/images/graphics/poyang-after.jpg differ diff --git a/src/statics/images/graphics/poyang-before.jpg b/src/statics/images/graphics/poyang-before.jpg new file mode 100644 index 00000000..7e0605b7 Binary files /dev/null and b/src/statics/images/graphics/poyang-before.jpg differ