templates/component/modal.html.twig line 1

Open in your IDE?
  1. {#
  2.     component: modal
  3.     title: {string}: titre
  4.     text: {string}: texte
  5.     button: {
  6.         text {string}: Texte du lien
  7.         to {string}: Lien
  8.     },
  9.     image: {image}:
  10. #}
  11. {% set props = {
  12.     title:null,
  13.     text:null,
  14.     button:null,
  15.     image:null,
  16.     open:false
  17. }|merge(props|default({}))  %}
  18. <div data-component="modal" class="Modal" data-open="{{props.open}}">
  19.     <div class="Modal-bg" ref="bg"></div>
  20.     <div class="Modal-content">
  21.         <div class="Modal-btclose" ref="btclose">
  22.             <div class="Modal-btcloseCross"></div>
  23.         </div>
  24.         <div class="Modal-image">
  25.             {% include "component/image.html.twig" with {
  26.                 props: props.image
  27.             } %}
  28.             {# {% include "component/picture.html.twig" with {
  29.                 props: (props.image) ? (props.image|merge({
  30.                     srcWebp: (props.image) ? asset(props.image.src | imagine_filter('convert_img_to_webp')) : ''
  31.                 })) : props.image
  32.             } %} #}
  33.         </div>
  34.         <div class="Modal-article">
  35.             {% if props.title is defined and props.title %}
  36.                 <div class="Modal-title Heading-titleAnnex">
  37.                     {{props.title}}
  38.                 </div>
  39.             {% endif %}
  40.             {% if props.text is defined and props.text %}
  41.                 <div class="Modal-text">
  42.                     {% include "component/wysiwyg.html.twig" with {
  43.                         props: {
  44.                             content: props.text
  45.                         }
  46.                     } %}
  47.                 </div>
  48.             {% endif %}
  49.             {% if props.button is defined and props.button %}
  50.                 {% include "component/button.html.twig" with {
  51.                         props: props.button
  52.                 } %}
  53.             {% endif %}
  54.         </div>
  55.     </div>
  56. </div>