{% extends 'front_v4/base.html.twig' %}
{% block meta_title %}Mon Centre Auditif - Découvrez notre blog {% if pagination is defined and pagination is not null and pagination.params is not empty %} | Page {{ pagination.currentPageNumber }} {% endif %}{% endblock meta_title %}
{% block meta_description %}Retrouvez toutes nos publications relatives à l'audition pour vous informer sur l'univers de l'aide auditive{% endblock meta_description %}
{% block meta_custom %}
{% if pagination is defined and pagination is not null %}
{% set numberOfPage = pagination.totalItemCount / pagination.itemNumberPerPage %}
{% if numberOfPage > 1 %}
{% set next = pagination.currentPageNumber+1 %}
{% set prev = pagination.currentPageNumber-1 %}
{% if pagination.currentPageNumber == 1 %}
{% set next = pagination.currentPageNumber+1 %}
<link rel="next" href="{{ path(app.request.attributes.get('_route'),
app.request.attributes.get('_route_params')) ~ "?page=" ~ next }}"/>
{% elseif pagination.currentPageNumber == numberOfPage %}
<link rel="prev" href="{{ path(app.request.attributes.get('_route'),
app.request.attributes.get('_route_params')) ~ "?page=" ~ prev }}"/>
{% else %}
<link rel="next" href="{{ path(app.request.attributes.get('_route'),
app.request.attributes.get('_route_params')) ~ "?page=" ~ next }}"/>
<link rel="prev" href="{{ path(app.request.attributes.get('_route'),
app.request.attributes.get('_route_params')) ~ "?page=" ~ prev }}"/>
{% endif %}
{% endif %}
{% endif %}
{% endblock meta_custom %}
{% block stylesheets %}
{{ encore_entry_link_tags('blog_list') }}
{% endblock stylesheets %}
{% block content %}
<div id="header"></div>
<!-- ========== MAIN CONTENT ========== -->
<main id="content" role="main">
<!-- Blog Carousel -->
{% include 'front_v4/mca/blog/_blog_swiper.html.twig' %}
<!-- End Blog Carousel -->
<!-- Card Grid -->
<div class="container content-space-2">
<!-- Hero -->
<div class="content-space-b-1">
<div class="w-md-75 text-center mx-md-auto">
<h1 class="">Le blog de l'audition</h1>
<p class="lead">Découvrez les dernières actualités sur l'univers de l'audition.</p>
</div>
</div>
<!-- End Hero -->
<div class="row justify-content-lg-between">
<div class="col-lg-8 mb-10 mb-lg-0">
<div class="d-grid gap-7 mb-7">
{% for post in pagination %}
<a href="{{ path('blog_post_show', {'slug': post.slug}) }}">
{% if post.isPillarPage == true %}
<div class="card card-transition align-items-start flex-wrap flex-row bg-img-start gradient-overlay-half-dark-v2"
style="background-image: url('{% if post.filename %} {{ vich_uploader_asset(post, 'imageFile') | imagine_filter('blog_post_extra_large') }} {% endif %}'); min-height: 25rem;">
<!-- Card Header -->
<div class="card-header w-100">
<div class="d-flex align-items-center">
<div class="flex-shrink-0">
<span class="avatar avatar-sm avatar-circle">
<img class="avatar-img"
src="{% if post.blogAuthor.filename %} {{ vich_uploader_asset(post.blogAuthor, 'imageFile') | imagine_filter('author_image_small') }} {% endif %}"
alt="{{ post.blogAuthor.firstname }}">
</span>
</div>
<div class="flex-grow-1 ms-3">
<h4 class="card-title text-white mb-0">{{ post.blogAuthor.firstname }}</h4>
<p class="card-text text-white-70 small">{{ post.createdAt|format_date('medium') }}</p>
</div>
</div>
</div>
<!-- End Card Header -->
<!-- Card Footer -->
<div class="card-footer mt-auto">
<h3 class="h2 text-white">{{ post.title }}</h3>
<p class="text-white-70">{{ post.body|striptags|truncate(120, true)|raw|nl2br }}</p>
</div>
<!-- End Card Footer -->
</div>
{% else %}
<!-- Card -->
<div class="card card-flush card-stretched-vertical">
<div class="row">
<div class="col-sm-5">
{# img size : 400x500 #}
<img class="card-img"
src="{% if post.filename %} {{ vich_uploader_asset(post, 'imageFile') | imagine_filter('blog_post_small') }} {% endif %}"
alt="{{ post.title }}">
</div>
<!-- End Col -->
<div class="col-sm-7">
<!-- Card Body -->
<div class="card-body">
<div class="mb-2">
<h5 class="text-primary">{{ post.blogCategory }}</h5>
</div>
<h3 class="card-title text-dark">{{ post.title }}</h3>
<p class="card-text">{{ post.body|striptags|truncate(250, true)|raw|nl2br }}</p>
<!-- Card Footer -->
<div class="card-footer">
<div class="d-flex">
<div class="flex-shrink-0">
<h4 class="avatar avatar-circle">
<img class="avatar-img"
src="{% if post.blogAuthor.filename %} {{ vich_uploader_asset(post.blogAuthor, 'imageFile') | imagine_filter('author_image_small') }} {% endif %}"
alt="{{ post.blogAuthor.firstname }}">
</h4>
</div>
<div class="flex-grow-1 ms-3">
<h4 class="mb-0">{{ post.blogAuthor.firstname }}</h4>
<p class="card-text small">{{ post.createdAt|format_date('medium') }}</p>
</div>
</div>
</div>
<!-- End Card Footer -->
</div>
<!-- End Card Body -->
</div>
<!-- End Col -->
</div>
<!-- End Row -->
</div>
<!-- End Card -->
{% endif %}
</a>
{% else %}
<p class="h5 fw-bold mx-3">Aucun article trouvé</p>
{% endfor %}
</div>
<!-- Sticky Block End Point -->
<div id="stickyBlockEndPoint"></div>
<!-- Pagination -->
{% if pagination is defined and pagination is not null %}
<div class="navigation pagination d-flex justify-content-center mt-5">
{% do pagination.setTemplate('@KnpPaginator/Pagination/twitter_bootstrap_v4_pagination.html.twig') %}
{{ knp_pagination_render(pagination) }}
</div>
{% endif %}
<!-- End Pagination -->
</div>
<!-- End Col -->
<div class="col-lg-3">
<div class="mb-7">
<div class="mb-3">
<h3>Rechercher un article</h3>
</div>
<!-- Search -->
{{ form_start(form) }}
<div class="input-group">
{{ form_widget(form.keyword) }}
<div class="input-group-append">
{{ form_widget(form.submit) }}
</div>
</div>
{{ form_end(form) }}
<!-- End Search -->
<p class="form-text">Saisissez un mot-clé pour effectuer une recherche parmi tous nos
articles.</p>
</div>
<!-- Sticky Block Start Point -->
<div id="stickyBlockStartPoint"></div>
<div class="js-sticky-block"
data-hs-sticky-block-options='{
"parentSelector": "#stickyBlockStartPoint",
"targetSelector": "#header",
"breakpoint": "md",
"startPoint": "#stickyBlockStartPoint",
"endPoint": "#stickyBlockEndPoint",
"stickyOffsetTop": 80
}'>
{% if randomPageByCategory is defined and randomPageByCategory is not empty %}
<div class="mb-7">
<div class="mb-3">
<h3>Notre sélection</h3>
</div>
<div class="d-grid gap-2">
{% for post in randomPageByCategory %}
<!-- Card -->
<a class="d-block" href="{{ path('blog_post_show', {'slug': post.slug}) }}">
<div class="d-flex align-items-center">
<div class="flex-shrink-0">
<div class="avatar avatar-lg">
<img class="avatar-img"
src="{% if post.filename %} {{ vich_uploader_asset(post, 'imageFile') | imagine_filter('blog_post_small') }} {% endif %}"
alt="{{ post.title }}">
</div>
</div>
<div class="flex-grow-1 ms-3">
<h5 class="text-inherit mb-0">{{ post.title }}</h5>
</div>
</div>
</a>
<!-- End Card -->
{% endfor %}
</div>
</div>
{% endif %}
{% if featuredCategory is defined and featuredCategory is not empty %}
<div class="mb-7">
<div class="mb-3">
<h3>{{ featuredCategory.name }}</h3>
</div>
<!-- List Group -->
<ul class="list-group list-group-lg">
{% for post in featuredLastedPostByCategory %}
<!-- Item -->
<li class="list-group-item">
<a href="#">
<div class="row align-items-center">
<div class="col">
<h5 class="mb-1">{{ post.title }}</h5>
<p class="text-body small mb-0">{{ post.createdAt|format_date('medium') }}</p>
</div>
<!-- End Col -->
<div class="col-auto">
<i class="bi-chevron-right"></i>
</div>
<!-- End Col -->
</div>
<!-- End Row -->
</a>
</li>
<!-- End Item -->
{% endfor %}
</ul>
<!-- End List Group -->
</div>
{% endif %}
</div>
</div>
<!-- End Col -->
</div>
<!-- End Row -->
</div>
<!-- End Card Grid -->
<!-- Hero -->
<div class="shape-container overflow-hidden">
<div class="bg-dark"
style="background-image: url({{ asset('build/front_v4/svg/components/wave-pattern-light.svg') }});">
<div class="container content-space-1 content-space-t-md-3 content-space-b-md-4">
<div class="position-relative w-lg-75 text-center mx-lg-auto">
<div class="mb-7">
<h1 class="fw-normal mb-4 font-size-md-down-1 text-white">A propos du <span
class="text-warning fw-semibold">blog</span></h1>
<p class="d-block d-inline lead text-white">
<span class="text-warning">Mon Centre Auditif</span> s’efforce à travers ce blog de vous
informer sur l’univers de l’audition.
Notre objectif est de rendre l’accès aux <strong>soins auditifs</strong> plus simple et
plus fluide pour les
personnes en recherche d’équipement. <br>
Du <strong>bilan auditif</strong> jusqu’à l’appareillage en passant par la prescription
médicale de l’ORL, nous allons
ensemble aborder les différents sujets qui entourent la perte auditive.<br><br>
Vous avez des questions ou des doutes sur votre santé auditive, n’hésitez pas à
consulter un
professionnel proche de chez vous. <br>
Nos différents rédacteurs vous apporteront un maximum d’informations vulgarisées sur les
solutions
auditives du marché, les mécanismes de remboursements, les dernières technologies et
l’actualité de
l’univers de l’audioprothèse.
</p>
</div>
<!-- End Row -->
</div>
</div>
</div>
<!-- Shape -->
<div class="shape shape-bottom zi-1" style="margin-bottom: -.125rem">
<svg xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" viewBox="0 0 1920 100.1">
<path fill="#fff" d="M0,0c0,0,934.4,93.4,1920,0v100.1H0L0,0z"></path>
</svg>
</div>
<!-- End Shape -->
</div>
<!-- End Hero -->
</main>
<!-- ========== END MAIN CONTENT ========== -->
{% endblock content %}
{% block javascripts %}
{{ encore_entry_script_tags('blog_list') }}
{% endblock javascripts %}