templates/component/introduction.html.twig line 1

Open in your IDE?
  1. {#
  2.     component: introduction
  3.     text: {
  4.         first {string}: Premier texte d'intro
  5.         second {string}: Deuxième texte d'intro
  6.     }
  7. #}
  8. <style>
  9.  {% if props.text.second is defined %}
  10.     {% if props.text.second is empty %}
  11.      .Introduction-first:after,
  12.        .Introduction-component:after {
  13.             display: none;
  14.         }
  15.         .SeaCourse-page .Introduction-first:after,
  16.         .SeaCourse-page .Introduction-component:after {
  17.             display: none;
  18.         }
  19.     {% endif %}
  20. {% endif %}
  21. </style>
  22. {% set props = {
  23.   text: []
  24. }|merge(props|default({}))  %}
  25. <section data-component="introduction" class="Introduction-component">
  26.     <div class="l-container">
  27.         <div
  28.             class="l-row u-center">
  29.             {# Main #}
  30.             <div
  31.                 class="l-column Introduction-main">
  32.                 {# First #}
  33.                 {% if props.text.first is defined %}
  34.                     <div class="Introduction-first">
  35.                         {% include "component/wysiwyg.html.twig" with {
  36.                             props: {
  37.                                 content: props.text.first
  38.                             }
  39.                         } %}
  40.                     </div>
  41.                 {% endif %}
  42.                 {# Second #}
  43.                 {% if props.text.second is defined and props.text.second is not empty  %}
  44.                     <div class="Introduction-second">
  45.                         {% include "component/wysiwyg.html.twig" with {
  46.                             props: {
  47.                                 content: props.text.second
  48.                             }
  49.                         } %}
  50.                     </div>
  51.                     
  52.                 {% endif %}
  53.             </div>
  54.         </div>
  55.     </div>
  56. </section>