{% extends "base.html.twig" %}
{% block title %}{{ parent() }} | Notre histoire{% endblock %}
{% block stylesheets %}<link rel="stylesheet" href="{{ asset('css/nous.css') }}">{% endblock %}
{% block h1 %}Notre histoire{% endblock %}
{% block content %}
<div class="wrapper col-12 d-flex flex-column ">
{% for presentationActive in presentationActives %}
{% if loop.index is odd %}
<div class="col-12 d-flex flex-lg-row flex-column">
<div class="col-lg-6 col-12">
<img class ="image_presentation" src="{{ asset('img/photoLifeUpload/' ~ presentationActive.getPhotoLives.first())}}" alt="phto de presentation">
</div>
<div class="col-lg-5 col-10 d-flex flex-column justify-content-start align-items-center mx-auto mb-5 presentation">
<div class="titre">{{ presentationActive.titre }}</div>
<div class="sstitre">{{ presentationActive.sstitre }}</div>
<div class = "text">{{ presentationActive.presentation|raw }}</div>
</div>
</div>
{% if loop.index == 1 %}
<div class="box_contact d-flex justify-content-center align-items-centers">
<a href="mailto:contact@lebiodelo.com" class="mail_contact">CONTACT@LEBIODELO.COM</a>
</div>
{% endif %}
{% else %}
<div class="col-12 d-flex flex-lg-row flex-column">
<div class="col-lg-5 col-10 d-flex flex-column justify-content-start align-items-center mx-auto mb-5 presentation">
<div class="titre">{{ presentationActive.titre }}</div>
<div class="sstitre">{{ presentationActive.sstitre }}</div>
<div class = "text">{{ presentationActive.presentation|raw }}</div>
</div>
<div class="col-lg-6 col-12">
<img class ="image_presentation" src="{{ asset('img/photoLifeUpload/' ~ presentationActive.getPhotoLives.first())}}" alt="phto de presentation">
</div>
</div>
{% endif %}
{% endfor %}
</div>
{# <textarea name="" hidden id="photos" cols="30" rows="10">{{photos}}</textarea> #}
{% endblock %}
{% block javascripts %}
<script>
{# var photos = JSON.parse(document.querySelector('#photos').innerHTML)
let cheminPhoto = "{{ asset('img/photoLifeUpload/') }}"
document.querySelector('.image_histoire').setAttribute('src', cheminPhoto + photos[0])
document.querySelector('.image_atelier').setAttribute('src', cheminPhoto + photos[1]) #}
</script>
{% endblock %}