bundles/AppBundle/Resources/views/Areas/text-image/view.html.twig line 1

Open in your IDE?
  1. {% set align = pimcore_select('align').getValue() %}
  2. {% set image = pimcore_image('image1') %}
  3. {% set hasImage = image and image.getSrc() %}
  4. {% set paddingTop = pimcore_select('paddingTop').getValue() %}
  5. {% set paddingBottom = pimcore_select('paddingBottom').getValue() %}
  6. {% set text1 = pimcore_wysiwyg('text1') %}
  7. {% set text2 = pimcore_wysiwyg('text2') %}
  8. {% set textColor = pimcore_select('textColor').getValue() %}
  9. {% set textColorHex = pimcore_input('textColorHex').getValue() %}
  10. {% set bgColor = pimcore_select('bgColor').getValue() %}
  11. {% set bgColorHex = pimcore_input('bgColorHex').getValue() %}
  12. {% set textColor1 = pimcore_select('textColor1').getValue() %}
  13. {% set textColor1Hex = pimcore_input('textColor1Hex').getValue() %}
  14. {% set bgColor1 = pimcore_select('bgColor1').getValue() %}
  15. {% set bgColor1Hex = pimcore_input('bgColor1Hex').getValue() %}
  16. {% set shadow1 = pimcore_checkbox('shadow1').isChecked() %}
  17. {% set padding1 = bgColor1 or bgColor1Hex or shadow1 %}
  18. {% set textColor2 = pimcore_select('textColor2').getValue() %}
  19. {% set textColor2Hex = pimcore_input('textColor2Hex').getValue() %}
  20. {% set bgColor2 = pimcore_select('bgColor2').getValue() %}
  21. {% set bgColor2Hex = pimcore_input('bgColor2Hex').getValue() %}
  22. {% set shadow2 = pimcore_checkbox('shadow2').isChecked() %}
  23. {% set padding2 = bgColor2 or bgColor2Hex or shadow2 %}
  24. <div class="{% if not textColorHex %} {{ textColor }} {% endif %} {% if not bgColorHex %} {{  bgColor }} {% endif %}" style="{% if textColorHex %}color: {{ textColorHex }}; {% endif %} {% if bgColorHex %}background: {{ bgColorHex }}; {% endif %}">
  25.     <div class="container px-5 pt-{{ paddingTop }} pb-{{ paddingBottom }}">
  26.         <div class="grid grid-cols-5 gap-5 md:gap-10">
  27.             <div class="{% if align != 'top' %} col-span-5 md:col-span-3 {% else %} col-span-5 {% endif %} {% if align == 'right' %} order-2 {% endif %}">
  28.                 <div class="prose colored text-balance {% if not editmode %}fade-in{% endif %} {% if not textColor1Hex %} {{ textColor1 }} {% endif %} {% if not bgColor1Hex %} {{  bgColor1 }} {% endif %} {% if padding1 %} p-5 {% endif %}  {% if shadow1 %}shadow-card{% endif %}" style="{% if textColor1Hex %}color: {{ textColor1Hex }}; {% endif %} {% if bgColor1Hex %}background: {{ bgColor1Hex }}; {% endif %}">
  29.                     {{ text1 | pimcoreObject | raw }}
  30.                 </div>
  31.             </div>
  32.             <div class="{% if align == 'shifted' %} md:col-start-3 col-span-5 md:col-span-3 {% else %}{% if align != 'top' %} col-span-5 md:col-span-2 {% else %} col-span-5 {% endif %}{% endif %} {% if align == 'right' %} order-1 {% endif %} {% if not editmode and not hasImage and not text2.getValue() %} hidden {% endif %}">
  33.                 {% if hasImage %}
  34.                     <div class="overflow-clip rounded-md {% if text2.getValue() %} mb-5 {% endif %}">
  35.                         <img src="{{ image.getThumbnail('stageThumbnailMobile').getPath() }}" class="w-full" title="">
  36.                     </div>
  37.                     {% if image.image.getMetadata('copyright') %}
  38.                        <div class="text-xs opacity-50 mt-2">&copy; {{ image.image.getMetadata('copyright') }}</div>
  39.                     {% endif %}
  40.                 {% endif %}
  41.                 <div class="prose colored text-balance {% if not editmode %}fade-in delay-150{% endif %} {% if not textColor2Hex %} {{ textColor2 }} {% endif %} {% if not bgColor2Hex %} {{  bgColor2 }} {% endif %} {% if padding2 %} p-5 {% endif %} {% if shadow2 %}shadow-card{% endif %}" style="{% if textColor2Hex %}color: {{ textColor2Hex }}; {% endif %} {% if bgColor2Hex %}background: {{ bgColor2Hex }}; {% endif %}">
  42.                     {{ text2 | pimcoreObject | raw }}
  43.                 </div>
  44.             </div>
  45.         </div>
  46.     </div>
  47. </div>