diff --git a/src/components/BeforeAfter/BeforeAfter.svelte b/src/components/BeforeAfter/BeforeAfter.svelte index 8853e725..03d0a302 100644 --- a/src/components/BeforeAfter/BeforeAfter.svelte +++ b/src/components/BeforeAfter/BeforeAfter.svelte @@ -38,6 +38,13 @@ */ export let afterAlt: string | null = null; + /** + * Set a class to target with SCSS. + * @type {string} + */ + let cls: string = ''; + export { cls as class }; + /** Drag handle colour */ export let handleColour = 'white'; /** Drag handle opacity */ @@ -153,11 +160,12 @@ /> {#if beforeSrc && beforeAlt && afterSrc && afterAlt} - +
+
- + {#if text} {@html marked.parse(text)} {/if} diff --git a/src/components/FeaturePhoto/FeaturePhoto.svelte b/src/components/FeaturePhoto/FeaturePhoto.svelte index b221966f..2d002473 100644 --- a/src/components/FeaturePhoto/FeaturePhoto.svelte +++ b/src/components/FeaturePhoto/FeaturePhoto.svelte @@ -90,7 +90,7 @@ }); - +
{#if $$slots.title} diff --git a/src/components/Headline/Headline.stories.svelte b/src/components/Headline/Headline.stories.svelte index 5034fc44..4a6dd31a 100644 --- a/src/components/Headline/Headline.stories.svelte +++ b/src/components/Headline/Headline.stories.svelte @@ -108,7 +108,7 @@ slot="crown" src="{crownImgSrc}" width="100" - class="mb-0" + class="mx-auto mb-0" alt="Illustration of Europe" /> diff --git a/src/components/Headline/Headline.svelte b/src/components/Headline/Headline.svelte index 5f7bf7f7..a966ec8d 100644 --- a/src/components/Headline/Headline.svelte +++ b/src/components/Headline/Headline.svelte @@ -73,72 +73,68 @@ } - -
- {#if $$slots.crown} -
- - +
+ +
+ {#if $$slots.crown} +
+ + +
+ {/if} +
+ {#if section} +

+ {section} +

+ {/if} + {#if $$slots.hed} + + + {:else} +

{@html marked.parseInline(hed)}

+ {/if} + {#if $$slots.dek} + +
+ +
+ {:else if dek} +
+ {@html marked(dek)} +
+ {/if}
- {/if} -
- {#if section} -

- {section} -

+ {#if $$slots.byline} + + + {:else if authors.length > 0 || publishTime} + {/if} - {#if $$slots.hed} - - - {:else} -

{@html marked.parseInline(hed)}

- {/if} - {#if $$slots.dek} - -
- -
- {:else if dek} -
- {@html marked(dek)} -
- {/if} -
- {#if $$slots.byline} - - - {:else if authors.length > 0 || publishTime} - - {/if} -
-
+
+
+
diff --git a/src/components/Headline/stories/docs/withCrownImage.md b/src/components/Headline/stories/docs/withCrownImage.md index e8becaaa..f705d9cb 100644 --- a/src/components/Headline/stories/docs/withCrownImage.md +++ b/src/components/Headline/stories/docs/withCrownImage.md @@ -12,7 +12,7 @@ Add a crown image in the `crown` named slot and override the headline in the `he slot="crown" src="{crownImgSrc}" width="100" - class="mb-0" + class="mx-auto mb-0" alt="Illustration of Europe" /> diff --git a/src/components/HeroHeadline/Hero.svelte b/src/components/HeroHeadline/Hero.svelte index bb2cffde..353c40b3 100644 --- a/src/components/HeroHeadline/Hero.svelte +++ b/src/components/HeroHeadline/Hero.svelte @@ -159,7 +159,7 @@
{#if notes} -