{% extends 'base.html.twig' %}
{% import 'app/_inc/macros.html.twig' as m %}
{% block css %}
{{ encore_entry_link_tags('app-pages-css') }}
{{ encore_entry_link_tags('app-gallery-css') }}
{% endblock %}
{% block js %}
{{ encore_entry_script_tags('app-gallery-js') }}
{% include('app/_inc/_beforeafter.html.twig') %}
{% endblock %}
{% block content %}
{% if category.pictures|length == 2 %}
{{ m.titleCoord(category.translate.title, 'nav.sablage', asset(category.pictures.1.path)) }}
{% else %}
{{ m.titleCoord(category.translate.title, 'nav.sablage', asset(category.firstPicture.path)) }}
{% endif %}
<main class="main-default">
<!-- --------- Sablage bois ------- -->
{% for paragraphe in category.categoryParagraphes %}
{% if paragraphe.pictures|length > 0 %}
{% if paragraphe.pictures|length == 2 %}
<section class="activites-block block-even">
<div class="container">
<div class="activites-img">
{{ m.beforeAfter(asset(paragraphe.pictures.0.path), asset(paragraphe.pictures.1.path)) }}
</div>
<div class="activites-content">
<h2 class="h2">{{ paragraphe.titre }}</h2>
<div class="paragraphe">
{{ paragraphe.texte|raw }}
</div>
{{ m.bn('nav.contact', path('contact')) }}
</div>
</div>
</section>
{% else %}
<section class="activites-block">
<div class="container">
<div class="activites-img">
{{ m.img(asset(paragraphe.pictures.0.path)) }}
</div>
<div class="activites-content">
<h2 class="h2">{{ paragraphe.titre }}</h2>
<div class="paragraphe">
{{ paragraphe.texte|raw }}
</div>
{{ m.bn('nav.contact', path('contact')) }}
</div>
</div>
</section>
{% endif %}
{% else %}
<section class="activites-block block-even">
<div class="container">
<div class="activites-content">
<h2 class="h2">{{ paragraphe.titre }}</h2>
<div class="paragraphe">
{{ paragraphe.texte|raw }}
</div>
{{ m.bn('nav.contact', path('contact')) }}
</div>
</div>
</section>
{% endif %}
{% endfor %}
<!-- --------- Scratch card ------- -->
<section>
<div class="container">
<div class="rea-wrapper">
<div class="rea-list">
{{ m.bn('Voir toutes nos réalisations', path('realisations')) }}
</div>
</div>
</section>
</main>
{% endblock %}