templates/component/heading.html.twig line 1

Open in your IDE?
  1. {#
  2.     component: heading
  3.     title {string}: Title de la dĂ©couverte
  4.     titleAnnex {string}: Sur titre au dessus du titre
  5.     text {string}: Texte de l'entĂȘte
  6.     
  7. #}
  8. {% set props = {
  9.   title: '',
  10.   titleAnnex: null,
  11.   text: null,
  12.   hLevel: '2'
  13. }|merge(props|default({}))  %}
  14. <div
  15.     data-component="heading" class="Heading-component">
  16.     {# Title annex #}
  17.     {% if props.titleAnnex %}
  18.         <p class="Heading-titleAnnex">{{ props.titleAnnex|raw }}</p>
  19.     {% endif %}
  20.     {# Title #}
  21.     <h{{props.hLevel}} class="Heading-title">{{ props.title | raw }}</h{{props.hLevel}}>
  22.     {# Content #}
  23.     {% if props.text %}
  24.         <p class="Heading-content">{{ props.text | raw }}</p>
  25.     {% endif %}
  26. </div>