You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

35 line
1.5 KiB

  1. import './commonContent-article.scss';
  2. import {createElement} from "../../_global/scripts/helpers";
  3. import {lorem2} from "../../_global/scripts/lorem";
  4. import {createBlockquote} from "../../atoms/blockquote/BlockquoteComponent";
  5. import {createContact} from "../contact/ContactComponent";
  6. import {createPrintShare} from "../print-share/PrintShareComponent";
  7. import {createInfobox} from "../infobox/InfoboxComponent";
  8. import {createTopicTeasersSection} from "../../sections/topic-teasers/TopicTeasersComponent";
  9. import {createCommonContent} from "../common-content/CommonContentComponent";
  10. export const createCommonContentArticle = ({
  11. addArticleComponents = true,
  12. kicker = 'Titelthema',
  13. headline = '5 Beispiele, wie sich Unternehmen für ihr Umfeld engagieren',
  14. }) => {
  15. const div = createElement('div');
  16. const article = createElement('article', ['col', 'magazine-article'], null, div);
  17. if (addArticleComponents) {
  18. createElement('p', ['kicker'], kicker, article);
  19. createElement('h1', [], headline, article);
  20. }
  21. article.appendChild(createCommonContent({}));
  22. const wrapper = createElement('div', ['content'], null, div);
  23. wrapper.appendChild(createTopicTeasersSection({maxItems: 6}));
  24. const article2 = createElement('article', ['col', 'magazine-article'], null, div);
  25. article2.appendChild(createInfobox({content: lorem2}));
  26. article2.appendChild(createBlockquote({}));
  27. article2.appendChild(createContact({}));
  28. article2.appendChild(createPrintShare({}));
  29. return div;
  30. }