hr-design-system-handlebars 1.11.10 → 1.11.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.babelrc.json +14 -0
- package/.storybook/main.js +34 -52
- package/.storybook/preview-head.html +4 -1
- package/.storybook/preview.js +25 -35
- package/CHANGELOG.md +17 -0
- package/dist/assets/index.css +11 -3
- package/package.json +20 -13
- package/src/assets/css/custom-utilities.css +3 -3
- package/src/stories/BrandColors.data.js +42 -0
- package/src/stories/BrandColors.mdx +25 -0
- package/src/stories/{Colors.stories.mdx → Colors.data.js} +2 -18
- package/src/stories/Colors.mdx +19 -0
- package/src/stories/Example.mdx +56 -0
- package/src/stories/Example.stories.js +57 -0
- package/src/stories/{Fixtures.stories.mdx → Fixtures.mdx} +3 -5
- package/src/stories/{InstallAndUpdate.stories.mdx → InstallAndUpdate.mdx} +0 -2
- package/src/stories/Introduction.mdx +3 -0
- package/src/stories/{SvgOptimization.stories.mdx → SvgOptimization.mdx} +0 -2
- package/src/stories/{Typography.stories.mdx → Typography.mdx} +13 -14
- package/src/stories/{conventions-and-datastructure.stories.mdx → conventions-and-datastructure.mdx} +7 -9
- package/src/stories/views/components/Button.mdx +30 -0
- package/src/stories/views/components/Button_.stories.js +77 -0
- package/src/stories/views/components/event/calendar/{event_calendar_components.stories.mdx → event_calendar_components.mdx} +31 -87
- package/src/stories/views/components/event/calendar/event_calendar_components.stories.js +129 -0
- package/src/stories/views/components/geoTag/geoTag.mdx +32 -0
- package/src/stories/views/components/geoTag/geoTag.stories.js +35 -0
- package/src/stories/views/components/grid/grid.mdx +210 -0
- package/src/stories/views/components/grid/grid.stories.js +148 -0
- package/src/stories/views/components/label/label.mdx +54 -0
- package/src/stories/views/components/label/label.stories.js +183 -0
- package/src/stories/views/components/page/page.data.js +17 -0
- package/src/stories/views/components/page/page.mdx +110 -0
- package/src/stories/views/components/page/page.stories.js +50 -0
- package/src/stories/views/components/page/page_pagination.data.js +8 -0
- package/src/stories/views/components/page/page_pagination.mdx +8 -0
- package/src/stories/views/components/page/page_pagination.stories.js +34 -0
- package/src/stories/views/components/page/page_player.mdx +21 -0
- package/src/stories/views/components/page/page_player.stories.js +34 -0
- package/src/stories/views/components/site_header/{header.stories.mdx → header.mdx} +218 -152
- package/src/stories/views/components/site_header/header.stories.js +62 -0
- package/src/stories/views/components/teaser/cluster/teaser_cluster.mdx +32 -0
- package/src/stories/views/components/teaser/cluster/teaser_cluster.stories.js +146 -0
- package/src/stories/views/components/teaser/components/teaser_byline.mdx +97 -0
- package/src/stories/views/components/teaser/components/teaser_byline.stories.js +30 -0
- package/src/stories/views/components/teaser/components/teaser_heading.mdx +96 -0
- package/src/stories/views/components/teaser/components/teaser_heading.stories.js +158 -0
- package/src/stories/views/components/teaser/components/teaser_text.mdx +36 -0
- package/src/stories/views/components/teaser/components/teaser_text.stories.js +74 -0
- package/src/stories/views/components/teaser/components/teaser_title.mdx +42 -0
- package/src/stories/views/components/teaser/components/teaser_title.stories.js +85 -0
- package/src/stories/views/components/teaser/components/teaser_topline.mdx +29 -0
- package/src/stories/views/components/teaser/components/teaser_topline.stories.js +27 -0
- package/src/stories/views/components/teaser/content_nav/teaser_content_nav.mdx +54 -0
- package/src/stories/views/components/teaser/content_nav/{teaser_content_nav.stories.mdx → teaser_content_nav.stories.js} +80 -61
- package/src/stories/views/components/teaser/group_teaser/group.mdx +18 -0
- package/src/stories/views/components/teaser/group_teaser/group.stories.js +85 -0
- package/src/stories/views/components/teaser/podcast/podcast.mdx +11 -0
- package/src/stories/views/components/teaser/podcast/{podcast.stories.mdx → podcast.stories.js} +50 -39
- package/src/stories/views/components/teaser/podcast/podcast_subscribe_button.mdx +10 -0
- package/src/stories/views/components/teaser/podcast/podcast_subscribe_button.stories.js +51 -0
- package/src/stories/views/components/teaser/tabbox/teaser_tabbox.mdx +10 -0
- package/src/stories/views/components/teaser/tabbox/teaser_tabbox.stories.js +40 -0
- package/src/stories/views/components/teaser/teaser_alternativ.mdx +76 -0
- package/src/stories/views/components/teaser/teaser_alternativ.stories.js +126 -0
- package/src/stories/views/components/teaser/teaser_alternativ_av.mdx +75 -0
- package/src/stories/views/components/teaser/teaser_alternativ_av.stories.js +111 -0
- package/src/stories/views/components/teaser/teaser_event_calendar.mdx +57 -0
- package/src/stories/views/components/teaser/teaser_event_calendar.stories.js +92 -0
- package/src/stories/views/components/teaser/teaser_indextext.mdx +35 -0
- package/src/stories/views/components/teaser/teaser_indextext.stories.js +85 -0
- package/src/stories/views/components/teaser/teaser_logic/teaser_logic.mdx +23 -0
- package/src/stories/views/components/teaser/teaser_logic/teaser_logic.stories.js +36 -0
- package/src/stories/views/components/teaser/teaser_poster.mdx +95 -0
- package/src/stories/views/components/teaser/teaser_poster.stories.js +67 -0
- package/src/stories/views/components/teaser/teaser_stage.mdx +15 -0
- package/src/stories/views/components/teaser/teaser_stage.stories.js +60 -0
- package/src/stories/views/components/teaser/teaser_standard.mdx +129 -0
- package/src/stories/views/components/teaser/teaser_standard.stories.js +166 -0
- package/src/stories/views/components/teaser/teaser_standard_av.mdx +38 -0
- package/src/stories/views/components/teaser/teaser_standard_av.stories.js +117 -0
- package/src/stories/views/components/teaser/teaser_standard_event.mdx +103 -0
- package/src/stories/views/components/teaser/teaser_standard_event.stories.js +119 -0
- package/src/stories/views/components/teaser/ticker/teaser_ticker.mdx +10 -0
- package/src/stories/views/components/teaser/ticker/{teaser_ticker.stories.mdx → teaser_ticker.stories.js} +25 -24
- package/.storybook/withThemeDecorator.js +0 -12
- package/src/stories/BrandColors.stories.mdx +0 -39
- package/src/stories/Example.stories.mdx +0 -93
- package/src/stories/Introduction.stories.mdx +0 -211
- package/src/stories/views/components/Button.stories.mdx +0 -82
- package/src/stories/views/components/geoTag/geoTag.stories.mdx +0 -61
- package/src/stories/views/components/grid/grid.stories.mdx +0 -275
- package/src/stories/views/components/label/label.stories.mdx +0 -200
- package/src/stories/views/components/page/page.stories.mdx +0 -144
- package/src/stories/views/components/page/page_pagination.stories.mdx +0 -36
- package/src/stories/views/components/page/page_player.stories.mdx +0 -43
- package/src/stories/views/components/teaser/cluster/teaser_cluster.stories.mdx +0 -97
- package/src/stories/views/components/teaser/components/teaser_byline.stories.mdx +0 -78
- package/src/stories/views/components/teaser/components/teaser_heading.stories.mdx +0 -219
- package/src/stories/views/components/teaser/components/teaser_text.stories.mdx +0 -94
- package/src/stories/views/components/teaser/components/teaser_title.stories.mdx +0 -124
- package/src/stories/views/components/teaser/components/teaser_topline.stories.mdx +0 -63
- package/src/stories/views/components/teaser/group_teaser/group.stories.mdx +0 -85
- package/src/stories/views/components/teaser/podcast/podcast_subscribe_button.stories.mdx +0 -52
- package/src/stories/views/components/teaser/tabbox/teaser_tabbox.stories.mdx +0 -39
- package/src/stories/views/components/teaser/teaser_alternativ.stories.mdx +0 -163
- package/src/stories/views/components/teaser/teaser_alternativ_av.stories.mdx +0 -142
- package/src/stories/views/components/teaser/teaser_event_calendar.stories.mdx +0 -131
- package/src/stories/views/components/teaser/teaser_indextext.stories.mdx +0 -111
- package/src/stories/views/components/teaser/teaser_logic/teaser_logic.stories.mdx +0 -39
- package/src/stories/views/components/teaser/teaser_poster.stories.mdx +0 -130
- package/src/stories/views/components/teaser/teaser_stage.stories.mdx +0 -53
- package/src/stories/views/components/teaser/teaser_standard.stories.mdx +0 -170
- package/src/stories/views/components/teaser/teaser_standard_av.stories.mdx +0 -95
- package/src/stories/views/components/teaser/teaser_standard_event.stories.mdx +0 -150
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { ArgsTable, Meta, Story, Canvas, Preview } from '@storybook/blocks'
|
|
2
|
+
import * as PageStories from './page.stories'
|
|
3
|
+
|
|
4
|
+
<Meta of={PageStories} />
|
|
5
|
+
|
|
6
|
+
# Page (allgemein)
|
|
7
|
+
|
|
8
|
+
Das Grundgerüst für das HTML-Markup einer Seite (in diesem Fall eine Index-Seite bzw. Übersichtsseite).
|
|
9
|
+
Stand 2023: Inhaltsseiten werden derzeit noch nicht berücksichtigt.
|
|
10
|
+
Für gemischte Inhalte siehe `Player-Interaktion`
|
|
11
|
+
|
|
12
|
+
# Grundaufbau
|
|
13
|
+
|
|
14
|
+
Um eine Seite zu erzeugen ist ein initiales HTML-Markup notwendig. Der Kopf `<head>` ist dabei statisch,
|
|
15
|
+
Inhalte werden im `<body>`-Tag abgelegt. Der Kopf entspricht einem klassischen HTML-Kopf mit Titel und Metadaten-Angaben.
|
|
16
|
+
|
|
17
|
+
## Markup im Kopf
|
|
18
|
+
|
|
19
|
+
```html
|
|
20
|
+
<!DOCTYPE html>
|
|
21
|
+
<html
|
|
22
|
+
class="no-js no-js-burgerMenu preload noMicroInteraction"
|
|
23
|
+
data-theme="hessenschau"
|
|
24
|
+
lang="de"
|
|
25
|
+
>
|
|
26
|
+
<head>
|
|
27
|
+
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
|
28
|
+
<meta http-equiv="X-UA-Compatible" content="IE=Edge"/>
|
|
29
|
+
<title>hessenschau.de | Nachrichten aus Hessen</title>
|
|
30
|
+
<meta name="application-name" content="hessenschau.de" />
|
|
31
|
+
<meta name="copyright" content="Hessischer Rundfunk, Frankfurt, Germany" />
|
|
32
|
+
<meta name="author" content="hessenschau.de, Frankfurt, Germany" />
|
|
33
|
+
<meta name="publisher" content="hessenschau.de" />
|
|
34
|
+
<meta name="language" content="Deutsch" />
|
|
35
|
+
</head>
|
|
36
|
+
|
|
37
|
+
<body itemscope itemtype="http://schema.org/WebPage">
|
|
38
|
+
<div class="js-pageSwap">
|
|
39
|
+
|
|
40
|
+
MARKUP FÜR INHALTE ...
|
|
41
|
+
|
|
42
|
+
<div>
|
|
43
|
+
</body>
|
|
44
|
+
</html>
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## Markup für Inhalte
|
|
48
|
+
|
|
49
|
+
Initial wird die Seitennavigation - das Menü - der Seite eingefügt. Wahlweise Abwandlungen der Seitennavigation
|
|
50
|
+
(mit Subnavigation oder Unwetterwarnung), die über unterschiedlichen Daten-JSONS ausgeformt werden. Die Daten-JSONS hierfür liegen
|
|
51
|
+
unter `components/site_header/fixtures` und die Komponente selber:
|
|
52
|
+
|
|
53
|
+
```html
|
|
54
|
+
{{> components/site_header/header }}
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
Dann folgen die Inhalte in diesem Fall Teaser, die über das Grid-Layout angeordnet werden. Die Komponenten für die Teaser
|
|
58
|
+
liegen unter `components/teaser/` und lauten auf `teaser_` und dessen Ausprägung:
|
|
59
|
+
|
|
60
|
+
<ul>
|
|
61
|
+
<li>standard (Standard => Bild oben, Text darunter)</li>
|
|
62
|
+
<li>alternativ (Alternativ => Bild links, Text rechts)</li>
|
|
63
|
+
<li>event\_calendar (Event-Kalender)</li>
|
|
64
|
+
<li>poster (Poster => Text auf Bild)</li>
|
|
65
|
+
<li>indextext (Nur Text)</li>
|
|
66
|
+
<li>stage (Stage => Sonderform über die ganze Seite)</li>
|
|
67
|
+
</ul>
|
|
68
|
+
|
|
69
|
+
Auch hier bestimmen die Daten-JSONS, das Bild und den Text. Die Daten-JSONS hierfür liegen
|
|
70
|
+
unter `components/teaser/fixtures` der Aufruf der Komponente selber:
|
|
71
|
+
|
|
72
|
+
```html
|
|
73
|
+
{{> components/teaser/teaser_standard }}
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
Gekapselt wird die Teaser-Komponente in einer `<section>`. Es können beliebig viele Sections mit entsprechenden Teaser-Komponenten
|
|
77
|
+
in das folgende Markup angelegt werden:
|
|
78
|
+
|
|
79
|
+
```html
|
|
80
|
+
<main onclick="void(0)" role="main" id="content" class="flex items-center justify-center">
|
|
81
|
+
<div class="grid grid-page">
|
|
82
|
+
<div class="{{> components/grid/grid_group_wrapper_classes }}">
|
|
83
|
+
|
|
84
|
+
<section class="grid items-start content-start grid-cols-12 col-span-12 bg-white gap-x-6 gap-y-6 ">
|
|
85
|
+
{{> components/teaser/teaser_standard }}
|
|
86
|
+
</section>
|
|
87
|
+
WEITERE TEASER...
|
|
88
|
+
</div>
|
|
89
|
+
</div>
|
|
90
|
+
</main>
|
|
91
|
+
|
|
92
|
+
</div>
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
Die Ausformung der Teaser basiert immer auf dem selben Daten-JSON, d.h. Bild und Texte sind immer identisch, lediglich die Größe und der
|
|
96
|
+
Teaser-Typ variieren.
|
|
97
|
+
|
|
98
|
+
<Canvas withToolbar>
|
|
99
|
+
<Story of={PageStories.Default} />
|
|
100
|
+
</Canvas>
|
|
101
|
+
|
|
102
|
+
<Canvas>
|
|
103
|
+
<Story of={PageStories.MitWarnung} />
|
|
104
|
+
</Canvas>
|
|
105
|
+
|
|
106
|
+
<Canvas>
|
|
107
|
+
<Story of={PageStories.MitSubnavigation} />
|
|
108
|
+
</Canvas>
|
|
109
|
+
|
|
110
|
+
<ArgsTable story="Default" />
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import page from './page.hbs'
|
|
2
|
+
import {
|
|
3
|
+
NavigationDataWithTeaser,
|
|
4
|
+
NavigationDataWithTeaser2,
|
|
5
|
+
NavigationDataWithTeaser3,
|
|
6
|
+
} from './page.data.js'
|
|
7
|
+
|
|
8
|
+
const Template = (args, { globals: { customConditionalToolbar } }) => {
|
|
9
|
+
// You can either use a function to create DOM elements or use a plain html string!
|
|
10
|
+
// return `<div>${label}</div>`;
|
|
11
|
+
let brand =
|
|
12
|
+
undefined !== customConditionalToolbar ? customConditionalToolbar['brands'] : 'hessenschau'
|
|
13
|
+
return page({ brand, ...args })
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export default {
|
|
17
|
+
title: 'Komponenten/Page/Page',
|
|
18
|
+
argTypes: {},
|
|
19
|
+
|
|
20
|
+
parameters: {
|
|
21
|
+
chromatic: {
|
|
22
|
+
viewports: [360, 768, 1024],
|
|
23
|
+
},
|
|
24
|
+
|
|
25
|
+
layout: 'fullscreen',
|
|
26
|
+
|
|
27
|
+
docs: {
|
|
28
|
+
inlineStories: false,
|
|
29
|
+
iframeHeight: 400,
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export const Default = {
|
|
35
|
+
render: Template.bind({}),
|
|
36
|
+
name: 'Default',
|
|
37
|
+
args: NavigationDataWithTeaser,
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export const MitWarnung = {
|
|
41
|
+
render: Template.bind({}),
|
|
42
|
+
name: 'Mit Warnung',
|
|
43
|
+
args: NavigationDataWithTeaser2,
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export const MitSubnavigation = {
|
|
47
|
+
render: Template.bind({}),
|
|
48
|
+
name: 'Mit Subnavigation',
|
|
49
|
+
args: NavigationDataWithTeaser3,
|
|
50
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import structuredClone from 'core-js-pure/actual/structured-clone'
|
|
2
|
+
import navigationData from '../site_header/fixtures/site_header_default.json'
|
|
3
|
+
import mixedContent from '../page/fixtures/page_pagination.json'
|
|
4
|
+
const NavigationDataWithMixedContent = structuredClone(
|
|
5
|
+
Object.assign({}, navigationData, mixedContent)
|
|
6
|
+
)
|
|
7
|
+
|
|
8
|
+
export { NavigationDataWithMixedContent }
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ArgsTable, Meta, Story, Canvas, Preview } from '@storybook/blocks'
|
|
2
|
+
import * as PagePaginationStories from './page_pagination.stories'
|
|
3
|
+
|
|
4
|
+
<Meta of={PagePaginationStories} />
|
|
5
|
+
|
|
6
|
+
<Canvas withToolbar>
|
|
7
|
+
<Story of={PagePaginationStories.MitPagination} />
|
|
8
|
+
</Canvas>
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { NavigationDataWithMixedContent } from './page_pagination.data.js'
|
|
2
|
+
import page from './page_pagination.hbs'
|
|
3
|
+
|
|
4
|
+
const Template = (args, { globals: { customConditionalToolbar } }) => {
|
|
5
|
+
// You can either use a function to create DOM elements or use a plain html string!
|
|
6
|
+
// return `<div>${label}</div>`;
|
|
7
|
+
let brand =
|
|
8
|
+
undefined !== customConditionalToolbar ? customConditionalToolbar['brands'] : 'hessenschau'
|
|
9
|
+
return page({ brand, ...args })
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export default {
|
|
13
|
+
title: 'Komponenten/Page/Pagination',
|
|
14
|
+
argTypes: {},
|
|
15
|
+
|
|
16
|
+
parameters: {
|
|
17
|
+
chromatic: {
|
|
18
|
+
viewports: [360, 768, 1024],
|
|
19
|
+
},
|
|
20
|
+
|
|
21
|
+
layout: 'fullscreen',
|
|
22
|
+
|
|
23
|
+
docs: {
|
|
24
|
+
inlineStories: false,
|
|
25
|
+
iframeHeight: 400,
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export const MitPagination = {
|
|
31
|
+
render: Template.bind({}),
|
|
32
|
+
name: 'Mit Pagination',
|
|
33
|
+
args: NavigationDataWithMixedContent,
|
|
34
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ArgsTable, Meta, Story, Canvas, Preview } from '@storybook/blocks'
|
|
2
|
+
import * as PagePlayerStories from './page_player.stories'
|
|
3
|
+
|
|
4
|
+
<Meta of={PagePlayerStories} />
|
|
5
|
+
|
|
6
|
+
# Page (gemischte Inhalte)
|
|
7
|
+
|
|
8
|
+
Hier werden nur gemischte Inhalte betrachtet. Hierfür werden Daten-JSONS unterschiedlicher
|
|
9
|
+
Ausprägung (Audio, Podcast) gemischt und herangezogen. Um einer Komponente diese spezifische Inhalte zu übergeben
|
|
10
|
+
wird sie wie folgt aufgerufen:
|
|
11
|
+
|
|
12
|
+
```html
|
|
13
|
+
{{> components/teaser/teaser_standard this.teaser_standard_50_audio.logicItem.includeModel}} {{>
|
|
14
|
+
components/teaser/podcast/podcast this.teaser_podcast_50.logicItem.includeModel}}
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
<Canvas>
|
|
18
|
+
<Story of={PagePlayerStories.PlayerInteraktion} />
|
|
19
|
+
</Canvas>
|
|
20
|
+
|
|
21
|
+
<ArgsTable story="Default" />
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import page from './page_players.hbs'
|
|
2
|
+
import AudioDataMixed from '../page/fixtures/page.json'
|
|
3
|
+
|
|
4
|
+
const Template = (args, { globals: { customConditionalToolbar } }) => {
|
|
5
|
+
// You can either use a function to create DOM elements or use a plain html string!
|
|
6
|
+
// return `<div>${label}</div>`;
|
|
7
|
+
let brand =
|
|
8
|
+
undefined !== customConditionalToolbar ? customConditionalToolbar['brands'] : 'hessenschau'
|
|
9
|
+
return page({ brand, ...args })
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export default {
|
|
13
|
+
title: 'Komponenten/Page/Page mit Player',
|
|
14
|
+
argTypes: {},
|
|
15
|
+
|
|
16
|
+
parameters: {
|
|
17
|
+
chromatic: {
|
|
18
|
+
viewports: [360, 768, 1024],
|
|
19
|
+
},
|
|
20
|
+
|
|
21
|
+
layout: 'fullscreen',
|
|
22
|
+
|
|
23
|
+
docs: {
|
|
24
|
+
inlineStories: false,
|
|
25
|
+
iframeHeight: 400,
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export const PlayerInteraktion = {
|
|
31
|
+
render: Template.bind({}),
|
|
32
|
+
name: 'Player-Interaktion',
|
|
33
|
+
args: AudioDataMixed,
|
|
34
|
+
}
|