{% extends "base.twig" %}
{% block content %}
	<div class="content-wrapper">
		<div class="Btn retour">
			<a href="/agenda">Retour</a>
		</div>
		<article class="post-type row">
			<div class="__img_event col-md">
				<img src="{{ Image(post.image_event).src }}" />
			</div>
			<section class="article-content col-md">
					<div class="header">
						<h3 class="titre_event">{{post.titre}}</h3>
				</div>

						<div class="cat {{post.category.slug}}">
							|	{{post.category.name}} |
						</div>
					<div class="data">
						<div class="__date">
		          <div class="__day">
		            {% set start = item.debut_event|date("Ydj") %}
		            {% set end = item.fin_event|date("Ydj") %}
		            {% if start == end %}
		              <span class="start">
		                Le <time>{{item.debut_event|date("l j F Y") }}</time>
		                <br>de <time>{{item.debut_event|date("G:i")}}</time>
		              </span>
		              <span class="end">
		                à <time>{{item.fin_event|date("G:i")}}</time></br>
		              </span>
		            {% else %}
		              <span class="start">
		                Du <time>{{item.debut_event|date("l j F Y") }}</time>
		                à <time>{{item.debut_event|date("G:i")}}</time>
		              </span>
		              <span class="end">
		                <br>Au <time>{{item.fin_event|date("j l F Y") }}</time></br>
		                à <time>{{item.fin_event|date("G:i")}}</time>
		              </span>
		            {% endif %}
		          </div>
		        </div>
			      <div class="lieu">{{post.lieu}}</div>
					</div>
					<div class="wrapper__content">
						 {{ post.meta('description') }}
					</div>
						<div class="inscription">
							{% if post.meta('inscription') %}
							<h3>{{post.titre_inscription}}</h3>
								{% for Items in post.meta('inscription') %}
										{% for detail in Items.choose %}
											{% if detail.acf_fc_layout == 'texte' %}
												<p class="texte_details">{{ detail.texte }}</p>
											{% endif %}
											{% if detail.acf_fc_layout == 'lien' %}
												<div class="Btn group_link">
													<a href="{{detail.lien.lien_hello_asso}}">{{detail.lien.texte_lien_hello_asso}}</a>
											  </div>
											{% endif %}
										{% endfor %}
								{% endfor %}
								{% endif %}
						</div>
							<div class="Btn voir_event">
									<a href="{{post.meta('voir_evenement_facebook').lien_facebook}}">{{post.meta('voir_evenement_facebook').texte}}</a>
							</div>

							<div class="partager">
								<h3>{{post.titre_partage}}</h3>
								<a href="{{post.meta('liens_reseaux_sociaux').lien_page_facebook}}">
									<img src="{{ Image(post.meta('liens_reseaux_sociaux').logo_facebook).src }}" />
								</a>
								<a href="{{post.meta('liens_reseaux_sociaux').lien_page_twitter}}">
									<img src="{{ Image(post.meta('liens_reseaux_sociaux').logo_twitter).src }}" />
								</a>
								<a href="{{post.meta('liens_reseaux_sociaux').lien_mail}}">
									<img src="{{ Image(post.meta('liens_reseaux_sociaux').logo_mail).src }}" />
								</a>
							</div>

							<div class="tarif">
								<h3>{{post.titre_tarif}}</h3>
								<p>{{post.type_tarif}}</p>
							</div>

			</section>
		</article>
	</div>
	{% if other %}
		<div class="other">
					<div class="header_other">
							<h3 class="voir_aussi">Voir aussi</h3>
					</div>
					<div class="other-posts row">
							{% for item in other %}
								{% include 'components/thumbnails/thumbnails.twig' %}
							{% endfor %}
					</div>
			</div>
		{% endif %}

{% endblock %}
