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.
 
 
 
 

29 lines
1.2 KiB

  1. import './howto-list.scss';
  2. import {createElement, createImage} from "../../_global/scripts/helpers";
  3. import {howToListData} from "./HowToListData";
  4. export const createHowToList =
  5. ({
  6. listItems: listItems = howToListData,
  7. headline = 'Wie funktioniert’s?',
  8. text = 'Bestimmen Sie die wirtschaftliche Ausrichtung ihrer Region mit! Wählen Sie die nächste Vollversammlung ihrer IHK. Hier erfahren Sie ganz genau, wie sie mitmachen.',
  9. }) => {
  10. const div = createElement('div', ['howto-list'], null);
  11. const div2 = createElement('div', ['howto-list--left'], null, div);
  12. createElement('h2', [], headline, div2);
  13. createElement('p', [], text, div2);
  14. const ul = createElement('ul', [], null, div);
  15. listItems.map((item) => {
  16. const li = createElement('li', [], null, ul);
  17. const a = createElement('a', [], null, li);
  18. createElement('div', ['icon-box', item.icon], null, a);
  19. createElement('h3', [], item.headline, a);
  20. createElement('p', [], item.text, a);
  21. createElement('span', [], item.more, a);
  22. a.href = item.link;
  23. if (item.copy && item.copy.length > 0) {
  24. createElement('p', [], item.copy, li);
  25. }
  26. })
  27. return div;
  28. }