templates/news/detail.html.twig line 1

Open in your IDE?
  1. {% extends 'base.html.twig' %}
  2. {% block page_contents %}
  3. <section class="section section-page-title section-news-title position-relative mb-4" data-aos='fade-down'>
  4.   <div class="bg-gradient pt-5 pb-4 t-0 l-0 w-100">
  5.     <div class="container">
  6.       <div class="row">
  7.         <div class="col-xl-10 mx-auto text-white">
  8.           <div class="a-box pt-md-5 pt-0">
  9.             <h1 class="page-name font-weight-bold mb-3">{{ news.title }}</h1>
  10.             <div class="a-time justify-content-md-start justify-content-end">
  11.               <div class="a-icon"><i class="fa-solid fa-calendar-week"></i></div>
  12.               <div class="a-text">{{ news.createdDate|date('d M Y') }}</div>
  13.             </div>
  14.           </div>
  15.         </div>
  16.       </div>
  17.     </div>
  18.   </div>
  19.   <div class="section-page-img position-relative pt-md-5 pt-4" data-aos='fade-right'>
  20.     <div class="container">
  21.       <div class="row">
  22.         <div class="col-12">
  23.           <img src="{{ news.media }}" alt="{{ news.title }}" onerror="this.onerror=null;this.src='{{ asset('assets/images/no-img/news.jpg') }}';">
  24.         </div>
  25.       </div>
  26.     </div>
  27.   </div>
  28. </section>
  29. <section class="section section-page-content" data-aos='fade-up'>
  30.   <div class="container">
  31.     <div class="row">
  32.       <div class="col-12 mx-auto keepEditorStyle mb-0 text-dark-purple text-justify">
  33.         {{ news.content|raw }}
  34.       </div>
  35.       <div class="col-6 text-left back-link my-4">
  36.         <a href="{{path('news.index')}}"><i class="fa-solid fa-arrow-left font-12"></i>{% trans %}Retour{% endtrans %}</a>
  37.       </div>
  38.       <div class="col-6 text-right next-link my-4">
  39.         {% if nextNews %}
  40.           <a href="{{ nextNews.url }}">{% trans %}Suivante{% endtrans %}<i class="fa-solid fa-arrow-right font-12"></i></a>
  41.         {% endif %}
  42.       </div>
  43.     </div>
  44.   </div>
  45. </section>
  46. <section class="section section-news b-4">
  47.     <div class="container">
  48.       <div class="row">
  49.         <div class="col-12">
  50.           <div class="section-title mb-4" data-aos='fade-down'><span>/</span> {% trans %}Dernières Actualités{% endtrans %}</div>
  51.         </div>
  52.       </div>
  53.       <div class="row">
  54.         {% if newsLasted %}
  55.           {% for news in newsLasted|default([]) %}
  56.               <div class="col-lg-4 col-md-6 mb-lg-5 mb-4">    
  57.                 <div class="n-item d-flex flex-column h-100" data-aos='zoom-in'>
  58.                   <div class="n-img mb-4">
  59.                     <a href="{{ news.url }}">
  60.                       <img class="position-relative w-100" src="{{ news.media }}" alt="{{ news.title }}" 
  61.                           onerror="this.onerror=null;this.src='{{ asset('assets/images/no-img/news.jpg') }}';"/>
  62.                     </a>
  63.                   </div>
  64.                   <div class="n-title mb-3">
  65.                     <a href="{{ news.url }}">{{ news.title }}</a>
  66.                   </div>
  67.                   <div class="n-time mb-3">
  68.                     <div class="n-icon"><i class="fa-solid fa-calendar-week"></i></div>
  69.                     <div class="n-text">{{ news.createdDate|date('d M Y') }}</div>
  70.                   </div>
  71.                   <div class="n-text mb-3">
  72.                     <div class="truncate-text">
  73.                       {{ news.description }}
  74.                     </div>
  75.                   </div>
  76.                   <div class="n-link mt-auto">
  77.                     <a href="{{ news.url }}">{% trans %}Lire l'article{% endtrans %}<i class="fa-solid fa-arrow-right"></i></a>
  78.                   </div>
  79.                 </div>
  80.               </div>
  81.           {% endfor %}
  82.       {% endif %}
  83.       </div>
  84.     </div>  
  85.   </section>
  86. {% endblock %}
  87. {% block custom_javascripts %}
  88. {{ '<script type="application/ld+json">'|raw }}
  89. {{ richSnippets|json_encode | raw }}
  90. {{ '</script>'|raw }}
  91. {% endblock %}