src/Modules/Pages/Templates/index.html.twig line 1

Open in your IDE?
  1. {% extends 'templates/base.html.twig' %}
  2. {% block title %}{{ page.name }}{% endblock %}
  3. {% block body %}
  4.     {% if page is defined %}
  5.         <section id="ct_pages" class="{% if isHome is defined %}pag_is_home{% endif %} tpl_detail ct_default" data-controller="core">
  6.             {% if isHome is defined %}
  7.                 <div class="container">
  8.                     <h3 class="title animate__animated" data-animation="animate__fadeIn" invisible>{{ page.name }}</h3>
  9.                     <div id="contentCms" class="content_detail">
  10.                         {{ page.content|raw }}
  11.                     </div>
  12.                 </div>
  13.             {% else %}
  14.                 <div id="backContentTop" {% if page.image is not null or page.children is defined %}class="has_image"{% endif %}>
  15.                     <div class="container">
  16.                         {% if page.children is defined %}
  17.                             <h1 class="title animate__animated" data-animation="animate__fadeIn" invisible {% if page.refCfgThemes is not null %}style="color:{{ page.refCfgThemes.color }};"{% endif %}>{{ page.name }}</h1>
  18.                             {% if page.catchPhrase is not null %}
  19.                                 <div class="catchphrase has-children">{{ page.catchPhrase|raw }}</div>
  20.                             {% endif %}
  21.                             {% set count=0 %}
  22.                             <div class="row bloc_page_children">
  23.                                 {% for child in page.children %}
  24.                                     {% if count == 0 %}
  25.                                         {% set animation="fadeInLeftBig" %}
  26.                                     {% elseif count == 1 %}
  27.                                         {% set animation="fadeInUpBig" %}
  28.                                     {% elseif count == 2 %}
  29.                                         {% set animation="fadeInRightBig" %}
  30.                                         {% set count=0 %}
  31.                                     {% endif %}
  32.                                     {% set count=count+1 %}
  33.                                     {% if child.children is defined %}
  34.                                         <div class="col-xl-4 col-md-6 bloc_page_child has_children animate__animated" data-animation="animate__fadeIn" invisible>
  35.                                             <div class="bloc_img">
  36.                                                 <img class="img-fluid full" src="{% if child.image is null %}{{ config.site.url~img_default }}{% else %}{{ child.image }}{% endif %}" alt="{{ child.name }}" width="510" height="282" data-method="fill" />
  37.                                             </div>
  38.                                             <div class="bloc_content">
  39.                                                 <div class="bloc_page_child_children">
  40.                                                     <h2>
  41.                                                         <a href="{{ path('pages_detail', {'rewrite': child.rewrite}) }}">
  42.                                                             {{ child.name }} <i class="bi bi-chevron-right"></i>
  43.                                                         </a>
  44.                                                     </h2>
  45.                                                     <ul>
  46.                                                     {% for childChild in child.children %}
  47.                                                         <li>
  48.                                                             <a href="{{ path('pages_detail', {'rewrite': childChild.rewrite}) }}">
  49.                                                                 <i class="bi bi-arrow-right"></i> {{ childChild.name }}
  50.                                                             </a>
  51.                                                         </li>
  52.                                                     {% endfor %}
  53.                                                     </ul>
  54.                                                 </div>
  55.                                             </div>
  56.                                         </div>
  57.                                     {% else %}
  58.                                         <div class="col-xl-4 col-md-6">
  59.                                             <a href="{{ path('pages_detail', {'rewrite': child.rewrite}) }}" class="item_bloc">
  60.                                                 <img class="img-fluid img-item" src="{% if child.image is null %}{{ config.site.url~img_default }}{% else %}{{ child.image }}{% endif %}" alt="{{ child.name }}" width="510" height="382" data-method="fill" />
  61.                                                 <div class="caption">
  62.                                                     <h2 class="item_caption_title">{{ child.name }}</h2>
  63.                                                     <img class="img-fluid img_link_arrow" src="{{ config.site.url~"/images/arrow_right.png" }}" alt="right arrow" />
  64.                                                 </div>
  65.                                                 <div class="overlay"></div>
  66.                                             </a>
  67.                                         </div>
  68.                                     {% endif %}
  69.                                 {% endfor %}
  70.                             </div>
  71.                         {% else %}
  72.                             <div class="row">
  73.                                 <div class="{% if page.imageDetail is not null %}col-lg-6{% else %}col-12{% endif %} catchphrase">
  74.                                     <h1 class="title animate__animated" data-animation="animate__fadeIn" invisible {% if page.refCfgThemes is not null %}style="color:{{ page.refCfgThemes.color }};"{% endif %}>{{ page.name }}</h1>
  75.                                     {% if page.catchPhrase is not null %}
  76.                                         {{ page.catchPhrase|raw }}
  77.                                     {% endif %}
  78.                                 </div>
  79.                                 {% if page.imageDetail is not null %}
  80.                                     <div class="col-lg-6 img-bandeau">
  81.                                         <img class="full img-fluid" src="{{ page.imageDetail }}" alt="{{ page.name }}" width="835" height="450" />
  82.                                     </div>
  83.                                 {% endif %}
  84.                             </div>
  85.                             <div class="content_bubbles">
  86.                                 {% include '/public/images/animations/orangebubble.svg' %}
  87.                                 {% include '/public/images/animations/redbubble.svg' %}
  88.                             </div>
  89.                         {% endif %}
  90.                     </div>
  91.                 </div>
  92.                 <div id="backContentBot">
  93.                     <div id="contentCms" class="container content_detail">
  94.                         {{ page.content|raw }}
  95.                         {{ mod_news|raw }}
  96.                     </div>
  97.                 </div>
  98.             {% endif %}
  99.             {% if isHome is defined %}
  100.                 <div class="content_bubbles">
  101.                     {% include '/public/images/animations/orangebubble.svg' %}
  102.                     {% include '/public/images/animations/redbubble.svg' %}
  103.                 </div>
  104.             {% endif %}
  105.         </section>
  106.     {% endif %}
  107. {% endblock %}