From 0ed0c89940b9ba0ada11e34476273dfd76d63efc Mon Sep 17 00:00:00 2001 From: Prasanta Kumar Dutta <7580745+pkd2512@users.noreply.github.com> Date: Tue, 5 Sep 2023 13:06:20 +0530 Subject: [PATCH] edits for #116 --- src/components/BodyText/BodyText.svelte | 5 ++++- .../FeaturePhoto/FeaturePhoto.stories.svelte | 4 ++++ src/components/FeaturePhoto/FeaturePhoto.svelte | 17 ++++++++++++++--- src/components/GraphicBlock/TextBlock.svelte | 2 +- .../PhotoCarousel/PhotoCarousel.svelte | 4 ++++ src/components/SearchInput/SearchInput.svelte | 2 +- .../SimpleTimeline/SimpleTimeline.svelte | 7 +------ src/components/Table/Table.svelte | 5 ++--- 8 files changed, 31 insertions(+), 15 deletions(-) diff --git a/src/components/BodyText/BodyText.svelte b/src/components/BodyText/BodyText.svelte index cdab904a..f65b299a 100644 --- a/src/components/BodyText/BodyText.svelte +++ b/src/components/BodyText/BodyText.svelte @@ -11,11 +11,14 @@ let cls: string = ''; export { cls as class }; + /** Add an id to the block tag to target it with custom CSS. */ + export let id: string = ''; + import { marked } from 'marked'; import Block from '../Block/Block.svelte'; - + {#if text} {@html marked.parse(text)} {/if} diff --git a/src/components/FeaturePhoto/FeaturePhoto.stories.svelte b/src/components/FeaturePhoto/FeaturePhoto.stories.svelte index 62ece47d..59e1fa51 100644 --- a/src/components/FeaturePhoto/FeaturePhoto.stories.svelte +++ b/src/components/FeaturePhoto/FeaturePhoto.stories.svelte @@ -25,6 +25,10 @@ control: 'select', options: ['normal', 'wide', 'wider', 'widest', 'fluid'], }, + textWidth: { + control: 'select', + options: ['normal', 'wide', 'wider', 'widest', 'fluid'], + }, }, }; diff --git a/src/components/FeaturePhoto/FeaturePhoto.svelte b/src/components/FeaturePhoto/FeaturePhoto.svelte index 4ae8030b..b221966f 100644 --- a/src/components/FeaturePhoto/FeaturePhoto.svelte +++ b/src/components/FeaturePhoto/FeaturePhoto.svelte @@ -41,6 +41,15 @@ * Width of the container, one of: normal, wide, wider, widest or fluid */ export let width: ContainerWidth = 'normal'; + + /** + * Set a different width for the text within the text well, for example, + * "normal" to keep the title, description and notes inline with the rest + * of the text well. Can't ever be wider than `width`. + * @type {string} + */ + export let textWidth: ContainerWidth | null = 'normal'; + /** * Whether to lazy load the photo using the [Intersection Observer API](https://developer.mozilla.org/en-US/docs/Web/API/Intersection_Observer_API) */ @@ -94,9 +103,11 @@ {/if} {#if caption} -
- {caption} -
+ +
+ {caption} +
+
{/if} {#if !altText} diff --git a/src/components/GraphicBlock/TextBlock.svelte b/src/components/GraphicBlock/TextBlock.svelte index 70fa2ca9..0e1cd96a 100644 --- a/src/components/GraphicBlock/TextBlock.svelte +++ b/src/components/GraphicBlock/TextBlock.svelte @@ -7,7 +7,7 @@ {#if width} - + {:else} diff --git a/src/components/PhotoCarousel/PhotoCarousel.svelte b/src/components/PhotoCarousel/PhotoCarousel.svelte index 5aa64a37..4f91b640 100644 --- a/src/components/PhotoCarousel/PhotoCarousel.svelte +++ b/src/components/PhotoCarousel/PhotoCarousel.svelte @@ -205,6 +205,10 @@ max-height: 100%; } + li { + padding: 0; + } + .splide__arrows { width: 275px; margin: 0 auto; diff --git a/src/components/SearchInput/SearchInput.svelte b/src/components/SearchInput/SearchInput.svelte index 981fc847..4d212124 100644 --- a/src/components/SearchInput/SearchInput.svelte +++ b/src/components/SearchInput/SearchInput.svelte @@ -27,7 +27,7 @@