templates/lef-career/partials/footer.html.twig line 1

Open in your IDE?
  1. {%- set version = '1.0.1' -%}
  2. {%- if editmode -%}
  3.     <link rel="stylesheet" href="/css/career-critical.css?v={{ version }}" />
  4.     <link rel="stylesheet" href="/css/career.css?v={{ version }}" />
  5.     <link rel="stylesheet" href="/css/editmode.css?v={{ version }}" />
  6.     {{- include('lef-career/partials/svg-sprite.html.twig') -}}
  7.     <footer class="footer">
  8.         <picture class="footer__picture footer__picture--first">
  9.             {{- pimcore_image('footerImageOne', {
  10.                 'class': 'footer__image footer__image--first'
  11.             }) -}}
  12.         </picture>
  13.         <address class="footer__address">
  14.             {{- pimcore_textarea('address', {
  15.                 'placeholder': 'Adresse'
  16.             }) -}}
  17.         </address>
  18.         <div class="footer__mail">
  19.             {{- pimcore_link('mail', {
  20.                 'reload': true
  21.             }) -}}
  22.             {%- set mail = pimcore_link('mail') -%}
  23.             {%- if not mail.isEmpty() and mail.href != '' and mail.text != '' -%}
  24.                 <a href="#" class="footer__mail-link">
  25.                     {{- mail.text -}}
  26.                 </a>
  27.             {%- endif -%}
  28.         </div>
  29.         <div class="footer__contact">
  30.             {{- pimcore_input('contact', {
  31.                 'placeholder': 'Text'
  32.             }) -}}
  33.         </div>
  34.         <div class="footer__legal-navigation">
  35.             {{- pimcore_relations('legalNavigation', {
  36.                 'types': ['document'],
  37.                 'subtypes': {
  38.                     'document': ['page']
  39.                 },
  40.                 'title': 'Bitte legen Sie hier Dokumente für die rechtlichen Informationen (Impressum etc.) ab!'
  41.             }) -}}
  42.         </div>
  43.         <picture class="footer__picture footer__picture--last">
  44.             {{- pimcore_image('footerImageTwo', {
  45.                 'class': 'footer__image footer__image--last'
  46.             }) -}}
  47.         </picture>
  48.     </footer>
  49. {%- else -%}
  50.     {%- set footerImageOne = pimcore_image('footerImageOne', {
  51.         'thumbnail': 'footerImageOne',
  52.         'pictureAttributes': {
  53.             'class': 'footer__picture footer__picture--first'
  54.         },
  55.         'imgAttributes': {
  56.             'class': 'footer__image footer__image--first',
  57.             'loading': 'lazy'
  58.         }
  59.     }) -%}
  60.     {%- set address = pimcore_textarea('address') -%}
  61.     {%- set mail = pimcore_link('mail') -%}
  62.     {%- set contact = pimcore_input('contact') -%}
  63.     {%- set legalNavigation = pimcore_relations('legalNavigation') -%}
  64.     {%- set footerImageTwo = pimcore_image('footerImageTwo', {
  65.         'thumbnail': 'footerImageTwo',
  66.         'pictureAttributes': {
  67.             'class': 'footer__picture footer__picture--last'
  68.         },
  69.         'imgAttributes': {
  70.             'class': 'footer__image footer__image--last',
  71.             'loading': 'lazy'
  72.         }
  73.     }) -%}
  74.     <footer id="footer" class="footer">
  75.         {%- if not footerImageOne.isEmpty() -%}
  76.             {{- footerImageOne|raw -}}
  77.         {%- else -%}
  78.             <div class="footer__picture footer__picture--first">
  79.             </div>
  80.         {%- endif -%}
  81.         {%- if not address.isEmpty() -%}
  82.             <address class="footer__address">
  83.                 {{- address|nl2br -}}
  84.             </address>
  85.         {%- else -%}
  86.             <div class="footer__address">
  87.             </div>
  88.         {%- endif -%}
  89.         <div class="footer__mail">
  90.             {%- if not mail.isEmpty() and mail.href != '' and mail.text != '' -%}
  91.                 <a href="mailto:{{- mail.href -}}"
  92.                    class="footer__mail-link"
  93.                    {% if mail.target == '_blank' %}target="_blank" rel="noopener noreferrer"{% endif %}>
  94.                     {{- mail.text -}}
  95.                 </a>
  96.             {%- endif -%}
  97.         </div>
  98.         <div class="footer__contact">
  99.             <p class="footer__contact-link">
  100.                 {{- contact.text -}}
  101.             </p>
  102.         </div>
  103.         {%- if not legalNavigation.isEmpty() -%}
  104.             {%- set links = legalNavigation.elements -%}
  105.             <nav class="footer__legal-navigation" aria-labelledby="legal-navigation-label">
  106.                 <h2 id="legal-navigation-label" class="visually-hidden">
  107.                     {{- 'Rechtliche Informationen'|trans -}}
  108.                 </h2>
  109.                 <ul class="footer__legal-list">
  110.                     {%- for link in links -%}
  111.                         {%- set id = link.id -%}
  112.                         {%- set name = link.property('navigation_name') -%}
  113.                         {%- set title = link.property('navigation_title') -%}
  114.                         {%- set target = link.property('navigation_target') -%}
  115.                         <li class="footer__legal-list-item">
  116.                             <a href="{{- link -}}"
  117.                                class="footer__legal-link"
  118.                                {% if id == document.id %}aria-current="page"{% endif %}
  119.                                {% if target == '_blank' %}target="_blank" rel="noopener noreferrer"{% endif %}>
  120.                                 {%- if name -%}
  121.                                     {{- name|raw -}}
  122.                                 {%- elseif title -%}
  123.                                     {{- title|raw -}}
  124.                                 {%- endif -%}
  125.                             </a>
  126.                         </li>
  127.                     {%- endfor -%}
  128.                 </ul>
  129.             </nav>
  130.         {%- else -%}
  131.             <div class="footer__legal-navigation">
  132.             </div>
  133.         {%- endif -%}
  134.         {%- if not footerImageTwo.isEmpty() -%}
  135.             {{- footerImageTwo|raw -}}
  136.         {%- else -%}
  137.             <div class="footer__picture footer__picture--last">
  138.             </div>
  139.         {%- endif -%}
  140.     </footer>
  141. {%- endif -%}