diff --git a/bin/newComponent/template/YourComponent/YourComponent.svelte b/bin/newComponent/template/YourComponent/YourComponent.svelte index 25e68616..469e0f07 100644 --- a/bin/newComponent/template/YourComponent/YourComponent.svelte +++ b/bin/newComponent/template/YourComponent/YourComponent.svelte @@ -21,23 +21,23 @@ /** Width of the component within the text well. */ export let width: ContainerWidth = 'normal'; + + import Block from '../../Block/Block.svelte'; -
+

{altText}

-
+ \ No newline at end of file diff --git a/src/components/GraphicBlock/GraphicBlock.svelte b/src/components/GraphicBlock/GraphicBlock.svelte new file mode 100644 index 00000000..29c5bd88 --- /dev/null +++ b/src/components/GraphicBlock/GraphicBlock.svelte @@ -0,0 +1,111 @@ + + + +
+ {#if $$slots.title} + + + + + {:else if (title)} + +

{title}

+ {#if (description)} + {@html marked(description)} + {/if} +
+ {/if} + + + {#if $$slots.notes} + + + + + {:else if (notes)} + + + + {/if} +
+
+ + + diff --git a/src/components/GraphicBlock/GraphicBlockTextWrapper.svelte b/src/components/GraphicBlock/GraphicBlockTextWrapper.svelte new file mode 100644 index 00000000..56f27c23 --- /dev/null +++ b/src/components/GraphicBlock/GraphicBlockTextWrapper.svelte @@ -0,0 +1,15 @@ + + +{#if (width)} + + + +{:else} + +{/if} diff --git a/src/components/GraphicBlock/stories/docs/component.md b/src/components/GraphicBlock/stories/docs/component.md new file mode 100644 index 00000000..9e54af26 --- /dev/null +++ b/src/components/GraphicBlock/stories/docs/component.md @@ -0,0 +1,21 @@ +The `GraphicBlock` component is a more specific type of `Block` that handles text elements around your chart. + +Many other components use this one to wrap graphics with styled text. When you use it, you'll also wrap your chart elements or component with it like this: + +--- + +```svelte + + + + +
+ +``` diff --git a/src/components/GraphicBlock/stories/docs/customText.md b/src/components/GraphicBlock/stories/docs/customText.md new file mode 100644 index 00000000..e4ba1566 --- /dev/null +++ b/src/components/GraphicBlock/stories/docs/customText.md @@ -0,0 +1,11 @@ +You can override the markup used to generate the chart text elements by using the `title` and/or `notes` named slots like this: + +```svelte + +
My smaller title
+
+ +``` diff --git a/src/components/GraphicBlock/stories/placeholder.png b/src/components/GraphicBlock/stories/placeholder.png new file mode 100644 index 00000000..ca521649 Binary files /dev/null and b/src/components/GraphicBlock/stories/placeholder.png differ diff --git a/src/components/Headline/Headline.svelte b/src/components/Headline/Headline.svelte index 436a562c..43e6654b 100644 --- a/src/components/Headline/Headline.svelte +++ b/src/components/Headline/Headline.svelte @@ -15,48 +15,53 @@ * Section colour */ export let sectionColour: string = 'red'; + + import Block from '../Block/Block.svelte'; -
- - -
- {#if section} -

{section}

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

{hed}

- {/if} - {#if dek} -

{dek}

- {/if} -
- {#if ($$slots.byline || $$slots.dateline)} - - {/if} -
+ {#if dek} +

{dek}

+ {/if} +
+ {#if ($$slots.byline || $$slots.dateline)} + + {/if} + + diff --git a/src/components/SiteFooter/Referrals/index.svelte b/src/components/SiteFooter/Referrals/index.svelte index 5fba2dab..0330b001 100644 --- a/src/components/SiteFooter/Referrals/index.svelte +++ b/src/components/SiteFooter/Referrals/index.svelte @@ -37,6 +37,10 @@ color: var(--nav-primary, #666); a { color: var(--nav-primary, #666); + text-decoration: none; + &:hover { + text-decoration: underline; + } } } } diff --git a/src/components/SiteFooter/SiteFooter.stories.svelte b/src/components/SiteFooter/SiteFooter.stories.svelte index 1f07a653..9a704635 100644 --- a/src/components/SiteFooter/SiteFooter.stories.svelte +++ b/src/components/SiteFooter/SiteFooter.stories.svelte @@ -71,6 +71,7 @@ \ No newline at end of file diff --git a/src/components/SiteFooter/SiteFooter.svelte b/src/components/SiteFooter/SiteFooter.svelte index 6eeda362..d202bf2c 100644 --- a/src/components/SiteFooter/SiteFooter.svelte +++ b/src/components/SiteFooter/SiteFooter.svelte @@ -66,13 +66,22 @@
+ diff --git a/src/components/SiteHeader/NavBar/NavDropdown/SectionDropdown.svelte b/src/components/SiteHeader/NavBar/NavDropdown/SectionDropdown.svelte index 93e27611..9f80737b 100644 --- a/src/components/SiteHeader/NavBar/NavDropdown/SectionDropdown.svelte +++ b/src/components/SiteHeader/NavBar/NavDropdown/SectionDropdown.svelte @@ -49,7 +49,7 @@ a { text-decoration: none; &:hover { - color: inherit; + color: var(--nav-primary, $tr-dark-grey); text-decoration: underline !important; } } diff --git a/src/components/SiteHeader/SiteHeader.stories.svelte b/src/components/SiteHeader/SiteHeader.stories.svelte index fda89c3a..15474496 100644 --- a/src/components/SiteHeader/SiteHeader.stories.svelte +++ b/src/components/SiteHeader/SiteHeader.stories.svelte @@ -27,7 +27,7 @@ @@ -46,7 +46,7 @@