{% extends "front-office/_base.html.twig" %}
{% block script %}
<script defer src="{{ asset('assets/js/blog-read.js') }}"></script>
{% endblock %}
{% block metaDescription %}{{ article.metaDescription }}{% endblock %}
{% block modal %}
{# MODAL TO DOWNLOAD ARTICLE'S FILE #}
<div class="blog-read-download-modal meli-center-center" id="js-blog-read-modal">
<div class="content meli-width-40">
<div
id="js-blog-read-close"
class="close txt-roboto meli-center-center txt-white txt-size25 bgc-orange">X</div>
<div class="background"></div>
<form class="form-box bgc-lightGreen" method="POST" action="{{ path('newsletter_treatment') }}">
<div class="fields-box">
<label for="email"
class="txt-century txt-size15 txt-bold txt-green">
Pour télécharger la ressource, <br> veuillez saisir votre email
</label>
<div class="field meli-between-center">
<input type="email" name="email" id="email" class="meli-width-80 txt-green"
placeholder="Entrez votre adresse mail" required
value="{% if app.user %}{{ app.user.email }}{% endif %}">
<button class="meli-width-20">
<img src="{{ asset('assets/img/icons/send.png') }}" loading="lazy" alt="Envoyer">
</button>
</div>
<label
class="txt-century txt-green txt-size12"
for="checkbox">
<input type="checkbox" name="checkbox" id="checkbox" required>
J'accepte de recevoir des mails de La Cabane à Coudre
</label>
</div>
<input type="hidden" name="brt" value="{{ token }}">
<input type="hidden" name="page" value="{{ app.request.pathInfo }}">
<input type="hidden" name="article" value="{{ article.id }}">
<input type="hidden" name="origin" value="blog_read">
</form>
</div>
</div>
{% endblock %}
{% block title %}{{ article.title }}{% endblock %}
{% block content %}
<section class="blog-read meli-section-90">
{# Breadcrumb #}
<div class="breadcrumb">
<a class="txt-century txt-orange txt-size12 txt-regular txt-underline" href="{{ path('home') }}">Accueil</a>
<span class="txt-century txt-orange txt-size12 txt-regular"> > </span>
<a href="{{ path('blog_list') }}"
class="txt-century txt-orange txt-size12 txt-regular txt-underline">Blog</a>
<span class="txt-century txt-orange txt-size12 txt-regular"> > </span>
<span class="txt-century txt-orange txt-size12 txt-regular">{{ article.title }}</span>
</div>
<div class="title-box">
<h1 class="txt-century txt-green txt-bold txt-size35 txt-center">{{ article.title }}</h1>
<p class="date txt-dancing txt-regular txt-size14 txt-green txt-center">
{{ article.datePublication|date('d/m/Y')|dateFr }}
</p>
</div>
<article class="content-box meli-section-60">{{ article.content|raw }}</article>
<div class="back-box">
<a href="{{ path('blog_list') }}">
<span class="icon"></span>
<span class="txt-century txt-regular txt-size15 txt-red">Retour aux articles</span>
</a>
</div>
<div class="line"></div>
{% if article.file is not null %}
<div class="file-box">
<div class="text-box meli-width-80">
<p class="title txt-dancing txt-bold txt-size35 txt-orange">Le petit bonus</p>
<p class="txt-century txt-bold txt-size15 txt-orange">
{% if article.textFile is not null %}
{{ article.textFile|nl2br }}
{% else %}
Retrouvez votre bonus en insérant votre mail, il vous sera envoyé dans votre boîte mail automatiquement.
{% endif %}
</p>
</div>
<div class="button-box">
<button id="js-blog-read-download-btn" class="button bgc-green meli-evenly-center">
<span class="icon"></span>
<span class="txt-century txt-white txt-regular txt-size15">Télécharger</span>
</button>
</div>
<div class="social-box">
<div class="item-box meli-width-30 meli-start-center">
<div class="item">
<a href="https://www.facebook.com/sharer.php?u={{ url('blog_read',{'id':article.id,'slug':article.title|url}) }}">
<img src="{{ asset('assets/img/icons/facebook.png') }}" alt="Partager sur Facebook">
</a>
</div>
<div class="item">
<a href="https://twitter.com/intent/tweet?url={{ url('blog_read',{'id':article.id,'slug':article.title|url}) }}">
<img src="{{ asset('assets/img/icons/twitter.png') }}" alt="Partager sur Twitter">
</a>
</div>
<div class="item">
<a href="https://www.linkedin.com/shareArticle?mini=true&url={{ url('blog_read',{'id':article.id,'slug':article.title|url}) }}">
<img src="{{ asset('assets/img/icons/linkedin.png') }}" alt="Partager sur LinkedIn">
</a>
</div>
</div>
</div>
</div>
<div class="line"></div>
{% endif %}
<div class="contact-box">
<div>
{% set perso = 1 %}
{% set contactTitle = "Une question, une remarque ?" %}
{% include "front-office/partials/_form_contact.html.twig" %}
</div>
</div>
</section>
{% endblock %}