diff --git a/package.json b/package.json index c09e4e6b..84f3b19b 100644 --- a/package.json +++ b/package.json @@ -105,7 +105,6 @@ "dependencies": { "@fortawesome/free-regular-svg-icons": "^6.7.2", "@fortawesome/free-solid-svg-icons": "^6.7.2", - "@splidejs/svelte-splide": "^0.2.9", "@sveltejs/kit": "^2.20.7", "dayjs": "^1.11.13", "journalize": "^2.6.0", diff --git a/src/components/PhotoCarousel/PhotoCarousel.mdx b/src/components/PhotoCarousel/PhotoCarousel.mdx deleted file mode 100644 index d2ef465f..00000000 --- a/src/components/PhotoCarousel/PhotoCarousel.mdx +++ /dev/null @@ -1,128 +0,0 @@ -import { Meta, Canvas } from '@storybook/blocks'; - -import * as PhotoCarouselStories from './PhotoCarousel.stories.svelte'; - - - -# PhotoCarousel - -The `PhotoCarousel` component creates a simple and accessible photo carousel with built-in lazy-loading and mobile swipe. - -```svelte - - - -``` - - - -## Using with ArchieML docs - -With the Graphics Kit, you'll likely get your text value from an ArchieML doc... - -```yaml -# ArchieML doc -[blocks] -type: photo-carousel - -# List of photo data -[.images] - # Photo 1 - src: 'images/myImage.jpg', # The source path can be a URL or a local path - altText: 'A picture of...', - caption: 'My caption...', // Optional - credit: 'REUTERS/Jane Doe', // Optional - objectFit: 'contain', // Optional - objectPosition: '50% 50%', // Optional - - # Photo 2 - src: 'images/myImage2.jpg', - altText: 'A picture of...', - caption: 'My caption...', // Optional - credit: 'REUTERS/Jane Doe', // Optional - objectFit: 'contain', // Optional - objectPosition: '50% 50%', // Optional - ... -[] -[] -``` - -... which you'll parse out of a ArchieML block object before passing to the `PhotoCarousel` component. - -> **Note:** If you're using local images files stored in your Graphics Kit project, prefix `assets` to the image source path, as in the example below. - -```svelte - - - -{#each content.blocks as block} - {#if block.type === 'photo-carousel'} - ({ - ...img, - src: `${assets}/${img.src}`, - }))} - /> - {/if} -{/each} -``` - - - -## Custom text - -To customise the credit and/or caption style, use the `credit` and `caption` [snippets](https://svelte.dev/docs/svelte/snippet) and pass `photo` as an argument. - -```svelte - - - {#snippet credit(image)} -

{image.credit}

- {/snippet} - - - {#snippet caption(image)} -

{image.caption}

- {/snippet} -
- - - -``` - - diff --git a/src/components/PhotoCarousel/PhotoCarousel.stories.svelte b/src/components/PhotoCarousel/PhotoCarousel.stories.svelte deleted file mode 100644 index 0092f7f6..00000000 --- a/src/components/PhotoCarousel/PhotoCarousel.stories.svelte +++ /dev/null @@ -1,58 +0,0 @@ - - - - - - - - - {#snippet credit(image)} -

{image.credit}

- {/snippet} - {#snippet caption(image)} -

{image.caption}

- {/snippet} -
-
- - diff --git a/src/components/PhotoCarousel/PhotoCarousel.svelte b/src/components/PhotoCarousel/PhotoCarousel.svelte deleted file mode 100644 index 7a14de34..00000000 --- a/src/components/PhotoCarousel/PhotoCarousel.svelte +++ /dev/null @@ -1,272 +0,0 @@ - - - - - - - - diff --git a/src/components/PhotoCarousel/demo/images.json b/src/components/PhotoCarousel/demo/images.json deleted file mode 100644 index a713aad9..00000000 --- a/src/components/PhotoCarousel/demo/images.json +++ /dev/null @@ -1,72 +0,0 @@ -[ - { - "src": "https://graphics.thomsonreuters.com/cdn/django-tools/media/graphics-gallery/galleries/world-cup-2022/spain-germany-11-27/2022-11-27T194630Z_544493697_UP1E.jpeg", - "caption": "Spain's Sergio Busquets and Aymeric Laporte react before a Germany goal is disallowed following a VAR review.", - "credit": "REUTERS/Molly Darlington" - }, - { - "src": "https://graphics.thomsonreuters.com/cdn/django-tools/media/graphics-gallery/galleries/world-cup-2022/spain-germany-11-27/2022-11-27T194619Z_2007900040_UP1.jpeg", - "caption": "Spain's Sergio Busquets fouls Germany's Jamal Musiala before being shown yellow card.", - "credit": "REUTERS/Kai Pfaffenbach" - }, - { - "src": "https://graphics.thomsonreuters.com/cdn/django-tools/media/graphics-gallery/galleries/world-cup-2022/spain-germany-11-27/2022-11-27T194619Z_635809122_UP1E.jpeg", - "caption": "Spain's Sergio Busquets is shown a yellow card by referee Danny Desmond Makkelie.", - "credit": "REUTERS/Albert Gea" - }, - { - "src": "https://graphics.thomsonreuters.com/cdn/django-tools/media/graphics-gallery/galleries/world-cup-2022/spain-germany-11-27/2022-11-27T191015Z_1293757566_UP1.jpeg", - "caption": "Spain's Sergio Busquets in action with Germany's Thomas Muller.", - "credit": "REUTERS/John Sibley" - }, - { - "src": "https://graphics.thomsonreuters.com/cdn/django-tools/media/graphics-gallery/galleries/world-cup-2022/spain-germany-11-27/2022-11-27T181411Z_1_MTZXEIBR0QNN.jpeg", - "caption": "Spain fans inside the stadium before the match.", - "credit": "REUTERS/Albert Gea" - }, - { - "src": "https://graphics.thomsonreuters.com/cdn/django-tools/media/graphics-gallery/galleries/world-cup-2022/spain-germany-11-27/2022-11-27T194827Z_345059331_UP1E.jpeg", - "caption": "Spain's Gavi.", - "credit": "REUTERS/Fabrizio Bensch" - }, - { - "src": "https://graphics.thomsonreuters.com/cdn/django-tools/media/graphics-gallery/galleries/world-cup-2022/spain-germany-11-27/2022-11-27T175149Z_1_MTZXEIBR0PMD.jpeg", - "caption": "", - "credit": "REUTERS/John Sibley" - }, - { - "src": "https://graphics.thomsonreuters.com/cdn/django-tools/media/graphics-gallery/galleries/world-cup-2022/spain-germany-11-27/2022-11-27T203232Z_890709671_UP1E.jpeg", - "caption": "Spain's Alvaro Morata scores their first goal.", - "credit": "REUTERS/Kai Pfaffenbach" - }, - { - "src": "https://graphics.thomsonreuters.com/cdn/django-tools/media/graphics-gallery/galleries/world-cup-2022/spain-germany-11-27/2022-11-27T203612Z_1399473226_UP1.jpeg", - "caption": "Spain's Alvaro Morata celebrates scoring their first goal.", - "credit": "REUTERS/Molly Darlington" - }, - { - "src": "https://graphics.thomsonreuters.com/cdn/django-tools/media/graphics-gallery/galleries/world-cup-2022/spain-germany-11-27/2022-11-27T204305Z_1795686896_UP1.jpeg", - "caption": "Germany's Niclas Fullkrug scores their first goal.", - "credit": "REUTERS/Molly Darlington" - }, - { - "src": "https://graphics.thomsonreuters.com/cdn/django-tools/media/graphics-gallery/galleries/world-cup-2022/spain-germany-11-27/2022-11-27T204528Z_151067034_UP1E.jpeg", - "caption": "Germany's Niclas Fullkrug celebrates scoring their first goal.", - "credit": "REUTERS/Molly Darlington" - }, - { - "src": "https://graphics.thomsonreuters.com/cdn/django-tools/media/graphics-gallery/galleries/world-cup-2022/spain-germany-11-27/2022-11-27T205041Z_2076149593_UP1.jpeg", - "caption": "Spain coach Luis Enrique.", - "credit": "REUTERS/John Sibley" - }, - { - "src": "https://graphics.thomsonreuters.com/cdn/django-tools/media/graphics-gallery/galleries/world-cup-2022/spain-germany-11-27/2022-11-27T205604Z_1468073277_UP1.jpeg", - "caption": "Germany's Manuel Neuer applauds fans after the match.", - "credit": "REUTERS/Kai Pfaffenbach" - }, - { - "src": "https://graphics.thomsonreuters.com/cdn/django-tools/media/graphics-gallery/galleries/world-cup-2022/spain-germany-11-27/2022-11-27T205854Z_408619749_UP1E.jpeg", - "caption": "Spain players applaud fans after the match.", - "credit": "REUTERS/Albert Gea" - } -] diff --git a/src/components/PhotoCarousel/demo/photos.json b/src/components/PhotoCarousel/demo/photos.json deleted file mode 100644 index a713aad9..00000000 --- a/src/components/PhotoCarousel/demo/photos.json +++ /dev/null @@ -1,72 +0,0 @@ -[ - { - "src": "https://graphics.thomsonreuters.com/cdn/django-tools/media/graphics-gallery/galleries/world-cup-2022/spain-germany-11-27/2022-11-27T194630Z_544493697_UP1E.jpeg", - "caption": "Spain's Sergio Busquets and Aymeric Laporte react before a Germany goal is disallowed following a VAR review.", - "credit": "REUTERS/Molly Darlington" - }, - { - "src": "https://graphics.thomsonreuters.com/cdn/django-tools/media/graphics-gallery/galleries/world-cup-2022/spain-germany-11-27/2022-11-27T194619Z_2007900040_UP1.jpeg", - "caption": "Spain's Sergio Busquets fouls Germany's Jamal Musiala before being shown yellow card.", - "credit": "REUTERS/Kai Pfaffenbach" - }, - { - "src": "https://graphics.thomsonreuters.com/cdn/django-tools/media/graphics-gallery/galleries/world-cup-2022/spain-germany-11-27/2022-11-27T194619Z_635809122_UP1E.jpeg", - "caption": "Spain's Sergio Busquets is shown a yellow card by referee Danny Desmond Makkelie.", - "credit": "REUTERS/Albert Gea" - }, - { - "src": "https://graphics.thomsonreuters.com/cdn/django-tools/media/graphics-gallery/galleries/world-cup-2022/spain-germany-11-27/2022-11-27T191015Z_1293757566_UP1.jpeg", - "caption": "Spain's Sergio Busquets in action with Germany's Thomas Muller.", - "credit": "REUTERS/John Sibley" - }, - { - "src": "https://graphics.thomsonreuters.com/cdn/django-tools/media/graphics-gallery/galleries/world-cup-2022/spain-germany-11-27/2022-11-27T181411Z_1_MTZXEIBR0QNN.jpeg", - "caption": "Spain fans inside the stadium before the match.", - "credit": "REUTERS/Albert Gea" - }, - { - "src": "https://graphics.thomsonreuters.com/cdn/django-tools/media/graphics-gallery/galleries/world-cup-2022/spain-germany-11-27/2022-11-27T194827Z_345059331_UP1E.jpeg", - "caption": "Spain's Gavi.", - "credit": "REUTERS/Fabrizio Bensch" - }, - { - "src": "https://graphics.thomsonreuters.com/cdn/django-tools/media/graphics-gallery/galleries/world-cup-2022/spain-germany-11-27/2022-11-27T175149Z_1_MTZXEIBR0PMD.jpeg", - "caption": "", - "credit": "REUTERS/John Sibley" - }, - { - "src": "https://graphics.thomsonreuters.com/cdn/django-tools/media/graphics-gallery/galleries/world-cup-2022/spain-germany-11-27/2022-11-27T203232Z_890709671_UP1E.jpeg", - "caption": "Spain's Alvaro Morata scores their first goal.", - "credit": "REUTERS/Kai Pfaffenbach" - }, - { - "src": "https://graphics.thomsonreuters.com/cdn/django-tools/media/graphics-gallery/galleries/world-cup-2022/spain-germany-11-27/2022-11-27T203612Z_1399473226_UP1.jpeg", - "caption": "Spain's Alvaro Morata celebrates scoring their first goal.", - "credit": "REUTERS/Molly Darlington" - }, - { - "src": "https://graphics.thomsonreuters.com/cdn/django-tools/media/graphics-gallery/galleries/world-cup-2022/spain-germany-11-27/2022-11-27T204305Z_1795686896_UP1.jpeg", - "caption": "Germany's Niclas Fullkrug scores their first goal.", - "credit": "REUTERS/Molly Darlington" - }, - { - "src": "https://graphics.thomsonreuters.com/cdn/django-tools/media/graphics-gallery/galleries/world-cup-2022/spain-germany-11-27/2022-11-27T204528Z_151067034_UP1E.jpeg", - "caption": "Germany's Niclas Fullkrug celebrates scoring their first goal.", - "credit": "REUTERS/Molly Darlington" - }, - { - "src": "https://graphics.thomsonreuters.com/cdn/django-tools/media/graphics-gallery/galleries/world-cup-2022/spain-germany-11-27/2022-11-27T205041Z_2076149593_UP1.jpeg", - "caption": "Spain coach Luis Enrique.", - "credit": "REUTERS/John Sibley" - }, - { - "src": "https://graphics.thomsonreuters.com/cdn/django-tools/media/graphics-gallery/galleries/world-cup-2022/spain-germany-11-27/2022-11-27T205604Z_1468073277_UP1.jpeg", - "caption": "Germany's Manuel Neuer applauds fans after the match.", - "credit": "REUTERS/Kai Pfaffenbach" - }, - { - "src": "https://graphics.thomsonreuters.com/cdn/django-tools/media/graphics-gallery/galleries/world-cup-2022/spain-germany-11-27/2022-11-27T205854Z_408619749_UP1E.jpeg", - "caption": "Spain players applaud fans after the match.", - "credit": "REUTERS/Albert Gea" - } -] diff --git a/src/index.js b/src/index.js index 6f4ee47b..277c0f25 100644 --- a/src/index.js +++ b/src/index.js @@ -27,7 +27,6 @@ export { default as InlineAd } from './components/AdSlot/InlineAd.svelte'; export { default as LeaderboardAd } from './components/AdSlot/LeaderboardAd.svelte'; export { default as Markdown } from './components/Markdown/Markdown.svelte'; export { default as PaddingReset } from './components/PaddingReset/PaddingReset.svelte'; -export { default as PhotoCarousel } from './components/PhotoCarousel/PhotoCarousel.svelte'; export { default as PhotoPack } from './components/PhotoPack/PhotoPack.svelte'; export { default as PymChild } from './components/PymChild/PymChild.svelte'; export { pym } from './components/PymChild/state.svelte.js';