hr-design-system-handlebars 0.47.4 β†’ 0.47.7

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 CHANGED
@@ -1,3 +1,39 @@
1
+ # v0.47.7 (Mon Jun 13 2022)
2
+
3
+ #### πŸ› Bug Fix
4
+
5
+ - - adjusted teaserText size and Teaser Title Sizes [#242](https://github.com/mumprod/hr-design-system-handlebars/pull/242) ([@vascoeduardo](https://github.com/vascoeduardo))
6
+
7
+ #### Authors: 1
8
+
9
+ - Vasco ([@vascoeduardo](https://github.com/vascoeduardo))
10
+
11
+ ---
12
+
13
+ # v0.47.6 (Wed Jun 08 2022)
14
+
15
+ #### πŸ› Bug Fix
16
+
17
+ - revision of alternative-teaser [#240](https://github.com/mumprod/hr-design-system-handlebars/pull/240) ([@hanswurstsalat](https://github.com/hanswurstsalat))
18
+
19
+ #### Authors: 1
20
+
21
+ - Geraldo ([@hanswurstsalat](https://github.com/hanswurstsalat))
22
+
23
+ ---
24
+
25
+ # v0.47.5 (Tue Jun 07 2022)
26
+
27
+ #### πŸ› Bug Fix
28
+
29
+ - some new code in header_alpine.js [#239](https://github.com/mumprod/hr-design-system-handlebars/pull/239) ([@StefanVesper](https://github.com/StefanVesper))
30
+
31
+ #### Authors: 1
32
+
33
+ - SonicSoulSurfer ([@StefanVesper](https://github.com/StefanVesper))
34
+
35
+ ---
36
+
1
37
  # v0.47.4 (Thu Jun 02 2022)
2
38
 
3
39
  #### πŸ› Bug Fix
@@ -1451,7 +1451,7 @@ Ensure the default browser behavior of the `hidden` attribute.
1451
1451
  padding-top: 0.75rem;
1452
1452
  padding-bottom: 0.75rem;
1453
1453
  font-size: 1rem;
1454
- line-height: 1.25rem;
1454
+ line-height: 1.375rem;
1455
1455
  }
1456
1456
  .btn--xl {
1457
1457
  padding-left: 1.5rem;
@@ -1750,14 +1750,14 @@ Ensure the default browser behavior of the `hidden` attribute.
1750
1750
  -ms-flex-negative: 0;
1751
1751
  flex-shrink: 0;
1752
1752
  }
1753
- .basis-2\/5 {
1754
- -ms-flex-preferred-size: 40%;
1755
- flex-basis: 40%;
1756
- }
1757
1753
  .basis-3\/5 {
1758
1754
  -ms-flex-preferred-size: 60%;
1759
1755
  flex-basis: 60%;
1760
1756
  }
1757
+ .basis-2\/5 {
1758
+ -ms-flex-preferred-size: 40%;
1759
+ flex-basis: 40%;
1760
+ }
1761
1761
  .-translate-x-1\/2 {
1762
1762
  --tw-translate-x: -50%;
1763
1763
  -webkit-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));
@@ -1896,6 +1896,9 @@ Ensure the default browser behavior of the `hidden` attribute.
1896
1896
  -moz-column-gap: 1rem;
1897
1897
  column-gap: 1rem;
1898
1898
  }
1899
+ .gap-y-3 {
1900
+ row-gap: 0.75rem;
1901
+ }
1899
1902
  .divide-y > :not([hidden]) ~ :not([hidden]) {
1900
1903
  --tw-divide-y-reverse: 0;
1901
1904
  border-top-width: calc(1px * calc(1 - var(--tw-divide-y-reverse)));
@@ -2253,7 +2256,7 @@ Ensure the default browser behavior of the `hidden` attribute.
2253
2256
  }
2254
2257
  .text-base {
2255
2258
  font-size: 1rem;
2256
- line-height: 1.25rem;
2259
+ line-height: 1.375rem;
2257
2260
  }
2258
2261
  .text-lg {
2259
2262
  font-size: 1.125rem;
@@ -2261,7 +2264,7 @@ Ensure the default browser behavior of the `hidden` attribute.
2261
2264
  }
2262
2265
  .text-xl {
2263
2266
  font-size: 1.25rem;
2264
- line-height: 1.75rem;
2267
+ line-height: 1.675rem;
2265
2268
  }
2266
2269
  .text-2xl {
2267
2270
  font-size: 1.375rem;
@@ -2817,7 +2820,7 @@ Ensure the default browser behavior of the `hidden` attribute.
2817
2820
 
2818
2821
  .md\:text-base {
2819
2822
  font-size: 1rem;
2820
- line-height: 1.25rem;
2823
+ line-height: 1.375rem;
2821
2824
  }
2822
2825
 
2823
2826
  .md\:text-4xl {
@@ -1,5 +1,5 @@
1
1
  //Main Alpine Init Listener
2
- document.addEventListener('alpine:init', () => {
2
+ document.addEventListener('alpine:init', () => {
3
3
  // Alpine.stores for global variables
4
4
  Alpine.store('clientHeight', document.documentElement.clientHeight || document.body.clientHeight)
5
5
  Alpine.store('clientWidth', document.documentElement.clientWidth || document.body.clientWidth)
@@ -7,23 +7,24 @@ document.addEventListener('alpine:init', () => {
7
7
  Alpine.store('searchFieldOpen', false);
8
8
  Alpine.store('serviceNavIsOpen', false);
9
9
  Alpine.store('searchID', {
10
- current: '{{nextRandom}}'
10
+ current: '{{nextRandom}}'
11
11
  });
12
12
  Alpine.store('serviceID', {
13
13
  open: false,
14
- current: '0'
14
+ current: '0'
15
15
  });
16
16
  Alpine.store('navIsVisible', true);
17
+ Alpine.store('subNavIsVisible', false);
17
18
 
18
19
  // context for the main header element
19
20
  Alpine.data('mainNavigationHandler', () =>({
20
-
21
+
21
22
  debounce (callback, wait) {
22
23
  let timeoutId = null;
23
24
  return (...args) => {
24
25
  window.clearTimeout(timeoutId);
25
26
  timeoutId = window.setTimeout(() => {
26
- callback.apply(null, args);
27
+ callback.apply(null, args);
27
28
  }, wait);
28
29
  };
29
30
 
@@ -33,14 +34,15 @@ document.addEventListener('alpine:init', () => {
33
34
  let height = top.innerHeight
34
35
 
35
36
  window.addEventListener('scroll', this.debounce( () => {
36
- let winScroll = document.body.scrollTop || document.documentElement.scrollTop
37
+ let winScroll = document.body.scrollTop || document.documentElement.scrollTop
37
38
  winScroll > lastScrollTop ? this.scrollingDown = true : this.scrollingDown = false
38
39
  //let height = document.documentElement.scrollHeight - document.documentElement.clientHeight
39
40
  this.percent = Math.round((winScroll / height) * 100)
40
41
  lastScrollTop = winScroll
41
- //console.log('winscroll: '+winScroll+' height: '+height + ' percent: '+ this.percent)
42
+ //console.log('winscroll: '+winScroll+' height: '+height + ' percent: '+ this.percent)
42
43
  this.$store.navIsVisible = !this.isNavHidden()
43
- //console.log(this.$store.navIsVisible);
44
+ this.$store.subNavIsVisible = !this.isSubNavHidden()
45
+ //console.log(this.$store.navIsVisible);
44
46
  },50))
45
47
  },
46
48
  percent: 0,
@@ -52,22 +54,33 @@ document.addEventListener('alpine:init', () => {
52
54
  return this.shouldServiceNavBeHidden()
53
55
  }
54
56
  },
57
+ isSubNavHidden() {
58
+ if(this.$screen('lg')){
59
+ if (document.querySelector('.isSelectedAndOpen') !== null) {
60
+ return false
61
+ } else {
62
+ return true
63
+ }
64
+ } else {
65
+ return true
66
+ }
67
+ },
55
68
  shouldBrandNavBeHidden() {
56
- return this.percent > 0
69
+ return this.percent > 0
57
70
  },
58
71
  shouldSectionNavBeHidden() {
59
72
  return this.percent > 50 && this.scrollingDown && this.$store.burgeropen == false && this.$screen('lg')
60
73
  },
61
74
  shouldServiceNavBeHidden() {
62
- return (this.percent > 90 && !this.$screen('lg') && this.scrollingDown && this.$store.burgeropen == false)
75
+ return (this.percent > 90 && !this.$screen('lg') && this.scrollingDown && this.$store.burgeropen == false)
63
76
  },
64
77
  shouldServiceIconsBeHidden() {
65
- return (this.percent > 50 && !this.$screen('md') && this.$store.burgeropen == false && this.$store.serviceNavIsOpen == false && this.scrollingDown == true) || (this.percent > 50 && !this.$screen('md') && this.$store.burgeropen == false && this.$store.serviceNavIsOpen == false && this.scrollingDown == false)
78
+ return (this.percent > 50 && !this.$screen('md') && this.$store.burgeropen == false && this.$store.serviceNavIsOpen == false && this.scrollingDown == true) || (this.percent > 50 && !this.$screen('md') && this.$store.burgeropen == false && this.$store.serviceNavIsOpen == false && this.scrollingDown == false)
66
79
  },
67
80
  shouldFlyoutBeHidden() {
68
81
  return (this.percent > 50 && this.scrollingDown && this.$screen('lg') )
69
82
  },
70
- resetNav() {
83
+ resetNav() {
71
84
  if(window.innerWidth > 1023) {
72
85
  this.$refs.sectionnavigation.setAttribute("style","")
73
86
  } else {
@@ -85,8 +98,8 @@ document.addEventListener('alpine:init', () => {
85
98
  this.$store.clientWidth = nowClientWidth
86
99
  }
87
100
  else{
88
- // timeout is used to dispatch events after the resize is done
89
- let timeout
101
+ // timeout is used to dispatch events after the resize is done
102
+ let timeout
90
103
  clearTimeout(timeout)
91
104
  timeout = setTimeout(() => {
92
105
  this.$refs.sectionnavigation.classList.remove('hidden')
@@ -100,29 +113,29 @@ document.addEventListener('alpine:init', () => {
100
113
  nextNowClientHeight = nowClientHeight
101
114
  this.$store.clientWidth = nowClientWidth
102
115
  }
103
- },
116
+ },
104
117
  toggleSectionNav() {
105
- //false = sectionNav schließt ( mobile/tablet? --> maxHeight = 0 /// desktop? just clear maxHeight attribute )
106
- //true = sectionNav ΓΆffnet (maxheight = scrollheight)
107
- console.log('toggleSectionNav, Event: ' + this.$event.detail )
108
- if(this.$event.detail === false) {
109
- if (window.innerWidth < 1024) {
118
+ //false = sectionNav schließt ( mobile/tablet? --> maxHeight = 0 /// desktop? just clear maxHeight attribute )
119
+ //true = sectionNav ΓΆffnet (maxheight = scrollheight)
120
+ console.log('toggleSectionNav, Event: ' + this.$event.detail )
121
+ if(this.$event.detail === false) {
122
+ if (window.innerWidth < 1024) {
110
123
  this.$refs.sectionnavigation.style.maxHeight='0px'
111
- } else {
124
+ } else {
112
125
  this.$refs.sectionnavigation.style.maxHeight = ''
113
126
  }
114
127
  } else {
115
128
  let winheightcorr = parseInt(window.innerHeight) - this.$refs.sectionnavigation.offsetTop
116
129
  let navheight = parseInt(this.$refs.sectionnavigation.scrollHeight)
117
- let brandNavHeight = this.percent > 0 ? 40 : 0
118
-
130
+ let brandNavHeight = this.percent > 0 ? 40 : 0
131
+
119
132
  if(navheight > winheightcorr){
120
133
  this.$refs.sectionnavigation.style.overflowY = 'scroll'
121
134
  this.$refs.sectionnavigation.style.maxHeight = winheightcorr + brandNavHeight +'px'
122
-
135
+
123
136
  } else {
124
137
  this.$refs.sectionnavigation.style.overflowY = 'hidden'
125
- this.$refs.sectionnavigation.style.maxHeight = this.$el.scrollHeight + 'px'
138
+ this.$refs.sectionnavigation.style.maxHeight = this.$el.scrollHeight + 'px'
126
139
  }
127
140
  }
128
141
  },
@@ -142,39 +155,39 @@ document.addEventListener('alpine:init', () => {
142
155
  }
143
156
  if(this.$screen('lg') && mode == true){
144
157
  this.enableScrolling()
145
- }
146
- }
158
+ }
159
+ }
147
160
 
148
161
  }))
149
162
 
150
163
  // context for the overlay
151
164
  Alpine.data('overlayHandler', () => ({
152
- shouldOverlayBeShown() {
153
- return (!this.$screen('lg') && ( this.$store.burgeropen == true || this.$store.serviceNavIsOpen == true || this.$store.searchFieldOpen == true ))
154
- },
155
- overlayWasClicked() {
156
- this.$store.serviceNavIsOpen ? this.$store.serviceNavIsOpen = false : null
157
- this.$dispatch('burger-close')
158
- this.$dispatch('close-servicemenu')
159
- // this.$dispatch('toggleScrolling', true )
160
- this.toggleScrolling(true)
161
- }
162
- }))
165
+ shouldOverlayBeShown() {
166
+ return (!this.$screen('lg') && ( this.$store.burgeropen == true || this.$store.serviceNavIsOpen == true || this.$store.searchFieldOpen == true ))
167
+ },
168
+ overlayWasClicked() {
169
+ this.$store.serviceNavIsOpen ? this.$store.serviceNavIsOpen = false : null
170
+ this.$dispatch('burger-close')
171
+ this.$dispatch('close-servicemenu')
172
+ // this.$dispatch('toggleScrolling', true )
173
+ this.toggleScrolling(true)
174
+ }
175
+ }))
163
176
 
164
177
  // context for all dropdowns
165
178
  Alpine.data('dropdown', () => ({
166
179
  dropped: false,
167
180
  toggle() {
168
- this.dropped = ! this.dropped;
181
+ this.dropped = ! this.dropped;
169
182
  },
170
183
  toggleServiceNav(){
171
184
  this.dropped = ! this.dropped;
172
185
  this.$store.searchFieldOpen = false;
173
-
174
- this.$el.id != this.$store.serviceID.current ? this.$store.serviceNavIsOpen = true : this.$el.id == this.$store.serviceID.current ? this.$store.serviceNavIsOpen = !this.$store.serviceNavIsOpen : null;
175
-
186
+
187
+ this.$el.id != this.$store.serviceID.current ? this.$store.serviceNavIsOpen = true : this.$el.id == this.$store.serviceID.current ? this.$store.serviceNavIsOpen = !this.$store.serviceNavIsOpen : null;
188
+
176
189
  this.$store.burgeropen == true ? this.$dispatch('burger-close') : null
177
-
190
+
178
191
  console.log('currentID: '+ this.$store.serviceID.current)
179
192
  console.log('target-id: '+this.$event.target.id)
180
193
  console.log('element-id: '+this.$el.id)
@@ -183,70 +196,71 @@ document.addEventListener('alpine:init', () => {
183
196
  this.$store.serviceID.current = this.$el.id
184
197
 
185
198
  this.toggleScrolling(!this.$store.serviceNavIsOpen)
186
-
199
+
187
200
  let myFlyout = document.querySelector('#flyout-'+this.$el.id)
188
- let brandNavHeight = this.percent > 0 ? 40 : 0
201
+ let brandNavHeight = this.percent > 0 ? 40 : 0
189
202
 
190
203
  if (this.$store.serviceNavIsOpen == true && this.dropped == true) {
191
204
  window.setTimeout(function(){
192
205
  if (myFlyout.scrollHeight > window.innerHeight-myFlyout.offsetTop) {
193
206
  myFlyout.style.height = 'auto'
194
- window.innerWidth < 768 ? myFlyout.style.maxHeight = window.innerHeight-myFlyout.offsetTop - 80 + brandNavHeight +'px' : myFlyout.style.maxHeight = window.innerHeight-myFlyout.offsetTop - 40 + brandNavHeight +'px'
207
+ window.innerWidth < 768 ? myFlyout.style.maxHeight = window.innerHeight-myFlyout.offsetTop - 80 + brandNavHeight +'px' : myFlyout.style.maxHeight = window.innerHeight-myFlyout.offsetTop - 40 + brandNavHeight +'px'
195
208
  myFlyout.style.overflowY = 'scroll'
196
209
  } else {
197
210
  myFlyout.style.maxHeight = ''
198
- //myFlyout.style.overflowY = 'hidden'
199
- }
211
+ //myFlyout.style.overflowY = 'hidden'
212
+ }
200
213
  },150)
201
214
  }
202
215
  }
203
216
  }))
204
217
 
205
218
  // There are several Flyouts sharing the same functionality and context, so put the data in an Alpine.data to make it reusable
206
- Alpine.data('flyoutHandler', () => ({
219
+ Alpine.data('flyoutHandler', () => ({
207
220
  init() {
208
- //Initial: x-collapse only on mobile/tablet
221
+ //Initial: x-collapse only on mobile/tablet
209
222
  if(window.innerWidth < 1024) {
210
223
  this.$el.setAttribute("x-collapse","")
211
- }
224
+ }
212
225
  },
213
226
  sectionNavFlyoutWatcher() {
214
227
  //Adds scrollheight of the flyout to sectionNav container to make sure all following items stay visible
215
228
  this.$watch('dropped', value => {
216
229
  let a = this.$refs.sectionnavigation.scrollHeight + this.$el.scrollHeight;
217
230
  let brandNavHeight = this.percent > 0 ? 40 : 0
218
- if(window.innerWidth < 1024) {
219
- if(value == true ) {
220
-
231
+ if(window.innerWidth < 1024) {
232
+ if(value == true ) {
233
+
221
234
  if (a < window.innerHeight - this.$refs.sectionnavigation.offsetTop) {
222
235
  this.$refs.sectionnavigation.style.maxHeight = a +'px'
223
236
  this.$refs.sectionnavigation.style.overflowY = 'hidden'
224
237
  } else {
225
238
  this.$refs.sectionnavigation.style.maxHeight = window.innerHeight - this.$refs.sectionnavigation.offsetTop + brandNavHeight +'px'
226
239
  this.$refs.sectionnavigation.style.overflowY = 'scroll'
227
- }
240
+ }
228
241
  } else {
229
242
  if (a < window.innerHeight - this.$refs.sectionnavigation.offsetTop) {
230
243
  this.$refs.sectionnavigation.style.overflowY = 'hidden'
231
244
  } else {
232
- this.$refs.sectionnavigation.style.overflowY = 'scroll'
245
+ this.$refs.sectionnavigation.style.overflowY = 'scroll'
233
246
  }
234
247
  }
235
248
  }
236
- })
249
+
250
+ })
237
251
  },
238
252
  setFlyoutAnimationStyle() {
239
253
  //sets/cleansup the x-collapse attributes depending on window.innerWidth, gets fired @resize.window in NavigationFlyout.hbs
240
254
  if(window.innerWidth > 1023) {
241
255
  if(this.$el.hasAttribute("x-collapse.duration.500ms")) {
242
256
  this.$el.removeAttribute("x-collapse.duration.500ms")
243
- delete this.$el._x_transition;
244
- this.$el.style.removeProperty('overflow');
245
- this.$el.style.removeProperty('height');
257
+ delete this.$el._x_transition;
258
+ this.$el.style.removeProperty('overflow');
259
+ this.$el.style.removeProperty('height');
246
260
  if (! this.$el._x_isShown) this.$el.style.display = 'none'
247
261
  if(this.$el.hasAttribute("hidden")) this.$el.removeAttribute("hidden")
248
262
  }
249
-
263
+
250
264
  } else {
251
265
  if(!this.$el.hasAttribute("x-collapse.duration.500ms")) this.$el.setAttribute("x-collapse.duration.500ms","")
252
266
  }
@@ -1,6 +1,6 @@
1
1
  {{#with this.commentLink}}
2
2
  <span class="whitespace-nowrap">
3
- {{#>components/base/link css="hover:underline decoration-1" _isAriaHidden=true _doTracking=(if this.doTracking 'true') _clickLabelPrefix1=this.realTeasersize _clickLabelPrefix2="comment" }}
3
+ {{#>components/base/link css="hover:underline decoration-1" isAriaHidden=true doTracking=(if this.doTracking 'true') clickLabelPrefix1=this.teaserSize clickLabelPrefix2="comment" }}
4
4
  {{> components/base/image/icon _icon="kommentar" _iconmap="icons" _addClass="mr-0.5 inline w-5 h-5 text-toplineColor fill-current"}}
5
5
  <span class="sr-only">{{loca "comment_anchor_1"}}</span>
6
6
  <span class="text-toplineColor">{{../../this.commentNumber}}</span>
@@ -1,8 +1,8 @@
1
1
  <span
2
2
  class='{{inline-switch
3
3
  size
4
- '["hero","100","25"]'
5
- '["block md:text-base","hidden md:block md:text-base","hidden","hidden md:block"]'
4
+ '["hero","25"]'
5
+ '["block","hidden","hidden md:block"]'
6
6
  }}
7
- text-sm mt-3 font-copy'
7
+ text-base mt-3 font-copy'
8
8
  >{{text}}</span>
@@ -1,5 +1,5 @@
1
1
  <span
2
- class="leading-5.5 pt-px block text-base {{inline-switch isPosterTeaser '[true]' '["text-white","text-toplineColor"]'}} font-heading"
2
+ class="pt-px block text-base {{inline-switch isPosterTeaser '[true]' '["text-white","text-toplineColor"]'}} font-heading"
3
3
  aria-label="{{readMore}}: {{text}}"
4
4
  >
5
5
  {{text}}
@@ -1,20 +1,22 @@
1
- <article class="col-span-12 flex gap-y-4 gap-x-5 {{inline-switch this.teaserSize '["25","33","50"]' '["px-5 flex-row ","md:col-span-4 flex-row","md:col-span-6 flex-row","flex-row"]'}} ">
2
- <figure class="{{inline-switch this.teaserSize '["25", "hero"]' '["basis-2/5 md:flex-full ar-1-1 md:ar-16-9","basis-3/5 ar-16-9", "ar-16-9"]'}} ">
3
- {{#>components/base/link _cssClasses="" _isAriaHidden=true _doTracking=(if this.doTracking 'true') _clickLabelPrefix1=this.teaserSize _clickLabelPrefix2="mediaLink" }}
4
- {{~> components/base/image/responsive_image this.teaserImage type=this.teasertype variant=this.imageVariant noDelay=../_noDelay addClassImg="" ~}}
1
+ <article class="col-span-12 flex gap-y-4 gap-x-5 {{inline-switch this.teaserSize '["50"]' '["md:col-span-6 flex-row","flex-row"]'}} ">
2
+ <figure class="{{inline-switch this.teaserSize '["hero"]' '["basis-3/5 ar-16-9", "ar-16-9"]'}} ">
3
+ {{#>components/base/link css="" isAriaHidden=true doTracking=(if this.doTracking 'true') clickLabelPrefix1=this.teaserSize clickLabelPrefix2="mediaLink" }}
4
+ {{~> components/base/image/responsive_image this.teaserImage type=this.teasertype variant=this.imageVariant noDelay=../noDelay addClassImg="" ~}}
5
5
  {{/components/base/link}}
6
6
  </figure>
7
- <div class="{{inline-switch this.teaserSize '["25", "hero"]' '["basis-3/5 md:flex-full" , "basis-2/5"]'}} ">
8
- <header class="md:px-0 {{inline-switch teasersize '["25"]' '["","px-5"]'}}">
9
- {{> components/teaser/components/teaser_heading fontVariant=this.headingFontVariant
10
- headlineTag=this.headlineTag
11
- label=this.label
12
- readMore=this.link.readMoreText.readMoreScreenreader
13
- size=this.teaserSize
14
- title=this.title
15
- topline=this.topline}}
7
+ <div class="{{inline-switch this.teaserSize '["hero"]' '["basis-2/5"]'}} ">
8
+ <header class="px-5 md:px-0">
9
+ {{#>components/base/link css="hover:text-toplineColor" doTracking=(if this.doTracking 'true') clickLabelPrefix1=this.teaserSize clickLabelPrefix2="headlineLink" }}
10
+ {{> components/teaser/components/teaser_heading fontVariant=this.headingFontVariant
11
+ headlineTag=this.headlineTag
12
+ label=this.label
13
+ readMore=this.link.readMoreText.readMoreScreenreader
14
+ size=this.teaserSize
15
+ title=this.title
16
+ topline=this.topline}}
17
+ {{/components/base/link}}
16
18
  </header>
17
- <section class="md:px-0 {{inline-switch this.teaserSize '["25"]' '["","px-5"]'}}">
19
+ <section class="px-5 md:px-0">
18
20
  {{> components/teaser/components/teaser_text text=this.shorttext size=this.teaserSize }}
19
21
  {{> components/teaser/components/teaser_byline}}
20
22
  </section>
@@ -1,4 +1,4 @@
1
- <article class="col-span-12 flex gap-y-5 gap-x-4 {{inline-switch this.teaserSize '["25","33","50"]' '["px-5 md:px-0 md:col-span-3 flex-row md:flex-col","md:col-span-4 flex-col","md:col-span-6 flex-col","flex-col"]'}} ">
1
+ <article class="col-span-12 flex gap-y-3 gap-x-4 {{inline-switch this.teaserSize '["25","33","50"]' '["px-5 md:px-0 md:col-span-3 flex-row md:flex-col","md:col-span-4 flex-col","md:col-span-6 flex-col","flex-col"]'}} ">
2
2
  <figure class="{{inline-switch this.teaserSize '["25"]' '["basis-2/5 md:flex-full ar-1-1 md:ar-16-9", "ar-16-9"]'}} ">
3
3
  {{#>components/base/link isAriaHidden=true doTracking=(if this.doTracking 'true') clickLabelPrefix1=this.teaserSize clickLabelPrefix2="mediaLink" }}
4
4
  {{~> components/base/image/responsive_image this.teaserImage type=this.teasertype variant=this.imageVariant noDelay=../noDelay addClassImg="" ~}}
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": "0.47.4",
9
+ "version": "0.47.7",
10
10
  "scripts": {
11
11
  "test": "echo \"Error: no test specified\" && exit 1",
12
12
  "storybook": "start-storybook -p 6006 public",
@@ -18,9 +18,9 @@ Zur Auszeichnung von Fließtexten stehen die folgenden Utility Klassen zur verf
18
18
  | `font-copy` | `font-family: DIN, sans-serif` | | Setzt die Eigenschaft `font-family` |
19
19
  | `text-xs` | `font-size: 0.75rem` <br /> `line-height: 1rem` | `12px`<br />`16px` | Setzt die Eigenschaften `font-size` und `line-height` |
20
20
  | `text-sm` | `font-size: 0.875rem` <br /> `line-height: 1.88rem` | `14px`<br />`19px` | Setzt die Eigenschaften `font-size` und `line-height` |
21
- | `text-base` | `font-size: 1rem` <br /> `line-height: 1.25rem` | `16px`<br />`20px` | Setzt die Eigenschaften `font-size` und `line-height` |
22
- | `text-lg` | `font-size: 1.125rem` <br /> `line-height: 1.75rem` | `18px`<br />`28px` | Setzt die Eigenschaften `font-size` und `line-height` |
23
- | `text-xl` | `font-size: 1.25rem` <br /> `line-height: 1.75rem` | `20px`<br />`28px` | Setzt die Eigenschaften `font-size` und `line-height` |
21
+ | `text-base` | `font-size: 1rem` <br /> `line-height: 1.375rem` | `16px`<br />`22px` | Setzt die Eigenschaften `font-size` und `line-height` |
22
+ | `text-lg` | `font-size: 1.125rem` <br /> `line-height: 1.75rem` | `18px`<br />`24px` | Setzt die Eigenschaften `font-size` und `line-height` |
23
+ | `text-xl` | `font-size: 1.25rem` <br /> `line-height: 1.75rem` | `20px`<br />`26px` | Setzt die Eigenschaften `font-size` und `line-height` |
24
24
 
25
25
  ### Verwendung
26
26
 
@@ -90,11 +90,11 @@ Zur Auszeichnung von Überschriften stehen die folgenden Utility Klassen zur ver
90
90
  | :------------------ | :-------------------------------------------------- | ------------------ | :---------------------------------------------------- |
91
91
  | `font-headingSerif` | `font-family: RobotoSlab, serif` | | Setzt die Eigenschaft `font-family` |
92
92
  | `font-heading` | `font-family: RobotoCond, sans-serif` | | Setzt die Eigenschaft `font-family` |
93
- | `text-lg` | `font-size: 1.125rem` <br /> `line-height: 1.75rem` | `18px`<br />`28px` | Setzt die Eigenschaften `font-size` und `line-height` |
94
- | `text-xl` | `font-size: 1.25rem` <br /> `line-height: 1.75rem` | `20px`<br />`28px` | Setzt die Eigenschaften `font-size` und `line-height` |
95
- | `text-2xl` | `font-size: 1.375rem` <br /> `line-height: 2rem` | `22px`<br />`32px` | Setzt die Eigenschaften `font-size` und `line-height` |
93
+ | `text-lg` | `font-size: 1.125rem` <br /> `line-height: 1.5rem` | `18px`<br />`24px` | Setzt die Eigenschaften `font-size` und `line-height` |
94
+ | `text-xl` | `font-size: 1.25rem` <br /> `line-height: 1.675rem` | `20px`<br />`26px` | Setzt die Eigenschaften `font-size` und `line-height` |
95
+ | `text-2xl` | `font-size: 1.375rem` <br /> `line-height: 1.75rem` | `22px`<br />`28px` | Setzt die Eigenschaften `font-size` und `line-height` |
96
96
  | `text-3xl` | `font-size: 1.875rem` <br /> `line-height: 2.25rem` | `30px`<br />`36px` | Setzt die Eigenschaften `font-size` und `line-height` |
97
- | `text-4xl` | `font-size: 2.125rem` <br /> `line-height: 2.25rem` | `34px`<br />`36px` | Setzt die Eigenschaften `font-size` und `line-height` |
97
+ | `text-4xl` | `font-size: 2.125rem` <br /> `line-height: 2.375rem`| `34px`<br />`38px` | Setzt die Eigenschaften `font-size` und `line-height` |
98
98
 
99
99
  ### Verwendung RobotoSlab
100
100
 
@@ -1,5 +1,5 @@
1
1
  //Main Alpine Init Listener
2
- document.addEventListener('alpine:init', () => {
2
+ document.addEventListener('alpine:init', () => {
3
3
  // Alpine.stores for global variables
4
4
  Alpine.store('clientHeight', document.documentElement.clientHeight || document.body.clientHeight)
5
5
  Alpine.store('clientWidth', document.documentElement.clientWidth || document.body.clientWidth)
@@ -7,23 +7,24 @@ document.addEventListener('alpine:init', () => {
7
7
  Alpine.store('searchFieldOpen', false);
8
8
  Alpine.store('serviceNavIsOpen', false);
9
9
  Alpine.store('searchID', {
10
- current: '{{nextRandom}}'
10
+ current: '{{nextRandom}}'
11
11
  });
12
12
  Alpine.store('serviceID', {
13
13
  open: false,
14
- current: '0'
14
+ current: '0'
15
15
  });
16
16
  Alpine.store('navIsVisible', true);
17
+ Alpine.store('subNavIsVisible', false);
17
18
 
18
19
  // context for the main header element
19
20
  Alpine.data('mainNavigationHandler', () =>({
20
-
21
+
21
22
  debounce (callback, wait) {
22
23
  let timeoutId = null;
23
24
  return (...args) => {
24
25
  window.clearTimeout(timeoutId);
25
26
  timeoutId = window.setTimeout(() => {
26
- callback.apply(null, args);
27
+ callback.apply(null, args);
27
28
  }, wait);
28
29
  };
29
30
 
@@ -33,14 +34,15 @@ document.addEventListener('alpine:init', () => {
33
34
  let height = top.innerHeight
34
35
 
35
36
  window.addEventListener('scroll', this.debounce( () => {
36
- let winScroll = document.body.scrollTop || document.documentElement.scrollTop
37
+ let winScroll = document.body.scrollTop || document.documentElement.scrollTop
37
38
  winScroll > lastScrollTop ? this.scrollingDown = true : this.scrollingDown = false
38
39
  //let height = document.documentElement.scrollHeight - document.documentElement.clientHeight
39
40
  this.percent = Math.round((winScroll / height) * 100)
40
41
  lastScrollTop = winScroll
41
- //console.log('winscroll: '+winScroll+' height: '+height + ' percent: '+ this.percent)
42
+ //console.log('winscroll: '+winScroll+' height: '+height + ' percent: '+ this.percent)
42
43
  this.$store.navIsVisible = !this.isNavHidden()
43
- //console.log(this.$store.navIsVisible);
44
+ this.$store.subNavIsVisible = !this.isSubNavHidden()
45
+ //console.log(this.$store.navIsVisible);
44
46
  },50))
45
47
  },
46
48
  percent: 0,
@@ -52,22 +54,33 @@ document.addEventListener('alpine:init', () => {
52
54
  return this.shouldServiceNavBeHidden()
53
55
  }
54
56
  },
57
+ isSubNavHidden() {
58
+ if(this.$screen('lg')){
59
+ if (document.querySelector('.isSelectedAndOpen') !== null) {
60
+ return false
61
+ } else {
62
+ return true
63
+ }
64
+ } else {
65
+ return true
66
+ }
67
+ },
55
68
  shouldBrandNavBeHidden() {
56
- return this.percent > 0
69
+ return this.percent > 0
57
70
  },
58
71
  shouldSectionNavBeHidden() {
59
72
  return this.percent > 50 && this.scrollingDown && this.$store.burgeropen == false && this.$screen('lg')
60
73
  },
61
74
  shouldServiceNavBeHidden() {
62
- return (this.percent > 90 && !this.$screen('lg') && this.scrollingDown && this.$store.burgeropen == false)
75
+ return (this.percent > 90 && !this.$screen('lg') && this.scrollingDown && this.$store.burgeropen == false)
63
76
  },
64
77
  shouldServiceIconsBeHidden() {
65
- return (this.percent > 50 && !this.$screen('md') && this.$store.burgeropen == false && this.$store.serviceNavIsOpen == false && this.scrollingDown == true) || (this.percent > 50 && !this.$screen('md') && this.$store.burgeropen == false && this.$store.serviceNavIsOpen == false && this.scrollingDown == false)
78
+ return (this.percent > 50 && !this.$screen('md') && this.$store.burgeropen == false && this.$store.serviceNavIsOpen == false && this.scrollingDown == true) || (this.percent > 50 && !this.$screen('md') && this.$store.burgeropen == false && this.$store.serviceNavIsOpen == false && this.scrollingDown == false)
66
79
  },
67
80
  shouldFlyoutBeHidden() {
68
81
  return (this.percent > 50 && this.scrollingDown && this.$screen('lg') )
69
82
  },
70
- resetNav() {
83
+ resetNav() {
71
84
  if(window.innerWidth > 1023) {
72
85
  this.$refs.sectionnavigation.setAttribute("style","")
73
86
  } else {
@@ -85,8 +98,8 @@ document.addEventListener('alpine:init', () => {
85
98
  this.$store.clientWidth = nowClientWidth
86
99
  }
87
100
  else{
88
- // timeout is used to dispatch events after the resize is done
89
- let timeout
101
+ // timeout is used to dispatch events after the resize is done
102
+ let timeout
90
103
  clearTimeout(timeout)
91
104
  timeout = setTimeout(() => {
92
105
  this.$refs.sectionnavigation.classList.remove('hidden')
@@ -100,29 +113,29 @@ document.addEventListener('alpine:init', () => {
100
113
  nextNowClientHeight = nowClientHeight
101
114
  this.$store.clientWidth = nowClientWidth
102
115
  }
103
- },
116
+ },
104
117
  toggleSectionNav() {
105
- //false = sectionNav schließt ( mobile/tablet? --> maxHeight = 0 /// desktop? just clear maxHeight attribute )
106
- //true = sectionNav ΓΆffnet (maxheight = scrollheight)
107
- console.log('toggleSectionNav, Event: ' + this.$event.detail )
108
- if(this.$event.detail === false) {
109
- if (window.innerWidth < 1024) {
118
+ //false = sectionNav schließt ( mobile/tablet? --> maxHeight = 0 /// desktop? just clear maxHeight attribute )
119
+ //true = sectionNav ΓΆffnet (maxheight = scrollheight)
120
+ console.log('toggleSectionNav, Event: ' + this.$event.detail )
121
+ if(this.$event.detail === false) {
122
+ if (window.innerWidth < 1024) {
110
123
  this.$refs.sectionnavigation.style.maxHeight='0px'
111
- } else {
124
+ } else {
112
125
  this.$refs.sectionnavigation.style.maxHeight = ''
113
126
  }
114
127
  } else {
115
128
  let winheightcorr = parseInt(window.innerHeight) - this.$refs.sectionnavigation.offsetTop
116
129
  let navheight = parseInt(this.$refs.sectionnavigation.scrollHeight)
117
- let brandNavHeight = this.percent > 0 ? 40 : 0
118
-
130
+ let brandNavHeight = this.percent > 0 ? 40 : 0
131
+
119
132
  if(navheight > winheightcorr){
120
133
  this.$refs.sectionnavigation.style.overflowY = 'scroll'
121
134
  this.$refs.sectionnavigation.style.maxHeight = winheightcorr + brandNavHeight +'px'
122
-
135
+
123
136
  } else {
124
137
  this.$refs.sectionnavigation.style.overflowY = 'hidden'
125
- this.$refs.sectionnavigation.style.maxHeight = this.$el.scrollHeight + 'px'
138
+ this.$refs.sectionnavigation.style.maxHeight = this.$el.scrollHeight + 'px'
126
139
  }
127
140
  }
128
141
  },
@@ -142,39 +155,39 @@ document.addEventListener('alpine:init', () => {
142
155
  }
143
156
  if(this.$screen('lg') && mode == true){
144
157
  this.enableScrolling()
145
- }
146
- }
158
+ }
159
+ }
147
160
 
148
161
  }))
149
162
 
150
163
  // context for the overlay
151
164
  Alpine.data('overlayHandler', () => ({
152
- shouldOverlayBeShown() {
153
- return (!this.$screen('lg') && ( this.$store.burgeropen == true || this.$store.serviceNavIsOpen == true || this.$store.searchFieldOpen == true ))
154
- },
155
- overlayWasClicked() {
156
- this.$store.serviceNavIsOpen ? this.$store.serviceNavIsOpen = false : null
157
- this.$dispatch('burger-close')
158
- this.$dispatch('close-servicemenu')
159
- // this.$dispatch('toggleScrolling', true )
160
- this.toggleScrolling(true)
161
- }
162
- }))
165
+ shouldOverlayBeShown() {
166
+ return (!this.$screen('lg') && ( this.$store.burgeropen == true || this.$store.serviceNavIsOpen == true || this.$store.searchFieldOpen == true ))
167
+ },
168
+ overlayWasClicked() {
169
+ this.$store.serviceNavIsOpen ? this.$store.serviceNavIsOpen = false : null
170
+ this.$dispatch('burger-close')
171
+ this.$dispatch('close-servicemenu')
172
+ // this.$dispatch('toggleScrolling', true )
173
+ this.toggleScrolling(true)
174
+ }
175
+ }))
163
176
 
164
177
  // context for all dropdowns
165
178
  Alpine.data('dropdown', () => ({
166
179
  dropped: false,
167
180
  toggle() {
168
- this.dropped = ! this.dropped;
181
+ this.dropped = ! this.dropped;
169
182
  },
170
183
  toggleServiceNav(){
171
184
  this.dropped = ! this.dropped;
172
185
  this.$store.searchFieldOpen = false;
173
-
174
- this.$el.id != this.$store.serviceID.current ? this.$store.serviceNavIsOpen = true : this.$el.id == this.$store.serviceID.current ? this.$store.serviceNavIsOpen = !this.$store.serviceNavIsOpen : null;
175
-
186
+
187
+ this.$el.id != this.$store.serviceID.current ? this.$store.serviceNavIsOpen = true : this.$el.id == this.$store.serviceID.current ? this.$store.serviceNavIsOpen = !this.$store.serviceNavIsOpen : null;
188
+
176
189
  this.$store.burgeropen == true ? this.$dispatch('burger-close') : null
177
-
190
+
178
191
  console.log('currentID: '+ this.$store.serviceID.current)
179
192
  console.log('target-id: '+this.$event.target.id)
180
193
  console.log('element-id: '+this.$el.id)
@@ -183,70 +196,71 @@ document.addEventListener('alpine:init', () => {
183
196
  this.$store.serviceID.current = this.$el.id
184
197
 
185
198
  this.toggleScrolling(!this.$store.serviceNavIsOpen)
186
-
199
+
187
200
  let myFlyout = document.querySelector('#flyout-'+this.$el.id)
188
- let brandNavHeight = this.percent > 0 ? 40 : 0
201
+ let brandNavHeight = this.percent > 0 ? 40 : 0
189
202
 
190
203
  if (this.$store.serviceNavIsOpen == true && this.dropped == true) {
191
204
  window.setTimeout(function(){
192
205
  if (myFlyout.scrollHeight > window.innerHeight-myFlyout.offsetTop) {
193
206
  myFlyout.style.height = 'auto'
194
- window.innerWidth < 768 ? myFlyout.style.maxHeight = window.innerHeight-myFlyout.offsetTop - 80 + brandNavHeight +'px' : myFlyout.style.maxHeight = window.innerHeight-myFlyout.offsetTop - 40 + brandNavHeight +'px'
207
+ window.innerWidth < 768 ? myFlyout.style.maxHeight = window.innerHeight-myFlyout.offsetTop - 80 + brandNavHeight +'px' : myFlyout.style.maxHeight = window.innerHeight-myFlyout.offsetTop - 40 + brandNavHeight +'px'
195
208
  myFlyout.style.overflowY = 'scroll'
196
209
  } else {
197
210
  myFlyout.style.maxHeight = ''
198
- //myFlyout.style.overflowY = 'hidden'
199
- }
211
+ //myFlyout.style.overflowY = 'hidden'
212
+ }
200
213
  },150)
201
214
  }
202
215
  }
203
216
  }))
204
217
 
205
218
  // There are several Flyouts sharing the same functionality and context, so put the data in an Alpine.data to make it reusable
206
- Alpine.data('flyoutHandler', () => ({
219
+ Alpine.data('flyoutHandler', () => ({
207
220
  init() {
208
- //Initial: x-collapse only on mobile/tablet
221
+ //Initial: x-collapse only on mobile/tablet
209
222
  if(window.innerWidth < 1024) {
210
223
  this.$el.setAttribute("x-collapse","")
211
- }
224
+ }
212
225
  },
213
226
  sectionNavFlyoutWatcher() {
214
227
  //Adds scrollheight of the flyout to sectionNav container to make sure all following items stay visible
215
228
  this.$watch('dropped', value => {
216
229
  let a = this.$refs.sectionnavigation.scrollHeight + this.$el.scrollHeight;
217
230
  let brandNavHeight = this.percent > 0 ? 40 : 0
218
- if(window.innerWidth < 1024) {
219
- if(value == true ) {
220
-
231
+ if(window.innerWidth < 1024) {
232
+ if(value == true ) {
233
+
221
234
  if (a < window.innerHeight - this.$refs.sectionnavigation.offsetTop) {
222
235
  this.$refs.sectionnavigation.style.maxHeight = a +'px'
223
236
  this.$refs.sectionnavigation.style.overflowY = 'hidden'
224
237
  } else {
225
238
  this.$refs.sectionnavigation.style.maxHeight = window.innerHeight - this.$refs.sectionnavigation.offsetTop + brandNavHeight +'px'
226
239
  this.$refs.sectionnavigation.style.overflowY = 'scroll'
227
- }
240
+ }
228
241
  } else {
229
242
  if (a < window.innerHeight - this.$refs.sectionnavigation.offsetTop) {
230
243
  this.$refs.sectionnavigation.style.overflowY = 'hidden'
231
244
  } else {
232
- this.$refs.sectionnavigation.style.overflowY = 'scroll'
245
+ this.$refs.sectionnavigation.style.overflowY = 'scroll'
233
246
  }
234
247
  }
235
248
  }
236
- })
249
+
250
+ })
237
251
  },
238
252
  setFlyoutAnimationStyle() {
239
253
  //sets/cleansup the x-collapse attributes depending on window.innerWidth, gets fired @resize.window in NavigationFlyout.hbs
240
254
  if(window.innerWidth > 1023) {
241
255
  if(this.$el.hasAttribute("x-collapse.duration.500ms")) {
242
256
  this.$el.removeAttribute("x-collapse.duration.500ms")
243
- delete this.$el._x_transition;
244
- this.$el.style.removeProperty('overflow');
245
- this.$el.style.removeProperty('height');
257
+ delete this.$el._x_transition;
258
+ this.$el.style.removeProperty('overflow');
259
+ this.$el.style.removeProperty('height');
246
260
  if (! this.$el._x_isShown) this.$el.style.display = 'none'
247
261
  if(this.$el.hasAttribute("hidden")) this.$el.removeAttribute("hidden")
248
262
  }
249
-
263
+
250
264
  } else {
251
265
  if(!this.$el.hasAttribute("x-collapse.duration.500ms")) this.$el.setAttribute("x-collapse.duration.500ms","")
252
266
  }
@@ -1,6 +1,6 @@
1
1
  {{#with this.commentLink}}
2
2
  <span class="whitespace-nowrap">
3
- {{#>components/base/link css="hover:underline decoration-1" _isAriaHidden=true _doTracking=(if this.doTracking 'true') _clickLabelPrefix1=this.realTeasersize _clickLabelPrefix2="comment" }}
3
+ {{#>components/base/link css="hover:underline decoration-1" isAriaHidden=true doTracking=(if this.doTracking 'true') clickLabelPrefix1=this.teaserSize clickLabelPrefix2="comment" }}
4
4
  {{> components/base/image/icon _icon="kommentar" _iconmap="icons" _addClass="mr-0.5 inline w-5 h-5 text-toplineColor fill-current"}}
5
5
  <span class="sr-only">{{loca "comment_anchor_1"}}</span>
6
6
  <span class="text-toplineColor">{{../../this.commentNumber}}</span>
@@ -1,8 +1,8 @@
1
1
  <span
2
2
  class='{{inline-switch
3
3
  size
4
- '["hero","100","25"]'
5
- '["block md:text-base","hidden md:block md:text-base","hidden","hidden md:block"]'
4
+ '["hero","25"]'
5
+ '["block","hidden","hidden md:block"]'
6
6
  }}
7
- text-sm mt-3 font-copy'
7
+ text-base mt-3 font-copy'
8
8
  >{{text}}</span>
@@ -1,5 +1,5 @@
1
1
  <span
2
- class="leading-5.5 pt-px block text-base {{inline-switch isPosterTeaser '[true]' '["text-white","text-toplineColor"]'}} font-heading"
2
+ class="pt-px block text-base {{inline-switch isPosterTeaser '[true]' '["text-white","text-toplineColor"]'}} font-heading"
3
3
  aria-label="{{readMore}}: {{text}}"
4
4
  >
5
5
  {{text}}
@@ -1,20 +1,22 @@
1
- <article class="col-span-12 flex gap-y-4 gap-x-5 {{inline-switch this.teaserSize '["25","33","50"]' '["px-5 flex-row ","md:col-span-4 flex-row","md:col-span-6 flex-row","flex-row"]'}} ">
2
- <figure class="{{inline-switch this.teaserSize '["25", "hero"]' '["basis-2/5 md:flex-full ar-1-1 md:ar-16-9","basis-3/5 ar-16-9", "ar-16-9"]'}} ">
3
- {{#>components/base/link _cssClasses="" _isAriaHidden=true _doTracking=(if this.doTracking 'true') _clickLabelPrefix1=this.teaserSize _clickLabelPrefix2="mediaLink" }}
4
- {{~> components/base/image/responsive_image this.teaserImage type=this.teasertype variant=this.imageVariant noDelay=../_noDelay addClassImg="" ~}}
1
+ <article class="col-span-12 flex gap-y-4 gap-x-5 {{inline-switch this.teaserSize '["50"]' '["md:col-span-6 flex-row","flex-row"]'}} ">
2
+ <figure class="{{inline-switch this.teaserSize '["hero"]' '["basis-3/5 ar-16-9", "ar-16-9"]'}} ">
3
+ {{#>components/base/link css="" isAriaHidden=true doTracking=(if this.doTracking 'true') clickLabelPrefix1=this.teaserSize clickLabelPrefix2="mediaLink" }}
4
+ {{~> components/base/image/responsive_image this.teaserImage type=this.teasertype variant=this.imageVariant noDelay=../noDelay addClassImg="" ~}}
5
5
  {{/components/base/link}}
6
6
  </figure>
7
- <div class="{{inline-switch this.teaserSize '["25", "hero"]' '["basis-3/5 md:flex-full" , "basis-2/5"]'}} ">
8
- <header class="md:px-0 {{inline-switch teasersize '["25"]' '["","px-5"]'}}">
9
- {{> components/teaser/components/teaser_heading fontVariant=this.headingFontVariant
10
- headlineTag=this.headlineTag
11
- label=this.label
12
- readMore=this.link.readMoreText.readMoreScreenreader
13
- size=this.teaserSize
14
- title=this.title
15
- topline=this.topline}}
7
+ <div class="{{inline-switch this.teaserSize '["hero"]' '["basis-2/5"]'}} ">
8
+ <header class="px-5 md:px-0">
9
+ {{#>components/base/link css="hover:text-toplineColor" doTracking=(if this.doTracking 'true') clickLabelPrefix1=this.teaserSize clickLabelPrefix2="headlineLink" }}
10
+ {{> components/teaser/components/teaser_heading fontVariant=this.headingFontVariant
11
+ headlineTag=this.headlineTag
12
+ label=this.label
13
+ readMore=this.link.readMoreText.readMoreScreenreader
14
+ size=this.teaserSize
15
+ title=this.title
16
+ topline=this.topline}}
17
+ {{/components/base/link}}
16
18
  </header>
17
- <section class="md:px-0 {{inline-switch this.teaserSize '["25"]' '["","px-5"]'}}">
19
+ <section class="px-5 md:px-0">
18
20
  {{> components/teaser/components/teaser_text text=this.shorttext size=this.teaserSize }}
19
21
  {{> components/teaser/components/teaser_byline}}
20
22
  </section>
@@ -8,8 +8,6 @@ import heroTeaserWithLabel from './fixtures/teaser_alternative_hero_serif_label.
8
8
  import heroTeaserWithComments from './fixtures/teaser_alternative_hero_serif_comments.json'
9
9
  import teaser100 from './fixtures/teaser_alternative_100_serif.json'
10
10
  import teaser50 from './fixtures/teaser_alternative_50_serif.json'
11
- import teaser33 from './fixtures/teaser_alternative_33_serif.json'
12
- import teaser25 from './fixtures/teaser_alternative_25_serif.json'
13
11
 
14
12
  <Meta
15
13
  title="Komponenten/Teaser/Alternativ"
@@ -20,7 +18,7 @@ import teaser25 from './fixtures/teaser_alternative_25_serif.json'
20
18
  teasersize: {
21
19
  control: {
22
20
  type: 'select',
23
- options: ['hero', '100', '50', '33', '25'],
21
+ options: ['hero', '100', '50'],
24
22
  },
25
23
  description: 'Teaser Grâße',
26
24
  table: {
@@ -70,10 +68,4 @@ Ein toller Einleitungstext fΓΌr unsere `Teaser` Komponente:
70
68
  <Story name="Alternativ 50" args={teaser50.logicItem.includeModel}>
71
69
  {Template.bind({})}
72
70
  </Story>
73
- <Story name="Alternativ 33" args={teaser33.logicItem.includeModel}>
74
- {Template.bind({})}
75
- </Story>
76
- <Story name="Alternativ 25" args={teaser25.logicItem.includeModel}>
77
- {Template.bind({})}
78
- </Story>
79
- </Preview>
71
+ </Preview>
@@ -1,4 +1,4 @@
1
- <article class="col-span-12 flex gap-y-5 gap-x-4 {{inline-switch this.teaserSize '["25","33","50"]' '["px-5 md:px-0 md:col-span-3 flex-row md:flex-col","md:col-span-4 flex-col","md:col-span-6 flex-col","flex-col"]'}} ">
1
+ <article class="col-span-12 flex gap-y-3 gap-x-4 {{inline-switch this.teaserSize '["25","33","50"]' '["px-5 md:px-0 md:col-span-3 flex-row md:flex-col","md:col-span-4 flex-col","md:col-span-6 flex-col","flex-col"]'}} ">
2
2
  <figure class="{{inline-switch this.teaserSize '["25"]' '["basis-2/5 md:flex-full ar-1-1 md:ar-16-9", "ar-16-9"]'}} ">
3
3
  {{#>components/base/link isAriaHidden=true doTracking=(if this.doTracking 'true') clickLabelPrefix1=this.teaserSize clickLabelPrefix2="mediaLink" }}
4
4
  {{~> components/base/image/responsive_image this.teaserImage type=this.teasertype variant=this.imageVariant noDelay=../noDelay addClassImg="" ~}}
@@ -40,8 +40,9 @@ module.exports = {
40
40
  fontSize: {
41
41
  'xs':['0.75rem', '1.063rem'],
42
42
  'sm':['0.875rem', '1.188rem'],
43
- 'base':['1rem', '1.25rem'],
44
- 'lg':['1.125rem', '1.5rem'],
43
+ 'base':['1rem', '1.375rem'],
44
+ 'lg':['1.125rem', '1.5rem'],
45
+ 'xl':['1.25rem', '1.675rem'],
45
46
  '2xl':['1.375rem', '1.75rem'],
46
47
  '4xl':['2.125rem', '2.375rem'],
47
48
  },