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.
 
 
 
 

30 lines
1.4 KiB

  1. import './election-result-list-item.scss';
  2. import {createElement, createImage} from "../../_global/scripts/helpers";
  3. export const createElectionResultListItem =
  4. ({
  5. image = './dummy/election-list-cover.jpg',
  6. name = 'Lars-Hendrick Pirckensee',
  7. job = 'Grundstücksmakler, Immobilenemakler',
  8. city = 'Kreisfreie Musterstadt, Musterhausen',
  9. }) => {
  10. const electionResultListItem = createElement('div', ['election-result-list-item']);
  11. const topBox = createElement('a', ['top-box'], null, electionResultListItem);
  12. topBox.href = '#';
  13. const imageBox = createElement('div', ['image-box'], null, topBox);
  14. createImage(image, 310, 310, '', [], imageBox);
  15. const copy = createElement('span', ['copyright'], name, imageBox);
  16. copy.setAttribute("aria-hidden", "true");
  17. createElement('span', ['sr-only'], name, imageBox);
  18. createElement('h3', [], name, topBox);
  19. const textBox = createElement('div', ['text-box'], null, electionResultListItem);
  20. const jobBox = createElement('div', ['job-box'], null, textBox);
  21. const jobBoxLink = createElement('a', ['icon-small-election-group'], job, jobBox);
  22. jobBoxLink.href = '#';
  23. const cityBox = createElement('div', ['city-box'], null, textBox);
  24. const cityBoxLink = createElement('a', ['icon-small-icon-election-location'], city, cityBox);
  25. cityBoxLink.href = '#';
  26. return electionResultListItem;
  27. }