templates/Nordinfo/Main/detail_page.html.twig line 1

Open in your IDE?
  1. {% extends 'Nordinfo/Main/base.html.twig' %}
  2. {% set show_btt = true %}
  3. {% block title %}{{ post.titre }} - Nord Info{% endblock %}
  4. {% block header_epingles %}
  5.   {{ include('Lenord/Main/parts/epingles.html.twig') }}
  6. {% endblock %}
  7. {% block header_breadcrumb %}
  8.   {{ include('Nordinfo/Main/parts/breadcrumb.html.twig') }}
  9. {% endblock %}
  10. {% block body %}
  11.   <main role="main" class="mainContent pt-0 pb-5" id="mainContent" tabindex="-1">
  12.     {% if referer is not null %}
  13.       {% set url_back = referer %}
  14.     {% else %}
  15.       {% set url_back = path('info') %}
  16.     {% endif %}
  17.     {% include 'Nordinfo/Main/parts/back_btn.html.twig' with {'back_btn_class':''} %}
  18.     <div class="headerBanner --pageDetails" {% if post.filename is null %} style="background-image: url('{{ asset('upload/images/'~post.filename) | imagine_filter('banner_full_width') }}')" {% else %} style="background-image: url('{{ asset('upload/images/'~post.filename) | imagine_filter('banner_full_width') }}')" {% endif %}>
  19.     </div>
  20.     <div class="container containerPostDetails --pageDetails pt-5">
  21.       <article class="pb-6">
  22.         <h1 class="text-center">{{ post.titre }}</h1>
  23.         <p class="font-weight-bold">{{ post.metaDescription }}</p>
  24.         <div class="containerContent">{{ content_post|raw }}</div>
  25.         {% if post.credits is not null %}
  26.           <p class="text-secondary font-italic fontWeightMedium fsXs mt-2">Crédits photo :
  27.             {{ post.credits }}
  28.           </p>
  29.         {% endif %}
  30.       </article>
  31.       <div class="pB pT">
  32.         {% if is_preview != 1 %}
  33.           {% include 'Nordinfo/Main/parts/article-actions.html.twig' with {'post_title':'test', 'post_id':'test', 'hide_favorite':true} %}
  34.         {% endif %}
  35.       </div>
  36.       <div class="container-sm pt-5">
  37.         {% include 'Nordinfo/Main/parts/cards-bottom.html.twig' %}
  38.         {% if post.relatedPost1 != null or post.relatedPost2 != null or post.relatedPost3 != null %}
  39.           <section class="pt-3">
  40.             <h2>À lire aussi</h2>
  41.             <ul class="listLinks">
  42.               {% if post.relatedPost1 != null %}
  43.                 <li>
  44.                   <a
  45.                     href="{{ path('post_detail', {"slug": post.relatedPost1.slug}) }}"><span>{{ post.relatedPost1.title }}</span></a>
  46.                 </li>
  47.               {% endif %}
  48.               {% if post.relatedPost2 != null %}
  49.                 <li>
  50.                   <a
  51.                     href="{{ path('post_detail', {"slug": post.relatedPost2.slug}) }}"><span>{{ post.relatedPost2.title }}</span></a>
  52.                 </li>
  53.               {% endif %}
  54.               {% if post.relatedPost3 != null %}
  55.                 <li>
  56.                   <a
  57.                     href="{{ path('post_detail', {"slug": post.relatedPost3.slug}) }}"><span>{{ post.relatedPost3.title }}</span></a>
  58.                 </li>
  59.               {% endif %}
  60.             </ul>
  61.           </section>
  62.         {% endif %}
  63.       </div>
  64.     </div>
  65.   </main>
  66. {% endblock %}