vendor/pimcore/portal-engine/src/Resources/views/shared/teaser/big-cta.html.twig line 1

Open in your IDE?
  1. {# parameters #}
  2. {% set color = color | default("white") %}
  3. {% set mediaLeft = mediaLeft | default(false) %}
  4. {% set title = title | default(null) %}
  5. {% set description = description | default(null) %}
  6. {% set button = portalEngine_addClassToLnk(button, 'btn btn-lg btn-shadow btn-light') | default(null) %}
  7. {% set image = image | default(null) %}
  8. {% set imageEditable = imageEditable | default(null) %}
  9. {% set content = content | default(null) %}
  10. {# bootstrap #}
  11. {% set mediaClass = "" %}
  12. {% set colorClass = "bg-white" %}
  13. {% set mediaClass = mediaLeft ? "content-teaser--media-left" %}
  14. {% if color == "primary" %}
  15.     {% set colorClass = "bg-primary text-white" %}
  16. {% endif %}
  17. {# content #}
  18. <section class="content-teaser {{ mediaClass }} {{ colorClass }}">
  19.     <div class="row no-gutters">
  20.         <div class="col-md-6">
  21.             {% if image %}
  22.                 <div class="content-teaser__img h-100">
  23.                     {{ image.thumbnail("portal-engine_teaser-cta").html({}, ["width", "height"]) | raw }}
  24.                 </div>
  25.             {% elseif imageEditable %}
  26.                 <div class="content-teaser__img h-100">
  27.                     {{ pimcore_image(imageEditable, {thumbnail: "portal-engine_teaser-cta"}).frontend | raw }}
  28.                 </div>
  29.             {% endif %}
  30.         </div>
  31.         <div class="col-md {{ not mediaLeft ? "order-md-first" }}">
  32.             <div class="content-teaser__content">
  33.                 <h3 class="content-teaser__content__title">
  34.                     {% if button and button.href %}
  35.                         <a href="{{ button.href }}" target="{{ button.target }}" class="stretched-link">
  36.                             {{ title | raw }}
  37.                         </a>
  38.                     {% else %}
  39.                         {{ title | raw }}
  40.                     {% endif %}
  41.                 </h3>
  42.                 {{ description | raw }}
  43.                 {% if button %}
  44.                     <div class="mt-5">
  45.                         {{ button|raw }}
  46.                     </div>
  47.                 {% endif %}
  48.                 {% if content %}
  49.                     <div class="mt-2">
  50.                         {{ content | raw }}
  51.                     </div>
  52.                 {% endif %}
  53.             </div>
  54.         </div>
  55.     </div>
  56. </section>