{% 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 %}
{{ m.titleCoord('Nos réalisations', 'nav.rea', asset('img/title-sablage.jpg')) }}
<main class="main-default">
<!-- ---------------- Contenu réa -------------- -->
<section class="rea-show">
<div class="container">
<div class="rea-show-top">
{% if realisation.pictures|length > 0 %}
{% if realisation.pictures|length == 2 %}
{{ m.beforeAfter(asset(realisation.pictures.0.path), asset(realisation.pictures.1.path)) }}
{% else %}
{{ m.img(asset(realisation.pictures.0.path)) }}
{% endif %}
{% else %}
{% endif %}
<div class="rea-show-content">
<div class="label">{{ realisation.category.translate.title }}</div>
<h2 class="h2">{{ realisation.translate.title }}</h2>
<div class="paragraphe">
{{ realisation.translate.content|raw }}
</div>
</div>
</div>
</div>
</section>
<!-- ---------------- Grille photo -------------- -->
<section>
<div class="container">
<div class="rea-gallery" data-gallery>
{% for pic in realisation.pictures %}
{{ m.img(asset(pic.path)) }}
{% endfor %}
</div>
</div>
</section>
<!-- ---------------- Autre réalisation -------------- -->
<section class="other-rea">
<div class="container">
<div class="other-rea-content">
{{ m.bn('Revenir à la liste', path('realisations')) }}
<h2 class="h2">Découvrez nos autres réalisations</h2>
</div>
<ul class="rea-list">
{% for rea in other if rea.id != realisation.id %}
<li>
<div class="rea-list-item" data-link>
{{ m.img(asset(rea.firstpicture.path)) }}
<h3 class="h3"><a href="{{ path('realisationshow', {'id':rea.id}) }}" title="voir la page">{{ rea.translate.title }}</a></h3>
</div>
</li>
{% endfor %}
</ul>
</div>
</section>
</main>
{% endblock %}