hr-design-system-handlebars 0.49.12 → 0.49.13

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.
Files changed (63) hide show
  1. package/.storybook/preview.js +64 -1
  2. package/CHANGELOG.md +12 -0
  3. package/dist/assets/index.css +73 -49
  4. package/dist/views/components/audio/audioElementDs.subfeature.js +9 -0
  5. package/dist/views/components/audio/audio_element.hbs +72 -0
  6. package/dist/views/components/button/button.hbs +6 -3
  7. package/dist/views/components/button/button_round.hbs +18 -19
  8. package/dist/views/components/button/button_transparent.hbs +17 -0
  9. package/dist/views/components/mediaplayer/mediaplayerLoaderDs.feature.js +22 -32
  10. package/dist/views/components/teaser/components/teaser_av_consumption.hbs +2 -2
  11. package/dist/views/components/teaser/components/teaser_lead.hbs +1 -1
  12. package/dist/views/components/teaser/teaser_standard.hbs +8 -9
  13. package/dist/views/components/video/video_element.hbs +76 -79
  14. package/package.json +1 -1
  15. package/src/assets/fixtures/teaser/teaser_group_100_2x_50.inc.json +18 -3
  16. package/src/assets/fixtures/teaser/teaser_images.inc.json +8 -8
  17. package/src/assets/fixtures/teaser/teaser_lead.inc.json +11 -1
  18. package/src/assets/fixtures/teaser/teaser_standard_25_serif.json +8 -0
  19. package/src/assets/fixtures/teaser/teaser_standard_25_serif_audio.json +36 -0
  20. package/src/assets/fixtures/teaser/{teaser_standard_25_serif_av_consumption.json → teaser_standard_25_serif_video.json} +8 -0
  21. package/src/assets/fixtures/teaser/teaser_standard_50_serif_audio.json +21 -0
  22. package/src/assets/fixtures/teaser/{teaser_standard_50_serif_av_consumption.json → teaser_standard_50_serif_video.json} +0 -0
  23. package/src/assets/fixtures/teaser/teasers.inc.json +4 -0
  24. package/src/stories/views/components/audio/audioElementDs.subfeature.js +9 -0
  25. package/src/stories/views/components/audio/audio_element.hbs +72 -0
  26. package/src/stories/views/components/button/button.hbs +6 -3
  27. package/src/stories/views/components/button/button_round.hbs +18 -19
  28. package/src/stories/views/components/button/button_transparent.hbs +17 -0
  29. package/src/stories/views/components/mediaplayer/mediaplayerLoaderDs.feature.js +22 -32
  30. package/src/stories/views/components/teaser/components/teaser_av_consumption.hbs +2 -2
  31. package/src/stories/views/components/teaser/components/teaser_lead.hbs +1 -1
  32. package/src/stories/views/components/teaser/fixtures/teaser_alternative_100_serif.json +1 -1
  33. package/src/stories/views/components/teaser/fixtures/teaser_alternative_25_serif.json +1 -1
  34. package/src/stories/views/components/teaser/fixtures/teaser_alternative_33_serif.json +1 -1
  35. package/src/stories/views/components/teaser/fixtures/teaser_alternative_50_serif.json +1 -1
  36. package/src/stories/views/components/teaser/fixtures/teaser_alternative_hero_serif.json +1 -1
  37. package/src/stories/views/components/teaser/fixtures/teaser_alternative_hero_serif_comments.json +1 -1
  38. package/src/stories/views/components/teaser/fixtures/teaser_alternative_hero_serif_label.json +1 -1
  39. package/src/stories/views/components/teaser/fixtures/teaser_comments_without_teaserinfo.json +1 -1
  40. package/src/stories/views/components/teaser/fixtures/teaser_index.json +1 -1
  41. package/src/stories/views/components/teaser/fixtures/teaser_poster_lg.json +1 -1
  42. package/src/stories/views/components/teaser/fixtures/teaser_poster_md.json +1 -1
  43. package/src/stories/views/components/teaser/fixtures/teaser_poster_md_label.json +1 -1
  44. package/src/stories/views/components/teaser/fixtures/teaser_standard_100_serif.json +1 -1
  45. package/src/stories/views/components/teaser/fixtures/teaser_standard_25_serif.json +1 -1
  46. package/src/stories/views/components/teaser/fixtures/teaser_standard_25_serif_audio.json +1 -0
  47. package/src/stories/views/components/teaser/fixtures/teaser_standard_25_serif_video.json +1 -0
  48. package/src/stories/views/components/teaser/fixtures/teaser_standard_33_serif.json +1 -1
  49. package/src/stories/views/components/teaser/fixtures/teaser_standard_50_serif.json +1 -1
  50. package/src/stories/views/components/teaser/fixtures/teaser_standard_50_serif_audio.json +1 -0
  51. package/src/stories/views/components/teaser/fixtures/teaser_standard_50_serif_video.json +1 -0
  52. package/src/stories/views/components/teaser/fixtures/teaser_standard_hero_serif.json +1 -1
  53. package/src/stories/views/components/teaser/fixtures/teaser_standard_hero_serif_comments.json +1 -1
  54. package/src/stories/views/components/teaser/fixtures/teaser_standard_hero_serif_label.json +1 -1
  55. package/src/stories/views/components/teaser/fixtures/teaser_tabbox.json +1 -1
  56. package/src/stories/views/components/teaser/teaser_standard.hbs +8 -9
  57. package/src/stories/views/components/teaser/teaser_standard_av.stories.mdx +12 -4
  58. package/src/stories/views/components/video/video_element.hbs +76 -79
  59. package/src/stories/views/components/teaser/fixtures/teaser_comment.json +0 -1
  60. package/src/stories/views/components/teaser/fixtures/teaser_standard_100_serif_av_consumption.json +0 -1
  61. package/src/stories/views/components/teaser/fixtures/teaser_standard_25_serif_av_consumption.json +0 -1
  62. package/src/stories/views/components/teaser/fixtures/teaser_standard_50_serif_av_consumption copy.json +0 -1
  63. package/src/stories/views/components/teaser/fixtures/teaser_standard_50_serif_av_consumption.json +0 -1
@@ -33,10 +33,73 @@ if (process.env.NODE_ENV !== 'production') {
33
33
  console.log('Looks like we are in development mode!')
34
34
  }
35
35
 
36
+ const customViewports = {
37
+ hrMin: {
38
+ name: 'hr: Min - 320px',
39
+ styles: {
40
+ width: '320px',
41
+ height: '600px',
42
+ },
43
+ },
44
+ hrXs: {
45
+ name: 'hr: XS - 360px',
46
+ styles: {
47
+ width: '360px',
48
+ height: '600px',
49
+ },
50
+ },
51
+ hrSmSmaller: {
52
+ name: 'hr: SM - 639px',
53
+ styles: {
54
+ width: '639px',
55
+ height: '800px',
56
+ },
57
+ },
58
+ hrSm: {
59
+ name: 'hr: SM - 640px',
60
+ styles: {
61
+ width: '640px',
62
+ height: '800px',
63
+ },
64
+ },
65
+ hrMdSmaller: {
66
+ name: 'hr: MD - 767px',
67
+ styles: {
68
+ width: '767px',
69
+ height: '1000px',
70
+ },
71
+ },
72
+ hrMd: {
73
+ name: 'hr: MD - 768px',
74
+ styles: {
75
+ width: '768px',
76
+ height: '1000px',
77
+ },
78
+ },
79
+ hrLgSmaller: {
80
+ name: 'hr: LG - 1023px',
81
+ styles: {
82
+ width: '1023px',
83
+ height: '1000px',
84
+ },
85
+ },
86
+ hrLg: {
87
+ name: 'hr: LG - 1024px',
88
+ styles: {
89
+ width: '1024px',
90
+ height: '1000px',
91
+ },
92
+ },
93
+ };
94
+
36
95
  export const parameters = {
37
96
  //layout: 'fullscreen',
38
97
  viewport: {
39
- viewports: INITIAL_VIEWPORTS,
98
+ viewports: {
99
+ ...customViewports,
100
+ ...INITIAL_VIEWPORTS,
101
+
102
+ },
40
103
  },
41
104
  backgrounds: {
42
105
  default: 'white',
package/CHANGELOG.md CHANGED
@@ -1,3 +1,15 @@
1
+ # v0.49.13 (Tue Jul 12 2022)
2
+
3
+ #### 🐛 Bug Fix
4
+
5
+ - Dpe 1576 [#267](https://github.com/mumprod/hr-design-system-handlebars/pull/267) ([@vascoeduardo](https://github.com/vascoeduardo))
6
+
7
+ #### Authors: 1
8
+
9
+ - Vasco ([@vascoeduardo](https://github.com/vascoeduardo))
10
+
11
+ ---
12
+
1
13
  # v0.49.12 (Tue Jul 12 2022)
2
14
 
3
15
  #### 🐛 Bug Fix
@@ -596,6 +596,12 @@ video {
596
596
  .relative {
597
597
  position: relative;
598
598
  }
599
+ .bottom-0 {
600
+ bottom: 0px;
601
+ }
602
+ .right-0 {
603
+ right: 0px;
604
+ }
599
605
  .left-1\/2 {
600
606
  left: 50%;
601
607
  }
@@ -608,11 +614,8 @@ video {
608
614
  .left-0 {
609
615
  left: 0px;
610
616
  }
611
- .bottom-0 {
612
- bottom: 0px;
613
- }
614
- .right-0 {
615
- right: 0px;
617
+ .top-full {
618
+ top: 100%;
616
619
  }
617
620
  .top-10 {
618
621
  top: 2.5rem;
@@ -664,6 +667,10 @@ video {
664
667
  .m-1 {
665
668
  margin: 0.25rem;
666
669
  }
670
+ .my-4 {
671
+ margin-top: 1rem;
672
+ margin-bottom: 1rem;
673
+ }
667
674
  .mx-4 {
668
675
  margin-left: 1rem;
669
676
  margin-right: 1rem;
@@ -676,10 +683,6 @@ video {
676
683
  margin-left: 2rem;
677
684
  margin-right: 2rem;
678
685
  }
679
- .my-4 {
680
- margin-top: 1rem;
681
- margin-bottom: 1rem;
682
- }
683
686
  .mx-px {
684
687
  margin-left: 1px;
685
688
  margin-right: 1px;
@@ -788,6 +791,12 @@ video {
788
791
  .aspect-video {
789
792
  aspect-ratio: 16 / 9;
790
793
  }
794
+ .h-6 {
795
+ height: 1.5rem;
796
+ }
797
+ .h-12 {
798
+ height: 3rem;
799
+ }
791
800
  .h-full {
792
801
  height: 100%;
793
802
  }
@@ -812,15 +821,12 @@ video {
812
821
  .h-5 {
813
822
  height: 1.25rem;
814
823
  }
815
- .h-6 {
816
- height: 1.5rem;
824
+ .h-3 {
825
+ height: 0.75rem;
817
826
  }
818
827
  .h-3\.5 {
819
828
  height: 0.875rem;
820
829
  }
821
- .h-3 {
822
- height: 0.75rem;
823
- }
824
830
  .h-auto {
825
831
  height: auto;
826
832
  }
@@ -842,15 +848,18 @@ video {
842
848
  .w-16 {
843
849
  width: 4rem;
844
850
  }
845
- .w-10 {
846
- width: 2.5rem;
847
- }
848
851
  .w-6 {
849
852
  width: 1.5rem;
850
853
  }
854
+ .w-12 {
855
+ width: 3rem;
856
+ }
851
857
  .w-full {
852
858
  width: 100%;
853
859
  }
860
+ .w-10 {
861
+ width: 2.5rem;
862
+ }
854
863
  .w-screen {
855
864
  width: 100vw;
856
865
  }
@@ -860,15 +869,12 @@ video {
860
869
  .w-40 {
861
870
  width: 10rem;
862
871
  }
863
- .w-12 {
864
- width: 3rem;
872
+ .w-3 {
873
+ width: 0.75rem;
865
874
  }
866
875
  .w-3\.5 {
867
876
  width: 0.875rem;
868
877
  }
869
- .w-3 {
870
- width: 0.75rem;
871
- }
872
878
  .w-max {
873
879
  width: -webkit-max-content;
874
880
  width: -moz-max-content;
@@ -1097,12 +1103,12 @@ video {
1097
1103
  .rounded-xl {
1098
1104
  border-radius: 0.75rem;
1099
1105
  }
1100
- .rounded {
1101
- border-radius: 0.25rem;
1102
- }
1103
1106
  .rounded-full {
1104
1107
  border-radius: 9999px;
1105
1108
  }
1109
+ .rounded {
1110
+ border-radius: 0.25rem;
1111
+ }
1106
1112
  .rounded-t-xl {
1107
1113
  border-top-left-radius: 0.75rem;
1108
1114
  border-top-right-radius: 0.75rem;
@@ -1177,10 +1183,17 @@ video {
1177
1183
  --tw-bg-opacity: 1;
1178
1184
  background-color: rgba(187, 247, 208, var(--tw-bg-opacity));
1179
1185
  }
1186
+ .bg-blue-jellyBean {
1187
+ --tw-bg-opacity: 1;
1188
+ background-color: rgba(39, 107, 158, var(--tw-bg-opacity));
1189
+ }
1180
1190
  .bg-blue-500 {
1181
1191
  --tw-bg-opacity: 1;
1182
1192
  background-color: rgba(59, 130, 246, var(--tw-bg-opacity));
1183
1193
  }
1194
+ .bg-transparent {
1195
+ background-color: transparent;
1196
+ }
1184
1197
  .bg-gray-100 {
1185
1198
  --tw-bg-opacity: 1;
1186
1199
  background-color: rgba(243, 244, 246, var(--tw-bg-opacity));
@@ -1281,12 +1294,12 @@ video {
1281
1294
  .to-purple-100 {
1282
1295
  --tw-gradient-to: #f3e8ff;
1283
1296
  }
1284
- .fill-current {
1285
- fill: currentColor;
1286
- }
1287
1297
  .fill-white {
1288
1298
  fill: #ffffff;
1289
1299
  }
1300
+ .fill-current {
1301
+ fill: currentColor;
1302
+ }
1290
1303
  .p-10 {
1291
1304
  padding: 2.5rem;
1292
1305
  }
@@ -1302,13 +1315,21 @@ video {
1302
1315
  .p-2 {
1303
1316
  padding: 0.5rem;
1304
1317
  }
1305
- .py-2 {
1306
- padding-top: 0.5rem;
1307
- padding-bottom: 0.5rem;
1318
+ .py-3\.5 {
1319
+ padding-top: 0.875rem;
1320
+ padding-bottom: 0.875rem;
1308
1321
  }
1309
- .px-4 {
1310
- padding-left: 1rem;
1311
- padding-right: 1rem;
1322
+ .px-3\.5 {
1323
+ padding-left: 0.875rem;
1324
+ padding-right: 0.875rem;
1325
+ }
1326
+ .py-3 {
1327
+ padding-top: 0.75rem;
1328
+ padding-bottom: 0.75rem;
1329
+ }
1330
+ .px-3 {
1331
+ padding-left: 0.75rem;
1332
+ padding-right: 0.75rem;
1312
1333
  }
1313
1334
  .py-6 {
1314
1335
  padding-top: 1.5rem;
@@ -1334,25 +1355,13 @@ video {
1334
1355
  padding-left: 1.25rem;
1335
1356
  padding-right: 1.25rem;
1336
1357
  }
1337
- .py-3\.5 {
1338
- padding-top: 0.875rem;
1339
- padding-bottom: 0.875rem;
1340
- }
1341
- .py-3 {
1342
- padding-top: 0.75rem;
1343
- padding-bottom: 0.75rem;
1344
- }
1345
1358
  .px-2 {
1346
1359
  padding-left: 0.5rem;
1347
1360
  padding-right: 0.5rem;
1348
1361
  }
1349
- .px-3\.5 {
1350
- padding-left: 0.875rem;
1351
- padding-right: 0.875rem;
1352
- }
1353
- .px-3 {
1354
- padding-left: 0.75rem;
1355
- padding-right: 0.75rem;
1362
+ .py-2 {
1363
+ padding-top: 0.5rem;
1364
+ padding-bottom: 0.5rem;
1356
1365
  }
1357
1366
  .py-1\.5 {
1358
1367
  padding-top: 0.375rem;
@@ -1366,6 +1375,10 @@ video {
1366
1375
  padding-left: 0px;
1367
1376
  padding-right: 0px;
1368
1377
  }
1378
+ .px-4 {
1379
+ padding-left: 1rem;
1380
+ padding-right: 1rem;
1381
+ }
1369
1382
  .pt-px {
1370
1383
  padding-top: 1px;
1371
1384
  }
@@ -1477,6 +1490,9 @@ video {
1477
1490
  .font-bold {
1478
1491
  font-weight: 700;
1479
1492
  }
1493
+ .font-semibold {
1494
+ font-weight: 600;
1495
+ }
1480
1496
  .uppercase {
1481
1497
  text-transform: uppercase;
1482
1498
  }
@@ -1523,6 +1539,10 @@ video {
1523
1539
  --tw-text-opacity: 1;
1524
1540
  color: rgba(255, 255, 255, var(--tw-text-opacity));
1525
1541
  }
1542
+ .text-blue-700 {
1543
+ --tw-text-opacity: 1;
1544
+ color: rgba(29, 78, 216, var(--tw-text-opacity));
1545
+ }
1526
1546
  .text-grey-scorpion {
1527
1547
  --tw-text-opacity: 1;
1528
1548
  color: rgba(96, 96, 96, var(--tw-text-opacity));
@@ -2459,6 +2479,10 @@ video {
2459
2479
  --tw-bg-opacity: 1;
2460
2480
  background-color: rgba(29, 78, 216, var(--tw-bg-opacity));
2461
2481
  }
2482
+ .hover\:bg-slate-300:hover {
2483
+ --tw-bg-opacity: 1;
2484
+ background-color: rgba(203, 213, 225, var(--tw-bg-opacity));
2485
+ }
2462
2486
  .hover\:bg-blue-congress:hover {
2463
2487
  --tw-bg-opacity: 1;
2464
2488
  background-color: rgba(0, 82, 147, var(--tw-bg-opacity));
@@ -113,6 +113,15 @@ const AudioElement = function (options, rootElement) {
113
113
  }
114
114
 
115
115
  listen('hr:global:stopOtherAVs', shouldIStopPlaying)
116
+
117
+ return {
118
+ play: function() {
119
+ audio.play()
120
+ },
121
+ pause: function() {
122
+ audio.pause()
123
+ }
124
+ }
116
125
  }
117
126
 
118
127
  export default AudioElement
@@ -0,0 +1,72 @@
1
+ <div class="c-audioElement">
2
+ <div id="{{nextRandom}}" class="{{~#with _addClass }} {{this}}{{/with}} js-load"
3
+ data-new-hr-mediaplayer-loader-ds='{
4
+ "type": "audio",
5
+ "position": "{{if _isTeaser 'teaser' 'page'}}",
6
+ "teaserSize" : "{{if _teaserSize _teaserSize '00' }}",
7
+ "playbackUnsupported":"{{loca "audio_unsupported"}}",
8
+ "playbackError":"{{loca "audio_playback_error"}}",
9
+ "playbackFileNotFound":"{{loca "audio_fileNotFound"}}",
10
+ "mediaMetadata":{{this.mediaMetadata}} {{#if _isTeaser}},
11
+ "autoplay":"true"{{/if}} }'
12
+ >
13
+ {{!-- geotag --}}
14
+ {{#unless _hideGeotag}}
15
+ {{~#with _geotag}}
16
+ <span class="js-geotag c-teaser__geotag" aria-hidden="true">{{this.[0].title~}}</span>
17
+ {{/with~}}
18
+ {{/unless}}
19
+ <div
20
+ {{~#if _is25Teaser}}
21
+ class="relative"
22
+ :class="avStart ? 'ar-16-9' : '{{_aspectRatio}}'"
23
+ {{else}}
24
+ class="relative {{_aspectRatio}}"
25
+ {{~/if~}}
26
+ >
27
+ {{~#if _isTeaser~}}
28
+ <div
29
+ {{~#if _is25Teaser}}
30
+ x-show="!avStart"
31
+ {{~/if~}}
32
+ >
33
+ {{#with _teaser}}
34
+ {{~#if _isCopyText~}}
35
+ {{> components/base/image/responsive_image this.teaserImage _type=(if this.teasertype this.teasertype 'story') _variant=(if this.imageVariant this.imageVariant '100-copytext') _addClassImg="ar__content" _addClass=_addClass _noDelay=../_noDelay}}
36
+ {{else}}
37
+ {{#>components/base/link _cssClasses="c-teaser__mediaLink" _isAriaHidden=true
38
+ _doTracking=(if this.doTracking 'true') _clickLabelPrefix1=this.realTeasersize
39
+ _clickLabelPrefix2="mediaLink" }}
40
+ {{> components/base/image/responsive_image this.teaserImage _type=(if this.teasertype this.teasertype 'story') _variant=(if this.imageVariant this.imageVariant '100-copytext') _addClassImg="js-mediaplayer__area ar__content mediaPlayerLoader__mediaplayerArea" _addClass=_addClass _noDelay=../../_noDelay}}
41
+ {{/components/base/link}}
42
+ {{~/if~}}
43
+ {{~/with~}}
44
+ {{> components/button/button_round _isButton="true" _addClass="absolute bottom-0 right-0 my-4 mx-4 js-mediaplayer__button" _showIcon=true _icon="play" _addIconClass="w-6 h-6 inline" _label="Audio" _srOnly="true" _alpineClick="avStart = !avStart" _x-show="!avStart"}}
45
+ </div>
46
+ {{else}}
47
+ {{> components/base/image/responsive_image this.teaseritem _type=_type _variant=_variant _addClass=_addClass _addClassImg="ar__content" _noDelay=_noDelay }}
48
+ {{~/if~}}
49
+
50
+
51
+ {{~#if _is25Teaser~}}
52
+ <div x-show="avStart" class="flex items-center justify-center ar-16-9 bg-blue-jellyBean">
53
+ {{> components/base/image/icon _icon="audio" _iconmap="icons" _addClass="w-12 h-12 fill-white " }}
54
+ </div>
55
+ {{~/if~}}
56
+
57
+ {{~#with _audioUrl ~}}
58
+ <audio x-show="avStart" class="absolute bottom-0 w-full{{~#with _addClassAudio }} {{this}}{{/with}}"
59
+ controls="controls" preload="none" controlsList="nodownload" oncontextmenu="return false;">
60
+ <source src="{{this}}" type='audio/mpeg'>
61
+ </audio>
62
+ {{~#if ../this.isPodcast~}}
63
+ <a href="{{../this.podcastDownloadUrl}}" class="downloadLink button-invert js-load"{{#with
64
+ ../this.trackingData}}
65
+ data-new-hr-click-tracking='{"settings": [{"type": "download", "clickLabel": "{{this.pageName}}", "secondLevelId": "{{this.secondLevelId}}"}, {"type": "uxAction", "clickLabel": "medienDownload::podcast::{{_type}}", "secondLevelId": "{{this.secondLevelId}}" }]}'{{/with}}>
66
+ {{> components/base/image/icon _icon='download-button' _addClass="icon--media"}}
67
+ </a>
68
+ {{~/if~}}
69
+ {{~/with~}}
70
+ </div>
71
+ </div>
72
+ </div>
@@ -2,14 +2,17 @@
2
2
  {{~#if _aria}} aria-label="{{_aria}}"{{/if}}
3
3
  {{~#if _isButton}} type="button"{{else}} type="submit"{{/if~}}
4
4
  {{~#if _name}} name="{{_name}}"{{/if}}
5
- class="bg-blue-500 hover:bg-blue-700 text-white py-2 px-4 rounded {{_addClass}}{{#if _webview}} -webview{{/if}}"
6
- {{~#if _value}} value="{{_value}}"{{/if}}
5
+ {{~#if _title}} title="{{_title}}"{{/if}}
6
+ class="{{_addClass}}{{#if _addClass2}} {{_addClass2}}{{/if}}{{#if _webview}} -webview{{/if}}"
7
+ {{~#if _value}} value="{{_value}}"{{/if}}
8
+ {{~#if _alpineClick}} @click="{{_alpineClick}}"{{/if}}
9
+ {{~#if _x-show}} x-show="{{_x-show}}"{{/if}}
7
10
  >
8
11
  {{~#if _showIcon~}}
9
12
  {{> components/base/image/icon _icon=_icon _iconmap=_iconmap _addClass=_addIconClass _webview=_webview}}
10
13
  {{/if~}}
11
14
  {{~#if _label~}}
12
- <span class="button__text">
15
+ <span {{#if _srOnly}}class="sr-only"{{/if}}>
13
16
  {{~_label~}}
14
17
  </span>
15
18
  {{/if~}}
@@ -1,19 +1,18 @@
1
- <button
2
- {{~#if _aria}} aria-label="{{_aria}}"{{/if}}
3
- {{~#if _isButton}} type="button"{{else}} type="submit"{{/if~}}
4
- {{~#if _name}} name="{{_name}}"{{/if}}
5
- class="bg-blue-500 hover:bg-blue-700 text-white rounded-full border-4 border-white p-1 {{_addClass}}{{#if _webview}} -webview{{/if}}"
6
- {{~#if _value}} value="{{_value}}"{{/if}}
7
- {{~#if _alpineClick}} @click="{{_alpineClick}}"{{/if}}
8
-
9
-
10
- >
11
- {{~#if _showIcon~}}
12
- {{> components/base/image/icon _icon=_icon _iconmap=_iconmap _addClass=_addIconClass _webview=_webview}}
13
- {{/if~}}
14
- {{~#if _label~}}
15
- <span class="sr-only">
16
- {{~_label~}}
17
- </span>
18
- {{/if~}}
19
- </button>
1
+ {{> components/button/button
2
+ _aria=_aria
3
+ _isButton=_isButton
4
+ _title=_title
5
+ _name=_name
6
+ _label=_label
7
+ _value=_value
8
+ _showIcon="true"
9
+ _icon=_icon
10
+ _iconmap=_iconmap
11
+ _addIconClass=_addIconClass
12
+ _addClass="bg-blue-500 hover:bg-blue-700 text-white rounded-full border-4 border-white p-1 "
13
+ _addClass2=_addClass
14
+ _webview=_webview
15
+ _x-show=_x-show
16
+ _alpineClick=_alpineClick
17
+ _srOnly=_srOnly
18
+ }}
@@ -0,0 +1,17 @@
1
+ {{> components/button/button
2
+ _aria=_aria
3
+ _isButton=_isButton
4
+ _title=_title
5
+ _name=_name
6
+ _label=_label
7
+ _value=_value
8
+ _showIcon="true"
9
+ _icon=_icon
10
+ _iconmap=_iconmap
11
+ _addIconClass=_addIconClass
12
+ _addClass="bg-transparent hover:bg-slate-300 text-blue-700 font-semibold py-3.5 px-3.5"
13
+ _addClass2=_addClass
14
+ _webview=_webview
15
+ _x-show=_x-show
16
+ _alpineClick=_alpineClick
17
+ }}
@@ -6,8 +6,7 @@ import VideoLivestream from 'components/video/livestream/videoLivestreamDs.subfe
6
6
 
7
7
  const MediaplayerLoader = function (context) {
8
8
  'use strict'
9
-
10
-
9
+
11
10
  const { options } = context,
12
11
  { element: rootElement } = context,
13
12
  type = options.type,
@@ -19,60 +18,51 @@ const MediaplayerLoader = function (context) {
19
18
  rootParent = rootElement.parentNode,
20
19
  mediaplayerButton = hr$('.js-mediaplayer__button', rootParent)[0];
21
20
 
22
- let video = false;
23
-
24
-
25
- const removeVideoHover = function () {
26
- rootElement.parentNode.parentNode.classList.remove('-imageHover')
27
- rootElement.parentNode.parentNode.parentNode.classList.remove('-imageHover')
28
- }
29
-
30
- const removeAudioHover = function () {
31
- audioContent.classList.remove('hide')
32
- audioContent.parentNode.parentNode.parentNode.parentNode.classList.remove('-imageHover')
33
- audioContent.parentNode.parentNode.parentNode.classList.remove('-imageHover')
34
- mediaplayerButton.parentNode.removeChild(mediaplayerButton)
35
- }
21
+ let avObject = false;
22
+ console.log("MediaplayerLoader", options);
36
23
 
37
24
  const loadLivestream = function () {
38
25
  new VideoLivestream(options)
39
- removeVideoHover()
26
+
40
27
  uxAction('mediabuttonclick::' + teaserSize + '::playButtonClick')
41
28
  }
42
-
43
-
29
+
44
30
  const unloadPlayer = function() {
45
31
  console.log("video.pause()");
46
- video.pause();
32
+ avObject.pause();
47
33
  }
48
34
 
49
35
  const loadOnDemand = function () {
50
- if(!video){
51
- console.log("loadOnDemand");
52
- video = new VideoOnDemandPlayer(options)
53
- removeVideoHover()
36
+ if(!avObject){
37
+ console.log("load OnDemand");
38
+ avObject = new VideoOnDemandPlayer(options)
54
39
  uxAction('mediabuttonclick::' + teaserSize + '::playButtonClick')
55
40
  listenOnce('player_colosed', unloadPlayer)
56
41
  } else {
57
42
  console.log("video.play()");
58
43
  listenOnce('player_colosed', unloadPlayer)
59
- video.play();
44
+ avObject.play();
60
45
  }
61
46
  }
62
47
 
63
48
  const loadAudio = function () {
64
- new AudioElement(options, rootElement)
65
- removeAudioHover()
66
- uxAction('mediabuttonclick::' + teaserSize + '::playButtonClick')
49
+ if(!avObject){
50
+ console.log("load Audio");
51
+ avObject = new AudioElement(options, rootElement)
52
+ uxAction('mediabuttonclick::' + teaserSize + '::playButtonClick')
53
+ listenOnce('player_colosed', unloadPlayer)
54
+ } else {
55
+ console.log("Audio.play()");
56
+ listenOnce('player_colosed', unloadPlayer)
57
+ avObject.play();
58
+ }
67
59
  }
68
60
 
69
-
70
-
71
61
  switch (type) {
72
62
  case 'live':
73
63
  console.log('live');
74
64
  if (position === 'teaser') {
75
- listenOnce('click', loadLivestream, mediaplayerButton)
65
+ listen('click', loadLivestream, mediaplayerButton)
76
66
  } else {
77
67
  loadLivestream()
78
68
  }
@@ -91,7 +81,7 @@ const MediaplayerLoader = function (context) {
91
81
  case 'audio':
92
82
  console.log('audio');
93
83
  if (position === 'teaser') {
94
- listenOnce('click', loadAudio, mediaplayerButton)
84
+ listen('click', loadAudio, mediaplayerButton)
95
85
  } else {
96
86
  audioContent.classList.remove('hide')
97
87
  new AudioElement(options, rootElement)
@@ -1,8 +1,8 @@
1
1
  {{#with this.teaserLead.avDocument}}
2
2
  {{~#if this.isVideo ~}}
3
- {{~> components/video/video_element _isTeaser=true _teaser=../this ~}}
3
+ {{~> components/video/video_element _isTeaser=true _teaser=../this _aspectRatio=../_aspectRatio ~}}
4
4
  {{~/if~}}
5
5
  {{~#if this.isAudio ~}}
6
- isAudio
6
+ {{~> components/audio/audio_element _isTeaser=true _teaser=../this _audioUrl=this.audioUrl _variant=this.imageVariant _noDelay=../_noDelay _aspectRatio=../_aspectRatio _is25Teaser=../_is25Teaser _teaserSize=../_teaserSize~}}
7
7
  {{~/if~}}
8
8
  {{/with}}
@@ -1,5 +1,5 @@
1
1
  {{~#if this.allowAVConsumption ~}}
2
- {{> components/teaser/components/teaser_av_consumption }}
2
+ {{> components/teaser/components/teaser_av_consumption _aspectRatio=_aspectRatio _is25Teaser=_is25Teaser _teaserSize=_teaserSize }}
3
3
  {{else}}
4
4
  {{> components/teaser/components/teaser_image }}
5
5
  {{/if}}
@@ -1,21 +1,20 @@
1
1
  <article class="col-span-12 flex gap-y-3 gap-x-4 {{inline-switch this.teaserSize '["25","33","50"]' '["js-is1to1 px-5 md:px-0 md:col-span-3 md:flex-col","md:col-span-4 flex-col","md:col-span-6 flex-col","flex-col"]'}} "
2
- x-data="{ videoStart: false }"
2
+ x-data="{ avStart: false }"
3
3
  {{#switch this.teaserSize~}}
4
- {{~#case "25"}}
5
-
6
- :class="videoStart ? 'flex-col' : 'flex-row'"
4
+ {{~#case "25"}}
5
+ :class="avStart ? 'flex-col' : 'flex-row'"
7
6
  {{/case~}}
8
7
  {{~/switch~}}
9
8
  >
10
9
  <figure class="relative {{inline-switch this.teaserSize '["25"]' '["basis-2/5 md:flex-full ar-1-1 md:ar-16-9", "ar-16-9"]'}} ">
11
- {{> components/teaser/components/teaser_lead }}
12
- </figure>
13
- <div class="{{inline-switch this.teaserSize '["25"]' '["basis-3/5 md:flex-full"]'}} ">
10
+ {{> components/teaser/components/teaser_lead _is25Teaser=this.is25Teaser _teaserSize=this.teaserSize _aspectRatio=(inline-switch this.teaserSize '["25"]' '["ar-1-1 md:ar-16-9", "ar-16-9"]') }}
14
11
  {{#switch this.teaserSize~}}
15
12
  {{~#case "25"}}
16
- <button x-show="videoStart" @click="videoStart = false; $dispatch('player_colosed')" class="md:hidden">Video schließen</button>
13
+ {{> components/button/button_transparent _showIcon="true" _title="Mediaplayer schließen" _icon="arrow-up" _iconmap="icons"_addIconClass="w-3 h-3 fill-current" _addClass="md:hidden absolute top-full right-0" _x-show="avStart" _alpineClick="avStart = false; $dispatch('player_colosed')"}}
17
14
  {{/case~}}
18
- {{~/switch~}}
15
+ {{~/switch~}}
16
+ </figure>
17
+ <div class="{{inline-switch this.teaserSize '["25"]' '["basis-3/5 md:flex-full"]'}} ">
19
18
  <header class="md:px-0 {{inline-switch teaserSize '["25"]' '["","px-5"]'}}">
20
19
  {{#>components/base/link css="hover:text-toplineColor" doTracking=(if this.doTracking 'true') clickLabelPrefix1=this.teaserSize clickLabelPrefix2="headlineLink" }}
21
20
  {{> components/teaser/components/teaser_heading