diff --git a/src/components/HeroHeadline/HeroHeadline.mdx b/src/components/HeroHeadline/HeroHeadline.mdx new file mode 100644 index 00000000..b5336d58 --- /dev/null +++ b/src/components/HeroHeadline/HeroHeadline.mdx @@ -0,0 +1,366 @@ +import { Meta, Canvas } from '@storybook/blocks'; + +import * as HeroHeadlineStories from './HeroHeadline.stories.svelte'; + + + +# HeroHeadline + +The `HeroHeadline` component creates a Reuters Graphics headline with a Hero media. + +```svelte + + + +``` + + + +## Transparent site header + +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; +} +``` + + + +## With background graphic + +Reuters Graphics headline with ai2svelte graphic as background. + +```svelte + + + +
+ + + +
+
+ + +``` + + + +## With background video + +Add a cover video and position the title with ease. + +```svelte + + + +
+
+
+ + +``` + + + +## With inline photo + +Reuters Graphics headline followed by a graphic or any media block. + +```svelte + + + +
+ +
+
+``` + + + +## With inline graphic + +Reuters Graphics headline followed by a graphic or any media block. + +```svelte + + + +
+ + + +
+
+``` + + + +## With inline video + +Add a cover video and position the title with ease. + +```svelte + + + +
+
+
+``` + + + +## Custom hed + +Add a custom styled headline. + +```svelte + + + +

+
A visual guide to
+
EUROVISION
+

+
+ + +``` + + diff --git a/src/components/HeroHeadline/Hero.stories.svelte b/src/components/HeroHeadline/HeroHeadline.stories..svelte similarity index 66% rename from src/components/HeroHeadline/Hero.stories.svelte rename to src/components/HeroHeadline/HeroHeadline.stories..svelte index 91b9e59a..ca03867f 100644 --- a/src/components/HeroHeadline/Hero.stories.svelte +++ b/src/components/HeroHeadline/HeroHeadline.stories..svelte @@ -1,31 +1,10 @@ - - - +{/snippet} + }} +> + {@render template({ + section: 'World News', + hed: 'Reuters Graphics Interactive', + dek: 'The beginning of a beautiful page', + authors: ['Simon Scarr', 'Vijdan Mohammad Kawoosa'], + publishTime: new Date('2022-03-04').toISOString(), + img: polarImgSrc, + })} + - + -``` diff --git a/src/components/HeroHeadline/stories/docs/backgroundVideo.md b/src/components/HeroHeadline/stories/docs/backgroundVideo.md deleted file mode 100644 index 49de9a18..00000000 --- a/src/components/HeroHeadline/stories/docs/backgroundVideo.md +++ /dev/null @@ -1,51 +0,0 @@ -Add a cover video and position the title with ease. - -```svelte - - - -
-
-
- - -``` diff --git a/src/components/HeroHeadline/stories/docs/component.md b/src/components/HeroHeadline/stories/docs/component.md deleted file mode 100644 index a70548c1..00000000 --- a/src/components/HeroHeadline/stories/docs/component.md +++ /dev/null @@ -1,20 +0,0 @@ -Reuters Graphics headline with a Hero media - -```svelte - - - -``` diff --git a/src/components/HeroHeadline/stories/docs/customHed.md b/src/components/HeroHeadline/stories/docs/customHed.md deleted file mode 100644 index 65ae17da..00000000 --- a/src/components/HeroHeadline/stories/docs/customHed.md +++ /dev/null @@ -1,43 +0,0 @@ -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 deleted file mode 100644 index fef464a0..00000000 --- a/src/components/HeroHeadline/stories/docs/inlineGraphic.md +++ /dev/null @@ -1,38 +0,0 @@ -Reuters Graphics headline followed by a graphic or any media block. - -```svelte - - - -
- - - -
-
-``` diff --git a/src/components/HeroHeadline/stories/docs/inlinePhoto.md b/src/components/HeroHeadline/stories/docs/inlinePhoto.md deleted file mode 100644 index 69f8df9e..00000000 --- a/src/components/HeroHeadline/stories/docs/inlinePhoto.md +++ /dev/null @@ -1,34 +0,0 @@ -Reuters Graphics headline followed by a graphic or any media block. - -```svelte - - - -
- -
-
-``` diff --git a/src/components/HeroHeadline/stories/docs/inlineVideo.md b/src/components/HeroHeadline/stories/docs/inlineVideo.md deleted file mode 100644 index dcf7c745..00000000 --- a/src/components/HeroHeadline/stories/docs/inlineVideo.md +++ /dev/null @@ -1,34 +0,0 @@ -Add a cover video and position the title with ease. - -```svelte - - - -
-
-
-``` diff --git a/src/components/HeroHeadline/stories/docs/transparentHeader.md b/src/components/HeroHeadline/stories/docs/transparentHeader.md deleted file mode 100644 index 55761f94..00000000 --- a/src/components/HeroHeadline/stories/docs/transparentHeader.md +++ /dev/null @@ -1,17 +0,0 @@ -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; -} -```