|
|
|
@@ -1,6 +1,7 @@ |
|
|
|
import {createElement, createImage} from "../../_global/scripts/helpers"; |
|
|
|
import './teaser.scss'; |
|
|
|
import {createReadingTime} from "../../atoms/reading-time/ReadingTimeComponent"; |
|
|
|
import {createLinkList} from "../linklist/LinkListComponent"; |
|
|
|
|
|
|
|
export const createTeaser = ({ |
|
|
|
type = 'regular', |
|
|
|
@@ -16,6 +17,7 @@ export const createTeaser = ({ |
|
|
|
picto = null, |
|
|
|
pictoText = false, |
|
|
|
linkType = null, |
|
|
|
linklistData = null, |
|
|
|
}) => { |
|
|
|
const teaser = createElement('div', ['teaser', type]); |
|
|
|
if (kicker && kicker.length > 0) { |
|
|
|
@@ -82,7 +84,11 @@ export const createTeaser = ({ |
|
|
|
|
|
|
|
const textBox = createElement('div', ['text-box'], '', teaser); |
|
|
|
createElement('div', ['title','like-h4'], headline, textBox); |
|
|
|
createElement('p', [], copy, textBox); |
|
|
|
if (linklistData) { |
|
|
|
textBox.appendChild(createLinkList({links: linklistData})); |
|
|
|
} else { |
|
|
|
createElement('p', [], copy, textBox); |
|
|
|
} |
|
|
|
|
|
|
|
if (showReadingTime) { |
|
|
|
const rt = createReadingTime({minutes: Math.floor(Math.random() * 10) + 2}); |
|
|
|
|