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.
 
 
 
 

85 lines
3.8 KiB

  1. import './footer.scss';
  2. import {createElement} from "../../_global/scripts/helpers";
  3. import {createSocialIcons} from "../../atoms/social-icons/SocialIconsComponent";
  4. import {socialIconsPlatforms} from "../../atoms/social-icons/SocialIconsData";
  5. import {createButton} from "../../atoms/button/ButtonComponent";
  6. export const createFooter = ({
  7. contactHeadline = 'Wir können wir Ihnen helfen?',
  8. address = 'IHK Musterstadt <br> Musterstraße 12-18 <br> 54321 Muster',
  9. mail = 'info@musterstadt.ihk.de',
  10. phone = '12345 / 6789 - 0',
  11. accessibility = [
  12. {
  13. name: 'Gebärdensprache',
  14. link: '#',
  15. icon: 'icon-gebaerdensprache',
  16. },
  17. {
  18. name: 'Leichte Sprache',
  19. link: '#',
  20. icon: 'icon-leichte-sprache',
  21. },
  22. {
  23. name: 'Erklärung zur Barrierefreiheit',
  24. link: '#',
  25. icon: 'icon-barrierefreiheit',
  26. }
  27. ],
  28. legalText = '<p>© Industrie- und Handelskammer Musterstast</p>\n' +
  29. '<p>Für die Richtigkeit der in dieser Website enthaltenen Angaben können wir trotz sorgfältiger Prüfung keine Gewähr übernehmen. Bei den verlinkten externen Seiten handelt es sich ausschließlich um fremde Inhalte, für die wir keine Haftung übernehmen und deren Inhalt wir uns nicht zu eigen machen.</p>',
  30. legalNav = ['Impressum', 'Datenschutzerklärung', 'Pflichtinformationen nach der DSGVO'],
  31. }) => {
  32. const footer = createElement('footer', ['page-footer']);
  33. const container = createElement('div', ['container'], null, footer);
  34. const rowContact = createElement('div', ['row', 'contact'], null, container);
  35. const rowSocial = createElement('div', ['row', 'social'], null, container);
  36. const rowAccessibility = createElement('div', ['row', 'barrier-free'], null, container);
  37. const rowCopyright = createElement('div', ['row', 'copyright'], null, container);
  38. const rowLegal = createElement('div', ['row', 'legal-nav'], null, container);
  39. const contactCol1 = createElement('div', ['col'], null, rowContact);
  40. createElement('p', ['like-h2'], contactHeadline, contactCol1);
  41. const contactCol2 = createElement('div', ['col'], null, rowContact);
  42. createElement('h6', [], 'Unsere Anschrift', contactCol2);
  43. createElement('p', [], address, contactCol2);
  44. contactCol2.appendChild(createButton({color: 'white', label: 'IHK wechseln', iconPosition: 'icon-right', icon: 'ihk-wechseln'}))
  45. const contactCol3 = createElement('div', ['col'], null, rowContact);
  46. createElement('h6', [], 'So erreichen Sie uns', contactCol3);
  47. const contactUl = createElement('ul', ['contact-list'], null, contactCol3);
  48. const contacts = {mail: mail, phone: phone};
  49. for (let property in contacts) {
  50. const li = createElement('li', [property], null, contactUl);
  51. const a = createElement('a', property === 'mail' ? ['email'] : ['mobile', 'phone'], contacts[property], li);
  52. a.href = property === 'mail' ? 'mailto:' + mail : 'tel:' + phone;
  53. }
  54. const socialCol = createElement('div', ['col'], null, rowSocial);
  55. socialCol.appendChild(createSocialIcons({icons: socialIconsPlatforms, title: ''}));
  56. const accCol = createElement('div', ['col'], null, rowAccessibility);
  57. const accList = createElement('ul', [], null, accCol);
  58. accessibility.map((item) => {
  59. const li = createElement('li', [item.icon], null, accList);
  60. const a = createElement('a', [], item.name, li);
  61. a.href = item.link;
  62. })
  63. const copyrightCol = createElement('div', ['col'], legalText, rowCopyright);
  64. copyrightCol.id = 'page-footer-copyright';
  65. const partnerCol = createElement('div', ['col'], null, rowCopyright);
  66. const legalCol = createElement('div', ['col'], null, rowLegal);
  67. legalCol.id = 'page-footer-legal';
  68. const legalNavUl = createElement('ul', [], null, legalCol);
  69. legalNav.map((item) => {
  70. const li = createElement('li', [], null, legalNavUl);
  71. const a = createElement('a', [], item, li);
  72. a.href = '#';
  73. })
  74. return footer;
  75. }