diff --git a/src/components/BeforeAfter/BeforeAfter.svelte b/src/components/BeforeAfter/BeforeAfter.svelte index 936ea92e..a4dec79e 100644 --- a/src/components/BeforeAfter/BeforeAfter.svelte +++ b/src/components/BeforeAfter/BeforeAfter.svelte @@ -3,6 +3,7 @@ import { onMount } from 'svelte'; import Block from '../Block/Block.svelte'; import type { ContainerWidth } from '../@types/global'; + import PaddingReset from '../PaddingReset/PaddingReset.svelte'; /** Width of the chart within the text well. */ export let width: ContainerWidth = 'normal'; // options: wide, wider, widest, fluid @@ -100,16 +101,16 @@ const move = (e) => { if (sliding && imgOffset) { const el = e.touches ? e.touches[0] : e; - const figureOffset = figure - ? parseInt(window.getComputedStyle(figure).marginLeft.slice(0, -2)) - : 0; + const figureOffset = figure ? + parseInt(window.getComputedStyle(figure).marginLeft.slice(0, -2)) : + 0; let x = el.pageX - figureOffset - imgOffset.left; x = - x < handleMargin - ? handleMargin - : x > w - handleMargin - ? w - handleMargin - : x; + x < handleMargin ? + handleMargin : + x > w - handleMargin ? + w - handleMargin : + x; offset = x / w; } }; @@ -220,10 +221,12 @@ {#if $$slots.caption} - + + + {/if} {/if} diff --git a/src/components/FeaturePhoto/FeaturePhoto.svelte b/src/components/FeaturePhoto/FeaturePhoto.svelte index b4bb51db..26cfa8be 100644 --- a/src/components/FeaturePhoto/FeaturePhoto.svelte +++ b/src/components/FeaturePhoto/FeaturePhoto.svelte @@ -2,6 +2,7 @@ import { onMount } from 'svelte'; import Block from '../Block/Block.svelte'; import type { ContainerWidth } from '../@types/global'; + import PaddingReset from '../PaddingReset/PaddingReset.svelte'; /** * Photo src @@ -72,7 +73,6 @@
{#if !lazy || (intersectable && intersecting)} {altText} @@ -80,7 +80,9 @@
{/if} {#if caption} -
{caption}
+ +
{caption}
+
{/if} {#if !altText}
altText
@@ -124,11 +126,5 @@ font-family: var(--theme-font-family-note, $font-family-display); color: var(--theme-colour-text-secondary, $tr-medium-grey); } - - &.fluid { - figcaption { - padding-left: 15px; - } - } } diff --git a/src/components/GraphicBlock/GraphicBlock.svelte b/src/components/GraphicBlock/GraphicBlock.svelte index fdf364fd..fdd60852 100644 --- a/src/components/GraphicBlock/GraphicBlock.svelte +++ b/src/components/GraphicBlock/GraphicBlock.svelte @@ -67,7 +67,7 @@ import AriaHidden from './AriaHidden.svelte'; import TextBlock from './TextBlock.svelte'; import Block from '../Block/Block.svelte'; - import PaddingReset from '../PaddingReset/index.svelte'; + import PaddingReset from '../PaddingReset/PaddingReset.svelte'; import { marked } from 'marked'; @@ -81,14 +81,14 @@ >
{#if $$slots.title} - + {:else if title} - +

{title}

{#if description} @@ -112,14 +112,14 @@
{/if} {#if $$slots.notes} - + {:else if notes} - +