{% extends 'base.html.twig' %}
{% block title %}Réalisation - RénovAtHome{% endblock %}
{% block stylesheets %}
{{ parent() }}
<link rel="stylesheet" href="{{ asset('assets/styles/realisation.css')}}">
{% endblock %}
{% block banner %}{% endblock %}
{% block main %}
<main>
<div class="container-real-show">
<div class="last-real">
{% if realisation.avant != "" and realisation.apres != "" %}
<div class="slider">
<div class="slider__before" style="background-image:url({{ asset('uploads/realisations/'~realisation.avant) | imagine_filter('middle')}});"></div>
<div class="slider__separator">
<div class="bar__separator"></div>
<div class="btn__separator">
<span class="btn__separator_left_arrow"></span>
<span class="btn__separator_right_arrow"></span>
</div>
<div class="bar__separator"></div>
</div>
<div class="slider__after" style="background-image:url({{ asset('uploads/realisations/'~realisation.apres) | imagine_filter('middle')}});"></div>
<input class="slider__range" type="range" min="2" max="98" value="50"/>
</div>
{% else %}
<img src="{{ asset('uploads/realisations/'~realisation.cover) | imagine_filter('middle')}}" alt="photo de couverture de la réalisation" class="img-place-holder">
{% endif %}
<div class="desc-real">
<div class="titre">
<div class="deco-sous-titre"></div>
<span class="sous-titre">{{realisation.categorie.nom}}</span>
</div>
<h2 class="titre-real">{{ realisation.nom }}</h2>
<p>{{ realisation.description |raw }}</p>
<p>
<b>Solution apportée par nos équipes :</b><br>
{{ realisation.taches |raw}}
</p>
</div>
</div>
{% if realisation.photos[0] is defined %}
<div class="galerie-real">
<h2 class="titre-deco-dessous">Photo</h2>
<div class="deco-sous-titre"></div>
<div id="popup-bg">
<span id="previous"><i class="fa-solid fa-angle-left"></i></span>
<div id="popup-content">
<img id="popup-img" src="#" alt="Rénovation effectué par RenvoAtHome" />
</div>
<span id="next"><i class="fa-solid fa-angle-right"></i></span>
</div>
<div class="photo-real">
{% for photo in realisation.photos |sort((a, b) => a.id <= b.id) %}
<div class="item-galerie">
<img src="{{ asset('uploads/realisations/'~photo.image) | imagine_filter('miniature')}}" alt="Rénovation effectué par RenvoAtHome" class="photo-galerie" id="{{photo.image}}">
</div>
{% endfor %}
</div>
</div>
{% endif %}
{% if realisation.temoignages[0] is defined %}
<div class="testimonial-real">
<div class="title-testimonial">
<span>Témoignage du client</span>
<div class="deco-sous-titre"></div>
</div>
{% if realisation.temoignages[0].video != null %}
<div class="commentaire-video" >
<div class="youtube_player" videoID="{{ realisation.temoignages[0].video }}" rel="rel=1" controls="controls=1" showinfo="showinfo=0" autoplay="autoplay=0" loop="loop=0" loading="loading=1"></div>
</div>
{% else %}
<img src="{{ asset('uploads/temoignages/'~realisation.temoignages[0].photo) | imagine_filter('logo')}}" alt="Rénovation effectué par RenvoAtHome" class="img-rounded">
<span class="name-client">{{ realisation.temoignages[0].client }}</span>
<div class="commentaire" >
{{ realisation.temoignages[0].commentaire | raw }}
</div>
{% endif %}
</div>
{% endif %}
<div class="titre">
<div class="deco-sous-titre"></div>
<span class="sous-titre">Nos réalisations</span>
</div>
<h2 class="titre-other-real">Nos autres réalisations</h2>
<div class="other-real">
{% for other in others |sort((a, b) => a.id <= b.id) %}
<div class="card-real {{ other.categorie.nom|lower|replace({' ': '-'}) }}">
<a class="titre-evenement" href="{{ path('realisation', { 'slug' : other.slug })}}">
<div class="layer">
<img src="{{ asset('uploads/realisations/'~other.cover) | imagine_filter('miniature')}}" alt="{{ other.nom }}">
<div class="overlay">
<div class="text"><span>EN DÉCOUVRIR PLUS <i class="fa-solid fa-arrow-right"></i></span></div>
</div>
</div>
<span class="card-real-category">{{ other.categorie.nom }}</span>
<h3 class="card-real-title">{{ other.nom }}</h3>
</a>
</div>
{% endfor %}
</div>
</div>
</main>
{% endblock %}
{% block contact %}{% endblock %}
{% block footer %}{% endblock %}
{% block script %}
{{ parent() }}
<script src="{{ asset('assets/js/main.js')}}"></script>
<script src="{{ asset('assets/js/realisations.js')}}"></script>
{% endblock %}