hr-design-system-handlebars 1.75.1 → 1.75.2

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 (54) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/assets/icons/icons/svgmap/copy-ds.svg +5 -21
  3. package/dist/assets/icons/icons/svgmap.min.svg +1 -1
  4. package/dist/assets/index.css +31 -21
  5. package/dist/assets/js/alpine.js +3 -2
  6. package/dist/views/components/page/components/metadatabox.hbs +1 -1
  7. package/dist/views/components/social_sharing/social_sharing_copytext.hbs +1 -1
  8. package/dist/views/components/social_sharing/social_sharing_horizontal.hbs +72 -0
  9. package/{src/stories/views/components/social_sharing/social_sharing_compact_icons.hbs → dist/views/components/social_sharing/social_sharing_icons.hbs} +46 -43
  10. package/dist/views/components/social_sharing/social_sharing_mobile.hbs +71 -0
  11. package/dist/views/components/top_button/top_button.hbs +19 -13
  12. package/dist/views_static/components/page/components/metadatabox.hbs +1 -1
  13. package/dist/views_static/components/social_sharing/social_sharing_copytext.hbs +1 -1
  14. package/dist/views_static/components/social_sharing/social_sharing_horizontal.hbs +72 -0
  15. package/dist/{views/components/social_sharing/social_sharing_compact_icons.hbs → views_static/components/social_sharing/social_sharing_icons.hbs} +46 -43
  16. package/dist/views_static/components/social_sharing/social_sharing_mobile.hbs +71 -0
  17. package/dist/views_static/components/top_button/top_button.hbs +19 -13
  18. package/package.json +1 -1
  19. package/src/assets/fixtures/page/metadatabox.json +2 -1
  20. package/src/assets/fixtures/page/metadatabox_comments.json +2 -1
  21. package/src/assets/fixtures/page/metadatabox_more_authors.json +2 -1
  22. package/src/assets/fixtures/page/metadatabox_more_authors_comments.json +2 -1
  23. package/src/assets/fixtures/page/metadatabox_one_author.json +2 -1
  24. package/src/assets/fixtures/page/metadatabox_one_author_comments.json +2 -1
  25. package/src/assets/fixtures/page/metadatabox_one_author_without_picture.json +2 -1
  26. package/src/assets/fixtures/page/story/story.inc.json +2 -1
  27. package/src/assets/fixtures/socialsharing/socialsharing.inc.json +2 -1
  28. package/src/assets/icons/icons/svgmap/copy-ds.svg +5 -21
  29. package/src/assets/icons/icons/svgmap.min.svg +1 -1
  30. package/src/assets/js/alpine.js +3 -2
  31. package/src/stories/views/components/page/components/metadatabox.hbs +1 -1
  32. package/src/stories/views/components/page/fixtures/metadatabox.json +1 -1
  33. package/src/stories/views/components/page/fixtures/metadatabox_comments.json +1 -1
  34. package/src/stories/views/components/page/fixtures/metadatabox_more_authors.json +1 -1
  35. package/src/stories/views/components/page/fixtures/metadatabox_more_authors_comments.json +1 -1
  36. package/src/stories/views/components/page/fixtures/metadatabox_one_author.json +1 -1
  37. package/src/stories/views/components/page/fixtures/metadatabox_one_author_comments.json +1 -1
  38. package/src/stories/views/components/page/fixtures/metadatabox_one_author_without_picture.json +1 -1
  39. package/src/stories/views/components/page/story/fixtures/story.json +1 -1
  40. package/src/stories/views/components/page/story/fixtures/story_with_label.json +1 -1
  41. package/src/stories/views/components/page/story/fixtures/story_with_livestream.json +1 -1
  42. package/src/stories/views/components/page/story/fixtures/story_with_square_image.json +1 -1
  43. package/src/stories/views/components/page/story/fixtures/story_with_video.json +1 -1
  44. package/src/stories/views/components/social_sharing/{social_sharing_compact.mdx → social_sharing.mdx} +1 -1
  45. package/src/stories/views/components/social_sharing/social_sharing.stories.js +45 -0
  46. package/src/stories/views/components/social_sharing/social_sharing_copytext.hbs +1 -1
  47. package/src/stories/views/components/social_sharing/social_sharing_horizontal.hbs +72 -0
  48. package/{dist/views_static/components/social_sharing/social_sharing_compact_icons.hbs → src/stories/views/components/social_sharing/social_sharing_icons.hbs} +46 -43
  49. package/src/stories/views/components/social_sharing/social_sharing_mobile.hbs +71 -0
  50. package/src/stories/views/components/top_button/top_button.hbs +19 -13
  51. package/dist/views/components/social_sharing/social_sharing_compact.hbs +0 -87
  52. package/dist/views_static/components/social_sharing/social_sharing_compact.hbs +0 -87
  53. package/src/stories/views/components/social_sharing/social_sharing_compact.hbs +0 -87
  54. package/src/stories/views/components/social_sharing/social_sharing_compact.stories.js +0 -18
@@ -423,7 +423,7 @@ video {
423
423
  font-stretch: condensed;
424
424
  }
425
425
 
426
- .-translate-x-1\/2, .-translate-x-2\/4, .-translate-y-1\/2, .-translate-y-8, .translate-y-0, .translate-y-12, .-rotate-45, .rotate-180, .rotate-45, .scale-50, .scale-y-100, .scale-y-90, .transform, .is-loading::after, .hover\:scale-105, .active\:scale-95 {
426
+ .-translate-x-1\/2, .-translate-x-2\/4, .-translate-y-1\/2, .translate-y-0, .translate-y-12, .translate-y-8, .-rotate-45, .rotate-180, .rotate-45, .scale-50, .scale-y-100, .scale-y-90, .transform, .is-loading::after, .hover\:scale-105, .active\:scale-95 {
427
427
  --tw-translate-x: 0;
428
428
  --tw-translate-y: 0;
429
429
  --tw-rotate: 0;
@@ -1046,9 +1046,6 @@ article.indexTextDS .indexTextHighlighted .link {
1046
1046
  .bottom-15 {
1047
1047
  bottom: 3.75rem;
1048
1048
  }
1049
- .bottom-\[19px\] {
1050
- bottom: 19px;
1051
- }
1052
1049
  .bottom-feature-box-height {
1053
1050
  bottom: 0;
1054
1051
  bottom: var(--feature-box-height);
@@ -1062,8 +1059,8 @@ article.indexTextDS .indexTextHighlighted .link {
1062
1059
  .left-2\/4 {
1063
1060
  left: 50%;
1064
1061
  }
1065
- .left-5 {
1066
- left: 1.25rem;
1062
+ .left-8 {
1063
+ left: 2rem;
1067
1064
  }
1068
1065
  .left-\[4px\] {
1069
1066
  left: 4px;
@@ -1071,8 +1068,8 @@ article.indexTextDS .indexTextHighlighted .link {
1071
1068
  .right-0 {
1072
1069
  right: 0px;
1073
1070
  }
1074
- .right-\[68px\] {
1075
- right: 68px;
1071
+ .right-\[50px\] {
1072
+ right: 50px;
1076
1073
  }
1077
1074
  .right-auto {
1078
1075
  right: auto;
@@ -1305,6 +1302,9 @@ article.indexTextDS .indexTextHighlighted .link {
1305
1302
  .-mt-1 {
1306
1303
  margin-top: -0.25rem;
1307
1304
  }
1305
+ .-mt-12 {
1306
+ margin-top: -3rem;
1307
+ }
1308
1308
  .-mt-2 {
1309
1309
  margin-top: -0.5rem;
1310
1310
  }
@@ -1317,9 +1317,6 @@ article.indexTextDS .indexTextHighlighted .link {
1317
1317
  .-mt-6 {
1318
1318
  margin-top: -1.5rem;
1319
1319
  }
1320
- .-mt-8 {
1321
- margin-top: -2rem;
1322
- }
1323
1320
  .-mt-\[18px\] {
1324
1321
  margin-top: -18px;
1325
1322
  }
@@ -1596,6 +1593,12 @@ article.indexTextDS .indexTextHighlighted .link {
1596
1593
  .h-8 {
1597
1594
  height: 2rem;
1598
1595
  }
1596
+ .h-9 {
1597
+ height: 2.25rem;
1598
+ }
1599
+ .h-9\.5 {
1600
+ height: 2.375rem;
1601
+ }
1599
1602
  .h-96 {
1600
1603
  height: 24rem;
1601
1604
  }
@@ -1648,6 +1651,9 @@ article.indexTextDS .indexTextHighlighted .link {
1648
1651
  .min-h-\[88px\] {
1649
1652
  min-height: 88px;
1650
1653
  }
1654
+ .min-h-screen {
1655
+ min-height: 100vh;
1656
+ }
1651
1657
  .w-0 {
1652
1658
  width: 0px;
1653
1659
  }
@@ -1714,6 +1720,9 @@ article.indexTextDS .indexTextHighlighted .link {
1714
1720
  .w-9 {
1715
1721
  width: 2.25rem;
1716
1722
  }
1723
+ .w-9\.5 {
1724
+ width: 2.375rem;
1725
+ }
1717
1726
  .w-\[19px\] {
1718
1727
  width: 19px;
1719
1728
  }
@@ -1849,10 +1858,6 @@ article.indexTextDS .indexTextHighlighted .link {
1849
1858
  --tw-translate-y: -50%;
1850
1859
  transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
1851
1860
  }
1852
- .-translate-y-8 {
1853
- --tw-translate-y: -2rem;
1854
- transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
1855
- }
1856
1861
  .translate-y-0 {
1857
1862
  --tw-translate-y: 0px;
1858
1863
  transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
@@ -1861,6 +1866,10 @@ article.indexTextDS .indexTextHighlighted .link {
1861
1866
  --tw-translate-y: 3rem;
1862
1867
  transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
1863
1868
  }
1869
+ .translate-y-8 {
1870
+ --tw-translate-y: 2rem;
1871
+ transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
1872
+ }
1864
1873
  .-rotate-45 {
1865
1874
  --tw-rotate: -45deg;
1866
1875
  transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
@@ -2125,9 +2134,6 @@ article.indexTextDS .indexTextHighlighted .link {
2125
2134
  .rounded-lg {
2126
2135
  border-radius: 0.5rem;
2127
2136
  }
2128
- .rounded-md {
2129
- border-radius: 0.375rem;
2130
- }
2131
2137
  .rounded-xl {
2132
2138
  border-radius: 0.75rem;
2133
2139
  }
@@ -2475,6 +2481,10 @@ article.indexTextDS .indexTextHighlighted .link {
2475
2481
  --tw-bg-opacity: 1;
2476
2482
  background-color: rgba(254, 202, 202, var(--tw-bg-opacity));
2477
2483
  }
2484
+ .bg-slate-200 {
2485
+ --tw-bg-opacity: 1;
2486
+ background-color: rgba(226, 232, 240, var(--tw-bg-opacity));
2487
+ }
2478
2488
  .bg-slate-500 {
2479
2489
  --tw-bg-opacity: 1;
2480
2490
  background-color: rgba(100, 116, 139, var(--tw-bg-opacity));
@@ -3368,7 +3378,7 @@ article.indexTextDS .indexTextHighlighted .link {
3368
3378
  border-bottom-color: var(--color-secondary-ds);
3369
3379
  }
3370
3380
  .counter-reset {
3371
- counter-reset: cnt1719489321419;
3381
+ counter-reset: cnt1719581775289;
3372
3382
  }
3373
3383
  .hyphens-auto {
3374
3384
  -webkit-hyphens: auto;
@@ -3747,7 +3757,7 @@ article.indexTextDS .indexTextHighlighted .link {
3747
3757
  --tw-ring-color: rgba(255, 255, 255, 0.5);
3748
3758
  }
3749
3759
  .-ordered {
3750
- counter-increment: cnt1719489321419 1;
3760
+ counter-increment: cnt1719581775289 1;
3751
3761
  }
3752
3762
  .-ordered::before {
3753
3763
  position: absolute;
@@ -3763,7 +3773,7 @@ article.indexTextDS .indexTextHighlighted .link {
3763
3773
  letter-spacing: .0125em;
3764
3774
  --tw-text-opacity: 1;
3765
3775
  color: rgba(0, 0, 0, var(--tw-text-opacity));
3766
- content: counter(cnt1719489321419);
3776
+ content: counter(cnt1719581775289);
3767
3777
  }
3768
3778
  /*! ****************************/
3769
3779
  /*! DataPolicy stuff */
@@ -40,8 +40,9 @@ Alpine.store('navIsVisible', true)
40
40
  Alpine.store('subNavIsVisible', false)
41
41
  Alpine.store('footerIsVisible', false)
42
42
  Alpine.store('sectionNavIsVisible', false)
43
- Alpine.store('sharingIsVisible', true)
44
- Alpine.store('sharingIsOpen', false)
43
+ Alpine.store('sharingIsVisible', false)
44
+ Alpine.store('sharingIsOpenHorizontal', false)
45
+ Alpine.store('sharingIsOpenMobile', false)
45
46
  Alpine.store('sharingBottomPos', {
46
47
  current: '0'
47
48
  })
@@ -11,7 +11,7 @@
11
11
  {{> components/page/components/commentinfo }}
12
12
  </div>
13
13
  {{#unless _webview}}
14
- {{> components/social_sharing/social_sharing_compact _isVertical=false}}
14
+ {{> components/social_sharing/social_sharing_horizontal }}
15
15
  {{/unless}}
16
16
  </div>
17
17
  </div>
@@ -6,7 +6,7 @@
6
6
  <div
7
7
  class="relative right-0 p-1 bg-white md:h-auto">
8
8
  <ul class="flex flex-col gap-3">
9
- {{> components/social_sharing/social_sharing_compact_icons }}
9
+ {{> components/social_sharing/social_sharing_icons _socialSharingType="vertical-desktop" }}
10
10
  </ul>
11
11
  </div>
12
12
  </div>
@@ -0,0 +1,72 @@
1
+ {{~#with this.socialSharing ~}}
2
+ <div x-data="stickySharingHandler"
3
+ x-init="$watch('$store.sharingIsVisible', () => {$store.sharingIsOpenHorizontal = false; $store.sharingIsOpenMobile = false})"
4
+ class="flex self-center justify-end ml-3 grow"
5
+ x-intersect:leave="$store.sharingIsVisible=false"
6
+ x-intersect:enter="$store.sharingIsVisible=true"
7
+ x-on:resize.window="$store.sharingIsOpenHorizontal = false"
8
+ x-on:keydown.escape.prevent.stop="close($refs.button)"
9
+ @click.outside="close()"
10
+ >
11
+ <div class="relative right-0 flex gap-3 bg-white md:h-auto" >
12
+ <button
13
+ class="{{#with ../this.trackingData}}js-load {{/with}}order-2 p-2 text-white border border-button bg-button ds-button font-heading hover:bg-button--dark hover:border-button--dark active:bg-button--dark group lg:hidden"
14
+ x-ref="button"
15
+ x-on:click="toggle()"
16
+ :aria-expanded="open"
17
+ :aria-controls="$id('dropdown-button')"
18
+ x-show="$store.sharingIsVisible"
19
+ {{#with ../this.trackingData}}
20
+ data-hr-click-tracking='{"settings": [{"type":"uxAction","secondLevelId": "{{this.secondLevelId}}","clickLabel": "socialShareClick::sharingmenuopened"}]}'
21
+ {{/with}}
22
+
23
+ >
24
+ {{> components/base/image/icon _addClass="w-5 h-5 fill-current group-hover:fill-link--dark" _icon="sharing" _iconmap="icons" }}
25
+ </button>
26
+ <div
27
+ x-ref="panel"
28
+ :class="$store.sharingIsOpenHorizontal ? 'flex' : 'hidden '"
29
+ :id="$id('dropdown-button')"
30
+ class="self-center bg-white h-8 absolute right-[50px] md:relative md:right-0 md:h-auto lg:flex"
31
+ >
32
+ <ul class="flex gap-3">
33
+ {{> components/social_sharing/social_sharing_icons _socialSharingType="metadatabox"}}
34
+ </ul>
35
+ </div>
36
+ </div>
37
+ </div>
38
+ <script>
39
+ function stickySharingHandler(){
40
+ return {
41
+ open: false,
42
+ sharingIsVisible: true,
43
+ isDesktop: true,
44
+ toggle() {
45
+ var isMobileApple = /^iP/.test(navigator.platform) || /^Mac/.test(navigator.platform) && navigator.maxTouchPoints > 4;
46
+ var isMobileOther= navigator.userAgent.match(/(Android)|(webOS)|(Blackberry)|(Windows Phone)/i);
47
+ var isMobile= isMobileApple || isMobileOther;
48
+ if (navigator.share && isMobile) {
49
+ navigator.share({
50
+ title: document.title,
51
+ text: 'Schau mal was ich auf hessenschau.de gefunden habe!',
52
+ url: window.location.href,
53
+ })
54
+ .then(() => console.log('Shared successfully'))
55
+ .catch((error) => console.error('Sharing failed:', error));
56
+ } else {
57
+ if (this.$store.sharingIsOpenHorizontal) {
58
+ return this.close()
59
+ }
60
+ this.$refs.button.focus()
61
+ this.$store.sharingIsOpenHorizontal = true
62
+
63
+ }
64
+ },
65
+ close(focusAfter) {
66
+ if (!this.$store.sharingIsOpenHorizontal) return
67
+ this.$store.sharingIsOpenHorizontal = false
68
+ }
69
+ }
70
+ }
71
+ </script>
72
+ {{/with}}
@@ -1,3 +1,44 @@
1
+ {{~#with this.copyToClipboardLink}}
2
+ <li x-data="copyHandler()" x-on:click="copyToClipboard" class="relative">
3
+ <button class="{{#with ../_trackingData}} js-load{{/with}} flex order-2 ds-button font-heading active:scale-95 w-8 h-8"
4
+ title="{{loca "share_copy_linktitle" }}"
5
+ data-url="{{this}}"
6
+ {{#with ../_trackingData}}
7
+ data-hr-click-tracking='{"settings": [{"type":"uxAction","secondLevelId": "{{this.secondLevelId}}","clickLabel": "socialShareClick::{{if ../_socialSharingType ../_socialSharingType "default" }}::copybutton"}]}'
8
+ {{/with}}
9
+ >
10
+ <span x-cloak class="flex items-center justify-center w-full h-full" x-show="!copySuccess">{{~> components/base/image/icon _addClass="w-full h-full fill-link hover:scale-105" _icon="copy-ds" _iconmap="icons" ~}}</span>
11
+ <span x-cloak class="flex items-center justify-center w-full h-full" x-show="copySuccess">{{~> components/base/image/icon _addClass="w-6 h-6 text-green-600" _icon="status-done" _iconmap="icons" ~}}</span>
12
+ </button>
13
+ <div x-cloak x-show="copySuccess" class="absolute left-8 flex flex-row items-center justify-start px-4 shadow w-auto h-8 top-0 ml-0.5 text-xs bg-white whitespace-nowrap sm480:text-sm font-headingSerif dark:text-text-dark">
14
+ {{loca "share_copy_message" }}
15
+ </div>
16
+ </li>
17
+ <script>
18
+ function copyHandler(){
19
+ return {
20
+ copySuccess: false,
21
+ copyToClipboard(event) {
22
+ const clickedContainer = event.currentTarget.parentNode
23
+ const url = clickedContainer.querySelector ("button:first-of-type").getAttribute('data-url');
24
+ //TODO: maby do this with a magical helper in alpine
25
+ navigator.clipboard
26
+ .writeText(url)
27
+ .then(() => {
28
+ console.log("successfully copied");
29
+ this.copySuccess = true
30
+ window.setTimeout(() => {
31
+ this.copySuccess = false
32
+ }, 2000)
33
+ })
34
+ .catch(() => {
35
+ console.log("something went wrong with copy");
36
+ });
37
+ }
38
+ }
39
+ }
40
+ </script>
41
+ {{/with}}
1
42
  {{~#with this.twitterLink ~}}
2
43
  <li>
3
44
  <a class="{{if (isUserConsentNeeded this) 'js-user-consent-needed ' ''}}{{#with ../_trackingData}} js-load{{/with}} flex order-2 ds-button font-heading active:scale-95 w-8 h-8"
@@ -7,7 +48,7 @@
7
48
  rel="noopener noreferrer"
8
49
  title="{{loca "share_x_linktitle" }}"
9
50
  {{#with ../_trackingData}}
10
- data-hr-click-tracking='{"settings": [{"type":"uxAction","secondLevelId": "{{this.secondLevelId}}","clickLabel": "socialShareClick::X"}]}'
51
+ data-hr-click-tracking='{"settings": [{"type":"uxAction","secondLevelId": "{{this.secondLevelId}}","clickLabel": "socialShareClick::{{if ../_socialSharingType ../_socialSharingType "default" }}::X"}]}'
11
52
  {{/with}}
12
53
  >
13
54
  {{~> components/base/image/icon _addClass="w-full h-full fill-link hover:scale-105 " _icon="x-ds" _iconmap="icons" ~}}
@@ -23,7 +64,7 @@
23
64
  rel="noopener noreferrer"
24
65
  title="{{loca "share_facebook_linktitle" }}"
25
66
  {{#with ../_trackingData}}
26
- data-hr-click-tracking='{"settings": [{"type":"uxAction","secondLevelId": "{{this.secondLevelId}}","clickLabel": "socialShareClick::facebook"}]}'
67
+ data-hr-click-tracking='{"settings": [{"type":"uxAction","secondLevelId": "{{this.secondLevelId}}","clickLabel": "socialShareClick::{{if ../_socialSharingType ../_socialSharingType "default" }}::facebook"}]}'
27
68
  {{/with}}
28
69
  >
29
70
  {{~> components/base/image/icon _addClass="w-full h-full fill-link hover:scale-105" _icon="facebook-ds" _iconmap="icons" ~}}
@@ -39,7 +80,7 @@
39
80
  rel="noopener noreferrer"
40
81
  title="{{loca "share_whatsapp_linktitle" }}"
41
82
  {{#with ../_trackingData}}
42
- data-hr-click-tracking='{"settings": [{"type":"uxAction","secondLevelId": "{{this.secondLevelId}}","clickLabel": "socialShareClick::whatsapp"}]}'
83
+ data-hr-click-tracking='{"settings": [{"type":"uxAction","secondLevelId": "{{this.secondLevelId}}","clickLabel": "socialShareClick::{{if ../_socialSharingType ../_socialSharingType "default" }}::whatsapp"}]}'
43
84
  {{/with}}
44
85
  >
45
86
  {{~> components/base/image/icon _addClass="w-full h-full fill-link hover:scale-105" _icon="whatsapp-ds" _iconmap="icons" ~}}
@@ -53,48 +94,10 @@
53
94
  href="{{this}}"
54
95
  title="{{loca "share_mail_linktitle" }}"
55
96
  {{#with ../_trackingData}}
56
- data-hr-click-tracking='{"settings": [{"type":"uxAction","secondLevelId": "{{this.secondLevelId}}","clickLabel": "socialShareClick::mailto"}]}'
97
+ data-hr-click-tracking='{"settings": [{"type":"uxAction","secondLevelId": "{{this.secondLevelId}}","clickLabel": "socialShareClick::{{if ../_socialSharingType ../_socialSharingType "default" }}::mailto"}]}'
57
98
  {{/with}}
58
99
  >
59
100
  {{~> components/base/image/icon _addClass="w-full h-full fill-link hover:scale-105" _icon="kontakt-ds" _iconmap="icons" ~}}
60
101
  </a>
61
102
  </li>
62
- {{/with}}
63
-
64
- <li x-data="copyHandler()" x-on:click="copyToClipboard" class="">
65
- <button class="{{#with ../_trackingData}} js-load{{/with}} flex order-2 ds-button font-heading active:scale-95 w-8 h-8"
66
- title="{{loca "share_copy_linktitle" }}"
67
- {{#with ../_trackingData}}
68
- data-hr-click-tracking='{"settings": [{"type":"uxAction","secondLevelId": "{{this.secondLevelId}}","clickLabel": "socialShareClick::copybutton"}]}'
69
- {{/with}}
70
- >
71
- {{~> components/base/image/icon _addClass="w-full h-full fill-link hover:scale-105" _icon="copy-ds" _iconmap="icons" ~}}
72
- </button>
73
- <div class="absolute flex flex-row items-center justify-start rounded pr-4 shadow hidden w-auto h-8 -mt-8 ml-0.5 text-xs bg-white whitespace-nowrap js-copyMessage sm480:text-sm font-headingSerif dark:text-text-dark">
74
- {{~> components/base/image/icon _addClass="w-7 h-7 text-green-600 mr-4" _icon="status-done" _iconmap="icons" ~}}
75
- {{loca "share_copy_message" }}
76
- </div>
77
- </li>
78
- <script>
79
- function copyHandler(){
80
- return {
81
- copyToClipboard(event) {
82
- const clickedContainer = event.currentTarget.parentNode
83
- const messageDiv = clickedContainer.querySelector('.js-copyMessage')
84
- const el = document.createElement('textarea')
85
- el.value = window.location.href
86
- el.setAttribute('readonly', '')
87
- el.style.position = 'absolute'
88
- el.style.left = '-9999px'
89
- document.body.appendChild(el)
90
- el.select()
91
- document.execCommand('copy')
92
- document.body.removeChild(el)
93
- messageDiv.classList.remove('hidden')
94
- window.setTimeout(() => {
95
- messageDiv.classList.add('hidden')
96
- }, 2000)
97
- }
98
- }
99
- }
100
- </script>
103
+ {{/with}}
@@ -0,0 +1,71 @@
1
+
2
+ {{~#with this.socialSharing ~}}
3
+ <div x-data="stickySharingHandlerMobile"
4
+ class=" relative ml-5 z-100 h-9.5 w-9.5"
5
+ :class="$store.footerIsVisible ? '-mt-6' : '-mt-12'"
6
+ x-on:resize.window="$store.sharingIsOpenMobile = false"
7
+ x-on:keydown.escape.prevent.stop="close($refs.button)"
8
+ @click.outside="close()"
9
+ >
10
+ <div class="absolute bottom-0 flex flex-col self-center gap-3 bg-white">
11
+ <button
12
+ class="{{#with ../this.trackingData}}js-load {{/with}}order-2 p-2 text-white border border-button bg-button ds-button font-heading hover:bg-button--dark hover:border-button--dark active:bg-button--dark group lg:hidden"
13
+ x-ref="button"
14
+ x-on:click="toggle()"
15
+ :aria-expanded="open"
16
+ :aria-controls="$id('dropdown-button')"
17
+
18
+ {{#with ../this.trackingData}}
19
+ data-hr-click-tracking='{"settings": [{"type":"uxAction","secondLevelId": "{{this.secondLevelId}}","clickLabel": "socialShareClick::sharingmenuopened"}]}'
20
+ {{/with}}
21
+
22
+ >
23
+ {{> components/base/image/icon _addClass="w-5 h-5 fill-current group-hover:fill-link--dark" _icon="sharing" _iconmap="icons" }}
24
+ </button>
25
+ <div
26
+ x-ref="panel"
27
+ :class="$store.sharingIsOpenMobile ? 'flex' : 'hidden '"
28
+ :id="$id('dropdown-button')"
29
+ class="relative right-0 self-center bg-white md:h-auto lg:hidden"
30
+ >
31
+ <ul class="flex flex-col gap-3 mt-2">
32
+ {{> components/social_sharing/social_sharing_icons _socialSharingType="mobile-sticky"}}
33
+ </ul>
34
+ </div>
35
+ </div>
36
+ </div>
37
+ <script>
38
+ function stickySharingHandlerMobile(){
39
+ return {
40
+ open: false,
41
+ sharingIsVisible: true,
42
+ isDesktop: true,
43
+ toggle() {
44
+ var isMobileApple = /^iP/.test(navigator.platform) || /^Mac/.test(navigator.platform) && navigator.maxTouchPoints > 4;
45
+ var isMobileOther= navigator.userAgent.match(/(Android)|(webOS)|(Blackberry)|(Windows Phone)/i);
46
+ var isMobile= isMobileApple || isMobileOther;
47
+ if (navigator.share && isMobile) {
48
+ navigator.share({
49
+ title: document.title,
50
+ text: 'Schau mal was ich auf hessenschau.de gefunden habe!',
51
+ url: window.location.href,
52
+ })
53
+ .then(() => console.log('Shared successfully'))
54
+ .catch((error) => console.error('Sharing failed:', error));
55
+ } else {
56
+ if (this.$store.sharingIsOpenMobile) {
57
+ return this.close()
58
+ }
59
+ this.$refs.button.focus()
60
+ this.$store.sharingIsOpenMobile = true
61
+ }
62
+
63
+ },
64
+ close(focusAfter) {
65
+ if (!this.$store.sharingIsOpenMobile) return
66
+ this.$store.sharingIsOpenMobile = false
67
+ }
68
+ }
69
+ }
70
+ </script>
71
+ {{/with}}
@@ -1,21 +1,27 @@
1
- <div class="h-8" x-data="{ isVisible: false }">
2
- <div class="grid h-8 grid-page z-100" :class="{ 'fixed bottom-feature-box-height left-0 w-full': !$store.footerIsVisible }">
3
- <div class="flex justify-end h-8 col-full sm:col-main"
4
- :class="{ 'bg-white': $store.footerIsVisible }">
1
+ <div class="" x-data="{ isVisible: false }">
2
+ <div class="grid grid-page z-100" :class="{ 'fixed bottom-feature-box-height left-0 w-full': !$store.footerIsVisible }">
3
+ <div class="flex justify-between h-0 col-full sm:col-main"
4
+ :class="{ 'bg-white h-8': $store.footerIsVisible }"
5
+ x-show="!$store.sharingIsVisible && isVisible"
6
+ x-transition:enter="transition ease-[cubic-bezier(0.68,-0.3,0.32,1)] duration-500 transform order-first"
7
+ x-transition:enter-start="opacity-0 translate-y-8"
8
+ x-transition:enter-end="opacity-100 translate-y-0"
9
+ x-transition:leave="transition ease-[cubic-bezier(0.68,-0.3,0.32,1)] duration-300"
10
+ x-transition:leave-start="opacity-100 translate-y-0"
11
+ x-transition:leave-end="opacity-0 translate-y-12"
12
+ @scroll.window="isVisible = ((window.pageYOffset * 2) > (window.innerHeight || (document.documentElement || document.body).clientHeight))"
13
+ >
14
+ {{> components/social_sharing/social_sharing_mobile }}
15
+
5
16
  <button
6
- @scroll.window="isVisible = (window.pageYOffset > (window.innerHeight || (document.documentElement || document.body).clientHeight))"
17
+
7
18
  @click="window.scrollTo({top: 0, behavior: 'smooth'})"
8
- x-show="isVisible"
9
- x-transition:enter="transition ease-[cubic-bezier(0.68,-0.3,0.32,1)] duration-500 transform order-first"
10
- x-transition:enter-start="opacity-0 -translate-y-8"
11
- x-transition:enter-end="opacity-100 translate-y-0"
12
- x-transition:leave="transition ease-[cubic-bezier(0.68,-0.3,0.32,1)] duration-300 transform absolute"
13
- x-transition:leave-start="opacity-100 translate-y-0"
14
- x-transition:leave-end="opacity-0 translate-y-12"
15
- class="{{> components/button/utilities/button_base_classes}} {{> components/button/utilities/button_variation_classes _variant="primary"}} -mt-6 z-100 p-2 h-max mr-5 hover:scale-105 [@media(min-width:1170px)]:-mr-14"
19
+ :class="$store.footerIsVisible ? '-mt-6' : '-mt-12'"
20
+ class="{{> components/button/utilities/button_base_classes}} {{> components/button/utilities/button_variation_classes _variant="primary"}} ml-auto z-100 p-2 h-max mr-5 hover:scale-105 [@media(min-width:1170px)]:-mr-14"
16
21
  >
17
22
  {{> components/base/image/icon _icon="arrow-up" _addClass="w-5 h-5 fill-current dark:fill-link-dark"}}
18
23
  </button>
24
+
19
25
  </div>
20
26
  </div>
21
27
  {{! Dieses DIV ist notwendig um bei Seiten mit einem Hintergrund zu vermeiden dass unten eine Lücke entsteht bei der das hintergrundbild durchscheint}}
@@ -11,7 +11,7 @@
11
11
  {{> components/page/components/commentinfo }}
12
12
  </div>
13
13
  {{#unless _webview}}
14
- {{> components/social_sharing/social_sharing_compact _isVertical=false}}
14
+ {{> components/social_sharing/social_sharing_horizontal }}
15
15
  {{/unless}}
16
16
  </div>
17
17
  </div>
@@ -6,7 +6,7 @@
6
6
  <div
7
7
  class="relative right-0 p-1 bg-white md:h-auto">
8
8
  <ul class="flex flex-col gap-3">
9
- {{> components/social_sharing/social_sharing_compact_icons }}
9
+ {{> components/social_sharing/social_sharing_icons _socialSharingType="vertical-desktop" }}
10
10
  </ul>
11
11
  </div>
12
12
  </div>
@@ -0,0 +1,72 @@
1
+ {{~#with this.socialSharing ~}}
2
+ <div x-data="stickySharingHandler"
3
+ x-init="$watch('$store.sharingIsVisible', () => {$store.sharingIsOpenHorizontal = false; $store.sharingIsOpenMobile = false})"
4
+ class="flex self-center justify-end ml-3 grow"
5
+ x-intersect:leave="$store.sharingIsVisible=false"
6
+ x-intersect:enter="$store.sharingIsVisible=true"
7
+ x-on:resize.window="$store.sharingIsOpenHorizontal = false"
8
+ x-on:keydown.escape.prevent.stop="close($refs.button)"
9
+ @click.outside="close()"
10
+ >
11
+ <div class="relative right-0 flex gap-3 bg-white md:h-auto" >
12
+ <button
13
+ class="{{#with ../this.trackingData}}js-load {{/with}}order-2 p-2 text-white border border-button bg-button ds-button font-heading hover:bg-button--dark hover:border-button--dark active:bg-button--dark group lg:hidden"
14
+ x-ref="button"
15
+ x-on:click="toggle()"
16
+ :aria-expanded="open"
17
+ :aria-controls="$id('dropdown-button')"
18
+ x-show="$store.sharingIsVisible"
19
+ {{#with ../this.trackingData}}
20
+ data-hr-click-tracking='{"settings": [{"type":"uxAction","secondLevelId": "{{this.secondLevelId}}","clickLabel": "socialShareClick::sharingmenuopened"}]}'
21
+ {{/with}}
22
+
23
+ >
24
+ {{> components/base/image/icon _addClass="w-5 h-5 fill-current group-hover:fill-link--dark" _icon="sharing" _iconmap="icons" }}
25
+ </button>
26
+ <div
27
+ x-ref="panel"
28
+ :class="$store.sharingIsOpenHorizontal ? 'flex' : 'hidden '"
29
+ :id="$id('dropdown-button')"
30
+ class="self-center bg-white h-8 absolute right-[50px] md:relative md:right-0 md:h-auto lg:flex"
31
+ >
32
+ <ul class="flex gap-3">
33
+ {{> components/social_sharing/social_sharing_icons _socialSharingType="metadatabox"}}
34
+ </ul>
35
+ </div>
36
+ </div>
37
+ </div>
38
+ <script>
39
+ function stickySharingHandler(){
40
+ return {
41
+ open: false,
42
+ sharingIsVisible: true,
43
+ isDesktop: true,
44
+ toggle() {
45
+ var isMobileApple = /^iP/.test(navigator.platform) || /^Mac/.test(navigator.platform) && navigator.maxTouchPoints > 4;
46
+ var isMobileOther= navigator.userAgent.match(/(Android)|(webOS)|(Blackberry)|(Windows Phone)/i);
47
+ var isMobile= isMobileApple || isMobileOther;
48
+ if (navigator.share && isMobile) {
49
+ navigator.share({
50
+ title: document.title,
51
+ text: 'Schau mal was ich auf hessenschau.de gefunden habe!',
52
+ url: window.location.href,
53
+ })
54
+ .then(() => console.log('Shared successfully'))
55
+ .catch((error) => console.error('Sharing failed:', error));
56
+ } else {
57
+ if (this.$store.sharingIsOpenHorizontal) {
58
+ return this.close()
59
+ }
60
+ this.$refs.button.focus()
61
+ this.$store.sharingIsOpenHorizontal = true
62
+
63
+ }
64
+ },
65
+ close(focusAfter) {
66
+ if (!this.$store.sharingIsOpenHorizontal) return
67
+ this.$store.sharingIsOpenHorizontal = false
68
+ }
69
+ }
70
+ }
71
+ </script>
72
+ {{/with}}