{% extends "base.twig" %}
{% block content %}

{% include 'components/title_page.twig'%}

	{% for item in posts %}
		<section class="row tpsF">
		<div class="sidebar col-md-4">
			<div class="title">
				<h3>{{item.title}}</h3>
				<div class="next_edition">
					<p>Prochaine Édition : <time>{{item.next_edition|date("F Y") }}</time>
					</p>
				</div>
			</div>
			<div class="content">
				{{item.text}}
			</div>
		</div>
		<div class="wrap_content col-md-8">
			<div class="slide">
		    {% for media in item.meta('slide') %}
					{% if Image(media.image).src %}
						<div class="img">
							<img src="{{ Image(media.image).src }}" alt="{{ Image(media.image).title }}">
						</div>
					{% endif %}
					{% if media.video %}
						<div class="video">
							<iframe width="560" height="315" src="//www.youtube.com/embed/{{ media.video }}" frameborder="0" allowfullscreen></iframe>
						</div>
					{% endif %}
				{% endfor %}
			</div>
		</div>
		</section>
	{% endfor %}
{% endblock %}
