hr-design-system-handlebars 0.49.12 → 0.49.15

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 (77) hide show
  1. package/.storybook/preview.js +64 -1
  2. package/CHANGELOG.md +36 -0
  3. package/build/helpers/configProperty.js +3 -0
  4. package/dist/assets/index.css +81 -49
  5. package/dist/views/components/audio/audioElementDs.subfeature.js +9 -0
  6. package/dist/views/components/audio/audio_element.hbs +72 -0
  7. package/dist/views/components/button/button.hbs +6 -3
  8. package/dist/views/components/button/button_round.hbs +18 -19
  9. package/dist/views/components/button/button_transparent.hbs +17 -0
  10. package/dist/views/components/mediaplayer/mediaplayerLoaderDs.feature.js +32 -35
  11. package/dist/views/components/teaser/components/teaser_av_consumption.hbs +5 -2
  12. package/dist/views/components/teaser/components/teaser_lead.hbs +1 -1
  13. package/dist/views/components/teaser/tabbox/group_tabbox.hbs +5 -2
  14. package/dist/views/components/teaser/tabbox/teaser_tabbox.hbs +8 -3
  15. package/dist/views/components/teaser/teaser_standard.hbs +8 -9
  16. package/dist/views/components/video/livestream/videoLivestreamDs.subfeature.js +9 -0
  17. package/dist/views/components/video/livestream/video_livestream.hbs +69 -0
  18. package/dist/views/components/video/video_element.hbs +64 -67
  19. package/package.json +1 -1
  20. package/src/assets/fixtures/teaser/teaser_group_100_2x_50.inc.json +18 -3
  21. package/src/assets/fixtures/teaser/teaser_group_tabbox.inc.json +66 -6
  22. package/src/assets/fixtures/teaser/teaser_images.inc.json +8 -8
  23. package/src/assets/fixtures/teaser/teaser_lead.inc.json +57 -1
  24. package/src/assets/fixtures/teaser/teaser_standard_25_serif.json +8 -0
  25. package/src/assets/fixtures/teaser/teaser_standard_25_serif_audio.json +36 -0
  26. package/src/assets/fixtures/teaser/teaser_standard_25_serif_live.json +36 -0
  27. package/src/assets/fixtures/teaser/{teaser_standard_25_serif_av_consumption.json → teaser_standard_25_serif_video.json} +8 -0
  28. package/src/assets/fixtures/teaser/teaser_standard_50_serif_audio.json +21 -0
  29. package/src/assets/fixtures/teaser/teaser_standard_50_serif_live.json +21 -0
  30. package/src/assets/fixtures/teaser/{teaser_standard_50_serif_av_consumption.json → teaser_standard_50_serif_video.json} +0 -0
  31. package/src/assets/fixtures/teaser/teasers.inc.json +4 -0
  32. package/src/stories/views/components/audio/audioElementDs.subfeature.js +9 -0
  33. package/src/stories/views/components/audio/audio_element.hbs +72 -0
  34. package/src/stories/views/components/button/button.hbs +6 -3
  35. package/src/stories/views/components/button/button_round.hbs +18 -19
  36. package/src/stories/views/components/button/button_transparent.hbs +17 -0
  37. package/src/stories/views/components/mediaplayer/mediaplayerLoaderDs.feature.js +32 -35
  38. package/src/stories/views/components/teaser/components/teaser_av_consumption.hbs +5 -2
  39. package/src/stories/views/components/teaser/components/teaser_lead.hbs +1 -1
  40. package/src/stories/views/components/teaser/fixtures/teaser_alternative_100_serif.json +1 -1
  41. package/src/stories/views/components/teaser/fixtures/teaser_alternative_25_serif.json +1 -1
  42. package/src/stories/views/components/teaser/fixtures/teaser_alternative_33_serif.json +1 -1
  43. package/src/stories/views/components/teaser/fixtures/teaser_alternative_50_serif.json +1 -1
  44. package/src/stories/views/components/teaser/fixtures/teaser_alternative_hero_serif.json +1 -1
  45. package/src/stories/views/components/teaser/fixtures/teaser_alternative_hero_serif_comments.json +1 -1
  46. package/src/stories/views/components/teaser/fixtures/teaser_alternative_hero_serif_label.json +1 -1
  47. package/src/stories/views/components/teaser/fixtures/teaser_comments_without_teaserinfo.json +1 -1
  48. package/src/stories/views/components/teaser/fixtures/teaser_index.json +1 -1
  49. package/src/stories/views/components/teaser/fixtures/teaser_poster_lg.json +1 -1
  50. package/src/stories/views/components/teaser/fixtures/teaser_poster_md.json +1 -1
  51. package/src/stories/views/components/teaser/fixtures/teaser_poster_md_label.json +1 -1
  52. package/src/stories/views/components/teaser/fixtures/teaser_standard_100_serif.json +1 -1
  53. package/src/stories/views/components/teaser/fixtures/teaser_standard_25_serif.json +1 -1
  54. package/src/stories/views/components/teaser/fixtures/teaser_standard_25_serif_audio.json +1 -0
  55. package/src/stories/views/components/teaser/fixtures/teaser_standard_25_serif_live.json +1 -0
  56. package/src/stories/views/components/teaser/fixtures/teaser_standard_25_serif_video.json +1 -0
  57. package/src/stories/views/components/teaser/fixtures/teaser_standard_33_serif.json +1 -1
  58. package/src/stories/views/components/teaser/fixtures/teaser_standard_50_serif.json +1 -1
  59. package/src/stories/views/components/teaser/fixtures/teaser_standard_50_serif_audio.json +1 -0
  60. package/src/stories/views/components/teaser/fixtures/teaser_standard_50_serif_live.json +1 -0
  61. package/src/stories/views/components/teaser/fixtures/teaser_standard_50_serif_video.json +1 -0
  62. package/src/stories/views/components/teaser/fixtures/teaser_standard_hero_serif.json +1 -1
  63. package/src/stories/views/components/teaser/fixtures/teaser_standard_hero_serif_comments.json +1 -1
  64. package/src/stories/views/components/teaser/fixtures/teaser_standard_hero_serif_label.json +1 -1
  65. package/src/stories/views/components/teaser/fixtures/teaser_tabbox.json +1 -1
  66. package/src/stories/views/components/teaser/tabbox/group_tabbox.hbs +5 -2
  67. package/src/stories/views/components/teaser/tabbox/teaser_tabbox.hbs +8 -3
  68. package/src/stories/views/components/teaser/teaser_standard.hbs +8 -9
  69. package/src/stories/views/components/teaser/teaser_standard_av.stories.mdx +20 -4
  70. package/src/stories/views/components/video/livestream/videoLivestreamDs.subfeature.js +9 -0
  71. package/src/stories/views/components/video/livestream/video_livestream.hbs +69 -0
  72. package/src/stories/views/components/video/video_element.hbs +64 -67
  73. package/src/stories/views/components/teaser/fixtures/teaser_comment.json +0 -1
  74. package/src/stories/views/components/teaser/fixtures/teaser_standard_100_serif_av_consumption.json +0 -1
  75. package/src/stories/views/components/teaser/fixtures/teaser_standard_25_serif_av_consumption.json +0 -1
  76. package/src/stories/views/components/teaser/fixtures/teaser_standard_50_serif_av_consumption copy.json +0 -1
  77. 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,39 @@
1
+ # v0.49.15 (Wed Jul 13 2022)
2
+
3
+ #### 🐛 Bug Fix
4
+
5
+ - add js-functionality to tabbox [#272](https://github.com/mumprod/hr-design-system-handlebars/pull/272) ([@hanswurstsalat](https://github.com/hanswurstsalat))
6
+
7
+ #### Authors: 1
8
+
9
+ - Geraldo ([@hanswurstsalat](https://github.com/hanswurstsalat))
10
+
11
+ ---
12
+
13
+ # v0.49.14 (Tue Jul 12 2022)
14
+
15
+ #### 🐛 Bug Fix
16
+
17
+ - Dpe 1683 [#271](https://github.com/mumprod/hr-design-system-handlebars/pull/271) ([@vascoeduardo](https://github.com/vascoeduardo))
18
+
19
+ #### Authors: 1
20
+
21
+ - Vasco ([@vascoeduardo](https://github.com/vascoeduardo))
22
+
23
+ ---
24
+
25
+ # v0.49.13 (Tue Jul 12 2022)
26
+
27
+ #### 🐛 Bug Fix
28
+
29
+ - Dpe 1576 [#267](https://github.com/mumprod/hr-design-system-handlebars/pull/267) ([@vascoeduardo](https://github.com/vascoeduardo))
30
+
31
+ #### Authors: 1
32
+
33
+ - Vasco ([@vascoeduardo](https://github.com/vascoeduardo))
34
+
35
+ ---
36
+
1
37
  # v0.49.12 (Tue Jul 12 2022)
2
38
 
3
39
  #### 🐛 Bug Fix
@@ -0,0 +1,3 @@
1
+ module.exports = function () {
2
+ return "test"
3
+ }
@@ -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));
@@ -1260,6 +1273,10 @@ video {
1260
1273
  --tw-bg-opacity: 1;
1261
1274
  background-color: rgba(220, 232, 240, var(--tw-bg-opacity));
1262
1275
  }
1276
+ .bg-red-500 {
1277
+ --tw-bg-opacity: 1;
1278
+ background-color: rgba(239, 68, 68, var(--tw-bg-opacity));
1279
+ }
1263
1280
  .bg-gradient-to-r {
1264
1281
  background-image: -webkit-gradient(linear, left top, right top, from(var(--tw-gradient-stops)));
1265
1282
  background-image: linear-gradient(to right, var(--tw-gradient-stops));
@@ -1281,12 +1298,12 @@ video {
1281
1298
  .to-purple-100 {
1282
1299
  --tw-gradient-to: #f3e8ff;
1283
1300
  }
1284
- .fill-current {
1285
- fill: currentColor;
1286
- }
1287
1301
  .fill-white {
1288
1302
  fill: #ffffff;
1289
1303
  }
1304
+ .fill-current {
1305
+ fill: currentColor;
1306
+ }
1290
1307
  .p-10 {
1291
1308
  padding: 2.5rem;
1292
1309
  }
@@ -1302,13 +1319,21 @@ video {
1302
1319
  .p-2 {
1303
1320
  padding: 0.5rem;
1304
1321
  }
1305
- .py-2 {
1306
- padding-top: 0.5rem;
1307
- padding-bottom: 0.5rem;
1322
+ .py-3\.5 {
1323
+ padding-top: 0.875rem;
1324
+ padding-bottom: 0.875rem;
1308
1325
  }
1309
- .px-4 {
1310
- padding-left: 1rem;
1311
- padding-right: 1rem;
1326
+ .px-3\.5 {
1327
+ padding-left: 0.875rem;
1328
+ padding-right: 0.875rem;
1329
+ }
1330
+ .py-3 {
1331
+ padding-top: 0.75rem;
1332
+ padding-bottom: 0.75rem;
1333
+ }
1334
+ .px-3 {
1335
+ padding-left: 0.75rem;
1336
+ padding-right: 0.75rem;
1312
1337
  }
1313
1338
  .py-6 {
1314
1339
  padding-top: 1.5rem;
@@ -1334,25 +1359,13 @@ video {
1334
1359
  padding-left: 1.25rem;
1335
1360
  padding-right: 1.25rem;
1336
1361
  }
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
1362
  .px-2 {
1346
1363
  padding-left: 0.5rem;
1347
1364
  padding-right: 0.5rem;
1348
1365
  }
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;
1366
+ .py-2 {
1367
+ padding-top: 0.5rem;
1368
+ padding-bottom: 0.5rem;
1356
1369
  }
1357
1370
  .py-1\.5 {
1358
1371
  padding-top: 0.375rem;
@@ -1366,6 +1379,10 @@ video {
1366
1379
  padding-left: 0px;
1367
1380
  padding-right: 0px;
1368
1381
  }
1382
+ .px-4 {
1383
+ padding-left: 1rem;
1384
+ padding-right: 1rem;
1385
+ }
1369
1386
  .pt-px {
1370
1387
  padding-top: 1px;
1371
1388
  }
@@ -1477,6 +1494,9 @@ video {
1477
1494
  .font-bold {
1478
1495
  font-weight: 700;
1479
1496
  }
1497
+ .font-semibold {
1498
+ font-weight: 600;
1499
+ }
1480
1500
  .uppercase {
1481
1501
  text-transform: uppercase;
1482
1502
  }
@@ -1523,6 +1543,10 @@ video {
1523
1543
  --tw-text-opacity: 1;
1524
1544
  color: rgba(255, 255, 255, var(--tw-text-opacity));
1525
1545
  }
1546
+ .text-blue-700 {
1547
+ --tw-text-opacity: 1;
1548
+ color: rgba(29, 78, 216, var(--tw-text-opacity));
1549
+ }
1526
1550
  .text-grey-scorpion {
1527
1551
  --tw-text-opacity: 1;
1528
1552
  color: rgba(96, 96, 96, var(--tw-text-opacity));
@@ -2459,10 +2483,18 @@ video {
2459
2483
  --tw-bg-opacity: 1;
2460
2484
  background-color: rgba(29, 78, 216, var(--tw-bg-opacity));
2461
2485
  }
2486
+ .hover\:bg-slate-300:hover {
2487
+ --tw-bg-opacity: 1;
2488
+ background-color: rgba(203, 213, 225, var(--tw-bg-opacity));
2489
+ }
2462
2490
  .hover\:bg-blue-congress:hover {
2463
2491
  --tw-bg-opacity: 1;
2464
2492
  background-color: rgba(0, 82, 147, var(--tw-bg-opacity));
2465
2493
  }
2494
+ .hover\:bg-red-700:hover {
2495
+ --tw-bg-opacity: 1;
2496
+ background-color: rgba(185, 28, 28, var(--tw-bg-opacity));
2497
+ }
2466
2498
  .hover\:text-toplineColor:hover {
2467
2499
  color: #006dc1;
2468
2500
  color: var(--color-topline);
@@ -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,58 @@ 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
-
21
+ let avObject = false;
22
+ console.log("MediaplayerLoader", options);
24
23
 
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)
24
+ const unloadPlayer = function() {
25
+ console.log("video.pause()");
26
+ avObject.pause();
35
27
  }
36
28
 
37
29
  const loadLivestream = function () {
38
- new VideoLivestream(options)
39
- removeVideoHover()
40
- uxAction('mediabuttonclick::' + teaserSize + '::playButtonClick')
41
- }
42
-
43
-
44
- const unloadPlayer = function() {
45
- console.log("video.pause()");
46
- video.pause();
30
+ if(!avObject){
31
+ console.log("load Livestream");
32
+ avObject = new VideoLivestream(options)
33
+ uxAction('mediabuttonclick::' + teaserSize + '::playButtonClick')
34
+ listenOnce('player_colosed', unloadPlayer)
35
+ } else {
36
+ console.log("video.play()");
37
+ listenOnce('player_colosed', unloadPlayer)
38
+ avObject.play();
39
+ }
47
40
  }
48
41
 
49
42
  const loadOnDemand = function () {
50
- if(!video){
51
- console.log("loadOnDemand");
52
- video = new VideoOnDemandPlayer(options)
53
- removeVideoHover()
43
+ if(!avObject){
44
+ console.log("load OnDemand");
45
+ avObject = new VideoOnDemandPlayer(options)
54
46
  uxAction('mediabuttonclick::' + teaserSize + '::playButtonClick')
55
47
  listenOnce('player_colosed', unloadPlayer)
56
48
  } else {
57
49
  console.log("video.play()");
58
50
  listenOnce('player_colosed', unloadPlayer)
59
- video.play();
51
+ avObject.play();
60
52
  }
61
53
  }
62
54
 
63
55
  const loadAudio = function () {
64
- new AudioElement(options, rootElement)
65
- removeAudioHover()
66
- uxAction('mediabuttonclick::' + teaserSize + '::playButtonClick')
56
+ if(!avObject){
57
+ console.log("load Audio");
58
+ avObject = new AudioElement(options, rootElement)
59
+ uxAction('mediabuttonclick::' + teaserSize + '::playButtonClick')
60
+ listenOnce('player_colosed', unloadPlayer)
61
+ } else {
62
+ console.log("Audio.play()");
63
+ listenOnce('player_colosed', unloadPlayer)
64
+ avObject.play();
65
+ }
67
66
  }
68
67
 
69
-
70
-
71
68
  switch (type) {
72
69
  case 'live':
73
70
  console.log('live');
74
71
  if (position === 'teaser') {
75
- listenOnce('click', loadLivestream, mediaplayerButton)
72
+ listen('click', loadLivestream, mediaplayerButton)
76
73
  } else {
77
74
  loadLivestream()
78
75
  }
@@ -91,7 +88,7 @@ const MediaplayerLoader = function (context) {
91
88
  case 'audio':
92
89
  console.log('audio');
93
90
  if (position === 'teaser') {
94
- listenOnce('click', loadAudio, mediaplayerButton)
91
+ listen('click', loadAudio, mediaplayerButton)
95
92
  } else {
96
93
  audioContent.classList.remove('hide')
97
94
  new AudioElement(options, rootElement)