{% extends 'front_v4/base.html.twig' %}
{% block meta_title %}{{ author.metaTitle }}{% endblock meta_title %}
{% block meta_description %}{{ author.metaDescription }}{% endblock meta_description %}
{% block meta_custom %}{{ author.metaCustom|raw }}{% endblock meta_custom %}
{% block content %}
<!-- ========== MAIN CONTENT ========== -->
<main id="content" role="main">
<!-- User Profile -->
<div class="container content-space-t-3 content-space-t-lg-4 content-space-b-1">
<div class="w-md-75 w-lg-65 mx-md-auto">
<!-- Media -->
<div class="d-sm-flex">
<div class="flex-shrink-0 mb-3 mb-sm-0">
<div class="avatar avatar-xxl avatar-circle">
{# image size : 160x160 #}
<img class="avatar-img" src="{% if author.filename %} {{ vich_uploader_asset(author, 'imageFile') | imagine_filter('author_image_medium') }} {% endif %}" alt="{{ author.firstname }} - Rédacteur Mon Centre Auditif">
<img class="bg-white position-absolute bottom-0 end-0 rounded-circle p-1" src="{{asset('build/front_v4/svg/illustrations/top-vendor.svg')}}" alt="Icon" width="32" height="32" title="Top Writer">
</div>
</div>
<div class="flex-grow-1 ms-sm-4">
<!-- Media -->
<div class="d-flex justify-content-between align-items-center mb-3">
<h1 class="h2 mb-0">{{ author.firstname }} {{ author.lastname }}</h1>
</div>
<!-- End Media -->
<div class="row mb-3">
<div class="col-auto">
<span class="h6">{{ author.blogPosts|length }}</span>
<span>articles</span>
</div>
<!-- End Col -->
{% if author.website is not null %}
<div class="col-auto">
<span class="h6">Site web :</span>
<a href="{{ author.website|raw }}" target="_blank"><span class="ms-1">{{ author.website|replace({'http://': '', 'https://': ''}) }}</span></a>
</div>
<!-- End Col -->
{% endif %}
{# <div class="col-auto">#}
{# <span class="h6">109</span>#}
{# <span class="ms-1">Following</span>#}
{# </div>#}
{# <!-- End Col -->#}
</div>
<!-- End Row -->
<p>
{{ author.description|raw }}
</p>
</div>
</div>
<!-- End Media -->
</div>
</div>
<!-- End User Profile -->
<div class="container">
<div class="border-top w-md-75 w-lg-65 mx-md-auto"></div>
</div>
<!-- Card Grid -->
<div class="container content-space-1">
<div class="w-md-75 w-lg-65 mx-md-auto">
{% for post in pagination %}
<!-- Card -->
<div class="card mb-5 mb-md-10">
<div class="shape-container">
{# image size : 500x280 #}
<img class="card-img-top" src="{% if post.filename %} {{ vich_uploader_asset(post, 'imageFile') | imagine_filter('blog_post_large') }} {% endif %}" alt="{{ post.title }}">
<!-- Shape -->
<div class="shape shape-bottom zi-1" style="margin-bottom: -.25rem">
<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>
<!-- Card Body -->
<div class="card-body">
<h3 class="card-title">
<a class="text-dark" href="{{ path('blog_post_show', {'slug': post.slug}) }}">{{ post.title }}</a>
</h3>
<p class="card-text">{{ post.body|striptags|slice(0, 140)|raw|nl2br }} ...</p>
</div>
<!-- End Card Body -->
<!-- Card Footer -->
<div class="card-footer">
<div class="d-flex align-items-center">
<div class="flex-shrink-0">
<a class="avatar avatar-xs avatar-circle" href="#" data-bs-toggle="tooltip" data-bs-placement="top" title="{{ author.firstname }}">
<img class="avatar-img" src="{% if author.filename %} {{ vich_uploader_asset(author, 'imageFile') | imagine_filter('author_image_medium') }} {% endif %}" alt="{{ author.firstname }} - Rédacteur Mon Centre Auditif">
</a>
</div>
<div class="flex-grow-1">
<div class="d-flex justify-content-end">
<p class="card-text">{{ post.createdAt|format_date('medium') }}</p>
</div>
</div>
</div>
</div>
<!-- End Card Footer -->
</div>
<!-- End Card -->
{% endfor %}
<!-- Pagination -->
{% if pagination is defined and pagination is not null %}
<div class="navigation pagination mt-5 justify-content-center">
{% do pagination.setTemplate('@KnpPaginator/Pagination/twitter_bootstrap_v4_pagination.html.twig') %}
{{ knp_pagination_render(pagination) }}
</div>
{% endif %}
<!-- End Pagination -->
</div>
</div>
<!-- End Card Grid -->
</main>
<!-- ========== END MAIN CONTENT ========== -->
{% endblock content %}