Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.
 
 
 
 

45 строки
2.3 KiB

  1. import './magazine-article.scss';
  2. import {createElement, createImage} from "../../_global/scripts/helpers";
  3. import {lorem1, lorem2} from "../../_global/scripts/lorem";
  4. import {createGallery} from "../gallery/GalleryComponent";
  5. import {createAnchorLinks} from "../anchor-links/AnchorLinksComponent";
  6. import {createBlockquote} from "../../atoms/blockquote/BlockquoteComponent";
  7. import {createContact} from "../contact/ContactComponent";
  8. import {createPrintShare} from "../print-share/PrintShareComponent";
  9. import {createInfobox} from "../infobox/InfoboxComponent";
  10. import {createEventsSection} from "../../sections/events/EventsComponent";
  11. export const createMagazineArticle = ({
  12. addArticleComponents = true,
  13. kicker = 'Titelthema',
  14. headline = '5 Beispiele, wie sich Unternehmen für ihr Umfeld engagieren',
  15. }) => {
  16. const article = createElement('article', ['col', 'magazine-article']);
  17. if (addArticleComponents) {
  18. createElement('p', ['kicker'], kicker, article);
  19. createElement('h1', [], headline, article);
  20. createElement('p', ['author-date'], 'von Martina Mustermann | 15.02.2025', article);
  21. article.appendChild(createAnchorLinks({titles: ['Lorem ipsum dolor sit', 'Consectetur adipisicing elit']}))
  22. const richText = createElement('div', ['richtext'], null, article);
  23. createElement('p', ['initial'], lorem1, richText);
  24. createElement('p', [], lorem2, richText);
  25. createElement('h2', [], 'Lorem ipsum dolor sit', richText);
  26. createElement('p', [], lorem1, richText);
  27. article.appendChild(createGallery({galleryType: 'masonry'}));
  28. article.appendChild(createInfobox({content: lorem2}));
  29. const imageBox = createElement('figure', ['image-box', 'off-grid'], null, article);
  30. createImage('./dummy/placeholder-3-2.svg', 420, 280, 'Image off grid', [], imageBox);
  31. createElement('figcaption', [], 'Bildunterschrift lorem ipsum dolor sit amet ipsum', imageBox);
  32. createElement('p', [], lorem2 + ' ' + lorem1 + ' ' + lorem2, article);
  33. createElement('p', [], lorem2, article);
  34. createElement('h2', [], 'Consectetur adipisicing elit', article);
  35. createElement('p', [], lorem2, article);
  36. article.appendChild(createEventsSection({}));
  37. article.appendChild(createBlockquote({}));
  38. article.appendChild(createContact({}));
  39. article.appendChild(createPrintShare({}));
  40. }
  41. return article;
  42. }