hr-design-system-handlebars 1.83.7 → 1.83.8
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 +12 -0
- package/dist/assets/index.css +3 -3
- package/dist/assets/js/alpine.js +5 -2
- package/dist/assets/js/components/social_sharing/socialSharingHandler.alpine.js +43 -0
- package/dist/views/components/page/story/story_article.hbs +2 -4
- package/dist/views/components/social_sharing/social_sharing_copytext.hbs +15 -13
- package/dist/views/components/social_sharing/social_sharing_horizontal.hbs +11 -46
- package/dist/views/components/social_sharing/social_sharing_icons.hbs +5 -5
- package/dist/views/components/social_sharing/social_sharing_mobile.hbs +9 -44
- package/dist/views_static/components/page/story/story_article.hbs +2 -4
- package/dist/views_static/components/social_sharing/social_sharing_copytext.hbs +15 -13
- package/dist/views_static/components/social_sharing/social_sharing_horizontal.hbs +11 -46
- package/dist/views_static/components/social_sharing/social_sharing_icons.hbs +5 -5
- package/dist/views_static/components/social_sharing/social_sharing_mobile.hbs +9 -44
- package/package.json +1 -1
- package/src/assets/js/alpine.js +5 -2
- package/src/stories/views/components/page/story/story_article.hbs +2 -4
- package/src/stories/views/components/social_sharing/socialSharingHandler.alpine.js +43 -0
- package/src/stories/views/components/social_sharing/social_sharing_copytext.hbs +15 -13
- package/src/stories/views/components/social_sharing/social_sharing_horizontal.hbs +11 -46
- package/src/stories/views/components/social_sharing/social_sharing_icons.hbs +5 -5
- package/src/stories/views/components/social_sharing/social_sharing_mobile.hbs +9 -44
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
# v1.83.8 (Tue Jul 23 2024)
|
|
2
|
+
|
|
3
|
+
#### 🐛 Bug Fix
|
|
4
|
+
|
|
5
|
+
- DPE-3261 - Social Sharing Tracking noch fehlerhaft [#1025](https://github.com/mumprod/hr-design-system-handlebars/pull/1025) ([@vascoeduardo](https://github.com/vascoeduardo))
|
|
6
|
+
|
|
7
|
+
#### Authors: 1
|
|
8
|
+
|
|
9
|
+
- Vasco ([@vascoeduardo](https://github.com/vascoeduardo))
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
1
13
|
# v1.83.7 (Fri Jul 19 2024)
|
|
2
14
|
|
|
3
15
|
#### 🐛 Bug Fix
|
package/dist/assets/index.css
CHANGED
|
@@ -3330,7 +3330,7 @@ article.indexTextDS .indexTextHighlighted .link {
|
|
|
3330
3330
|
border-bottom-color: var(--color-secondary-ds);
|
|
3331
3331
|
}
|
|
3332
3332
|
.counter-reset {
|
|
3333
|
-
counter-reset:
|
|
3333
|
+
counter-reset: cnt1721740209898;
|
|
3334
3334
|
}
|
|
3335
3335
|
.hyphens-auto {
|
|
3336
3336
|
-webkit-hyphens: auto;
|
|
@@ -3738,7 +3738,7 @@ article.indexTextDS .indexTextHighlighted .link {
|
|
|
3738
3738
|
--tw-ring-color: rgba(255, 255, 255, 0.5);
|
|
3739
3739
|
}
|
|
3740
3740
|
.-ordered {
|
|
3741
|
-
counter-increment:
|
|
3741
|
+
counter-increment: cnt1721740209898 1;
|
|
3742
3742
|
}
|
|
3743
3743
|
.-ordered::before {
|
|
3744
3744
|
position: absolute;
|
|
@@ -3754,7 +3754,7 @@ article.indexTextDS .indexTextHighlighted .link {
|
|
|
3754
3754
|
letter-spacing: .0125em;
|
|
3755
3755
|
--tw-text-opacity: 1;
|
|
3756
3756
|
color: rgba(0, 0, 0, var(--tw-text-opacity));
|
|
3757
|
-
content: counter(
|
|
3757
|
+
content: counter(cnt1721740209898);
|
|
3758
3758
|
}
|
|
3759
3759
|
/*! ****************************/
|
|
3760
3760
|
/*! DataPolicy stuff */
|
package/dist/assets/js/alpine.js
CHANGED
|
@@ -17,6 +17,7 @@ AsyncAlpine.init(Alpine)
|
|
|
17
17
|
.data('slider', () =>
|
|
18
18
|
import('components/horizontal_scroll_container/horizontal_scroll_container.alpine.js')
|
|
19
19
|
)
|
|
20
|
+
.data('socialSharingHandler', ()=> import('components/social_sharing/socialSharingHandler.alpine.js'))
|
|
20
21
|
.start()
|
|
21
22
|
|
|
22
23
|
window.Alpine = Alpine
|
|
@@ -41,8 +42,10 @@ Alpine.store('subNavIsVisible', false)
|
|
|
41
42
|
Alpine.store('footerIsVisible', false)
|
|
42
43
|
Alpine.store('sectionNavIsVisible', false)
|
|
43
44
|
Alpine.store('sharingIsVisible', false)
|
|
44
|
-
Alpine.store('
|
|
45
|
-
|
|
45
|
+
Alpine.store('sharingIsOpen', {
|
|
46
|
+
metadatabox: false,
|
|
47
|
+
mobilesticky: false
|
|
48
|
+
})
|
|
46
49
|
Alpine.store('sharingBottomPos', {
|
|
47
50
|
current: '0'
|
|
48
51
|
})
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { uxAction } from 'base/tracking/pianoHelper.subfeature'
|
|
2
|
+
|
|
3
|
+
export default (module) => ({
|
|
4
|
+
open: false,
|
|
5
|
+
sharingIsVisible: true,
|
|
6
|
+
isDesktop: true,
|
|
7
|
+
|
|
8
|
+
toggle() {
|
|
9
|
+
|
|
10
|
+
var isMobileApple = /^iP/.test(navigator.platform) || /^Mac/.test(navigator.platform) && navigator.maxTouchPoints > 4;
|
|
11
|
+
var isMobileOther= navigator.userAgent.match(/(Android)|(webOS)|(Blackberry)|(Windows Phone)/i);
|
|
12
|
+
var isMobile= isMobileApple || isMobileOther;
|
|
13
|
+
|
|
14
|
+
if (navigator.share && isMobile) {
|
|
15
|
+
navigator.share({
|
|
16
|
+
title: document.title,
|
|
17
|
+
text: 'Schau mal was ich auf hessenschau.de gefunden habe!',
|
|
18
|
+
url: window.location.href,
|
|
19
|
+
})
|
|
20
|
+
.then(() => {
|
|
21
|
+
console.log('Shared successfully');
|
|
22
|
+
uxAction('socialShareClick::'+module+'::nativeShare');
|
|
23
|
+
console.log('tracked: socialShareClick::'+module+'::nativeShare');
|
|
24
|
+
})
|
|
25
|
+
.catch((error) => console.error('Sharing failed:', error));
|
|
26
|
+
} else {
|
|
27
|
+
if (this.$store.sharingIsOpen[module]) {
|
|
28
|
+
return this.close(true)
|
|
29
|
+
}
|
|
30
|
+
this.$refs.button.focus()
|
|
31
|
+
this.$store.sharingIsOpen[module] = true
|
|
32
|
+
uxAction('socialShareClick::'+module+'::sharingIconOpen');
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
close(trackClick) {
|
|
36
|
+
if (!this.$store.sharingIsOpen[module]) return
|
|
37
|
+
this.$store.sharingIsOpen[module] = false
|
|
38
|
+
if(trackClick) {
|
|
39
|
+
uxAction('socialShareClick::'+module+'::sharingIconClose');
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
})
|
|
@@ -27,10 +27,8 @@
|
|
|
27
27
|
{{/with}}
|
|
28
28
|
{{/unless}}
|
|
29
29
|
|
|
30
|
-
{{#unless ../../_webview-adjust_context}}
|
|
31
|
-
{{
|
|
32
|
-
{{> components/social_sharing/social_sharing_copytext _useSticky=(configProperty "templates.useStickyNav")}}
|
|
33
|
-
{{~/with~}}
|
|
30
|
+
{{#unless ../../_webview-adjust_context}}
|
|
31
|
+
{{> components/social_sharing/social_sharing_copytext _useSticky=(configProperty "templates.useStickyNav")}}
|
|
34
32
|
{{/unless}}
|
|
35
33
|
{{~> components/content/copytext/copytext _isWebview=../../_webview-adjust_context ~}}
|
|
36
34
|
|
|
@@ -1,14 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
{{#
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
1
|
+
{{~#with this.socialSharing ~}}
|
|
2
|
+
<div x-show="$screen('lg') && $store.sharingIsVisible == false && document.querySelector('.copytextWrapper').offsetHeight > 220" x-init="" class="{{#unless ../_useSticky}}top-0 {{/unless}}sticky w-10 col-start-2 pt-6 z-100 h-fit"
|
|
3
|
+
{{#if ../_useSticky}}
|
|
4
|
+
:class="{'top-[142px]': $store.sectionNavIsVisible && $store.subNavIsVisible && $screen('lg') ,
|
|
5
|
+
'top-[106px]': $store.sectionNavIsVisible && !$store.subNavIsVisible && $screen('lg') ,
|
|
6
|
+
'top-[61px]' : !$store.sectionNavIsVisible && $screen('lg')}"
|
|
7
|
+
{{/if}}
|
|
8
|
+
>
|
|
9
|
+
<div
|
|
10
|
+
class="relative right-0 p-1 bg-white md:h-auto">
|
|
11
|
+
<ul class="flex flex-col gap-3">
|
|
12
|
+
{{> components/social_sharing/social_sharing_icons _socialSharingType="vertical-desktop" _trackingData=../this.trackingData}}
|
|
13
|
+
</ul>
|
|
14
|
+
</div>
|
|
13
15
|
</div>
|
|
14
|
-
|
|
16
|
+
{{/with}}
|
|
@@ -1,73 +1,38 @@
|
|
|
1
1
|
{{~#with this.socialSharing ~}}
|
|
2
|
-
<div
|
|
3
|
-
x-
|
|
2
|
+
<div
|
|
3
|
+
x-data="socialSharingHandler('metadatabox')"
|
|
4
|
+
x-init="$watch('$store.sharingIsVisible', () => {$store.sharingIsOpen.metadatabox = false; $store.sharingIsOpen.mobilesticky = false})"
|
|
4
5
|
class="flex self-center justify-end ml-3 grow"
|
|
5
6
|
x-intersect:leave="$store.sharingIsVisible=false"
|
|
6
7
|
x-intersect:enter="$store.sharingIsVisible=true"
|
|
7
|
-
x-on:resize.window="$store.
|
|
8
|
-
x-on:keydown.escape.prevent.stop="close(
|
|
8
|
+
x-on:resize.window="$store.sharingIsOpen.metadatabox = false"
|
|
9
|
+
x-on:keydown.escape.prevent.stop="close()"
|
|
9
10
|
@click.outside="close()"
|
|
11
|
+
ax-load
|
|
12
|
+
x-ignore
|
|
10
13
|
>
|
|
11
14
|
<div class="relative right-0 flex gap-3 bg-white md:h-auto" >
|
|
12
15
|
<button
|
|
13
|
-
class="
|
|
16
|
+
class="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
17
|
x-ref="button"
|
|
15
18
|
x-on:click="toggle()"
|
|
16
19
|
:aria-expanded="open"
|
|
17
20
|
:aria-controls="$id('dropdown-button')"
|
|
18
21
|
aria-label="{{loca "share_linktitle" }}"
|
|
19
|
-
x-show="$store.sharingIsVisible"
|
|
20
|
-
{{#with ../this.trackingData}}
|
|
21
|
-
data-hr-click-tracking='{"settings": [{"type":"uxAction","secondLevelId": "{{this.secondLevelId}}","clickLabel": "socialShareClick::sharingmenuopened"}]}'
|
|
22
|
-
{{/with}}
|
|
23
|
-
|
|
22
|
+
x-show="$store.sharingIsVisible"
|
|
24
23
|
>
|
|
25
24
|
{{> components/base/image/icon _addClass="w-5 h-5 fill-current group-hover:fill-link--dark" _icon="sharing" _iconmap="icons" }}
|
|
26
25
|
</button>
|
|
27
26
|
<div
|
|
28
27
|
x-ref="panel"
|
|
29
|
-
:class="{ 'hidden': !$store.
|
|
28
|
+
:class="{ 'hidden': !$store.sharingIsOpen.metadatabox,'flex': $store.sharingIsOpen.metadatabox }"
|
|
30
29
|
:id="$id('dropdown-button')"
|
|
31
30
|
class="self-center bg-white h-8 absolute right-[50px] md:relative md:right-0 md:h-auto hidden lg:flex"
|
|
32
31
|
>
|
|
33
32
|
<ul class="flex gap-3">
|
|
34
|
-
{{> components/social_sharing/social_sharing_icons _socialSharingType="metadatabox"}}
|
|
33
|
+
{{> components/social_sharing/social_sharing_icons _socialSharingType="metadatabox" _trackingData=../this.trackingData}}
|
|
35
34
|
</ul>
|
|
36
35
|
</div>
|
|
37
36
|
</div>
|
|
38
37
|
</div>
|
|
39
|
-
<script>
|
|
40
|
-
function stickySharingHandler(){
|
|
41
|
-
return {
|
|
42
|
-
open: false,
|
|
43
|
-
sharingIsVisible: true,
|
|
44
|
-
isDesktop: true,
|
|
45
|
-
toggle() {
|
|
46
|
-
var isMobileApple = /^iP/.test(navigator.platform) || /^Mac/.test(navigator.platform) && navigator.maxTouchPoints > 4;
|
|
47
|
-
var isMobileOther= navigator.userAgent.match(/(Android)|(webOS)|(Blackberry)|(Windows Phone)/i);
|
|
48
|
-
var isMobile= isMobileApple || isMobileOther;
|
|
49
|
-
if (navigator.share && isMobile) {
|
|
50
|
-
navigator.share({
|
|
51
|
-
title: document.title,
|
|
52
|
-
text: 'Schau mal was ich auf hessenschau.de gefunden habe!',
|
|
53
|
-
url: window.location.href,
|
|
54
|
-
})
|
|
55
|
-
.then(() => console.log('Shared successfully'))
|
|
56
|
-
.catch((error) => console.error('Sharing failed:', error));
|
|
57
|
-
} else {
|
|
58
|
-
if (this.$store.sharingIsOpenHorizontal) {
|
|
59
|
-
return this.close()
|
|
60
|
-
}
|
|
61
|
-
this.$refs.button.focus()
|
|
62
|
-
this.$store.sharingIsOpenHorizontal = true
|
|
63
|
-
|
|
64
|
-
}
|
|
65
|
-
},
|
|
66
|
-
close(focusAfter) {
|
|
67
|
-
if (!this.$store.sharingIsOpenHorizontal) return
|
|
68
|
-
this.$store.sharingIsOpenHorizontal = false
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
</script>
|
|
73
38
|
{{/with}}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
title="{{loca "share_copy_linktitle" }}"
|
|
5
5
|
data-url="{{this}}"
|
|
6
6
|
{{#with ../_trackingData}}
|
|
7
|
-
data-hr-click-tracking='{"settings": [{"type":"uxAction","secondLevelId": "{{this.secondLevelId}}","clickLabel": "socialShareClick::{{if
|
|
7
|
+
data-hr-click-tracking='{"settings": [{"type":"uxAction","secondLevelId": "{{this.secondLevelId}}","clickLabel": "socialShareClick::{{if ../../_socialSharingType ../../_socialSharingType "default" }}::copybutton"}]}'
|
|
8
8
|
{{/with}}
|
|
9
9
|
>
|
|
10
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>
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
rel="noopener noreferrer"
|
|
49
49
|
title="{{loca "share_x_linktitle" }}"
|
|
50
50
|
{{#with ../_trackingData}}
|
|
51
|
-
data-hr-click-tracking='{"settings": [{"type":"uxAction","secondLevelId": "{{this.secondLevelId}}","clickLabel": "socialShareClick::{{if
|
|
51
|
+
data-hr-click-tracking='{"settings": [{"type":"uxAction","secondLevelId": "{{this.secondLevelId}}","clickLabel": "socialShareClick::{{if ../../_socialSharingType ../../_socialSharingType "default" }}::X"}]}'
|
|
52
52
|
{{/with}}
|
|
53
53
|
>
|
|
54
54
|
{{~> components/base/image/icon _addClass="w-full h-full fill-link hover:scale-105 " _icon="x-ds" _iconmap="icons" ~}}
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
rel="noopener noreferrer"
|
|
65
65
|
title="{{loca "share_facebook_linktitle" }}"
|
|
66
66
|
{{#with ../_trackingData}}
|
|
67
|
-
data-hr-click-tracking='{"settings": [{"type":"uxAction","secondLevelId": "{{this.secondLevelId}}","clickLabel": "socialShareClick::{{if
|
|
67
|
+
data-hr-click-tracking='{"settings": [{"type":"uxAction","secondLevelId": "{{this.secondLevelId}}","clickLabel": "socialShareClick::{{if ../../_socialSharingType ../../_socialSharingType "default" }}::facebook"}]}'
|
|
68
68
|
{{/with}}
|
|
69
69
|
>
|
|
70
70
|
{{~> components/base/image/icon _addClass="w-full h-full fill-link hover:scale-105" _icon="facebook-ds" _iconmap="icons" ~}}
|
|
@@ -80,7 +80,7 @@
|
|
|
80
80
|
rel="noopener noreferrer"
|
|
81
81
|
title="{{loca "share_whatsapp_linktitle" }}"
|
|
82
82
|
{{#with ../_trackingData}}
|
|
83
|
-
data-hr-click-tracking='{"settings": [{"type":"uxAction","secondLevelId": "{{this.secondLevelId}}","clickLabel": "socialShareClick::{{if
|
|
83
|
+
data-hr-click-tracking='{"settings": [{"type":"uxAction","secondLevelId": "{{this.secondLevelId}}","clickLabel": "socialShareClick::{{if ../../_socialSharingType ../../_socialSharingType "default" }}::whatsapp"}]}'
|
|
84
84
|
{{/with}}
|
|
85
85
|
>
|
|
86
86
|
{{~> components/base/image/icon _addClass="w-full h-full fill-link hover:scale-105" _icon="whatsapp-ds" _iconmap="icons" ~}}
|
|
@@ -94,7 +94,7 @@
|
|
|
94
94
|
href="{{this}}"
|
|
95
95
|
title="{{loca "share_mail_linktitle" }}"
|
|
96
96
|
{{#with ../_trackingData}}
|
|
97
|
-
data-hr-click-tracking='{"settings": [{"type":"uxAction","secondLevelId": "{{this.secondLevelId}}","clickLabel": "socialShareClick::{{if
|
|
97
|
+
data-hr-click-tracking='{"settings": [{"type":"uxAction","secondLevelId": "{{this.secondLevelId}}","clickLabel": "socialShareClick::{{if ../../_socialSharingType ../../_socialSharingType "default" }}::mailto"}]}'
|
|
98
98
|
{{/with}}
|
|
99
99
|
>
|
|
100
100
|
{{~> components/base/image/icon _addClass="w-full h-full fill-link hover:scale-105" _icon="kontakt-ds" _iconmap="icons" ~}}
|
|
@@ -1,71 +1,36 @@
|
|
|
1
1
|
|
|
2
2
|
{{~#with this.socialSharing ~}}
|
|
3
|
-
<div x-data="
|
|
3
|
+
<div x-data="socialSharingHandler('mobilesticky')"
|
|
4
4
|
class=" relative ml-5 z-100 h-9.5 w-9.5"
|
|
5
5
|
:class="$store.footerIsVisible ? '-mt-6' : '-mt-12'"
|
|
6
|
-
x-on:resize.window="$store.
|
|
7
|
-
x-on:keydown.escape.prevent.stop="close(
|
|
6
|
+
x-on:resize.window="$store.sharingIsOpen.mobilesticky = false"
|
|
7
|
+
x-on:keydown.escape.prevent.stop="close()"
|
|
8
8
|
@click.outside="close()"
|
|
9
|
+
ax-load
|
|
10
|
+
x-ignore
|
|
9
11
|
>
|
|
10
12
|
<div class="absolute bottom-0 flex flex-col self-center gap-3 bg-white">
|
|
13
|
+
|
|
11
14
|
<button
|
|
12
|
-
class="
|
|
15
|
+
class="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
16
|
x-ref="button"
|
|
14
17
|
x-on:click="toggle()"
|
|
15
18
|
:aria-expanded="open"
|
|
16
19
|
:aria-controls="$id('dropdown-button')"
|
|
17
20
|
aria-label='{{loca "share_linktitle" }}'
|
|
18
|
-
{{#with ../this.trackingData}}
|
|
19
|
-
data-hr-click-tracking='{"settings": [{"type":"uxAction","secondLevelId": "{{this.secondLevelId}}","clickLabel": "socialShareClick::sharingmenuopened"}]}'
|
|
20
|
-
{{/with}}
|
|
21
|
-
|
|
22
21
|
>
|
|
23
22
|
{{> components/base/image/icon _addClass="w-5 h-5 fill-current group-hover:fill-link--dark" _icon="sharing" _iconmap="icons" }}
|
|
24
23
|
</button>
|
|
25
24
|
<div
|
|
26
25
|
x-ref="panel"
|
|
27
|
-
:class="$store.
|
|
26
|
+
:class="$store.sharingIsOpen.mobilesticky ? 'flex' : 'hidden '"
|
|
28
27
|
:id="$id('dropdown-button')"
|
|
29
28
|
class="relative right-0 self-center bg-white md:h-auto lg:hidden"
|
|
30
29
|
>
|
|
31
30
|
<ul class="flex flex-col gap-3 mt-2">
|
|
32
|
-
{{> components/social_sharing/social_sharing_icons _socialSharingType="
|
|
31
|
+
{{> components/social_sharing/social_sharing_icons _socialSharingType="mobilesticky" _trackingData=../this.trackingData}}
|
|
33
32
|
</ul>
|
|
34
33
|
</div>
|
|
35
34
|
</div>
|
|
36
35
|
</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
36
|
{{/with}}
|
|
@@ -27,10 +27,8 @@
|
|
|
27
27
|
{{/with}}
|
|
28
28
|
{{/unless}}
|
|
29
29
|
|
|
30
|
-
{{#unless _webview}}
|
|
31
|
-
{{
|
|
32
|
-
{{> components/social_sharing/social_sharing_copytext _useSticky=(configProperty "templates.useStickyNav")}}
|
|
33
|
-
{{~/with~}}
|
|
30
|
+
{{#unless _webview}}
|
|
31
|
+
{{> components/social_sharing/social_sharing_copytext _useSticky=(configProperty "templates.useStickyNav")}}
|
|
34
32
|
{{/unless}}
|
|
35
33
|
{{~> components/content/copytext/copytext _isWebview=_webview ~}}
|
|
36
34
|
|
|
@@ -1,14 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
{{#
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
1
|
+
{{~#with this.socialSharing ~}}
|
|
2
|
+
<div x-show="$screen('lg') && $store.sharingIsVisible == false && document.querySelector('.copytextWrapper').offsetHeight > 220" x-init="" class="{{#unless ../_useSticky}}top-0 {{/unless}}sticky w-10 col-start-2 pt-6 z-100 h-fit"
|
|
3
|
+
{{#if ../_useSticky}}
|
|
4
|
+
:class="{'top-[142px]': $store.sectionNavIsVisible && $store.subNavIsVisible && $screen('lg') ,
|
|
5
|
+
'top-[106px]': $store.sectionNavIsVisible && !$store.subNavIsVisible && $screen('lg') ,
|
|
6
|
+
'top-[61px]' : !$store.sectionNavIsVisible && $screen('lg')}"
|
|
7
|
+
{{/if}}
|
|
8
|
+
>
|
|
9
|
+
<div
|
|
10
|
+
class="relative right-0 p-1 bg-white md:h-auto">
|
|
11
|
+
<ul class="flex flex-col gap-3">
|
|
12
|
+
{{> components/social_sharing/social_sharing_icons _socialSharingType="vertical-desktop" _trackingData=../this.trackingData}}
|
|
13
|
+
</ul>
|
|
14
|
+
</div>
|
|
13
15
|
</div>
|
|
14
|
-
|
|
16
|
+
{{/with}}
|
|
@@ -1,73 +1,38 @@
|
|
|
1
1
|
{{~#with this.socialSharing ~}}
|
|
2
|
-
<div
|
|
3
|
-
x-
|
|
2
|
+
<div
|
|
3
|
+
x-data="socialSharingHandler('metadatabox')"
|
|
4
|
+
x-init="$watch('$store.sharingIsVisible', () => {$store.sharingIsOpen.metadatabox = false; $store.sharingIsOpen.mobilesticky = false})"
|
|
4
5
|
class="flex self-center justify-end ml-3 grow"
|
|
5
6
|
x-intersect:leave="$store.sharingIsVisible=false"
|
|
6
7
|
x-intersect:enter="$store.sharingIsVisible=true"
|
|
7
|
-
x-on:resize.window="$store.
|
|
8
|
-
x-on:keydown.escape.prevent.stop="close(
|
|
8
|
+
x-on:resize.window="$store.sharingIsOpen.metadatabox = false"
|
|
9
|
+
x-on:keydown.escape.prevent.stop="close()"
|
|
9
10
|
@click.outside="close()"
|
|
11
|
+
ax-load
|
|
12
|
+
x-ignore
|
|
10
13
|
>
|
|
11
14
|
<div class="relative right-0 flex gap-3 bg-white md:h-auto" >
|
|
12
15
|
<button
|
|
13
|
-
class="
|
|
16
|
+
class="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
17
|
x-ref="button"
|
|
15
18
|
x-on:click="toggle()"
|
|
16
19
|
:aria-expanded="open"
|
|
17
20
|
:aria-controls="$id('dropdown-button')"
|
|
18
21
|
aria-label="{{loca "share_linktitle" }}"
|
|
19
|
-
x-show="$store.sharingIsVisible"
|
|
20
|
-
{{#with ../this.trackingData}}
|
|
21
|
-
data-hr-click-tracking='{"settings": [{"type":"uxAction","secondLevelId": "{{this.secondLevelId}}","clickLabel": "socialShareClick::sharingmenuopened"}]}'
|
|
22
|
-
{{/with}}
|
|
23
|
-
|
|
22
|
+
x-show="$store.sharingIsVisible"
|
|
24
23
|
>
|
|
25
24
|
{{> components/base/image/icon _addClass="w-5 h-5 fill-current group-hover:fill-link--dark" _icon="sharing" _iconmap="icons" }}
|
|
26
25
|
</button>
|
|
27
26
|
<div
|
|
28
27
|
x-ref="panel"
|
|
29
|
-
:class="{ 'hidden': !$store.
|
|
28
|
+
:class="{ 'hidden': !$store.sharingIsOpen.metadatabox,'flex': $store.sharingIsOpen.metadatabox }"
|
|
30
29
|
:id="$id('dropdown-button')"
|
|
31
30
|
class="self-center bg-white h-8 absolute right-[50px] md:relative md:right-0 md:h-auto hidden lg:flex"
|
|
32
31
|
>
|
|
33
32
|
<ul class="flex gap-3">
|
|
34
|
-
{{> components/social_sharing/social_sharing_icons _socialSharingType="metadatabox"}}
|
|
33
|
+
{{> components/social_sharing/social_sharing_icons _socialSharingType="metadatabox" _trackingData=../this.trackingData}}
|
|
35
34
|
</ul>
|
|
36
35
|
</div>
|
|
37
36
|
</div>
|
|
38
37
|
</div>
|
|
39
|
-
<script>
|
|
40
|
-
function stickySharingHandler(){
|
|
41
|
-
return {
|
|
42
|
-
open: false,
|
|
43
|
-
sharingIsVisible: true,
|
|
44
|
-
isDesktop: true,
|
|
45
|
-
toggle() {
|
|
46
|
-
var isMobileApple = /^iP/.test(navigator.platform) || /^Mac/.test(navigator.platform) && navigator.maxTouchPoints > 4;
|
|
47
|
-
var isMobileOther= navigator.userAgent.match(/(Android)|(webOS)|(Blackberry)|(Windows Phone)/i);
|
|
48
|
-
var isMobile= isMobileApple || isMobileOther;
|
|
49
|
-
if (navigator.share && isMobile) {
|
|
50
|
-
navigator.share({
|
|
51
|
-
title: document.title,
|
|
52
|
-
text: 'Schau mal was ich auf hessenschau.de gefunden habe!',
|
|
53
|
-
url: window.location.href,
|
|
54
|
-
})
|
|
55
|
-
.then(() => console.log('Shared successfully'))
|
|
56
|
-
.catch((error) => console.error('Sharing failed:', error));
|
|
57
|
-
} else {
|
|
58
|
-
if (this.$store.sharingIsOpenHorizontal) {
|
|
59
|
-
return this.close()
|
|
60
|
-
}
|
|
61
|
-
this.$refs.button.focus()
|
|
62
|
-
this.$store.sharingIsOpenHorizontal = true
|
|
63
|
-
|
|
64
|
-
}
|
|
65
|
-
},
|
|
66
|
-
close(focusAfter) {
|
|
67
|
-
if (!this.$store.sharingIsOpenHorizontal) return
|
|
68
|
-
this.$store.sharingIsOpenHorizontal = false
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
</script>
|
|
73
38
|
{{/with}}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
title="{{loca "share_copy_linktitle" }}"
|
|
5
5
|
data-url="{{this}}"
|
|
6
6
|
{{#with ../_trackingData}}
|
|
7
|
-
data-hr-click-tracking='{"settings": [{"type":"uxAction","secondLevelId": "{{this.secondLevelId}}","clickLabel": "socialShareClick::{{if
|
|
7
|
+
data-hr-click-tracking='{"settings": [{"type":"uxAction","secondLevelId": "{{this.secondLevelId}}","clickLabel": "socialShareClick::{{if ../../_socialSharingType ../../_socialSharingType "default" }}::copybutton"}]}'
|
|
8
8
|
{{/with}}
|
|
9
9
|
>
|
|
10
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>
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
rel="noopener noreferrer"
|
|
49
49
|
title="{{loca "share_x_linktitle" }}"
|
|
50
50
|
{{#with ../_trackingData}}
|
|
51
|
-
data-hr-click-tracking='{"settings": [{"type":"uxAction","secondLevelId": "{{this.secondLevelId}}","clickLabel": "socialShareClick::{{if
|
|
51
|
+
data-hr-click-tracking='{"settings": [{"type":"uxAction","secondLevelId": "{{this.secondLevelId}}","clickLabel": "socialShareClick::{{if ../../_socialSharingType ../../_socialSharingType "default" }}::X"}]}'
|
|
52
52
|
{{/with}}
|
|
53
53
|
>
|
|
54
54
|
{{~> components/base/image/icon _addClass="w-full h-full fill-link hover:scale-105 " _icon="x-ds" _iconmap="icons" ~}}
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
rel="noopener noreferrer"
|
|
65
65
|
title="{{loca "share_facebook_linktitle" }}"
|
|
66
66
|
{{#with ../_trackingData}}
|
|
67
|
-
data-hr-click-tracking='{"settings": [{"type":"uxAction","secondLevelId": "{{this.secondLevelId}}","clickLabel": "socialShareClick::{{if
|
|
67
|
+
data-hr-click-tracking='{"settings": [{"type":"uxAction","secondLevelId": "{{this.secondLevelId}}","clickLabel": "socialShareClick::{{if ../../_socialSharingType ../../_socialSharingType "default" }}::facebook"}]}'
|
|
68
68
|
{{/with}}
|
|
69
69
|
>
|
|
70
70
|
{{~> components/base/image/icon _addClass="w-full h-full fill-link hover:scale-105" _icon="facebook-ds" _iconmap="icons" ~}}
|
|
@@ -80,7 +80,7 @@
|
|
|
80
80
|
rel="noopener noreferrer"
|
|
81
81
|
title="{{loca "share_whatsapp_linktitle" }}"
|
|
82
82
|
{{#with ../_trackingData}}
|
|
83
|
-
data-hr-click-tracking='{"settings": [{"type":"uxAction","secondLevelId": "{{this.secondLevelId}}","clickLabel": "socialShareClick::{{if
|
|
83
|
+
data-hr-click-tracking='{"settings": [{"type":"uxAction","secondLevelId": "{{this.secondLevelId}}","clickLabel": "socialShareClick::{{if ../../_socialSharingType ../../_socialSharingType "default" }}::whatsapp"}]}'
|
|
84
84
|
{{/with}}
|
|
85
85
|
>
|
|
86
86
|
{{~> components/base/image/icon _addClass="w-full h-full fill-link hover:scale-105" _icon="whatsapp-ds" _iconmap="icons" ~}}
|
|
@@ -94,7 +94,7 @@
|
|
|
94
94
|
href="{{this}}"
|
|
95
95
|
title="{{loca "share_mail_linktitle" }}"
|
|
96
96
|
{{#with ../_trackingData}}
|
|
97
|
-
data-hr-click-tracking='{"settings": [{"type":"uxAction","secondLevelId": "{{this.secondLevelId}}","clickLabel": "socialShareClick::{{if
|
|
97
|
+
data-hr-click-tracking='{"settings": [{"type":"uxAction","secondLevelId": "{{this.secondLevelId}}","clickLabel": "socialShareClick::{{if ../../_socialSharingType ../../_socialSharingType "default" }}::mailto"}]}'
|
|
98
98
|
{{/with}}
|
|
99
99
|
>
|
|
100
100
|
{{~> components/base/image/icon _addClass="w-full h-full fill-link hover:scale-105" _icon="kontakt-ds" _iconmap="icons" ~}}
|
|
@@ -1,71 +1,36 @@
|
|
|
1
1
|
|
|
2
2
|
{{~#with this.socialSharing ~}}
|
|
3
|
-
<div x-data="
|
|
3
|
+
<div x-data="socialSharingHandler('mobilesticky')"
|
|
4
4
|
class=" relative ml-5 z-100 h-9.5 w-9.5"
|
|
5
5
|
:class="$store.footerIsVisible ? '-mt-6' : '-mt-12'"
|
|
6
|
-
x-on:resize.window="$store.
|
|
7
|
-
x-on:keydown.escape.prevent.stop="close(
|
|
6
|
+
x-on:resize.window="$store.sharingIsOpen.mobilesticky = false"
|
|
7
|
+
x-on:keydown.escape.prevent.stop="close()"
|
|
8
8
|
@click.outside="close()"
|
|
9
|
+
ax-load
|
|
10
|
+
x-ignore
|
|
9
11
|
>
|
|
10
12
|
<div class="absolute bottom-0 flex flex-col self-center gap-3 bg-white">
|
|
13
|
+
|
|
11
14
|
<button
|
|
12
|
-
class="
|
|
15
|
+
class="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
16
|
x-ref="button"
|
|
14
17
|
x-on:click="toggle()"
|
|
15
18
|
:aria-expanded="open"
|
|
16
19
|
:aria-controls="$id('dropdown-button')"
|
|
17
20
|
aria-label='{{loca "share_linktitle" }}'
|
|
18
|
-
{{#with ../this.trackingData}}
|
|
19
|
-
data-hr-click-tracking='{"settings": [{"type":"uxAction","secondLevelId": "{{this.secondLevelId}}","clickLabel": "socialShareClick::sharingmenuopened"}]}'
|
|
20
|
-
{{/with}}
|
|
21
|
-
|
|
22
21
|
>
|
|
23
22
|
{{> components/base/image/icon _addClass="w-5 h-5 fill-current group-hover:fill-link--dark" _icon="sharing" _iconmap="icons" }}
|
|
24
23
|
</button>
|
|
25
24
|
<div
|
|
26
25
|
x-ref="panel"
|
|
27
|
-
:class="$store.
|
|
26
|
+
:class="$store.sharingIsOpen.mobilesticky ? 'flex' : 'hidden '"
|
|
28
27
|
:id="$id('dropdown-button')"
|
|
29
28
|
class="relative right-0 self-center bg-white md:h-auto lg:hidden"
|
|
30
29
|
>
|
|
31
30
|
<ul class="flex flex-col gap-3 mt-2">
|
|
32
|
-
{{> components/social_sharing/social_sharing_icons _socialSharingType="
|
|
31
|
+
{{> components/social_sharing/social_sharing_icons _socialSharingType="mobilesticky" _trackingData=../this.trackingData}}
|
|
33
32
|
</ul>
|
|
34
33
|
</div>
|
|
35
34
|
</div>
|
|
36
35
|
</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
36
|
{{/with}}
|
package/package.json
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"main": "dist/index.js",
|
|
8
8
|
"repository": "https://github.com/szuelch/hr-design-system-handlebars",
|
|
9
|
-
"version": "1.83.
|
|
9
|
+
"version": "1.83.8",
|
|
10
10
|
"scripts": {
|
|
11
11
|
"test": "echo \"Error: no test specified\" && exit 1",
|
|
12
12
|
"storybook": "storybook dev -p 6006 public",
|
package/src/assets/js/alpine.js
CHANGED
|
@@ -17,6 +17,7 @@ AsyncAlpine.init(Alpine)
|
|
|
17
17
|
.data('slider', () =>
|
|
18
18
|
import('components/horizontal_scroll_container/horizontal_scroll_container.alpine.js')
|
|
19
19
|
)
|
|
20
|
+
.data('socialSharingHandler', ()=> import('components/social_sharing/socialSharingHandler.alpine.js'))
|
|
20
21
|
.start()
|
|
21
22
|
|
|
22
23
|
window.Alpine = Alpine
|
|
@@ -41,8 +42,10 @@ Alpine.store('subNavIsVisible', false)
|
|
|
41
42
|
Alpine.store('footerIsVisible', false)
|
|
42
43
|
Alpine.store('sectionNavIsVisible', false)
|
|
43
44
|
Alpine.store('sharingIsVisible', false)
|
|
44
|
-
Alpine.store('
|
|
45
|
-
|
|
45
|
+
Alpine.store('sharingIsOpen', {
|
|
46
|
+
metadatabox: false,
|
|
47
|
+
mobilesticky: false
|
|
48
|
+
})
|
|
46
49
|
Alpine.store('sharingBottomPos', {
|
|
47
50
|
current: '0'
|
|
48
51
|
})
|
|
@@ -27,10 +27,8 @@
|
|
|
27
27
|
{{/with}}
|
|
28
28
|
{{/unless}}
|
|
29
29
|
|
|
30
|
-
{{#unless _webview-adjust_context}}
|
|
31
|
-
{{
|
|
32
|
-
{{> components/social_sharing/social_sharing_copytext _useSticky=(configProperty "templates.useStickyNav")}}
|
|
33
|
-
{{~/with~}}
|
|
30
|
+
{{#unless _webview-adjust_context}}
|
|
31
|
+
{{> components/social_sharing/social_sharing_copytext _useSticky=(configProperty "templates.useStickyNav")}}
|
|
34
32
|
{{/unless}}
|
|
35
33
|
{{~> components/content/copytext/copytext _isWebview=_webview-adjust_context ~}}
|
|
36
34
|
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { uxAction } from 'base/tracking/pianoHelper.subfeature'
|
|
2
|
+
|
|
3
|
+
export default (module) => ({
|
|
4
|
+
open: false,
|
|
5
|
+
sharingIsVisible: true,
|
|
6
|
+
isDesktop: true,
|
|
7
|
+
|
|
8
|
+
toggle() {
|
|
9
|
+
|
|
10
|
+
var isMobileApple = /^iP/.test(navigator.platform) || /^Mac/.test(navigator.platform) && navigator.maxTouchPoints > 4;
|
|
11
|
+
var isMobileOther= navigator.userAgent.match(/(Android)|(webOS)|(Blackberry)|(Windows Phone)/i);
|
|
12
|
+
var isMobile= isMobileApple || isMobileOther;
|
|
13
|
+
|
|
14
|
+
if (navigator.share && isMobile) {
|
|
15
|
+
navigator.share({
|
|
16
|
+
title: document.title,
|
|
17
|
+
text: 'Schau mal was ich auf hessenschau.de gefunden habe!',
|
|
18
|
+
url: window.location.href,
|
|
19
|
+
})
|
|
20
|
+
.then(() => {
|
|
21
|
+
console.log('Shared successfully');
|
|
22
|
+
uxAction('socialShareClick::'+module+'::nativeShare');
|
|
23
|
+
console.log('tracked: socialShareClick::'+module+'::nativeShare');
|
|
24
|
+
})
|
|
25
|
+
.catch((error) => console.error('Sharing failed:', error));
|
|
26
|
+
} else {
|
|
27
|
+
if (this.$store.sharingIsOpen[module]) {
|
|
28
|
+
return this.close(true)
|
|
29
|
+
}
|
|
30
|
+
this.$refs.button.focus()
|
|
31
|
+
this.$store.sharingIsOpen[module] = true
|
|
32
|
+
uxAction('socialShareClick::'+module+'::sharingIconOpen');
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
close(trackClick) {
|
|
36
|
+
if (!this.$store.sharingIsOpen[module]) return
|
|
37
|
+
this.$store.sharingIsOpen[module] = false
|
|
38
|
+
if(trackClick) {
|
|
39
|
+
uxAction('socialShareClick::'+module+'::sharingIconClose');
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
})
|
|
@@ -1,14 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
{{#
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
1
|
+
{{~#with this.socialSharing ~}}
|
|
2
|
+
<div x-show="$screen('lg') && $store.sharingIsVisible == false && document.querySelector('.copytextWrapper').offsetHeight > 220" x-init="" class="{{#unless ../_useSticky}}top-0 {{/unless}}sticky w-10 col-start-2 pt-6 z-100 h-fit"
|
|
3
|
+
{{#if ../_useSticky}}
|
|
4
|
+
:class="{'top-[142px]': $store.sectionNavIsVisible && $store.subNavIsVisible && $screen('lg') ,
|
|
5
|
+
'top-[106px]': $store.sectionNavIsVisible && !$store.subNavIsVisible && $screen('lg') ,
|
|
6
|
+
'top-[61px]' : !$store.sectionNavIsVisible && $screen('lg')}"
|
|
7
|
+
{{/if}}
|
|
8
|
+
>
|
|
9
|
+
<div
|
|
10
|
+
class="relative right-0 p-1 bg-white md:h-auto">
|
|
11
|
+
<ul class="flex flex-col gap-3">
|
|
12
|
+
{{> components/social_sharing/social_sharing_icons _socialSharingType="vertical-desktop" _trackingData=../this.trackingData}}
|
|
13
|
+
</ul>
|
|
14
|
+
</div>
|
|
13
15
|
</div>
|
|
14
|
-
|
|
16
|
+
{{/with}}
|
|
@@ -1,73 +1,38 @@
|
|
|
1
1
|
{{~#with this.socialSharing ~}}
|
|
2
|
-
<div
|
|
3
|
-
x-
|
|
2
|
+
<div
|
|
3
|
+
x-data="socialSharingHandler('metadatabox')"
|
|
4
|
+
x-init="$watch('$store.sharingIsVisible', () => {$store.sharingIsOpen.metadatabox = false; $store.sharingIsOpen.mobilesticky = false})"
|
|
4
5
|
class="flex self-center justify-end ml-3 grow"
|
|
5
6
|
x-intersect:leave="$store.sharingIsVisible=false"
|
|
6
7
|
x-intersect:enter="$store.sharingIsVisible=true"
|
|
7
|
-
x-on:resize.window="$store.
|
|
8
|
-
x-on:keydown.escape.prevent.stop="close(
|
|
8
|
+
x-on:resize.window="$store.sharingIsOpen.metadatabox = false"
|
|
9
|
+
x-on:keydown.escape.prevent.stop="close()"
|
|
9
10
|
@click.outside="close()"
|
|
11
|
+
ax-load
|
|
12
|
+
x-ignore
|
|
10
13
|
>
|
|
11
14
|
<div class="relative right-0 flex gap-3 bg-white md:h-auto" >
|
|
12
15
|
<button
|
|
13
|
-
class="
|
|
16
|
+
class="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
17
|
x-ref="button"
|
|
15
18
|
x-on:click="toggle()"
|
|
16
19
|
:aria-expanded="open"
|
|
17
20
|
:aria-controls="$id('dropdown-button')"
|
|
18
21
|
aria-label="{{loca "share_linktitle" }}"
|
|
19
|
-
x-show="$store.sharingIsVisible"
|
|
20
|
-
{{#with ../this.trackingData}}
|
|
21
|
-
data-hr-click-tracking='{"settings": [{"type":"uxAction","secondLevelId": "{{this.secondLevelId}}","clickLabel": "socialShareClick::sharingmenuopened"}]}'
|
|
22
|
-
{{/with}}
|
|
23
|
-
|
|
22
|
+
x-show="$store.sharingIsVisible"
|
|
24
23
|
>
|
|
25
24
|
{{> components/base/image/icon _addClass="w-5 h-5 fill-current group-hover:fill-link--dark" _icon="sharing" _iconmap="icons" }}
|
|
26
25
|
</button>
|
|
27
26
|
<div
|
|
28
27
|
x-ref="panel"
|
|
29
|
-
:class="{ 'hidden': !$store.
|
|
28
|
+
:class="{ 'hidden': !$store.sharingIsOpen.metadatabox,'flex': $store.sharingIsOpen.metadatabox }"
|
|
30
29
|
:id="$id('dropdown-button')"
|
|
31
30
|
class="self-center bg-white h-8 absolute right-[50px] md:relative md:right-0 md:h-auto hidden lg:flex"
|
|
32
31
|
>
|
|
33
32
|
<ul class="flex gap-3">
|
|
34
|
-
{{> components/social_sharing/social_sharing_icons _socialSharingType="metadatabox"}}
|
|
33
|
+
{{> components/social_sharing/social_sharing_icons _socialSharingType="metadatabox" _trackingData=../this.trackingData}}
|
|
35
34
|
</ul>
|
|
36
35
|
</div>
|
|
37
36
|
</div>
|
|
38
37
|
</div>
|
|
39
|
-
<script>
|
|
40
|
-
function stickySharingHandler(){
|
|
41
|
-
return {
|
|
42
|
-
open: false,
|
|
43
|
-
sharingIsVisible: true,
|
|
44
|
-
isDesktop: true,
|
|
45
|
-
toggle() {
|
|
46
|
-
var isMobileApple = /^iP/.test(navigator.platform) || /^Mac/.test(navigator.platform) && navigator.maxTouchPoints > 4;
|
|
47
|
-
var isMobileOther= navigator.userAgent.match(/(Android)|(webOS)|(Blackberry)|(Windows Phone)/i);
|
|
48
|
-
var isMobile= isMobileApple || isMobileOther;
|
|
49
|
-
if (navigator.share && isMobile) {
|
|
50
|
-
navigator.share({
|
|
51
|
-
title: document.title,
|
|
52
|
-
text: 'Schau mal was ich auf hessenschau.de gefunden habe!',
|
|
53
|
-
url: window.location.href,
|
|
54
|
-
})
|
|
55
|
-
.then(() => console.log('Shared successfully'))
|
|
56
|
-
.catch((error) => console.error('Sharing failed:', error));
|
|
57
|
-
} else {
|
|
58
|
-
if (this.$store.sharingIsOpenHorizontal) {
|
|
59
|
-
return this.close()
|
|
60
|
-
}
|
|
61
|
-
this.$refs.button.focus()
|
|
62
|
-
this.$store.sharingIsOpenHorizontal = true
|
|
63
|
-
|
|
64
|
-
}
|
|
65
|
-
},
|
|
66
|
-
close(focusAfter) {
|
|
67
|
-
if (!this.$store.sharingIsOpenHorizontal) return
|
|
68
|
-
this.$store.sharingIsOpenHorizontal = false
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
</script>
|
|
73
38
|
{{/with}}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
title="{{loca "share_copy_linktitle" }}"
|
|
5
5
|
data-url="{{this}}"
|
|
6
6
|
{{#with ../_trackingData}}
|
|
7
|
-
data-hr-click-tracking='{"settings": [{"type":"uxAction","secondLevelId": "{{this.secondLevelId}}","clickLabel": "socialShareClick::{{if
|
|
7
|
+
data-hr-click-tracking='{"settings": [{"type":"uxAction","secondLevelId": "{{this.secondLevelId}}","clickLabel": "socialShareClick::{{if ../../_socialSharingType ../../_socialSharingType "default" }}::copybutton"}]}'
|
|
8
8
|
{{/with}}
|
|
9
9
|
>
|
|
10
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>
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
rel="noopener noreferrer"
|
|
49
49
|
title="{{loca "share_x_linktitle" }}"
|
|
50
50
|
{{#with ../_trackingData}}
|
|
51
|
-
data-hr-click-tracking='{"settings": [{"type":"uxAction","secondLevelId": "{{this.secondLevelId}}","clickLabel": "socialShareClick::{{if
|
|
51
|
+
data-hr-click-tracking='{"settings": [{"type":"uxAction","secondLevelId": "{{this.secondLevelId}}","clickLabel": "socialShareClick::{{if ../../_socialSharingType ../../_socialSharingType "default" }}::X"}]}'
|
|
52
52
|
{{/with}}
|
|
53
53
|
>
|
|
54
54
|
{{~> components/base/image/icon _addClass="w-full h-full fill-link hover:scale-105 " _icon="x-ds" _iconmap="icons" ~}}
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
rel="noopener noreferrer"
|
|
65
65
|
title="{{loca "share_facebook_linktitle" }}"
|
|
66
66
|
{{#with ../_trackingData}}
|
|
67
|
-
data-hr-click-tracking='{"settings": [{"type":"uxAction","secondLevelId": "{{this.secondLevelId}}","clickLabel": "socialShareClick::{{if
|
|
67
|
+
data-hr-click-tracking='{"settings": [{"type":"uxAction","secondLevelId": "{{this.secondLevelId}}","clickLabel": "socialShareClick::{{if ../../_socialSharingType ../../_socialSharingType "default" }}::facebook"}]}'
|
|
68
68
|
{{/with}}
|
|
69
69
|
>
|
|
70
70
|
{{~> components/base/image/icon _addClass="w-full h-full fill-link hover:scale-105" _icon="facebook-ds" _iconmap="icons" ~}}
|
|
@@ -80,7 +80,7 @@
|
|
|
80
80
|
rel="noopener noreferrer"
|
|
81
81
|
title="{{loca "share_whatsapp_linktitle" }}"
|
|
82
82
|
{{#with ../_trackingData}}
|
|
83
|
-
data-hr-click-tracking='{"settings": [{"type":"uxAction","secondLevelId": "{{this.secondLevelId}}","clickLabel": "socialShareClick::{{if
|
|
83
|
+
data-hr-click-tracking='{"settings": [{"type":"uxAction","secondLevelId": "{{this.secondLevelId}}","clickLabel": "socialShareClick::{{if ../../_socialSharingType ../../_socialSharingType "default" }}::whatsapp"}]}'
|
|
84
84
|
{{/with}}
|
|
85
85
|
>
|
|
86
86
|
{{~> components/base/image/icon _addClass="w-full h-full fill-link hover:scale-105" _icon="whatsapp-ds" _iconmap="icons" ~}}
|
|
@@ -94,7 +94,7 @@
|
|
|
94
94
|
href="{{this}}"
|
|
95
95
|
title="{{loca "share_mail_linktitle" }}"
|
|
96
96
|
{{#with ../_trackingData}}
|
|
97
|
-
data-hr-click-tracking='{"settings": [{"type":"uxAction","secondLevelId": "{{this.secondLevelId}}","clickLabel": "socialShareClick::{{if
|
|
97
|
+
data-hr-click-tracking='{"settings": [{"type":"uxAction","secondLevelId": "{{this.secondLevelId}}","clickLabel": "socialShareClick::{{if ../../_socialSharingType ../../_socialSharingType "default" }}::mailto"}]}'
|
|
98
98
|
{{/with}}
|
|
99
99
|
>
|
|
100
100
|
{{~> components/base/image/icon _addClass="w-full h-full fill-link hover:scale-105" _icon="kontakt-ds" _iconmap="icons" ~}}
|
|
@@ -1,71 +1,36 @@
|
|
|
1
1
|
|
|
2
2
|
{{~#with this.socialSharing ~}}
|
|
3
|
-
<div x-data="
|
|
3
|
+
<div x-data="socialSharingHandler('mobilesticky')"
|
|
4
4
|
class=" relative ml-5 z-100 h-9.5 w-9.5"
|
|
5
5
|
:class="$store.footerIsVisible ? '-mt-6' : '-mt-12'"
|
|
6
|
-
x-on:resize.window="$store.
|
|
7
|
-
x-on:keydown.escape.prevent.stop="close(
|
|
6
|
+
x-on:resize.window="$store.sharingIsOpen.mobilesticky = false"
|
|
7
|
+
x-on:keydown.escape.prevent.stop="close()"
|
|
8
8
|
@click.outside="close()"
|
|
9
|
+
ax-load
|
|
10
|
+
x-ignore
|
|
9
11
|
>
|
|
10
12
|
<div class="absolute bottom-0 flex flex-col self-center gap-3 bg-white">
|
|
13
|
+
|
|
11
14
|
<button
|
|
12
|
-
class="
|
|
15
|
+
class="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
16
|
x-ref="button"
|
|
14
17
|
x-on:click="toggle()"
|
|
15
18
|
:aria-expanded="open"
|
|
16
19
|
:aria-controls="$id('dropdown-button')"
|
|
17
20
|
aria-label='{{loca "share_linktitle" }}'
|
|
18
|
-
{{#with ../this.trackingData}}
|
|
19
|
-
data-hr-click-tracking='{"settings": [{"type":"uxAction","secondLevelId": "{{this.secondLevelId}}","clickLabel": "socialShareClick::sharingmenuopened"}]}'
|
|
20
|
-
{{/with}}
|
|
21
|
-
|
|
22
21
|
>
|
|
23
22
|
{{> components/base/image/icon _addClass="w-5 h-5 fill-current group-hover:fill-link--dark" _icon="sharing" _iconmap="icons" }}
|
|
24
23
|
</button>
|
|
25
24
|
<div
|
|
26
25
|
x-ref="panel"
|
|
27
|
-
:class="$store.
|
|
26
|
+
:class="$store.sharingIsOpen.mobilesticky ? 'flex' : 'hidden '"
|
|
28
27
|
:id="$id('dropdown-button')"
|
|
29
28
|
class="relative right-0 self-center bg-white md:h-auto lg:hidden"
|
|
30
29
|
>
|
|
31
30
|
<ul class="flex flex-col gap-3 mt-2">
|
|
32
|
-
{{> components/social_sharing/social_sharing_icons _socialSharingType="
|
|
31
|
+
{{> components/social_sharing/social_sharing_icons _socialSharingType="mobilesticky" _trackingData=../this.trackingData}}
|
|
33
32
|
</ul>
|
|
34
33
|
</div>
|
|
35
34
|
</div>
|
|
36
35
|
</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
36
|
{{/with}}
|