{% extends 'templates/base.html.twig' %}
{% block title %}{{ page.name }}{% endblock %}
{% block body %}
{% if page is defined %}
<section id="ct_pages" class="{% if isHome is defined %}pag_is_home{% endif %} tpl_detail ct_default" data-controller="core">
{% if isHome is defined %}
<div class="container">
<h3 class="title animate__animated" data-animation="animate__fadeIn" invisible>{{ page.name }}</h3>
<div id="contentCms" class="content_detail">
{{ page.content|raw }}
</div>
</div>
{% else %}
<div id="backContentTop" {% if page.image is not null or page.children is defined %}class="has_image"{% endif %}>
<div class="container">
{% if page.children is defined %}
<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>
{% if page.catchPhrase is not null %}
<div class="catchphrase has-children">{{ page.catchPhrase|raw }}</div>
{% endif %}
{% set count=0 %}
<div class="row bloc_page_children">
{% for child in page.children %}
{% if count == 0 %}
{% set animation="fadeInLeftBig" %}
{% elseif count == 1 %}
{% set animation="fadeInUpBig" %}
{% elseif count == 2 %}
{% set animation="fadeInRightBig" %}
{% set count=0 %}
{% endif %}
{% set count=count+1 %}
{% if child.children is defined %}
<div class="col-xl-4 col-md-6 bloc_page_child has_children animate__animated" data-animation="animate__fadeIn" invisible>
<div class="bloc_img">
<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" />
</div>
<div class="bloc_content">
<div class="bloc_page_child_children">
<h2>
<a href="{{ path('pages_detail', {'rewrite': child.rewrite}) }}">
{{ child.name }} <i class="bi bi-chevron-right"></i>
</a>
</h2>
<ul>
{% for childChild in child.children %}
<li>
<a href="{{ path('pages_detail', {'rewrite': childChild.rewrite}) }}">
<i class="bi bi-arrow-right"></i> {{ childChild.name }}
</a>
</li>
{% endfor %}
</ul>
</div>
</div>
</div>
{% else %}
<div class="col-xl-4 col-md-6">
<a href="{{ path('pages_detail', {'rewrite': child.rewrite}) }}" class="item_bloc">
<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" />
<div class="caption">
<h2 class="item_caption_title">{{ child.name }}</h2>
<img class="img-fluid img_link_arrow" src="{{ config.site.url~"/images/arrow_right.png" }}" alt="right arrow" />
</div>
<div class="overlay"></div>
</a>
</div>
{% endif %}
{% endfor %}
</div>
{% else %}
<div class="row">
<div class="{% if page.imageDetail is not null %}col-lg-6{% else %}col-12{% endif %} catchphrase">
<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>
{% if page.catchPhrase is not null %}
{{ page.catchPhrase|raw }}
{% endif %}
</div>
{% if page.imageDetail is not null %}
<div class="col-lg-6 img-bandeau">
<img class="full img-fluid" src="{{ page.imageDetail }}" alt="{{ page.name }}" width="835" height="450" />
</div>
{% endif %}
</div>
<div class="content_bubbles">
{% include '/public/images/animations/orangebubble.svg' %}
{% include '/public/images/animations/redbubble.svg' %}
</div>
{% endif %}
</div>
</div>
<div id="backContentBot">
<div id="contentCms" class="container content_detail">
{{ page.content|raw }}
{{ mod_news|raw }}
</div>
</div>
{% endif %}
{% if isHome is defined %}
<div class="content_bubbles">
{% include '/public/images/animations/orangebubble.svg' %}
{% include '/public/images/animations/redbubble.svg' %}
</div>
{% endif %}
</section>
{% endif %}
{% endblock %}