templates/front/blog/by_category.html.twig line 1

Open in your IDE?
  1. {% extends 'base.html.twig' %}
  2. {% block title %} {{ category.name }} | {{ parent() }} {% endblock %}
  3. {% block body %}
  4. <div class="breadcrumbs-fs fl-wrap">
  5.     <div class="container">
  6.         <div class="breadcrumbs fl-wrap">
  7.             <a href="{{ url('app_front_blog') }}">Blog</a><span>{{ category.name }}</span>
  8.         </div>
  9.     </div>
  10. </div>
  11. <section class="grey-blue-bg small-padding">
  12.     <div class="container">
  13.         <div class="row">
  14.             <div class="col-md-8">
  15.                 <div class="post-container fl-wrap">
  16.                     {% if articles.totalItemCount > 0 %} 
  17.                         {% for article in articles %}
  18.                         <article class="post-article">
  19.                             <div class="title-devis">
  20.                                 <span>{{ article.title }}</span>
  21.                             </div>
  22.                             <div class="list-single-main-media fl-wrap">
  23.                                 <div class="single-slider-wrapper fl-wrap">
  24.                                     <div class="single-slider fl-wrap">
  25.                                         <div class="slick-slide-item">
  26.                                             {% if article.image %}
  27.                                             <img src="{{ asset('/uploads/files/articles/' ~ article.image) | imagine_filter('806x250') }}" alt="{{ article.title }}">
  28.                                             {% else %}
  29.                                             <img src="{{ asset('front/images/all/ryvup.jpeg') | imagine_filter('806x250') }}" alt="{{ article.title }}">
  30.                                             {% endif %}
  31.                                         </div>
  32.                                     </div>
  33.                                 </div>
  34.                             </div>
  35.                             <div class="list-single-main-item fl-wrap">
  36.                                 <p>
  37.                                     {% if article.content | length > 410 %}
  38.                                     {{ article.content|slice(0,410)|raw }} ...
  39.                                     {% else %}
  40.                                     {{ article.content|slice(0,410)|raw }}
  41.                                     {% endif %}
  42.                                 </p>
  43.                                 <div class="post-opt">
  44.                                     <ul>
  45.                                         <li><i class="fal fa-calendar"></i> <span>{{ article.createdAt | format_datetime(locale='fr', pattern="dd MMMM YYYY") }}</span></li>
  46.                                         <li><i class="fal fa-share-alt"></i> <span>RYVUP</span></li>
  47.                                     </ul>
  48.                                 </div>
  49.                                 {% if article.content | length > 410 %}
  50.                                 <span class="fw-separator"></span>
  51.                                 <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>
  52.                                 {% endif %}
  53.                             </div>
  54.                         </article>
  55.                         {% endfor %}
  56.                     {% endif %}
  57.                     {{ knp_pagination_render(articles) }}
  58.                 </div>
  59.             </div>
  60.             <div class="col-md-4">
  61.                 <div class="box-widget-wrap fl-wrap fixed-bar">
  62.                     <div class="box-widget-item fl-wrap">
  63.                         <div class="box-widget">
  64.                             <div class="box-widget-content">
  65.                                 <div class="box-widget-item-header mb-3">
  66.                                     <h3> Demander un devis </h3>
  67.                                 </div>
  68.                                 <div class="text-left">
  69.                                     <p>Location d'autocar, minibus, voiture privée et sanitaire avec chauffeur pour tous vos déplacements</p>
  70.                                     <p>Avec Ryvup, trouver votre transport sur mesure !</p>
  71.                                 </div>
  72.                                 <div class="text-left">
  73.                                     <a href="{{ url('app_client_home') }}" class="btn color2-bg mt-3">
  74.                                        Devis immédiat
  75.                                        <i class="fal fa-angle-right"></i>
  76.                                     </a>
  77.                                 </div>
  78.                             </div>
  79.                         </div>
  80.                     </div>
  81.                     <div class="box-widget-item fl-wrap">
  82.                         <div class="box-widget">
  83.                             <div class="box-widget-content">
  84.                                 <div class="box-widget-item-header">
  85.                                     <h3>Autres catégories</h3>
  86.                                 </div>
  87.                                 <ul class="cat-item">
  88.                                     {% set id = category.id %}
  89.                                     {% for category in categories %}
  90.                                         {% if category.id != id %}
  91.                                         <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>
  92.                                         {% endif %}
  93.                                     {% endfor %}
  94.                                 </ul>
  95.                             </div>
  96.                         </div>
  97.                     </div>
  98.                 </div>
  99.             </div>
  100.         </div>
  101.     </div>
  102. </section>
  103. {% endblock %}