templates/component/large_image_text.html.twig line 1

Open in your IDE?
  1. {#
  2.     component: large image text
  3.     heading: [{
  4.         title {string}: Titre 
  5.         titleAnnex {string}: Titre annexe (au dessus du titre)
  6.     }]
  7.     text {string}: Texte
  8.     image {image}: Image 
  9.         size: {
  10.             width: "1320",
  11.             height: "650"
  12.         }
  13.     links: [{
  14.         text {string}: Texte du lien
  15.         to {string}: Lien
  16.     }]
  17. #}
  18. {% set props = {
  19.     heading: null,
  20.     text: null,
  21.     image: null,
  22.     links: null
  23. }|merge(props|default({}))  %}
  24. <section
  25.     data-component="large-image-text" class="LargeImageText-component">
  26.     {# Image #}
  27.     <div class="LargeImageText-image-container">
  28.         <div class="LargeImageText-image" ref="images">
  29.             {% include "component/image.html.twig" with {
  30.                 props: props.image
  31.             } %}
  32.             {# {% include "component/picture.html.twig" with {
  33.                 props: props.image|merge({
  34.                     srcWebp: (props.image.src) ? asset(props.image.src | imagine_filter('convert_img_to_webp')) : ''
  35.                 })
  36.             } %} #}
  37.         </div>
  38.     </div>
  39.     <div class="l-container">
  40.         <div class="l-row LargeImageText-row u-v-center u-end">
  41.             <div
  42.                 class="l-column LargeImageText-main">
  43.                 {# Heading #}
  44.                 {% include "component/heading.html.twig" with {
  45.                     props: props.heading
  46.                 } %}
  47.                 {# Text #}
  48.                 <div class="LargeImageText-text">
  49.                     {% include "component/wysiwyg.html.twig" with {
  50.                         props: {
  51.                             content: props.text
  52.                         }
  53.                     } %}
  54.                 </div>
  55.                 {% if props.links %}
  56.                     {# Links #}
  57.                     <div class="LargeImageText-links">
  58.                         {% for link in props.links %}
  59.                             {% include "component/button.html.twig" with {
  60.                                 props: link
  61.                             } %}
  62.                         {% endfor %}
  63.                     </div>
  64.                 {% endif %}
  65.             </div>
  66.         </div>
  67.     </div>
  68. </section>