{% extends 'base.html.twig' %}
{% block title %} {{ category.name }} | {{ parent() }} {% endblock %}
{% block body %}
<div class="breadcrumbs-fs fl-wrap">
<div class="container">
<div class="breadcrumbs fl-wrap">
<a href="{{ url('app_front_blog') }}">Blog</a><span>{{ category.name }}</span>
</div>
</div>
</div>
<section class="grey-blue-bg small-padding">
<div class="container">
<div class="row">
<div class="col-md-8">
<div class="post-container fl-wrap">
{% if articles.totalItemCount > 0 %}
{% for article in articles %}
<article class="post-article">
<div class="title-devis">
<span>{{ article.title }}</span>
</div>
<div class="list-single-main-media fl-wrap">
<div class="single-slider-wrapper fl-wrap">
<div class="single-slider fl-wrap">
<div class="slick-slide-item">
{% if article.image %}
<img src="{{ asset('/uploads/files/articles/' ~ article.image) | imagine_filter('806x250') }}" alt="{{ article.title }}">
{% else %}
<img src="{{ asset('front/images/all/ryvup.jpeg') | imagine_filter('806x250') }}" alt="{{ article.title }}">
{% endif %}
</div>
</div>
</div>
</div>
<div class="list-single-main-item fl-wrap">
<p>
{% if article.content | length > 410 %}
{{ article.content|slice(0,410)|raw }} ...
{% else %}
{{ article.content|slice(0,410)|raw }}
{% endif %}
</p>
<div class="post-opt">
<ul>
<li><i class="fal fa-calendar"></i> <span>{{ article.createdAt | format_datetime(locale='fr', pattern="dd MMMM YYYY") }}</span></li>
<li><i class="fal fa-share-alt"></i> <span>RYVUP</span></li>
</ul>
</div>
{% if article.content | length > 410 %}
<span class="fw-separator"></span>
<a href="{{ url('app_front_blog_read', {'cat_slug': article.category.slug, 'slug': article.slug}) }}" class="btn float-btn color-bg">Lire la suite<i class="fal fa-angle-right"></i></a>
{% endif %}
</div>
</article>
{% endfor %}
{% endif %}
{{ knp_pagination_render(articles) }}
</div>
</div>
<div class="col-md-4">
<div class="box-widget-wrap fl-wrap fixed-bar">
<div class="box-widget-item fl-wrap">
<div class="box-widget">
<div class="box-widget-content">
<div class="box-widget-item-header mb-3">
<h3> Demander un devis </h3>
</div>
<div class="text-left">
<p>Location d'autocar, minibus, voiture privée et sanitaire avec chauffeur pour tous vos déplacements</p>
<p>Avec Ryvup, trouver votre transport sur mesure !</p>
</div>
<div class="text-left">
<a href="{{ url('app_client_home') }}" class="btn color2-bg mt-3">
Devis immédiat
<i class="fal fa-angle-right"></i>
</a>
</div>
</div>
</div>
</div>
<div class="box-widget-item fl-wrap">
<div class="box-widget">
<div class="box-widget-content">
<div class="box-widget-item-header">
<h3>Autres catégories</h3>
</div>
<ul class="cat-item">
{% set id = category.id %}
{% for category in categories %}
{% if category.id != id %}
<li><a href="{{ url('app_front_blog_by_category', {'slug': category.slug}) }}" title="{% if category.name | length > 28 %}{{ category.name }}{% endif %}">{% if category.name | length > 28 %}{{ category.name | slice(0,28) }}...{% else %}{{ category.name }}{% endif %}</a> <span>{{ category.articles | length }}</span></li>
{% endif %}
{% endfor %}
</ul>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
{% endblock %}