templates/extra_pages/articles.html.twig line 1

  1. {% extends "base.html.twig" %}
  2. {% block title %}
  3.     {{ parent() }} - All
  4. {% endblock %}
  5. {% block stylesheets %}
  6. {{ parent() }}
  7. {% endblock %}
  8. {% block javascript %}
  9. {{ parent() }}
  10. {% endblock %}
  11. {% block body %}
  12. {{ parent() }}
  13. <div class="container">
  14.     <h1 class="title-page">
  15.         {{ 'Figures-clés des acquisitions'|trans }}
  16.     </h1>
  17.     <div style="margin: 22px 0 25px; ">{{intro | raw}}</div>
  18.     {% set nrofcolumns = 4 %}
  19.         
  20.     {% for article in articles %}
  21.         {% if (loop.index0!=0  and loop.index0 is divisible by(nrofcolumns) ) %}
  22.       {% endif %}
  23.         {% if loop.index0==0  or loop.index0 is divisible by(nrofcolumns)   %}
  24.           <div class="row" style="gap: 8px;">
  25.       {% endif %}
  26.               <div class="col-sm" style=" border: 1px solid #8c8c8c; border-radius: 8px; padding: 5px; margin-bottom: 8px;justify-content:center;display: flex; text-align:center;">
  27.                 <a href="{{ path('article', { 'id': article.id }) }}" style="text-decoration: none; border-bottom: none">
  28.                     <img src="{{ app.request.baseUrl }}/images/articles/thumbnails/{{article.picture}}" alt="{{article.title}}"/>
  29.                     <div style="margin: 8px 0 4px">
  30.                         {{article.title | replace({"(":"<br />" ~ "(" })|raw}}
  31.                     </div>
  32.                 </a>
  33.               </div>
  34.                 {% if (loop.index0!=0  and loop.index is divisible by(nrofcolumns) ) %}
  35.           </div>
  36.       {% endif %}
  37.     {% endfor %}
  38.     {% if (articles|length) > 0  %}
  39.       {% set end_index = nrofcolumns-((articles|length)%nrofcolumns) %}
  40.        {% for i in 1..end_index %}
  41.           <div class="col-sm"></div>
  42.       {% endfor %} 
  43.     {% endif %}
  44. </div>
  45. <!--DISCLAIMER-->
  46. {% include 'disclaimer_popup.html.twig' with {'cookie_accepted':cookie_accepted??"false" } %}
  47. {% endblock body %}