{% extends "layouts/front.html.twig" %}
{% block title %}{{ category.title }}{% endblock %}
{% if formView is defined %}
{% form_theme formView 'bootstrap_5_layout.html.twig' %}
{% endif %}
{% block stylesheets %}
<style>
{{ getContentData(category.content, 'gjs-css')|raw }}
</style>
{% endblock %}
{% block body %}
{% if category.illustration != null %}
{{ include('include/_header_page.html.twig', {title: category.title, illustration: category.illustration}) }}
{% endif %}
{% if children is defined %}
{% for child in children %}
<a href="{{ path('category_view', {'slug': child.slug }) }}">{{ child.title }}</a><br>
{% endfor %}
{% endif %}
{# {% include "include/_blocs.html.twig" %} #}
{{ getContentData(category.content, 'gjs-html')|raw }}
{% if posts is defined %}
<div class="container-fluid blockactu">
<div class="row gap-3 mb-4">
{% for post in posts %}
{% set counter = ( counter | default(0) ) + 1 %}
{% if counter == 4 %}
</div><div class="row gap-3 mb-4">
{% set counter = 1 %}
{% endif %}
{{ blogService.getHTMLForOne(post)|raw }}
{# {% include "include/post_one.html.twig" %} #}
{% endfor %}
</div>
</div>
{% include('include/_pagination.html.twig') %}
{% endif %}
{% if presidentsSlide is defined %}
<div class="container-fluid blockcontent3 grey-style pd2" >
<h3 class="text-center mb-5 mt-5">LES ANCIENS BÂTONNIERS</h3>
<div class="slider-2">
{% for item in presidentsSlide %}
<div class="batonnierslider">
<img src="{{ asset(item.picture) }}" class="img-fluid" alt="">
<p class="name">{{ item.firstname }} {{ item.lastname }}</p>
<p class="time">{{ item.date }}</p>
</div>
{% endfor %}
</div>
</div>
{% endif %}
{% endblock %}