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

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