hr-design-system-handlebars 1.1.4 → 1.1.6
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/CHANGELOG.md +24 -0
- package/dist/assets/index.css +93 -34
- package/dist/assets/js/components/event/filtererDs.feature.js +42 -38
- package/dist/views/components/event/calendar/event_calendar_event_teaser.hbs +2 -2
- package/dist/views/components/grid/grid_group_highlight.hbs +1 -1
- package/dist/views/components/grid/grid_group_tabbed.hbs +1 -1
- package/dist/views/components/grid/grid_group_wrapper_classes.hbs +1 -1
- package/dist/views/components/teaser/teaser_stage.hbs +1 -1
- package/dist/views/components/teaser/teaser_standard.hbs +2 -2
- package/package.json +1 -1
- package/src/assets/css/custom-utilities.css +46 -33
- package/src/stories/views/components/event/calendar/event_calendar_components.stories.mdx +1 -1
- package/src/stories/views/components/event/calendar/event_calendar_event_teaser.hbs +2 -2
- package/src/stories/views/components/event/filtererDs.feature.js +42 -38
- package/src/stories/views/components/grid/grid_group_highlight.hbs +1 -1
- package/src/stories/views/components/grid/grid_group_tabbed.hbs +1 -1
- package/src/stories/views/components/grid/grid_group_wrapper_classes.hbs +1 -1
- package/src/stories/views/components/teaser/cluster/teaser_cluster.stories.mdx +10 -12
- package/src/stories/views/components/teaser/content_nav/teaser_content_nav.stories.mdx +4 -5
- package/src/stories/views/components/teaser/group_teaser/group.stories.mdx +51 -59
- package/src/stories/views/components/teaser/podcast/podcast.stories.mdx +26 -28
- package/src/stories/views/components/teaser/teaser_alternativ.stories.mdx +15 -6
- package/src/stories/views/components/teaser/teaser_alternativ_av.stories.mdx +1 -1
- package/src/stories/views/components/teaser/teaser_event_calendar.stories.mdx +1 -1
- package/src/stories/views/components/teaser/teaser_indextext.stories.mdx +26 -14
- package/src/stories/views/components/teaser/teaser_logic/teaser_logic.stories.mdx +17 -17
- package/src/stories/views/components/teaser/teaser_poster.stories.mdx +38 -19
- package/src/stories/views/components/teaser/teaser_stage.hbs +1 -1
- package/src/stories/views/components/teaser/teaser_standard.hbs +2 -2
- package/src/stories/views/components/teaser/teaser_standard.stories.mdx +40 -26
- package/src/stories/views/components/teaser/teaser_standard_av.stories.mdx +3 -3
- package/src/stories/views/components/teaser/teaser_standard_event.stories.mdx +3 -3
- package/tailwind.config.js +1 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<article id="{{this.startDate.htmlDate}}" class="
|
|
1
|
+
<article id="{{this.startDate.htmlDate}}" class="col-span-12 md:flex-row gap-y-3 gap-x-4 md:px-0 js-fr-target{{#unless @first}} border-t border-event-calendar-secondary{{/unless}}{{#unless _showTeaser}} hidden{{/unless}}" x-data="{ avStart: false }">
|
|
2
2
|
<div class="border-none h-full">
|
|
3
3
|
<div class="relative">
|
|
4
4
|
<div class="flex flex-col items-stretch sm:flex-row">
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
<div class="flex flex-col items-start basis-10/12 w-10/12">
|
|
14
14
|
<div class="absolute top-0 left-0 w-full sm:static">
|
|
15
15
|
<div class="ar-4-3 sm:ar-auto">
|
|
16
|
-
<header class="absolute bottom-0 left-0 p-4 sm:pt-3 sm:pb-2 bg-white opacity-80 sm:static sm:bg-transparent">
|
|
16
|
+
<header class="absolute bottom-0 left-0 p-4 w-full sm:pt-3 sm:pb-2 bg-white opacity-80 sm:static sm:bg-transparent">
|
|
17
17
|
{{#decorator 'components/base/link' _css="ds-teaser-focus hover:text-toplineColor" }}
|
|
18
18
|
{{#> components/teaser/components/teaser_header}}
|
|
19
19
|
{{#with this.label}}
|
|
@@ -6,19 +6,23 @@ require('zepto-modules/callbacks')
|
|
|
6
6
|
require('zepto-modules/deferred')
|
|
7
7
|
|
|
8
8
|
const Filterer = (context) => {
|
|
9
|
-
const { options } = context
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
9
|
+
const { options } = context,
|
|
10
|
+
{ element: rootElement } = context,
|
|
11
|
+
pushToBrowserHistory = options.pushToBrowserHistory || false,
|
|
12
|
+
loadingCssTrigger = options.loadingCssTrigger || 'is-loading',
|
|
13
|
+
hiddenElementCssTrigger = options.hiddenElementCssTrigger || 'hidden',
|
|
14
|
+
navItemSelectedCssTrigger = options.navItemSelectedCssTrigger || 'selected',
|
|
15
|
+
contentTargetClass = '.js-fr-content',
|
|
16
|
+
errorTargetClass = 'js-fr-error-target',
|
|
17
|
+
errorClass = 'js-fr-error',
|
|
18
|
+
reloadTriggerClass = 'js-fr-reload-trigger',
|
|
19
|
+
targetClass = 'js-fr-target',
|
|
20
|
+
triggerClass = 'js-fr-trigger',
|
|
21
|
+
triggerDomNodes = hr$(`.${triggerClass}`, rootElement),
|
|
22
|
+
errorTargetDomNodes = hr$(`.${errorTargetClass}`, rootElement),
|
|
23
|
+
errorDomNodes = hr$(`.${errorClass}`),
|
|
24
|
+
contentTargetDomNode = hr$(contentTargetClass, rootElement)[0]
|
|
18
25
|
let targetDomNodes = hr$(`.${targetClass}`, rootElement)
|
|
19
|
-
const errorTargetDomNodes = hr$(`.${errorTargetClass}`, rootElement)
|
|
20
|
-
const errorDomNodes = hr$(`.${errorClass}`)
|
|
21
|
-
const contentTargetDomNode = hr$(contentTargetClass, rootElement)[0]
|
|
22
26
|
|
|
23
27
|
const init = function () {
|
|
24
28
|
for (let i = 0; i < triggerDomNodes.length; i++) {
|
|
@@ -40,13 +44,13 @@ const Filterer = (context) => {
|
|
|
40
44
|
}
|
|
41
45
|
}
|
|
42
46
|
|
|
43
|
-
if (
|
|
44
|
-
!rootElement.classList.contains('-excerpt') &&
|
|
45
|
-
!!(window.history && window.history.pushState)
|
|
46
|
-
) {
|
|
47
|
+
if (pushToBrowserHistory && !!(window.history && window.history.pushState)) {
|
|
47
48
|
listen('popstate', handlePopstate, window)
|
|
48
49
|
//initial state ersetzen so dass es ein rückkehrpunkt gibt
|
|
49
|
-
const selectedTrigger = hr$(
|
|
50
|
+
const selectedTrigger = hr$(
|
|
51
|
+
`.${triggerClass}.${navItemSelectedCssTrigger}`,
|
|
52
|
+
rootElement
|
|
53
|
+
)
|
|
50
54
|
history.replaceState(
|
|
51
55
|
{
|
|
52
56
|
sel: triggerClass,
|
|
@@ -66,7 +70,7 @@ const Filterer = (context) => {
|
|
|
66
70
|
clearSelected()
|
|
67
71
|
|
|
68
72
|
if (!forceReset) {
|
|
69
|
-
e.currentTarget.classList.add(
|
|
73
|
+
e.currentTarget.classList.add(navItemSelectedCssTrigger)
|
|
70
74
|
}
|
|
71
75
|
|
|
72
76
|
//hacky weil e beim start auch kein Event sein kann
|
|
@@ -76,10 +80,10 @@ const Filterer = (context) => {
|
|
|
76
80
|
}
|
|
77
81
|
|
|
78
82
|
const clearSelected = function () {
|
|
79
|
-
let triggerDomNodes = hr$(`.${triggerClass}
|
|
83
|
+
let triggerDomNodes = hr$(`.${triggerClass}.${navItemSelectedCssTrigger}`, rootElement)
|
|
80
84
|
|
|
81
85
|
triggerDomNodes.forEach(function (triggerDomNode) {
|
|
82
|
-
triggerDomNode.classList.remove(
|
|
86
|
+
triggerDomNode.classList.remove(navItemSelectedCssTrigger)
|
|
83
87
|
})
|
|
84
88
|
}
|
|
85
89
|
|
|
@@ -108,10 +112,10 @@ const Filterer = (context) => {
|
|
|
108
112
|
loadContent(currentTarget)
|
|
109
113
|
} else {
|
|
110
114
|
stratHideOthersById(targetDomNodes, data.crit, reset)
|
|
111
|
-
if (push &&
|
|
115
|
+
if (push && pushToBrowserHistory) {
|
|
112
116
|
history.pushState(
|
|
113
117
|
{
|
|
114
|
-
sel:
|
|
118
|
+
sel: `.${currentTarget}.${navItemSelectedCssTrigger}`,
|
|
115
119
|
crit: data.crit,
|
|
116
120
|
},
|
|
117
121
|
null,
|
|
@@ -127,10 +131,10 @@ const Filterer = (context) => {
|
|
|
127
131
|
loadContent(currentTarget)
|
|
128
132
|
} else {
|
|
129
133
|
stratHideOthersStartsWithId(targetDomNodes, data.crit, reset)
|
|
130
|
-
if (push &&
|
|
134
|
+
if (push && pushToBrowserHistory) {
|
|
131
135
|
history.pushState(
|
|
132
136
|
{
|
|
133
|
-
sel:
|
|
137
|
+
sel: `.${currentTarget}.${navItemSelectedCssTrigger}`,
|
|
134
138
|
crit: data.crit,
|
|
135
139
|
},
|
|
136
140
|
null,
|
|
@@ -146,7 +150,7 @@ const Filterer = (context) => {
|
|
|
146
150
|
}
|
|
147
151
|
}
|
|
148
152
|
|
|
149
|
-
|
|
153
|
+
/* if (countXTClick) {
|
|
150
154
|
pi(
|
|
151
155
|
xtpage +
|
|
152
156
|
'&pchap=' +
|
|
@@ -163,11 +167,11 @@ const Filterer = (context) => {
|
|
|
163
167
|
}
|
|
164
168
|
const removeErrors = function () {
|
|
165
169
|
if (errorTargetDomNodes.length > 0) {
|
|
166
|
-
errorTargetDomNodes[0].classList.add(
|
|
170
|
+
errorTargetDomNodes[0].classList.add(hiddenElementCssTrigger)
|
|
167
171
|
}
|
|
168
172
|
|
|
169
173
|
if (errorDomNodes.length > 0) {
|
|
170
|
-
errorDomNodes[0].classList.add(
|
|
174
|
+
errorDomNodes[0].classList.add(hiddenElementCssTrigger)
|
|
171
175
|
}
|
|
172
176
|
}
|
|
173
177
|
const loadContent = function (currentTarget) {
|
|
@@ -184,7 +188,7 @@ const Filterer = (context) => {
|
|
|
184
188
|
cache: true,
|
|
185
189
|
beforeSend: function () {
|
|
186
190
|
console.log('before load')
|
|
187
|
-
$(contentTargetClass, rootElement).addClass(
|
|
191
|
+
$(contentTargetClass, rootElement).addClass(loadingCssTrigger)
|
|
188
192
|
},
|
|
189
193
|
})
|
|
190
194
|
.done(function (data, status, xhr) {
|
|
@@ -198,7 +202,7 @@ const Filterer = (context) => {
|
|
|
198
202
|
$(contentTargetClass, rootElement).append(data)
|
|
199
203
|
|
|
200
204
|
targetDomNodes = hr$('.' + targetClass, rootElement)
|
|
201
|
-
$(contentTargetClass, rootElement).removeClass(
|
|
205
|
+
$(contentTargetClass, rootElement).removeClass(loadingCssTrigger)
|
|
202
206
|
$(currentTarget, rootElement)
|
|
203
207
|
.closest('.' + reloadTriggerClass)
|
|
204
208
|
.removeClass(reloadTriggerClass)
|
|
@@ -210,7 +214,7 @@ const Filterer = (context) => {
|
|
|
210
214
|
})
|
|
211
215
|
.fail(function (data, status, xhr) {
|
|
212
216
|
console.log('load error')
|
|
213
|
-
$(contentTargetClass, rootElement).addClass(
|
|
217
|
+
$(contentTargetClass, rootElement).addClass(loadingCssTrigger)
|
|
214
218
|
})
|
|
215
219
|
}
|
|
216
220
|
const createInlineUrl = function (element) {
|
|
@@ -229,7 +233,7 @@ const Filterer = (context) => {
|
|
|
229
233
|
)[0]
|
|
230
234
|
doFilter(target, false, false)
|
|
231
235
|
clearSelected()
|
|
232
|
-
target.classList.add(
|
|
236
|
+
target.classList.add(navItemSelectedCssTrigger)
|
|
233
237
|
}
|
|
234
238
|
}
|
|
235
239
|
const initial = function () {
|
|
@@ -242,16 +246,16 @@ const Filterer = (context) => {
|
|
|
242
246
|
|
|
243
247
|
if (reset) {
|
|
244
248
|
for (i = 0; i < targetDomNodes.length; i++) {
|
|
245
|
-
targetDomNodes[i].classList.remove(
|
|
249
|
+
targetDomNodes[i].classList.remove(hiddenElementCssTrigger)
|
|
246
250
|
}
|
|
247
251
|
return
|
|
248
252
|
}
|
|
249
253
|
|
|
250
254
|
for (i = 0; i < targetDomNodes.length; i++) {
|
|
251
255
|
if (targetDomNodes[i].getAttribute('id') !== crit) {
|
|
252
|
-
targetDomNodes[i].classList.add(
|
|
256
|
+
targetDomNodes[i].classList.add(hiddenElementCssTrigger)
|
|
253
257
|
} else {
|
|
254
|
-
targetDomNodes[i].classList.remove(
|
|
258
|
+
targetDomNodes[i].classList.remove(hiddenElementCssTrigger)
|
|
255
259
|
|
|
256
260
|
found = true
|
|
257
261
|
}
|
|
@@ -267,16 +271,16 @@ const Filterer = (context) => {
|
|
|
267
271
|
|
|
268
272
|
if (reset) {
|
|
269
273
|
for (i = 0; i < targetDomNodes.length; i++) {
|
|
270
|
-
targetDomNodes[i].classList.remove(
|
|
274
|
+
targetDomNodes[i].classList.remove(hiddenElementCssTrigger)
|
|
271
275
|
}
|
|
272
276
|
return
|
|
273
277
|
}
|
|
274
278
|
|
|
275
279
|
for (i = 0; i < targetDomNodes.length; i++) {
|
|
276
280
|
if (targetDomNodes[i].getAttribute('id').indexOf(crit) !== 0) {
|
|
277
|
-
targetDomNodes[i].classList.add(
|
|
281
|
+
targetDomNodes[i].classList.add(hiddenElementCssTrigger)
|
|
278
282
|
} else {
|
|
279
|
-
targetDomNodes[i].classList.remove(
|
|
283
|
+
targetDomNodes[i].classList.remove(hiddenElementCssTrigger)
|
|
280
284
|
|
|
281
285
|
found = true
|
|
282
286
|
}
|
|
@@ -289,7 +293,7 @@ const Filterer = (context) => {
|
|
|
289
293
|
const displayErrorTarget = function () {
|
|
290
294
|
if (targetDomNodes.length >= 1) {
|
|
291
295
|
if (errorTargetDomNodes.length > 0) {
|
|
292
|
-
errorTargetDomNodes[0].classList.remove(
|
|
296
|
+
errorTargetDomNodes[0].classList.remove(hiddenElementCssTrigger)
|
|
293
297
|
}
|
|
294
298
|
}
|
|
295
299
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
</div>
|
|
2
2
|
<div class="grid col-full grid-page mt-6{{inline-switch _backgroundColor '["1","2"]' '[" bg-grey-concrete"," bg-orange-bridesmaid"]'}}">
|
|
3
|
-
<section class="grid grid-cols-12 py-6 sm:px-
|
|
3
|
+
<section class="grid grid-cols-12 py-6 sm:px-9.5 col-full sm:col-main gap-x-6 gap-y-9">
|
|
4
4
|
<div class="grid content-start grid-cols-12 col-span-12 gap-x-6 gap-y-6">
|
|
5
5
|
{{> @partial-block }}
|
|
6
6
|
</div>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
</div>
|
|
2
|
-
<section class="grid grid-cols-12 px-
|
|
2
|
+
<section class="grid grid-cols-12 px-9.5 py-8 mx-4 mt-6 bg-blue-400 sm:mx-0 rounded-tl-hr rounded-br-hr col-full sm:col-main gap-x-6 gap-y-6">
|
|
3
3
|
{{> @partial-block }}
|
|
4
4
|
</section>
|
|
5
5
|
<div class="{{> components/grid/grid_group_wrapper_classes }}">
|
|
@@ -1 +1 @@
|
|
|
1
|
-
grid grid-cols-12 bg-white pt-6 sm:px-
|
|
1
|
+
grid grid-cols-12 bg-white pt-6 sm:px-9.5 col-full sm:col-main gap-x-6 gap-y-10 md:gap-y-14
|
|
@@ -19,21 +19,20 @@ import clusterTeaserImage33 from '../fixtures/cluster_teaser_33_image.json'
|
|
|
19
19
|
import PodcastChannelClusterTeaser from '../fixtures/cluster_teaser_Podcast_Channel.json'
|
|
20
20
|
import clusterTeaserOrdered33LongTitle from '../fixtures/cluster_teaser_33_long_title.json'
|
|
21
21
|
|
|
22
|
-
<Meta
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
22
|
+
<Meta
|
|
23
|
+
title="Komponenten/Teaser/Cluster"
|
|
24
|
+
parameters={{
|
|
25
|
+
layout: '',
|
|
26
|
+
}}
|
|
27
|
+
argTypes={{}}
|
|
28
|
+
decorators={[
|
|
29
29
|
(Story) => {
|
|
30
|
-
return `<div class="grid grid-page"><div class="grid grid-cols-12 py-6 col-full gap-x-6 gap-y-6 sm:px-
|
|
30
|
+
return `<div class="grid grid-page"><div class="grid grid-cols-12 py-6 col-full gap-x-6 gap-y-6 sm:px-9.5 sm:col-main">
|
|
31
31
|
${Story()}
|
|
32
32
|
</div></div>`
|
|
33
33
|
},
|
|
34
34
|
]}
|
|
35
|
-
|
|
36
|
-
/>
|
|
35
|
+
/>
|
|
37
36
|
|
|
38
37
|
export const Template = (args, { globals: { customConditionalToolbar } }) => {
|
|
39
38
|
// You can either use a function to create DOM elements or use a plain html string!
|
|
@@ -43,7 +42,6 @@ export const Template = (args, { globals: { customConditionalToolbar } }) => {
|
|
|
43
42
|
return cluster({ brand, ...args })
|
|
44
43
|
}
|
|
45
44
|
|
|
46
|
-
|
|
47
45
|
<Preview withToolbar>
|
|
48
46
|
<Story name="Kurzmeldungen 100" args={clusterTeaser100}>
|
|
49
47
|
{Template.bind({})}
|
|
@@ -96,4 +94,4 @@ export const Template = (args, { globals: { customConditionalToolbar } }) => {
|
|
|
96
94
|
<Story name="Meistgeklickt-Box mit langem Titel" args={clusterTeaserOrdered33LongTitle}>
|
|
97
95
|
{Template.bind({})}
|
|
98
96
|
</Story>
|
|
99
|
-
</Preview>
|
|
97
|
+
</Preview>
|
|
@@ -42,7 +42,7 @@ import contentNavDropdown_subgroups from '../fixtures/teaser_content_nav_dropdow
|
|
|
42
42
|
expanded: false,
|
|
43
43
|
disable: false,
|
|
44
44
|
},
|
|
45
|
-
},
|
|
45
|
+
},
|
|
46
46
|
teaserSize: {
|
|
47
47
|
control: {
|
|
48
48
|
type: 'select',
|
|
@@ -58,7 +58,7 @@ import contentNavDropdown_subgroups from '../fixtures/teaser_content_nav_dropdow
|
|
|
58
58
|
}}
|
|
59
59
|
decorators={[
|
|
60
60
|
(Story) => {
|
|
61
|
-
return `<div class="grid grid-page"><div class="grid grid-cols-12 py-6 col-full gap-x-6 gap-y-6 sm:px-
|
|
61
|
+
return `<div class="grid grid-page"><div class="grid grid-cols-12 py-6 col-full gap-x-6 gap-y-6 sm:px-9.5 sm:col-main">
|
|
62
62
|
${Story()}
|
|
63
63
|
</div></div>`
|
|
64
64
|
},
|
|
@@ -77,8 +77,7 @@ export const Template = (args, { globals: { customConditionalToolbar } }) => {
|
|
|
77
77
|
|
|
78
78
|
## Beschreibung
|
|
79
79
|
|
|
80
|
-
|
|
81
|
-
<Preview withToolbar>
|
|
80
|
+
<Preview withToolbar>
|
|
82
81
|
<b>Liste</b>
|
|
83
82
|
<Story name="Liste" args={contentNavList}>
|
|
84
83
|
{Template.bind({})}
|
|
@@ -115,4 +114,4 @@ export const Template = (args, { globals: { customConditionalToolbar } }) => {
|
|
|
115
114
|
<Story name="Dropdown mit Subgruppen" args={contentNavDropdown_subgroups}>
|
|
116
115
|
{Template.bind({})}
|
|
117
116
|
</Story>
|
|
118
|
-
</Preview>
|
|
117
|
+
</Preview>
|
|
@@ -1,19 +1,18 @@
|
|
|
1
|
-
import { ArgsTable, Meta, Story, Canvas, Preview } from
|
|
1
|
+
import { ArgsTable, Meta, Story, Canvas, Preview } from '@storybook/addon-docs'
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import teaserGroup100 from '../fixtures/teaser_group_100.json'
|
|
3
|
+
import groupTeaser from './group_teaser.hbs'
|
|
4
|
+
import groupTeaserAccented from './group_teaser_accented.hbs'
|
|
5
|
+
import teaserGroup100 from '../fixtures/teaser_group_100.json'
|
|
7
6
|
import teaserGroupRelatedContent100 from '../fixtures/teaser_group_related_content_100.json'
|
|
8
|
-
import teaserGroup100highlight from '../fixtures/teaser_group_100_highlight.json'
|
|
7
|
+
import teaserGroup100highlight from '../fixtures/teaser_group_100_highlight.json'
|
|
9
8
|
import teaserGroup100highlight2 from '../fixtures/teaser_group_100_highlight_2.json'
|
|
10
|
-
|
|
11
|
-
import teaserGroup100contentnav from '../fixtures/teaser_group_100_contentnav.json'
|
|
9
|
+
|
|
10
|
+
import teaserGroup100contentnav from '../fixtures/teaser_group_100_contentnav.json'
|
|
12
11
|
|
|
13
12
|
<Meta
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
13
|
+
title="Komponenten/Teaser/Gruppen"
|
|
14
|
+
argTypes={{
|
|
15
|
+
teaserSize: {
|
|
17
16
|
control: {
|
|
18
17
|
type: 'select',
|
|
19
18
|
options: ['100', '66', '50', '33', '25'],
|
|
@@ -25,69 +24,62 @@ import teaserGroup100contentnav from '../fixtures/teaser_group_100_contentnav.js
|
|
|
25
24
|
},
|
|
26
25
|
},
|
|
27
26
|
},
|
|
28
|
-
|
|
29
|
-
|
|
27
|
+
}}
|
|
28
|
+
parameters={{
|
|
30
29
|
layout: 'fullscreen',
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
<div class="grid grid-cols-12 py-6 bg-white sm:px-
|
|
30
|
+
}}
|
|
31
|
+
decorators={[
|
|
32
|
+
(Story) => {
|
|
33
|
+
return `<div class="grid my-5 grid-page">
|
|
34
|
+
<div class="grid grid-cols-12 py-6 bg-white sm:px-9.5 col-full sm:col-main gap-x-6 md:gap-y-14 gap-y-6">
|
|
36
35
|
${Story()}
|
|
37
36
|
</div>
|
|
38
37
|
</div>`
|
|
39
|
-
|
|
40
|
-
|
|
38
|
+
},
|
|
39
|
+
]}
|
|
41
40
|
/>
|
|
42
41
|
|
|
43
42
|
export const groupTeaserTemplate = ({ text, ...args }) => {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
}
|
|
48
|
-
|
|
43
|
+
// You can either use a function to create DOM elements or use a plain html string!
|
|
44
|
+
// return `<div>${label}</div>`;
|
|
45
|
+
return groupTeaser({ text, ...args })
|
|
46
|
+
}
|
|
49
47
|
|
|
50
48
|
export const groupTeaserAccentedTemplate = ({ text, ...args }) => {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
}
|
|
49
|
+
// You can either use a function to create DOM elements or use a plain html string!
|
|
50
|
+
// return `<div>${label}</div>`;
|
|
51
|
+
return groupTeaserAccented({ text, ...args })
|
|
52
|
+
}
|
|
55
53
|
|
|
56
54
|
# Button
|
|
57
55
|
|
|
58
56
|
Ein toller Einleitungstext für unsere `Teaser Gruppen` Komponente:
|
|
59
57
|
|
|
60
58
|
<Preview withToolbar>
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
<Story
|
|
86
|
-
name="100% Gruppe mit Related Content"
|
|
87
|
-
args={teaserGroupRelatedContent100.includeModel}
|
|
88
|
-
>
|
|
89
|
-
{groupTeaserTemplate.bind({})}
|
|
90
|
-
</Story>
|
|
59
|
+
<Story name="100% Gruppe mit Überschrift" args={teaserGroup100.includeModel}>
|
|
60
|
+
{groupTeaserTemplate.bind({})}
|
|
61
|
+
</Story>
|
|
62
|
+
<Story
|
|
63
|
+
name="100% Gruppe mit Überschrift Highlight 1"
|
|
64
|
+
args={teaserGroup100highlight.includeModel}
|
|
65
|
+
>
|
|
66
|
+
{groupTeaserTemplate.bind({})}
|
|
67
|
+
</Story>
|
|
68
|
+
<Story
|
|
69
|
+
name="100% Gruppe mit Überschrift Highlight 2"
|
|
70
|
+
args={teaserGroup100highlight2.includeModel}
|
|
71
|
+
>
|
|
72
|
+
{groupTeaserTemplate.bind({})}
|
|
73
|
+
</Story>
|
|
74
|
+
<Story
|
|
75
|
+
name="100% Gruppe mit Content Navigation Aufklapp"
|
|
76
|
+
args={teaserGroup100contentnav.includeModel}
|
|
77
|
+
>
|
|
78
|
+
{groupTeaserAccentedTemplate.bind({})}
|
|
79
|
+
</Story>
|
|
80
|
+
<Story name="100% Gruppe mit Related Content" args={teaserGroupRelatedContent100.includeModel}>
|
|
81
|
+
{groupTeaserTemplate.bind({})}
|
|
82
|
+
</Story>
|
|
91
83
|
</Preview>
|
|
92
84
|
|
|
93
85
|
<ArgsTable story="main" />
|
|
@@ -7,27 +7,26 @@ import episodeJson50 from '../fixtures/teaser_podcast_50.json'
|
|
|
7
7
|
import playlistJson100 from '../fixtures/teaser_podcast_playlist.json'
|
|
8
8
|
import playlistJson50 from '../fixtures/teaser_podcast_playlist_50.json'
|
|
9
9
|
|
|
10
|
-
<Meta
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
10
|
+
<Meta
|
|
11
|
+
title="Komponenten/Teaser/Podcast"
|
|
12
|
+
parameters={{
|
|
13
|
+
chromatic: {
|
|
14
|
+
viewports: [360, 768, 1024],
|
|
15
|
+
diffThreshold: 0.5,
|
|
16
|
+
},
|
|
17
|
+
layout: 'fullscreen',
|
|
18
|
+
}}
|
|
19
|
+
argTypes={{}}
|
|
20
|
+
decorators={[
|
|
21
21
|
(Story) => {
|
|
22
22
|
return `<div class="grid grid-page">
|
|
23
|
-
<div class="grid grid-cols-12 py-6 col-full gap-x-6 gap-y-6 sm:px-
|
|
23
|
+
<div class="grid grid-cols-12 py-6 col-full gap-x-6 gap-y-6 sm:px-9.5 sm:col-main">
|
|
24
24
|
${Story()}
|
|
25
25
|
</div>
|
|
26
26
|
</div>`
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
/>
|
|
27
|
+
},
|
|
28
|
+
]}
|
|
29
|
+
/>
|
|
31
30
|
|
|
32
31
|
export const episodeTemplate = (args, { globals: { customConditionalToolbar } }) => {
|
|
33
32
|
// You can either use a function to create DOM elements or use a plain html string!
|
|
@@ -45,18 +44,17 @@ export const playlistTemplate = (args, { globals: { customConditionalToolbar } }
|
|
|
45
44
|
return podcastPlaylist({ brand, ...args })
|
|
46
45
|
}
|
|
47
46
|
|
|
48
|
-
|
|
49
|
-
<
|
|
50
|
-
|
|
51
|
-
|
|
47
|
+
<Preview withToolbar>
|
|
48
|
+
<Story name="100% Episode Player" args={episodeJson.logicItem.includeModel}>
|
|
49
|
+
{episodeTemplate.bind({})}
|
|
50
|
+
</Story>
|
|
51
|
+
<Story name="50% Episode Player" args={episodeJson50.logicItem.includeModel}>
|
|
52
|
+
{episodeTemplate.bind({})}
|
|
52
53
|
</Story>
|
|
53
|
-
<Story
|
|
54
|
-
{
|
|
55
|
-
</Story>
|
|
56
|
-
<Story name="100% Channel Player" args={playlistJson100.logicItem.includeModel}>
|
|
57
|
-
{playlistTemplate.bind({})}
|
|
54
|
+
<Story name="100% Channel Player" args={playlistJson100.logicItem.includeModel}>
|
|
55
|
+
{playlistTemplate.bind({})}
|
|
58
56
|
</Story>
|
|
59
|
-
|
|
60
|
-
{playlistTemplate.bind({})}
|
|
57
|
+
<Story name="50% Channel Player" args={playlistJson50.logicItem.includeModel}>
|
|
58
|
+
{playlistTemplate.bind({})}
|
|
61
59
|
</Story>
|
|
62
|
-
</Preview>
|
|
60
|
+
</Preview>
|
|
@@ -21,7 +21,7 @@ import teaser50Download from './fixtures/teaser_alternative_50_serif_download.js
|
|
|
21
21
|
layout: 'fullscreen',
|
|
22
22
|
chromatic: {
|
|
23
23
|
viewports: [360, 1024],
|
|
24
|
-
diffThreshold: 0.5
|
|
24
|
+
diffThreshold: 0.5,
|
|
25
25
|
},
|
|
26
26
|
}}
|
|
27
27
|
argTypes={{
|
|
@@ -40,7 +40,7 @@ import teaser50Download from './fixtures/teaser_alternative_50_serif_download.js
|
|
|
40
40
|
}}
|
|
41
41
|
decorators={[
|
|
42
42
|
(Story) => {
|
|
43
|
-
return `<div class="grid grid-page"><div class="grid grid-cols-12 py-6 col-full gap-x-6 gap-y-6 sm:px-
|
|
43
|
+
return `<div class="grid grid-page"><div class="grid grid-cols-12 py-6 col-full gap-x-6 gap-y-6 sm:px-9.5 sm:col-main">
|
|
44
44
|
${Story()}
|
|
45
45
|
</div></div>`
|
|
46
46
|
},
|
|
@@ -123,10 +123,16 @@ Die Alternativ-Teaser-Komponente wird in handlebars wie folgt eingebaut:
|
|
|
123
123
|
<Story name="Alternativ Hero mit Label" args={heroTeaserWithLabel.logicItem.includeModel}>
|
|
124
124
|
{Template.bind({})}
|
|
125
125
|
</Story>
|
|
126
|
-
<Story
|
|
126
|
+
<Story
|
|
127
|
+
name="Alternativ Hero mit externen Link Dokument"
|
|
128
|
+
args={heroTeaserLink.logicItem.includeModel}
|
|
129
|
+
>
|
|
127
130
|
{Template.bind({})}
|
|
128
131
|
</Story>
|
|
129
|
-
<Story
|
|
132
|
+
<Story
|
|
133
|
+
name="Alternativ Hero mit Sendungsdokument"
|
|
134
|
+
args={heroTeaserProgram.logicItem.includeModel}
|
|
135
|
+
>
|
|
130
136
|
{Template.bind({})}
|
|
131
137
|
</Story>
|
|
132
138
|
<b>Alternativ 100%</b>
|
|
@@ -141,10 +147,13 @@ Die Alternativ-Teaser-Komponente wird in handlebars wie folgt eingebaut:
|
|
|
141
147
|
<Story name="Alternativ 50" args={teaser50.logicItem.includeModel}>
|
|
142
148
|
{Template.bind({})}
|
|
143
149
|
</Story>
|
|
144
|
-
<Story
|
|
150
|
+
<Story
|
|
151
|
+
name="Alternativ 50 ohne Teaserbild"
|
|
152
|
+
args={teaser50WithoutTeaserImage.logicItem.includeModel}
|
|
153
|
+
>
|
|
145
154
|
{Template.bind({})}
|
|
146
155
|
</Story>
|
|
147
|
-
|
|
156
|
+
<b>Alternativ 50% mit externem Link</b>
|
|
148
157
|
<Story name="Alternativ 50 mit externem Link" args={teaser50Link.logicItem.includeModel}>
|
|
149
158
|
{Template.bind({})}
|
|
150
159
|
</Story>
|
|
@@ -37,7 +37,7 @@ import teaser50_live from './fixtures/teaser_alternative_50_serif_live.json'
|
|
|
37
37
|
}}
|
|
38
38
|
decorators={[
|
|
39
39
|
(Story) => {
|
|
40
|
-
return `<div class="grid grid-page"><div class="grid grid-cols-12 py-6 col-full gap-x-6 gap-y-6 sm:px-
|
|
40
|
+
return `<div class="grid grid-page"><div class="grid grid-cols-12 py-6 col-full gap-x-6 gap-y-6 sm:px-9.5 sm:col-main">
|
|
41
41
|
${Story()}
|
|
42
42
|
</div></div>`
|
|
43
43
|
},
|
|
@@ -24,7 +24,7 @@ import teaserEventCalendarWithNoFutureEventsData from './fixtures/teaser_event_c
|
|
|
24
24
|
}}
|
|
25
25
|
decorators={[
|
|
26
26
|
(Story) => {
|
|
27
|
-
return `<div class="grid grid-page"><div class="grid grid-cols-12 py-6 col-full gap-x-6 gap-y-6 sm:px-
|
|
27
|
+
return `<div class="grid grid-page"><div class="grid grid-cols-12 py-6 col-full gap-x-6 gap-y-6 sm:px-9.5 sm:col-main">
|
|
28
28
|
${Story()}
|
|
29
29
|
</div></div>`
|
|
30
30
|
},
|