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

Open in your IDE?
  1. {% extends 'Nordinfo/Main/base.html.twig' %}
  2. {% set show_btt = true %}
  3. {% block title %}{{ post.title }} - Nord Info{% endblock %}
  4. {% if post.dateDebut is defined and post.dateDebut != null %}
  5.   {% set date_segments = post.dateDebut | split('/') %}
  6.   {% set date = date_segments[1] ~ '/' ~ date_segments[0] ~ '/' ~ date_segments[2] %}
  7. {% else %}
  8.   {% set date = "" %}
  9. {% endif %}
  10.     {% if post.dateFin is defined and post.dateFin != null %}
  11.     {% set date_segmentss = post.dateFin | split('/') %}
  12.     {% set date_fin = date_segmentss[1] ~ '/' ~ date_segmentss[0] ~ '/' ~ date_segmentss[2] %}
  13.   {% else %}
  14.     {% set date_fin = "" %}
  15.   {% endif %}
  16.     {% if referer is not null %}
  17.     {% set url_back = referer %}
  18.   {% else %}
  19.     {% set url_back = path('info') %}
  20.   {% endif %}
  21.     {% set main_type = "folder" %}
  22.   {% block header_epingles %}
  23.     {{ include('Lenord/Main/parts/epingles.html.twig') }}
  24.   {% endblock %}
  25.   {% block header_breadcrumb %}
  26.     {{ include('Nordinfo/Main/parts/breadcrumb.html.twig') }}
  27.   {% endblock %}
  28. {% block body %}
  29.     <main role="main" class="mainContent pt-0" id="mainContent" tabindex="-1">
  30.     {% include 'Nordinfo/Main/parts/back_btn.html.twig' with {'back_btn_class':''} %}
  31.         <div class="headerBanner {% if placement_image|default %}{{ placement_image }}{% endif %} {% if post.type.type == 'folder' %}--pageDetails{% endif %}" {% if post.illustrationdetailName is null %} style="background-image: url('{{ asset('upload/images/'~post.illustrationfilName) | imagine_filter('banner_full_width') }}')" {% else %} style="background-image: url('{{ asset('upload/images/'~post.illustrationdetailName) | imagine_filter('banner_full_width') }}')" {% endif %}></div>
  32.     <div style="background-color: {{ post.palettecouleur.getCodeHexa() }};" class="pb-5 mb-5">
  33.             <div class="container containerPostDetails {% if post.type.type == 'folder' %}--pageDetails --pageFolder{% endif %}">
  34.                 <article class="pt-5">
  35.                     <p class="text-center fsXs">
  36.                         <span class="__date">{{ date|format_datetime('none', 'none', 'fr_FR', null, "d MMMM Y") }}</span>
  37.                         <span class="lsMd ttUppercase">
  38.                             {% if post.topics|length > 1 %}{% for top in post.topics %}{% if loop.index != 1 %}, {% endif %}{{ top.displayName }}{% endfor %}
  39.                             {% else %}{% for top in post.topics %}{{ top.displayName }}{% endfor %}{% endif %}
  40.                             {% if post.territories|length > 0 and post.topics|length > 0 %}<span class="separator">|</span>{% endif %}
  41.                             {% if post.territories|length > 1 %}{% for t in post.territories %}{% if loop.last == false and post.territories|length > 1 %}{{ t.displayName ~", " }}{% else %}{{ t.displayName }}{% endif %}{% endfor %}
  42.                             {% else %}{% for t in post.territories %}{{ t.displayName }}{% endfor %}{% endif %}
  43.                         </span>
  44.                     </p>
  45.                     <h1 class="text-center">{{ post.title }}</h1>
  46.                     {% if post.subtitle|length > 0 %}<p class="__subtitle">{{ post.subtitle }}</p>{% endif %}
  47.                     {% if post.chapo|length > 0 %}<p class="__chapo">{{ post.chapo }}{% if post.url1|length > 0 %}<br><a href="{{ post.url1 }}" target="_blank" class="_external"><span>{{ post.link1 }}</span></a>{% endif %}</p>{% endif %}
  48.                     <div class="containerContent mb-2">{{ content_post|raw }}</div>
  49.                     {% if false %}
  50.                         {% if post.credits is not null %}
  51.                             <p class="text-secondary font-italic fontWeightMedium fsXs">Crédits photo :
  52.                                 {{ post.credits }}
  53.                             </p>
  54.                         {% endif %}
  55.                     {% endif %}
  56.                 </article>
  57.             </div>
  58.         </div>
  59.         <div class="container _masonry">
  60.             <div class="gridMasonry" id="gridMasonry">
  61.                 <div class="grid-sizer"></div>
  62.                 {% for post in related_posts|sort((a, b) => a.orderFolder <=> b.orderFolder) %}
  63.                     {{ include('Nordinfo/Main/parts/item_list_related_folder.html.twig') }}
  64.                 {% endfor %}
  65.             </div>
  66.         </div>
  67.         <div style="padding-bottom:200px;"></div>
  68.     </main>
  69. {% endblock %}