templates/component/large_image_heading.html.twig line 1

Open in your IDE?
  1. {#
  2.     component: large image heading
  3.     heading: [{
  4.         title {string}: Titre 
  5.         titleAnnex {string}: Titre annexe 
  6.     }]
  7.     subtitle {string}: Sous-titre après le heading
  8.     content {string}: Text après l'image
  9.     image {image}: Image du contenu
  10.         size: {
  11.             width: "1200",
  12.             height: "480"
  13.         }
  14.     link: [{
  15.         text {string}: Texte du lien
  16.         to {string}: Lien
  17.     }]
  18. #}
  19. {% set props = {
  20.   heading: null,
  21.   image:null,
  22.   subtitle:null,
  23.   content:null,
  24.   link:null
  25. }|merge(props|default({}))  %}
  26. <section data-component="large-image-heading" class="LargeImageHeading-component">
  27.     <div class="l-container">
  28.         <div
  29.             class="l-row">
  30.             {# Main #}
  31.             <div
  32.                 class="l-column LargeImageHeading-main">
  33.                 {# Background image #}
  34.                 <div class="LargeImageHeading-backgroundImage  {% if props.subtitle %}has-Subtitle {% endif %} ">
  35.                     {% include "component/image.html.twig" with {
  36.                         props: props.image
  37.                     } %}
  38.                     {# {% include "component/picture.html.twig" with {
  39.                         props: props.image|merge({
  40.                             srcWebp: (props.image.src) ? asset(props.image.src | imagine_filter('convert_img_to_webp')) : ''
  41.                         })
  42.                     } %} #}
  43.                 </div>
  44.                 {# Subtitle #}
  45.                 {% if props.subtitle is defined %}
  46.                     <div class="LargeImageHeading-subtitle-container">
  47.                         <p class="LargeImageHeading-subtitle">{{ props.subtitle }}</p>
  48.                     </div>
  49.                 {% endif %}
  50.             </div>
  51.         </div>
  52.         <div
  53.             class="l-row LargeImageHeading-contentRow">
  54.             {# Content #}
  55.             <div
  56.                 class="l-column LargeImageHeading-content">
  57.                 {# Heading #}
  58.                 {% include "component/heading.html.twig" with {
  59.                     props: props.heading
  60.                 } %}
  61.             </div>
  62.         </div>
  63.         {% if props.content %}
  64.             <div class="l-row LargeImageHeading-textAttachedRow">
  65.                 {% include "component/wysiwyg.html.twig" with {
  66.                     props: {
  67.                         content: props.content
  68.                     }
  69.                 } %}
  70.             </div>
  71.             {% if props.link %}
  72.                 <div class="l-row LargeImageHeading-button">
  73.                     {% include "component/button.html.twig" with {
  74.                     props: props.link
  75.                 } %}
  76.                 </div>
  77.             {% endif %}
  78.         {% endif %}
  79.     </div>
  80. </section>