|
|
|
@@ -10,17 +10,20 @@ export const createMiniTeaser = ({ |
|
|
|
buttonlabel = 'IHK-Newsletter sichern', |
|
|
|
backgroundImage = null, |
|
|
|
}) => { |
|
|
|
|
|
|
|
|
|
|
|
if (type === 'standard') { |
|
|
|
const tile = createElement('a', ['tile', 'mini-teaser', type], null); |
|
|
|
tile.href = link; |
|
|
|
const tile = createElement('div', ['tile', 'mini-teaser', type], null); |
|
|
|
// tile.href = link; |
|
|
|
const textBox = createElement('div', ['text-box'], null, tile); |
|
|
|
createElement('div', ['category','like-h5'], category, textBox); |
|
|
|
createElement('div', ['title','like-h4'], title, textBox); |
|
|
|
const teaserLink = createElement('a', ['teaser--link'], '', tile); |
|
|
|
teaserLink.href = link; |
|
|
|
teaserLink.setAttribute('aria-label', 'Beschreibender Link-Text'); |
|
|
|
return tile; |
|
|
|
}else{ |
|
|
|
const tile = createElement('a', ['tile', 'mini-teaser', type], null); |
|
|
|
tile.href = link; |
|
|
|
} else { |
|
|
|
const tile = createElement('div', ['tile', 'mini-teaser', type], null); |
|
|
|
// tile.href = link; |
|
|
|
if (backgroundImage && backgroundImage.length > 0) { |
|
|
|
tile.style = 'background-image: url(' + backgroundImage + ');'; |
|
|
|
tile.classList.add('background-image'); |
|
|
|
@@ -30,11 +33,14 @@ export const createMiniTeaser = ({ |
|
|
|
createElement('div', ['icon-box', 'pictogram-' + icon.toLowerCase().split(' ').join('-')], null, textBox); |
|
|
|
createElement('div', ['title','like-h4'], title, textBox); |
|
|
|
textBox.appendChild(createButton({elementType: 'span',color: 'white', label: buttonlabel,iconPosition: 'icon-right', icon: null, preventClick: false})) |
|
|
|
}else{ |
|
|
|
} else { |
|
|
|
createElement('div', ['title', 'noicon', 'like-h4'], title, textBox); |
|
|
|
textBox.appendChild(createButton({elementType: 'span',color: 'white', label: buttonlabel, iconPosition: 'icon-right', icon: null, preventClick: false})) |
|
|
|
} |
|
|
|
|
|
|
|
const teaserLink = createElement('a', ['teaser--link'], '', tile); |
|
|
|
teaserLink.href = link; |
|
|
|
teaserLink.setAttribute('aria-label', 'Beschreibender Link-Text'); |
|
|
|
|
|
|
|
return tile; |
|
|
|
} |
|
|
|
} |