|
|
|
@@ -83,10 +83,14 @@ export const createTeaser = ({ |
|
|
|
} |
|
|
|
|
|
|
|
const textBox = createElement('div', ['text-box'], '', teaser); |
|
|
|
createElement('div', ['title','like-h4'], headline, textBox); |
|
|
|
|
|
|
|
if (linklistData) { |
|
|
|
// Mit Linkliste: KEINE "title" Klasse, KEIN Link in Headline |
|
|
|
createElement('div', ['like-h4'], headline, textBox); |
|
|
|
textBox.appendChild(createLinkList({links: linklistData})); |
|
|
|
} else { |
|
|
|
// Ohne Linkliste: normale Variante MIT "title" Klasse |
|
|
|
createElement('div', ['title','like-h4'], headline, textBox); |
|
|
|
createElement('p', [], copy, textBox); |
|
|
|
} |
|
|
|
|
|
|
|
@@ -98,12 +102,15 @@ export const createTeaser = ({ |
|
|
|
teaser.dataset.imageSize = imageSize; |
|
|
|
} |
|
|
|
|
|
|
|
const teaserLink = createElement('a', ['teaser--link', type], '', teaser); |
|
|
|
teaserLink.href = link; |
|
|
|
teaserLink.setAttribute('aria-label', 'Beschreibender Link-Text'); |
|
|
|
// teaserLink nur OHNE linklistData |
|
|
|
if (!linklistData) { |
|
|
|
const teaserLink = createElement('a', ['teaser--link', type], '', teaser); |
|
|
|
teaserLink.href = link; |
|
|
|
teaserLink.setAttribute('aria-label', 'Beschreibender Link-Text'); |
|
|
|
|
|
|
|
if (linkType) { |
|
|
|
teaserLink.classList.add(linkType); |
|
|
|
if (linkType) { |
|
|
|
teaserLink.classList.add(linkType); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
return teaser; |
|
|
|
|