{% extends 'base.html.twig' %}
{% block title %}{{ setting.siteName }} : Article - {{ article.title }}{% endblock %}
{% block body %}
<section class="container py-5">
<div class="row">
<div class="col">
{# Breadcrumbs #}
<div class="row">
<div class="col small">
<nav style="--bs-breadcrumb-divider: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8'%3E%3Cpath d='M2.5 0L1 1.5 3.5 4 1 6.5 2.5 8l4-4-4-4z' fill='%236c757d'/%3E%3C/svg%3E");"
aria-label="breadcrumb">
<ol class="breadcrumb small">
<li class="breadcrumb-item"><a href="{{ path('app_home') }}"
class="text-decoration-none text-dark">Accueil</a></li>
<li class="breadcrumb-item" aria-current="page"><a
href="{{ path('app_blog_article_index') }}"
class="text-decoration-none text-dark">Blog</a></li>
<li class="breadcrumb-item active" aria-current="page">{{ article.title }}</li>
</ol>
</nav>
</div>
</div>
</div>
</div>
<h1 class="text-center mb-2 color1 fw-700 text-uppercase" data-aos="fade-down" data-aos-duration="3000">Blog</h1>
<div class="row mt-3">
<div class="col newsletter">
<img src="{{ asset('assets/img/articles/' ~ article.image ) }}" data-aos="fade-up" data-aos-duration="1500"
class="img-fluid shadow" style="max-height: 300px; width: 100%; object-fit: cover;"
alt="{{ article.title }}">
<h3 class="text-center mb-2 color1 fw-700 text-uppercase mt-5">{{ article.title }}</h3>
<p class="text-xsmall color1 text-center">
Posté le {{ article.createdAt|date('d-m-Y') }},
{% if article.updatedAt != null %}
modifié le {{ article.createdAt|date('d-m-Y') }},
{% endif %}
<br>dans la catégorie <a href="{{ path('app_blog_category_show', {'slug': article.category.slug}) }}"
class="text-decoration-none color2">{{ article.category.title }}</a>
</p>
<div class="text-xsmall mt-5">
{{ article.content|replace({'<div>': '', '</div>': '',})|raw }}
</div>
{% if article.video != null %}
<p class="text-xsmall">
Découvrir la vidéo : <a href="{{ article.video }}" class="text-decoration-none color1 text-xsmall"
target="_blank">{{ article.video }}</a>
</p>
{% endif %}
<!-- Button trigger modal -->
<button type="button" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#staticBackdrop">
S'inscrire à la Newsletter
</button>
<!-- Modal -->
<div class="modal fade" id="staticBackdrop" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1"
aria-labelledby="staticBackdropLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header h4">Inscription à la Newsletter</h1>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body" style="padding-top: 0 !important;">
{{ form_start(form) }}
<div class="my-custom-class-for-errors py-3">
{{ form_errors(form) }}
</div>
{{ form_row(form.email) }}
<p class="small">
Veuillez recopier le code anti-spam :
{{ form_row(form.captcha) }}
</p>
<p class="text-xxsmall mb-4">
✅ Oui, je souhaite m’abonner à la newsletter de {{ setting.siteName }}.<br>
Je peux me désinscrire à tout moment de la newsletter en suivant le lien adéquat dans la newsletter.
</p>
{{ form_row(form.submit) }}
{{ form_end(form) }}
</div>
</div>
</div>
</div>
</div>
</div>
<div class="row mt-5 pt-3 border-top border-bottom">
<div class="col text-center">
<p class="text-xsmall color2">
<span class="fw-bold">Partager l'article</span>
<div class="fb-share-button" data-href="https://developers.facebook.com/docs/plugins/"
data-layout="button" data-size="small">
<a target="_blank"
href="https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fdevelopers.facebook.com%2Fdocs%2Fplugins%2F&src=sdkpreparse"
class="fb-xfbml-parse-ignore">Partager</a>
</div>
</p>
</div>
</div>
<div class="row mt-5">
<div class="col text-center">
<a class="btn btn-sm btn-primary" href="{{ path('app_blog_article_index') }}">Retour à la page du Blog</a>
</div>
</div>
</section>
<div id="fb-root"></div>
<script async defer crossorigin="anonymous" src="https://connect.facebook.net/fr_FR/sdk.js#xfbml=1&version=v15.0"
nonce="sYowubn8"></script>
{% endblock %}