hr-design-system-handlebars 1.8.0 → 1.9.0
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 +24 -0
- package/build/handlebars/helpers/handlebar-helpers.js +12 -1
- package/dist/assets/index.css +3 -3
- package/dist/assets/js/components/modal/modal.feature.js +15 -2
- package/dist/assets/js/generic/hrQuery.subfeature.js +23 -0
- package/dist/assets/vendor/dialog-polyfill/dialog-polyfill.css +39 -0
- package/dist/views/components/modal/modal.hbs +1 -1
- package/dist/views/components/teaser/cluster/teaser_cluster.hbs +1 -1
- package/dist/views/components/teaser/cluster/teaser_cluster_list.hbs +3 -3
- package/package.json +2 -1
- package/src/assets/vendor/dialog-polyfill/dialog-polyfill.css +39 -0
- package/src/stories/views/components/modal/modal.feature.js +15 -2
- package/src/stories/views/components/modal/modal.hbs +1 -1
- package/src/stories/views/components/teaser/cluster/teaser_cluster.hbs +1 -1
- package/src/stories/views/components/teaser/cluster/teaser_cluster_list.hbs +3 -3
- package/src/stories/views/generic/hrQuery.subfeature.js +23 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,27 @@
|
|
|
1
|
+
# v1.9.0 (Mon Mar 13 2023)
|
|
2
|
+
|
|
3
|
+
#### 🚀 Enhancement
|
|
4
|
+
|
|
5
|
+
- Bugfix/dpe 2186 [#582](https://github.com/mumprod/hr-design-system-handlebars/pull/582) ([@szuelch](https://github.com/szuelch))
|
|
6
|
+
|
|
7
|
+
#### Authors: 1
|
|
8
|
+
|
|
9
|
+
- [@szuelch](https://github.com/szuelch)
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# v1.8.1 (Fri Mar 10 2023)
|
|
14
|
+
|
|
15
|
+
#### 🐛 Bug Fix
|
|
16
|
+
|
|
17
|
+
- Bugfix/dpe 2182 [#581](https://github.com/mumprod/hr-design-system-handlebars/pull/581) ([@szuelch](https://github.com/szuelch))
|
|
18
|
+
|
|
19
|
+
#### Authors: 1
|
|
20
|
+
|
|
21
|
+
- [@szuelch](https://github.com/szuelch)
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
1
25
|
# v1.8.0 (Thu Mar 09 2023)
|
|
2
26
|
|
|
3
27
|
#### 🚀 Enhancement
|
|
@@ -420,7 +420,18 @@ var helpers = {
|
|
|
420
420
|
},
|
|
421
421
|
|
|
422
422
|
'configProperty': function () {
|
|
423
|
-
|
|
423
|
+
let configProperty = ''
|
|
424
|
+
|
|
425
|
+
if (arguments.length >= 1) {
|
|
426
|
+
configProperty = arguments[0]
|
|
427
|
+
switch (configProperty) {
|
|
428
|
+
case 'dialogPolyfill.baseUrl':
|
|
429
|
+
configProperty = 'vendor/dialog-polyfill'
|
|
430
|
+
}
|
|
431
|
+
} else {
|
|
432
|
+
configProperty = 'No config-property defined.'
|
|
433
|
+
}
|
|
434
|
+
return new handlebars.SafeString(configProperty)
|
|
424
435
|
},
|
|
425
436
|
|
|
426
437
|
'addCacheEntry': function () {
|
package/dist/assets/index.css
CHANGED
|
@@ -2667,7 +2667,7 @@ video {
|
|
|
2667
2667
|
transition-timing-function: cubic-bezier(0.4, 0, 1, 1);
|
|
2668
2668
|
}
|
|
2669
2669
|
.counter-reset {
|
|
2670
|
-
counter-reset:
|
|
2670
|
+
counter-reset: cnt1678716136265;
|
|
2671
2671
|
}
|
|
2672
2672
|
.line-clamp-4 {
|
|
2673
2673
|
overflow: hidden;
|
|
@@ -2901,7 +2901,7 @@ video {
|
|
|
2901
2901
|
--tw-ring-color: rgba(255, 255, 255, 0.5);
|
|
2902
2902
|
}
|
|
2903
2903
|
.-ordered {
|
|
2904
|
-
counter-increment:
|
|
2904
|
+
counter-increment: cnt1678716136265 1;
|
|
2905
2905
|
}
|
|
2906
2906
|
.-ordered::before {
|
|
2907
2907
|
position: absolute;
|
|
@@ -2917,7 +2917,7 @@ video {
|
|
|
2917
2917
|
letter-spacing: .0125em;
|
|
2918
2918
|
--tw-text-opacity: 1;
|
|
2919
2919
|
color: rgba(0, 0, 0, var(--tw-text-opacity));
|
|
2920
|
-
content: counter(
|
|
2920
|
+
content: counter(cnt1678716136265);
|
|
2921
2921
|
}
|
|
2922
2922
|
/*! ****************************/
|
|
2923
2923
|
/*! text-shadow */
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
import { hr$, listen, unlisten } from 'hrQuery'
|
|
1
|
+
import { hr$, listen, unlisten, addLink } from 'hrQuery'
|
|
2
2
|
import { uxAction } from 'base/tracking/atiHelper.subfeature'
|
|
3
|
+
import dialogPolyfill from 'dialog-polyfill'
|
|
3
4
|
|
|
4
5
|
const Modal = (context) => {
|
|
5
6
|
const { options } = context,
|
|
6
7
|
{ element: rootElement } = context,
|
|
8
|
+
dialogPolyfillBaseUrl = options.dialogPolyfillBaseUrl || 'vendor/dialog-polyfill',
|
|
7
9
|
modalTriggerId = options.modalTriggerId ? '#' + options.modalTriggerId : '',
|
|
8
10
|
modalTrigger = hr$(modalTriggerId)[0],
|
|
9
11
|
modalCloseTriggers = hr$('.js-modal-close', rootElement),
|
|
@@ -20,8 +22,18 @@ const Modal = (context) => {
|
|
|
20
22
|
})
|
|
21
23
|
}
|
|
22
24
|
|
|
25
|
+
const configurePolyfillIfNeeded = () => {
|
|
26
|
+
if (undefined == modal.showModal) {
|
|
27
|
+
addLink('dialog-polyfill-css', `${dialogPolyfillBaseUrl}/dialog-polyfill.css`, {
|
|
28
|
+
type: 'text/css',
|
|
29
|
+
rel: 'stylesheet',
|
|
30
|
+
})
|
|
31
|
+
}
|
|
32
|
+
dialogPolyfill.registerDialog(modal)
|
|
33
|
+
}
|
|
34
|
+
|
|
23
35
|
const clickTracking = () => {
|
|
24
|
-
console.log(
|
|
36
|
+
console.log('tracking')
|
|
25
37
|
uxAction(trackingInformations)
|
|
26
38
|
}
|
|
27
39
|
|
|
@@ -41,6 +53,7 @@ const Modal = (context) => {
|
|
|
41
53
|
modal.close()
|
|
42
54
|
}
|
|
43
55
|
|
|
56
|
+
configurePolyfillIfNeeded()
|
|
44
57
|
configureEventListeners()
|
|
45
58
|
}
|
|
46
59
|
|
|
@@ -358,6 +358,28 @@ const loadScript = function (id, scriptUrl, async, callback) {
|
|
|
358
358
|
firstScriptTagInPage.parentNode.insertBefore(scriptTag, firstScriptTagInPage)
|
|
359
359
|
}
|
|
360
360
|
|
|
361
|
+
const addLink = function (id, url, config) {
|
|
362
|
+
if (document.getElementById(id)) return
|
|
363
|
+
|
|
364
|
+
let linkTag = document.createElement('link')
|
|
365
|
+
linkTag.id = id
|
|
366
|
+
linkTag.href = url
|
|
367
|
+
if (config.type) {
|
|
368
|
+
linkTag.type = config.type
|
|
369
|
+
}
|
|
370
|
+
if (config.rel) {
|
|
371
|
+
linkTag.rel = config.rel
|
|
372
|
+
}
|
|
373
|
+
if (config.title) {
|
|
374
|
+
linkTag.title = config.title
|
|
375
|
+
}
|
|
376
|
+
if (config.as) {
|
|
377
|
+
linkTag.as = config.as
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
document.getElementsByTagName('head')[0].appendChild(linkTag)
|
|
381
|
+
}
|
|
382
|
+
|
|
361
383
|
/*
|
|
362
384
|
* Fügt ein "style" bereich zum dokument hinzu
|
|
363
385
|
* und gibt eine referenz darauf zurück
|
|
@@ -445,6 +467,7 @@ const clearRequestInterval = (handle) =>
|
|
|
445
467
|
: window.clearInterval(handle)
|
|
446
468
|
|
|
447
469
|
export {
|
|
470
|
+
addLink,
|
|
448
471
|
addStyle,
|
|
449
472
|
hr$,
|
|
450
473
|
stripTags,
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
dialog {
|
|
2
|
+
position: fixed;
|
|
3
|
+
top: 50%;
|
|
4
|
+
transform: translate(0, -50%);
|
|
5
|
+
left: 0;
|
|
6
|
+
right: 0;
|
|
7
|
+
width: -moz-fit-content;
|
|
8
|
+
width: -webkit-fit-content;
|
|
9
|
+
width: fit-content;
|
|
10
|
+
height: -moz-fit-content;
|
|
11
|
+
height: -webkit-fit-content;
|
|
12
|
+
height: fit-content;
|
|
13
|
+
margin: auto;
|
|
14
|
+
padding: 1em;
|
|
15
|
+
background: white;
|
|
16
|
+
color: black;
|
|
17
|
+
display: block;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
dialog:not([open]) {
|
|
21
|
+
display: none;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
dialog + .backdrop {
|
|
25
|
+
position: fixed;
|
|
26
|
+
top: 0;
|
|
27
|
+
right: 0;
|
|
28
|
+
bottom: 0;
|
|
29
|
+
left: 0;
|
|
30
|
+
background: rgba(96, 96, 96, 0.9);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
._dialog_overlay {
|
|
34
|
+
position: fixed;
|
|
35
|
+
top: 0;
|
|
36
|
+
right: 0;
|
|
37
|
+
bottom: 0;
|
|
38
|
+
left: 0;
|
|
39
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<div class="js-load" data-hr-modal='{"modalTriggerId":"{{defaultIfEmpty _trigger ""}}", "trackingInformations": "{{this.link.cmsDocument.title}} Ticketlink-Overlay ok geklickt - Dokumenten-Id: {{this.link.cmsDocument.sophoraId}}"}'>
|
|
1
|
+
<div class="js-load" data-hr-modal='{"modalTriggerId":"{{defaultIfEmpty _trigger ""}}", "trackingInformations": "{{this.link.cmsDocument.title}} Ticketlink-Overlay ok geklickt - Dokumenten-Id: {{this.link.cmsDocument.sophoraId}}","dialogPolyfillBaseUrl":"{{configProperty "dialogPolyfill.baseUrl"}}"}'>
|
|
2
2
|
<dialog class='js-modal p-0 backdrop:bg-grey-scorpion/90 shadow-md {{defaultIfEmpty _css "sm:max-w-xl"}}'>
|
|
3
3
|
<form method="dialog" class="js-dialog-content p-4">
|
|
4
4
|
{{> @partial-block }}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<article class="mx-5 sm:mx-0 col-span-12 grid bg-highlight-1 rounded-tl-hr rounded-br-hr{{~inline-switch this.teaserSize '["25","33","50"]' '[" md:col-span-3"," md:col-span-4"," md:col-span-6",""]'}} ">
|
|
1
|
+
<article class="cy-teaser-cluster{{if this.isOrdered '--ordered'}} mx-5 sm:mx-0 col-span-12 grid bg-highlight-1 rounded-tl-hr rounded-br-hr{{~inline-switch this.teaserSize '["25","33","50"]' '[" md:col-span-3"," md:col-span-4"," md:col-span-6",""]'}} ">
|
|
2
2
|
<div class="">
|
|
3
3
|
<h2 class="flex items-center px-5 py-5 text-clusterTeaserHeadline">
|
|
4
4
|
{{#if this.teaserLogo}}
|
|
@@ -18,12 +18,12 @@
|
|
|
18
18
|
{{/if~}}
|
|
19
19
|
{{~#with this.clusterTeaserItems}}
|
|
20
20
|
{{~#if ../this.isOrdered}}
|
|
21
|
-
<ol class="mx-5 list-none divide-y divide-white divide-solid counter-reset border-t border-white{{~#if ../this.showFirstImageOrGenreImage}}{{~inline-switch ../this.realTeaserSize '["100"]' '[" md:-pt-5 md:mx-0 md:pr-5 md:border-none md:basis-1/2-gap-6 lg:basis-2/3-gap-6"]'}}{{/if~}}">
|
|
21
|
+
<ol class="cy-teaser-cluster__list mx-5 list-none divide-y divide-white divide-solid counter-reset border-t border-white{{~#if ../this.showFirstImageOrGenreImage}}{{~inline-switch ../this.realTeaserSize '["100"]' '[" md:-pt-5 md:mx-0 md:pr-5 md:border-none md:basis-1/2-gap-6 lg:basis-2/3-gap-6"]'}}{{/if~}}">
|
|
22
22
|
{{else}}
|
|
23
|
-
<ul class="mx-5 divide-y divide-white divide-solid border-t border-white {{~#if ../this.showFirstImageOrGenreImage}}{{~inline-switch ../this.realTeaserSize '["100"]' '[" md:-pt-5 md:mx-0 md:pr-5 md:border-none md:basis-1/2-gap-6 lg:basis-2/3-gap-6"]'}}{{/if~}}">
|
|
23
|
+
<ul class="cy-teaser-cluster__list mx-5 divide-y divide-white divide-solid border-t border-white {{~#if ../this.showFirstImageOrGenreImage}}{{~inline-switch ../this.realTeaserSize '["100"]' '[" md:-pt-5 md:mx-0 md:pr-5 md:border-none md:basis-1/2-gap-6 lg:basis-2/3-gap-6"]'}}{{/if~}}">
|
|
24
24
|
{{/if}}
|
|
25
25
|
{{~#each this~}}
|
|
26
|
-
<li class="{{
|
|
26
|
+
<li class="cy-teaser-cluster__item {{#if ../../this.isOrdered}}-ordered{{/if}} py-3{{#unless ../../this.overviewLink.link}} last-of-type:pb-3{{/unless~}}{{~#if ../../this.showFirstImageOrGenreImage}}{{~inline-switch ../../this.realTeaserSize '["100"]' '[" md:first-of-type:pt-0"]'}}{{/if~}}">
|
|
27
27
|
{{> components/teaser/cluster/teaser_cluster_item _size=../this.realTeaserSize _ordered=../../this.isOrdered }}
|
|
28
28
|
</li>
|
|
29
29
|
{{~/each}}
|
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.
|
|
9
|
+
"version": "1.9.0",
|
|
10
10
|
"scripts": {
|
|
11
11
|
"test": "echo \"Error: no test specified\" && exit 1",
|
|
12
12
|
"storybook": "start-storybook -p 6006 public",
|
|
@@ -95,6 +95,7 @@
|
|
|
95
95
|
"@tailwindcss/line-clamp": "^0.4.2",
|
|
96
96
|
"alpinejs": "^3.8.1",
|
|
97
97
|
"async-alpine": "^1.0.0",
|
|
98
|
+
"dialog-polyfill": "^0.5.6",
|
|
98
99
|
"tailwindcss-counter": "^1.1.3"
|
|
99
100
|
},
|
|
100
101
|
"prettier": {
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
dialog {
|
|
2
|
+
position: fixed;
|
|
3
|
+
top: 50%;
|
|
4
|
+
transform: translate(0, -50%);
|
|
5
|
+
left: 0;
|
|
6
|
+
right: 0;
|
|
7
|
+
width: -moz-fit-content;
|
|
8
|
+
width: -webkit-fit-content;
|
|
9
|
+
width: fit-content;
|
|
10
|
+
height: -moz-fit-content;
|
|
11
|
+
height: -webkit-fit-content;
|
|
12
|
+
height: fit-content;
|
|
13
|
+
margin: auto;
|
|
14
|
+
padding: 1em;
|
|
15
|
+
background: white;
|
|
16
|
+
color: black;
|
|
17
|
+
display: block;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
dialog:not([open]) {
|
|
21
|
+
display: none;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
dialog + .backdrop {
|
|
25
|
+
position: fixed;
|
|
26
|
+
top: 0;
|
|
27
|
+
right: 0;
|
|
28
|
+
bottom: 0;
|
|
29
|
+
left: 0;
|
|
30
|
+
background: rgba(96, 96, 96, 0.9);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
._dialog_overlay {
|
|
34
|
+
position: fixed;
|
|
35
|
+
top: 0;
|
|
36
|
+
right: 0;
|
|
37
|
+
bottom: 0;
|
|
38
|
+
left: 0;
|
|
39
|
+
}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
import { hr$, listen, unlisten } from 'hrQuery'
|
|
1
|
+
import { hr$, listen, unlisten, addLink } from 'hrQuery'
|
|
2
2
|
import { uxAction } from 'base/tracking/atiHelper.subfeature'
|
|
3
|
+
import dialogPolyfill from 'dialog-polyfill'
|
|
3
4
|
|
|
4
5
|
const Modal = (context) => {
|
|
5
6
|
const { options } = context,
|
|
6
7
|
{ element: rootElement } = context,
|
|
8
|
+
dialogPolyfillBaseUrl = options.dialogPolyfillBaseUrl || 'vendor/dialog-polyfill',
|
|
7
9
|
modalTriggerId = options.modalTriggerId ? '#' + options.modalTriggerId : '',
|
|
8
10
|
modalTrigger = hr$(modalTriggerId)[0],
|
|
9
11
|
modalCloseTriggers = hr$('.js-modal-close', rootElement),
|
|
@@ -20,8 +22,18 @@ const Modal = (context) => {
|
|
|
20
22
|
})
|
|
21
23
|
}
|
|
22
24
|
|
|
25
|
+
const configurePolyfillIfNeeded = () => {
|
|
26
|
+
if (undefined == modal.showModal) {
|
|
27
|
+
addLink('dialog-polyfill-css', `${dialogPolyfillBaseUrl}/dialog-polyfill.css`, {
|
|
28
|
+
type: 'text/css',
|
|
29
|
+
rel: 'stylesheet',
|
|
30
|
+
})
|
|
31
|
+
}
|
|
32
|
+
dialogPolyfill.registerDialog(modal)
|
|
33
|
+
}
|
|
34
|
+
|
|
23
35
|
const clickTracking = () => {
|
|
24
|
-
console.log(
|
|
36
|
+
console.log('tracking')
|
|
25
37
|
uxAction(trackingInformations)
|
|
26
38
|
}
|
|
27
39
|
|
|
@@ -41,6 +53,7 @@ const Modal = (context) => {
|
|
|
41
53
|
modal.close()
|
|
42
54
|
}
|
|
43
55
|
|
|
56
|
+
configurePolyfillIfNeeded()
|
|
44
57
|
configureEventListeners()
|
|
45
58
|
}
|
|
46
59
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<div class="js-load" data-hr-modal='{"modalTriggerId":"{{defaultIfEmpty _trigger ""}}", "trackingInformations": "{{this.link.cmsDocument.title}} Ticketlink-Overlay ok geklickt - Dokumenten-Id: {{this.link.cmsDocument.sophoraId}}"}'>
|
|
1
|
+
<div class="js-load" data-hr-modal='{"modalTriggerId":"{{defaultIfEmpty _trigger ""}}", "trackingInformations": "{{this.link.cmsDocument.title}} Ticketlink-Overlay ok geklickt - Dokumenten-Id: {{this.link.cmsDocument.sophoraId}}","dialogPolyfillBaseUrl":"{{configProperty "dialogPolyfill.baseUrl"}}"}'>
|
|
2
2
|
<dialog class='js-modal p-0 backdrop:bg-grey-scorpion/90 shadow-md {{defaultIfEmpty _css "sm:max-w-xl"}}'>
|
|
3
3
|
<form method="dialog" class="js-dialog-content p-4">
|
|
4
4
|
{{> @partial-block }}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<article class="mx-5 sm:mx-0 col-span-12 grid bg-highlight-1 rounded-tl-hr rounded-br-hr{{~inline-switch this.teaserSize '["25","33","50"]' '[" md:col-span-3"," md:col-span-4"," md:col-span-6",""]'}} ">
|
|
1
|
+
<article class="cy-teaser-cluster{{if this.isOrdered '--ordered'}} mx-5 sm:mx-0 col-span-12 grid bg-highlight-1 rounded-tl-hr rounded-br-hr{{~inline-switch this.teaserSize '["25","33","50"]' '[" md:col-span-3"," md:col-span-4"," md:col-span-6",""]'}} ">
|
|
2
2
|
<div class="">
|
|
3
3
|
<h2 class="flex items-center px-5 py-5 text-clusterTeaserHeadline">
|
|
4
4
|
{{#if this.teaserLogo}}
|
|
@@ -18,12 +18,12 @@
|
|
|
18
18
|
{{/if~}}
|
|
19
19
|
{{~#with this.clusterTeaserItems}}
|
|
20
20
|
{{~#if ../this.isOrdered}}
|
|
21
|
-
<ol class="mx-5 list-none divide-y divide-white divide-solid counter-reset border-t border-white{{~#if ../this.showFirstImageOrGenreImage}}{{~inline-switch ../this.realTeaserSize '["100"]' '[" md:-pt-5 md:mx-0 md:pr-5 md:border-none md:basis-1/2-gap-6 lg:basis-2/3-gap-6"]'}}{{/if~}}">
|
|
21
|
+
<ol class="cy-teaser-cluster__list mx-5 list-none divide-y divide-white divide-solid counter-reset border-t border-white{{~#if ../this.showFirstImageOrGenreImage}}{{~inline-switch ../this.realTeaserSize '["100"]' '[" md:-pt-5 md:mx-0 md:pr-5 md:border-none md:basis-1/2-gap-6 lg:basis-2/3-gap-6"]'}}{{/if~}}">
|
|
22
22
|
{{else}}
|
|
23
|
-
<ul class="mx-5 divide-y divide-white divide-solid border-t border-white {{~#if ../this.showFirstImageOrGenreImage}}{{~inline-switch ../this.realTeaserSize '["100"]' '[" md:-pt-5 md:mx-0 md:pr-5 md:border-none md:basis-1/2-gap-6 lg:basis-2/3-gap-6"]'}}{{/if~}}">
|
|
23
|
+
<ul class="cy-teaser-cluster__list mx-5 divide-y divide-white divide-solid border-t border-white {{~#if ../this.showFirstImageOrGenreImage}}{{~inline-switch ../this.realTeaserSize '["100"]' '[" md:-pt-5 md:mx-0 md:pr-5 md:border-none md:basis-1/2-gap-6 lg:basis-2/3-gap-6"]'}}{{/if~}}">
|
|
24
24
|
{{/if}}
|
|
25
25
|
{{~#each this~}}
|
|
26
|
-
<li class="{{
|
|
26
|
+
<li class="cy-teaser-cluster__item {{#if ../../this.isOrdered}}-ordered{{/if}} py-3{{#unless ../../this.overviewLink.link}} last-of-type:pb-3{{/unless~}}{{~#if ../../this.showFirstImageOrGenreImage}}{{~inline-switch ../../this.realTeaserSize '["100"]' '[" md:first-of-type:pt-0"]'}}{{/if~}}">
|
|
27
27
|
{{> components/teaser/cluster/teaser_cluster_item _size=../this.realTeaserSize _ordered=../../this.isOrdered }}
|
|
28
28
|
</li>
|
|
29
29
|
{{~/each}}
|
|
@@ -358,6 +358,28 @@ const loadScript = function (id, scriptUrl, async, callback) {
|
|
|
358
358
|
firstScriptTagInPage.parentNode.insertBefore(scriptTag, firstScriptTagInPage)
|
|
359
359
|
}
|
|
360
360
|
|
|
361
|
+
const addLink = function (id, url, config) {
|
|
362
|
+
if (document.getElementById(id)) return
|
|
363
|
+
|
|
364
|
+
let linkTag = document.createElement('link')
|
|
365
|
+
linkTag.id = id
|
|
366
|
+
linkTag.href = url
|
|
367
|
+
if (config.type) {
|
|
368
|
+
linkTag.type = config.type
|
|
369
|
+
}
|
|
370
|
+
if (config.rel) {
|
|
371
|
+
linkTag.rel = config.rel
|
|
372
|
+
}
|
|
373
|
+
if (config.title) {
|
|
374
|
+
linkTag.title = config.title
|
|
375
|
+
}
|
|
376
|
+
if (config.as) {
|
|
377
|
+
linkTag.as = config.as
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
document.getElementsByTagName('head')[0].appendChild(linkTag)
|
|
381
|
+
}
|
|
382
|
+
|
|
361
383
|
/*
|
|
362
384
|
* Fügt ein "style" bereich zum dokument hinzu
|
|
363
385
|
* und gibt eine referenz darauf zurück
|
|
@@ -445,6 +467,7 @@ const clearRequestInterval = (handle) =>
|
|
|
445
467
|
: window.clearInterval(handle)
|
|
446
468
|
|
|
447
469
|
export {
|
|
470
|
+
addLink,
|
|
448
471
|
addStyle,
|
|
449
472
|
hr$,
|
|
450
473
|
stripTags,
|