diff --git a/src/components/Headline/Headline.stories.svelte b/src/components/Headline/Headline.stories.svelte index 26e2ff89..5034fc44 100644 --- a/src/components/Headline/Headline.stories.svelte +++ b/src/components/Headline/Headline.stories.svelte @@ -77,7 +77,7 @@ - +

The secret to “The Nutcracker's” diff --git a/src/components/Headline/Headline.svelte b/src/components/Headline/Headline.svelte index 228778cf..f86adbfb 100644 --- a/src/components/Headline/Headline.svelte +++ b/src/components/Headline/Headline.svelte @@ -74,7 +74,7 @@ -
+
{#if $$slots.crown}
diff --git a/src/components/Headline/stories/docs/customHed.md b/src/components/Headline/stories/docs/customHed.md index 415e51a6..25228bd3 100644 --- a/src/components/Headline/stories/docs/customHed.md +++ b/src/components/Headline/stories/docs/customHed.md @@ -5,7 +5,7 @@ Use the `hed` and/or `dek` named slots to override those elements with completel import { Headline } from '@reuters-graphics/graphics-components'; - +

The secret to “The Nutcracker's” diff --git a/src/components/HeroHeadline/Hero.stories.svelte b/src/components/HeroHeadline/Hero.stories.svelte index 9031a9d7..93d4427b 100644 --- a/src/components/HeroHeadline/Hero.stories.svelte +++ b/src/components/HeroHeadline/Hero.stories.svelte @@ -7,10 +7,20 @@ import backgroundGraphicDocs from './stories/docs/backgroundGraphic.md?raw'; // @ts-ignore import inlineGraphicDocs from './stories/docs/inlineGraphic.md?raw'; + // @ts-ignore + import transparentHeaderDocs from './stories/docs/transparentHeader.md?raw'; + // @ts-ignore + import videoDocs from './stories/docs/backgroundVideo.md?raw'; + // @ts-ignore + import customHedDocs from './stories/docs/customHed.md?raw'; // @ts-ignore import polarImgSrc from './stories/polar.jpg'; + // @ts-ignore + import eurovisImgSrc from './stories/eurovis.jpeg'; + import Block from '../Block/Block.svelte'; + import SiteHeader from '../SiteHeader/SiteHeader.svelte'; import HeroHeadline from './Hero.svelte'; import GraphicBlock from '../GraphicBlock/GraphicBlock.svelte'; @@ -34,6 +44,10 @@ control: 'select', options: ['normal', 'wide', 'wider', 'widest'], }, + hedAlign: { + control: 'select', + options: ['left', 'center', 'right'], + }, width: { control: 'select', options: ['normal', 'wide', 'wider', 'widest'], @@ -49,6 +63,10 @@ /> @@ -64,12 +82,33 @@ }}" /> + +
+ + + + + +
+
+ + + + + + + + + + + + + +
+ + + + +
+
+
+ + + + + + + +

+
A visual guide to
+
EUROVISION
+

+
+ + +
+ + diff --git a/src/components/HeroHeadline/Hero.svelte b/src/components/HeroHeadline/Hero.svelte index f73b5111..bb2cffde 100644 --- a/src/components/HeroHeadline/Hero.svelte +++ b/src/components/HeroHeadline/Hero.svelte @@ -108,119 +108,159 @@ } -
- - {#if $$slots.background || img} - - -
- {#if $$slots.background} - - - {:else} - +
+ + {#if $$slots.background || img} + + {#if $$slots.hed} + -
- + +
+ +
+
+ {:else} + {/if} -
- - {#if notes} - - - +
+ {#if $$slots.background} + + + {:else} + +
+
+ {/if} +
+ + {#if notes} + + + + {/if} {/if} - {/if} - - {#if $$slots.inline} - - -
- - -
-
- {/if} + + {#if $$slots.inline} + + {#if $$slots.hed} + + +
+ +
+
+ {:else} + + {/if} +
+ + +
+
+ {/if} +
-{#if $$slots.byline} - - -{:else if authors.length > 0 || publishTime} - -{/if} + ``` diff --git a/src/components/HeroHeadline/stories/docs/backgroundVideo.md b/src/components/HeroHeadline/stories/docs/backgroundVideo.md new file mode 100644 index 00000000..767c25a0 --- /dev/null +++ b/src/components/HeroHeadline/stories/docs/backgroundVideo.md @@ -0,0 +1,58 @@ +Add a cover video and position the title with ease. + +```svelte + + + +
+ + + + +
+
+ + +``` diff --git a/src/components/HeroHeadline/stories/docs/customHed.md b/src/components/HeroHeadline/stories/docs/customHed.md new file mode 100644 index 00000000..1118bfc7 --- /dev/null +++ b/src/components/HeroHeadline/stories/docs/customHed.md @@ -0,0 +1,40 @@ +Add a custom styled headline. + +```svelte + + + +

+
A visual guide to
+
EUROVISION
+

+
+ + +``` diff --git a/src/components/HeroHeadline/stories/docs/inlineGraphic.md b/src/components/HeroHeadline/stories/docs/inlineGraphic.md index c3b0b182..c4b395ce 100644 --- a/src/components/HeroHeadline/stories/docs/inlineGraphic.md +++ b/src/components/HeroHeadline/stories/docs/inlineGraphic.md @@ -2,7 +2,7 @@ Reuters Graphics headline followed by a graphic or any media block. ```svelte diff --git a/src/components/HeroHeadline/stories/docs/transparentHeader.md b/src/components/HeroHeadline/stories/docs/transparentHeader.md new file mode 100644 index 00000000..55761f94 --- /dev/null +++ b/src/components/HeroHeadline/stories/docs/transparentHeader.md @@ -0,0 +1,17 @@ +Make the hero full bleed and under the header. + +```scss +// global.scss + +.nav-container { + background-color: transparent !important; +} +.nav-container .inner { + background-color: transparent !important; + border: none; +} + +.hero-wrapper { + margin-top: -64px; +} +``` diff --git a/src/components/HeroHeadline/stories/eurovis.jpeg b/src/components/HeroHeadline/stories/eurovis.jpeg new file mode 100644 index 00000000..ad298a80 Binary files /dev/null and b/src/components/HeroHeadline/stories/eurovis.jpeg differ