templates/app/article/show.html.twig line 1

Open in your IDE?
  1. {% import 'app/_inc/macros.html.twig' as m %}
  2. {% extends 'base.html.twig' %}
  3. {% block seo %}
  4.     {{seo.generate(app.request.get('_route'), app.request.locale, article)|raw}}
  5. {% endblock %}
  6. {% block css %}
  7.     {{ encore_entry_link_tags('app-articles-css') }}
  8.     {{ encore_entry_link_tags('app-swiper-css') }}
  9. {% endblock %}
  10. {% block js %}{{ encore_entry_script_tags('app-swiper-js') }}{% endblock %}
  11. {% block content %}
  12.     {% set a = article %}
  13.     <main id="page" class="article_show">
  14.         <div class="bg wood">
  15.             {{ m.img(asset('img/fond-table.png')) }}
  16.         </div>
  17.         <div class="ct">
  18.             <section class="top-title">
  19.                 <h2 class="h3">{{ a.translate.title|trans|raw }}</h2>
  20.                 {{m.Breadcrumb(article.translate.title, {link:{
  21.                     0:['nav.actu', path('article_list')],
  22.                     1:[a.translate.title]
  23.                 }})}}
  24.             </section>
  25.             <section data-a-up class="paragraphe article_content">
  26.                 <div class="img-article">
  27.                     {{ m.Img(a.firstPicture.path, {attr_img:{alt:a.firstPicture.translate.name},width:660}) }}
  28.                 </div>
  29.                 {{article.translate.content|raw}}
  30.             </section>
  31.             {% if articles|length > 0 %}
  32.                 <section class="swiper" data-swiper="all" data-a-up>
  33.                     <div class="top" data-a-up>
  34.                         <h2 class="h2">{{ 'news.plus'|trans|raw }}</h2>
  35.                         {{ m.SwiperNav('all') }}
  36.                     </div>
  37.                     <div class="swiper-wrapper">
  38.                         {% for other in articles %}
  39.                             <div class="swiper-slide" data-a-up>
  40.                                 {{m.Actu(other)}}
  41.                             </div>
  42.                         {% endfor %}
  43.                     </div>
  44.                 </section>
  45.             {% endif %}
  46.         </div>
  47.     </main>
  48. {% endblock %}