templates/areas/together/together.html.twig line 1

Open in your IDE?
  1. <figure class="together">
  2.     {%- if editmode -%}
  3.         {{- pimcore_image('togetherImage') -}}
  4.         <figcaption class="together__caption">
  5.             <div class="together__caption-top">
  6.                 <h2 class="together__headline">
  7.                     {{- pimcore_input('togetherHeadline', {
  8.                         'placeholder': 'Überschrift'
  9.                     }) -}}
  10.                 </h2>
  11.                 <div class="together__subline">
  12.                     {{- pimcore_input('subline', {
  13.                         'placeholder': 'Text'
  14.                     }) -}}
  15.                 </div>
  16.             </div>
  17.             <div class="together__caption-bottom">
  18.                 <div class="together__link-section-left">
  19.                     {{- pimcore_textarea('text', {
  20.                         'placeholder': 'Text'
  21.                     }) -}}
  22.                 </div>
  23.                 <div class="together__link-section-right">
  24.                     {{- pimcore_link('link') -}}
  25.                 </div>
  26.             </div>
  27.         </figcaption>
  28.     {%- else -%}
  29.         {%- set image = pimcore_image('togetherImage', {
  30.             'thumbnail': 'homepageHeroImage',
  31.             'pictureAttributes': {
  32.                 'class': 'together__picture'
  33.             },
  34.             'imgAttributes': {
  35.                 'class': 'together__image',
  36.                 'loading': 'lazy'
  37.             }
  38.         }) -%}
  39.         {%- set togetherHeadline = pimcore_input('togetherHeadline') -%}
  40.         {%- set subline = pimcore_input('subline') -%}
  41.         {%- set text = pimcore_textarea('text') -%}
  42.         {%- set link = pimcore_link('link') -%}
  43.         {%- if not image.isEmpty() -%}
  44.             {{- image|raw -}}
  45.         {%- endif -%}
  46.         <figcaption class="together__caption">
  47.             <div class="together__caption-top">
  48.                 {%- if not togetherHeadline.isEmpty() -%}
  49.                     <h2 class="together__headline">
  50.                         {{- togetherHeadline|raw -}}
  51.                     </h2>
  52.                 {%- endif -%}
  53.                 {%- if not subline.isEmpty() -%}
  54.                     <p class="together__subline">
  55.                         {{- subline|raw -}}
  56.                     </p>
  57.                 {%- endif -%}
  58.             </div>
  59.             <div class="together__caption-bottom">
  60.                 {%- if not text.isEmpty() -%}
  61.                     <p class="together__link-section-left">
  62.                         {{- text|nl2br -}}
  63.                     </p>
  64.                 {%- endif -%}
  65.                 {%- if not link.isEmpty() and link.href != '' and link.text != '' -%}
  66.                     <a href="{{- link.href -}}"
  67.                        class="together__link-section-right"
  68.                        {% if link.target == '_blank' %}target="_blank" rel="noopener noreferrer"{% endif %}>
  69.                         {{- link.text -}}
  70.                     </a>
  71.                 {%- endif -%}
  72.             </div>
  73.             <svg class="icon"
  74.                  aria-hidden="true"
  75.                  focusable="false">
  76.                 <use xlink:href="#angle-down-regular" />
  77.             </svg>
  78.         </figcaption>
  79.     {%- endif -%}
  80. </figure>