templates/default/actualites.html.twig line 1

Open in your IDE?
  1. {# BASE LOAD #}
  2. {% extends 'base.html.twig' %}
  3. {# TITLE TOP PAGE #}
  4. {% block title %}CPI | {% if app.request.locale == 'fr' %}Actualités{% else %}News{% endif %}{% endblock %}
  5. {# CSS #}
  6. {% block stylesheet %}
  7.          <link rel="stylesheet" href="{{ asset('css/actualites.css')}}">
  8. {% endblock %}
  9. {# BODY HOME PAGE #}
  10. {% block body %}
  11. <style>
  12.   
  13. </style>
  14. {% set catSelected = app.request.query.get('categorie') %}
  15.     <main>
  16.         <div class="accueil" style="padding-top: 237px;">
  17.             <div class="container text-light">
  18.                 <div class="row py-5 noBottom">
  19.                     <div class="col-12">
  20.                         <h1 data-aos="fade-right" data-aos-duration="1000" class="opensans_bold_50">{% trans %}titre-actualites{% endtrans %}{% if app.user %}<a href="{{path('app_dictionnaire_edit',{'id':118})}}"><button type="button"  style="margin-left:5px" class="btn btn-warning"  ><i class="fa-solid fa-pen"></i></button></a>{% endif %}</h1>
  21.                         <div class="col-lg-4">
  22.                             <div class="traitBlanc"></div>
  23.                         </div>
  24.                     </div>
  25.                 </div>
  26.                 <div class="dropdowns">
  27.                     <div class="row">
  28.                         <div class="col-12">
  29.                             <div class="row mb-5">
  30.                                 <div class="col-12 col-md-3">
  31.                                     <!-- Date Filter Dropdown -->
  32.                                         <div data-aos="fade-up" data-aos-duration="1200" class="dropdown " style="z-index:5">
  33.                                             <button class="btn dropdown-toggle margeButton d-flex justify-content-between" type="button" id="dropdownMenuButton1" data-bs-toggle="dropdown" aria-expanded="false">
  34.                                                 {% if app.request.get('date') is not empty  %}
  35.                                                     {% if app.request.get('date') == 'mois'%}
  36.                                                         {% if app.request.locale == 'fr' %}Sur le dernier mois{% else %}Over the last month{% endif %} 
  37.                                                     {% endif %}
  38.                                                     {% if app.request.get('date') == 'annee'%}
  39.                                                         {% if app.request.locale == 'fr' %}La dernière année{% else %}The last year{% endif %} 
  40.                                                         
  41.                                                     {% endif %}
  42.                                                 {% else %}Date{% endif %}
  43.                                             </button>
  44.                                            <ul class="dropdown-menu">
  45.                                                 <li>
  46.                                                     <a style="font-weight:600;" class="dropdown-item text-light" href="{{ path('app_actualites', {'date': '','categorie': catSelected, 'locale': app.request.locale}) }}#jobsList">
  47.                                                         {% if app.request.locale == 'fr' %}Toutes les dates{% else %}All dates{% endif %} 
  48.                                                     </a>
  49.                                                 </li>
  50.                                                 <li>
  51.                                                     <a class="dropdown-item text-light" href="{{ path('app_actualites', {'date': 'mois', 'categorie': catSelected, 'locale': app.request.locale}) }}">
  52.                                                         {% if app.request.locale == 'fr' %}Sur le dernier mois{% else %}Over the last month{% endif %}
  53.                                                     </a>
  54.                                                 </li>
  55.                                                 <li>
  56.                                                     <a class="dropdown-item text-light" href="{{ path('app_actualites', {'date': 'annee', 'categorie': catSelected, 'locale': app.request.locale}) }}">
  57.                                                         {% if app.request.locale == 'fr' %}La dernière année{% else %}The last year{% endif %}
  58.                                                     </a>
  59.                                                 </li>
  60.                                             </ul>
  61.                                         </div>
  62.                                 </div>
  63.                                 <style>
  64.                                     .btn-dangerr{
  65.                                         background-color:white!important;
  66.                                         font-weight:bold!important;
  67.                                         color:#30278E!important;
  68.                                         width:auto!important;
  69.                                     }
  70.                                 </style>
  71.                                 <div class="col-12 col-md-3 margeButton " style="position: relative; bottom: 15px;z-index:4">
  72.                                     <div data-aos="fade-up" data-aos-duration="1000" class="dropdown my-3">
  73.                                        <button class="btn {{ catSelected ? 'btn-dangerr' : 'btn-secondary' }} dropdown-toggle d-flex justify-content-between" type="button" id="dropdownMenuButtonType" data-bs-toggle="dropdown" aria-expanded="false">
  74.                                             {% if catSelected %}
  75.                                                 {% for res in cat %}
  76.                                                     {% if res.id == catSelected  %}
  77.                                                         {% set title = app.request.locale == 'fr' ? res.titreFr : res.titreEn %}
  78.                                                         {{ title|length > 10 ? title|slice(0, 11) ~ '...' : title }}
  79.                                                     {% endif %}
  80.                                                 {% endfor %}
  81.                                             {% else %}
  82.                                                 {% set defaultTitle = app.request.locale == 'fr' ? 'Catégories' : 'Categories' %}
  83.                                                 {{ defaultTitle|length > 10 ? defaultTitle|slice(0, 11) ~ '...' : defaultTitle }}
  84.                                             {% endif %}
  85.                                         </button>
  86.                                          <ul class="dropdown-menu">
  87.                                             <li>
  88.                                                 <a style="font-weight:600;" class="dropdown-item text-light" href="{{ path('app_actualites', {'categorie': '', 'date': app.request.get('date'), 'locale': app.request.locale}) }}#jobsList">
  89.                                                     {% if app.request.locale == 'fr' %}Toutes les catégories{% else %}All categories{% endif %}
  90.                                                 </a>
  91.                                             </li>
  92.                                             {% for res in cat %}
  93.                                                 <li>
  94.                                                     <a class="dropdown-item text-light" href="{{ path('app_actualites', {'categorie': res.id, 'date': app.request.get('date'), 'locale': app.request.locale}) }}">
  95.                                                         {% if app.request.locale == 'fr' %}{{ res.titreFr }}{% else %}{{ res.titreEn }}{% endif %}
  96.                                                     </a>
  97.                                                 </li>
  98.                                             {% endfor %}
  99.                                         </ul>
  100.                                         </div>
  101.                                 </div>
  102.                                 <div data-aos="fade-up" data-aos-duration="1600" class="col-12 col-md-3 margeButton" style="z-index:4">
  103.                                  
  104.                                 </div>
  105.                                 <div class="col-12 col-md-3 margeButton">
  106.                                     <div data-aos="fade-up" data-aos-duration="1800" class="dropdown ">
  107.                                         <a href="{{path('app_actualites',{'locale':app.request.locale})}}"><button class="btn btn-secondary btn-res d-flex justify-content-between" type="button">
  108.                                           
  109.                                            <p style="margin-bottom: 0;"> <i class="fas fa-arrows-rotate" aria-hidden="true" style="margin-right:10px"></i>{% if app.request.locale == 'fr' %}Réinitialiser{% else %}Reset{% endif %}</p>
  110.                                         </button></a>
  111.                                        
  112.                                     </div>
  113.                                 </div>
  114.                             </div>
  115.                         </div>
  116.                     </div>
  117.                 </div>
  118.             </div>
  119.         </div>
  120.         <div class="accueil2" style="margin-top:30px;">
  121.             <div class="container">
  122.                 <div class="row">
  123.                     <div class="col-12">
  124.                     {% set lastsIds = lasts|map(last => last.id) %}
  125.                     {% for last in lasts %}
  126.                         <div class="row">
  127.                             <div class="col-lg-5 pb-5 lastActu noBottom align-self-center order-last order-lg-first">
  128.                             {% if app.request.locale == 'fr' %}
  129.                                 {% set titreNew = last.titreFr|replace({' ':'_'}) %}
  130.                             {% else %}
  131.                                 {% set titreNew = last.titreEn|replace({' ':'_'}) %}
  132.                             {% endif %}
  133.                                 <a href="{{path('actualitesD',{'id':last.id, 'titre': titreNew,'locale':app.request.locale})}}">
  134.                                     <div class="texte-carte">
  135.                                         <div class="titre" style="font-size: 36px!important;">
  136.                                                  <p data-aos="fade-right" data-aos-duration="1000" style="min-height:145px"> {% if app.request.locale == 'fr' %}{{last.titreFr|slice(0,90)}}{% else %}{{last.titreEn|slice(0,90)}}{% endif %} ...</p>
  137.                                             </div>
  138.                                            
  139.                                         <div data-aos="fade-right" data-aos-duration="1000" class="date">
  140.                                             <img src="{{asset('img/actualites/clock.png')}}" alt="clock" style="">
  141.                                             <p>
  142.                                             {{last.date|date('d')}}
  143.                                                         {% if app.request.locale == 'fr' %}
  144.                                                             {% if last.date|date('m') == '01' %}JANVIER{% endif %}
  145.                                                             {% if last.date|date('m') == '02' %}FEVRIER{% endif %}
  146.                                                             {% if last.date|date('m') == '03' %}MARS{% endif %}
  147.                                                             {% if last.date|date('m') == '04' %}AVRIL{% endif %}
  148.                                                             {% if last.date|date('m') == '05' %}MAI{% endif %}
  149.                                                             {% if last.date|date('m') == '06' %}JUIN{% endif %}
  150.                                                             {% if last.date|date('m') == '07' %}JUILLET{% endif %}
  151.                                                             {% if last.date|date('m') == '08' %}AOUT{% endif %}
  152.                                                             {% if last.date|date('m') == '09' %}SEPTEMBRE{% endif %}
  153.                                                             {% if last.date|date('m') == '10' %}OCTOBRE{% endif %}
  154.                                                             {% if last.date|date('m') == '11' %}NOVEMBRE{% endif %}
  155.                                                             {% if last.date|date('m') == '12' %}DECEMBRE{% endif %}
  156.                                                         {% else %}
  157.                                                             {% if last.date|date('m') == '01' %}JANUARY{% endif %}
  158.                                                             {% if last.date|date('m') == '02' %}FEBRUARY{% endif %}
  159.                                                             {% if last.date|date('m') == '03' %}MARCH{% endif %}
  160.                                                             {% if last.date|date('m') == '04' %}APRIL{% endif %}
  161.                                                             {% if last.date|date('m') == '05' %}MAY{% endif %}
  162.                                                             {% if last.date|date('m') == '06' %}JUNE{% endif %}
  163.                                                             {% if last.date|date('m') == '07' %}JULY{% endif %}
  164.                                                             {% if last.date|date('m') == '08' %}AUGUST{% endif %}
  165.                                                             {% if last.date|date('m') == '09' %}SEPTEMBER{% endif %}
  166.                                                             {% if last.date|date('m') == '10' %}OCTOBER{% endif %}
  167.                                                             {% if last.date|date('m') == '11' %}NOVEMBER{% endif %}
  168.                                                             {% if last.date|date('m') == '12' %}DECEMBER{% endif %}
  169.                                                         {% endif %}
  170.                                                             {{last.date|date('Y')}}
  171.                                             </p>
  172.                                         </div>
  173.                                      <div class="description "style="font-size: 21px!important;">
  174.                                                <p data-aos="fade-right" data-aos-duration="1000">{% if app.request.locale == 'fr' %}{{last.introFr|slice(0,170)|raw }}{% else %}{{last.introEn|slice(0,170)|raw }}{% endif %} </p>
  175.                                             </div>
  176.                                     </div>
  177.                                 </a>
  178.                             </div>
  179.                             <div class="col-lg-7 noBottom ">
  180.                                 <a data-aos="fade-up" data-aos-duration="1000" href="{{path('actualitesD',{'id':last.id, 'titre' : titreNew,'locale':app.request.locale})}}">
  181.                                     <img style="object-fit:cover;" id="imgAeronautique" class="w-100 h-100 img-fluid" src="
  182.                                             {% if last.image == 'ok' %}
  183.                                                 {{asset('uploads/actualites/cpi-actu-defaut.jpg')}}
  184.                                             {% else %}
  185.                                                 {{asset('uploads/actualites/'~last.image)}}
  186.                                             {% endif %}
  187.                                             " alt="salon aeronautique">
  188.                                 </a>
  189.                             </div>
  190.                         </div>
  191.                         {% endfor %}
  192.                         <div class="row twoActu" style="margin-top:30px;">
  193.                         {% for res in two %}
  194.                             {% if res.id not in lastsIds %}
  195.                             {% if res.afficher == 1 %}
  196.                             {% if app.request.locale == 'fr' %}
  197.                                 {% set titreNew = res.titreFr|replace({' ':'_',"'":"_"}) %}
  198.                             {% else %}
  199.                                 {% set titreNew = res.titreEn|replace({' ':'_',"'":"_"}) %}
  200.                             {% endif %}
  201.                                 <div data-aos="fade-up" data-aos-duration="1000" class="col-lg-6 noBottom ">
  202.                                     <div class="carte">
  203.                                         <a href="{{path('actualitesD',{'id':res.id, 'titre': titreNew,'locale':app.request.locale})}}">
  204.                                             <img style="object-fit:cover;"  class="img-fluid" src="
  205.                                                 {% if res.image == 'ok' %}
  206.                                                     {{asset('uploads/actualites/cpi-actu-defaut.jpg')}}
  207.                                                 {% else %}
  208.                                                     {{asset('uploads/actualites/'~res.image)}}
  209.                                                 {% endif %}
  210.                                                 " alt="salon aeronautique">
  211.                                             <div class="texte-carte pt-1 pt-md-2">
  212.                                             <div class="titre" >
  213.                                                     <p data-aos="fade-right" data-aos-duration="1000" style="min-height:80px">{% if app.request.locale == 'fr' %}{{res.titreFr|slice(0,90)}}{% else %}{{res.titreEn|slice(0,90)}}{% endif %} ...</p>
  214.                                                 </div>
  215.                                                 <div class="description "style="font-size: 21px!important;">
  216.                                                <p data-aos="fade-right" data-aos-duration="1000">{% if app.request.locale == 'fr' %}{{res.introFr|slice(0,170)|raw }}...{% else %}{{res.introEn|slice(0,170)|raw }}...{% endif %}</p>
  217.                                             </div>
  218.                                                
  219.                                                 <div data-aos="fade-right" data-aos-duration="1000" class="date" >
  220.                                                     <img src="{{asset('img/actualites/clock.png')}}" alt="clock">
  221.                                                     <p>
  222.                                                 {{res.date|date('d')}}
  223.                                                                 {% if app.request.locale == 'fr' %}
  224.                                                             {% if res.date|date('m') == '01' %}JANVIER{% endif %}
  225.                                                             {% if res.date|date('m') == '02' %}FEVRIER{% endif %}
  226.                                                             {% if res.date|date('m') == '03' %}MARS{% endif %}
  227.                                                             {% if res.date|date('m') == '04' %}AVRIL{% endif %}
  228.                                                             {% if res.date|date('m') == '05' %}MAI{% endif %}
  229.                                                             {% if res.date|date('m') == '06' %}JUIN{% endif %}
  230.                                                             {% if res.date|date('m') == '07' %}JUILLET{% endif %}
  231.                                                             {% if res.date|date('m') == '08' %}AOUT{% endif %}
  232.                                                             {% if res.date|date('m') == '09' %}SEPTEMBRE{% endif %}
  233.                                                             {% if res.date|date('m') == '10' %}OCTOBRE{% endif %}
  234.                                                             {% if res.date|date('m') == '11' %}NOVEMBRE{% endif %}
  235.                                                             {% if res.date|date('m') == '12' %}DECEMBRE{% endif %}
  236.                                                         {% else %}
  237.                                                             {% if res.date|date('m') == '01' %}JANUARY{% endif %}
  238.                                                             {% if res.date|date('m') == '02' %}FEBRUARY{% endif %}
  239.                                                             {% if res.date|date('m') == '03' %}MARCH{% endif %}
  240.                                                             {% if res.date|date('m') == '04' %}APRIL{% endif %}
  241.                                                             {% if res.date|date('m') == '05' %}MAY{% endif %}
  242.                                                             {% if res.date|date('m') == '06' %}JUNE{% endif %}
  243.                                                             {% if res.date|date('m') == '07' %}JULY{% endif %}
  244.                                                             {% if res.date|date('m') == '08' %}AUGUST{% endif %}
  245.                                                             {% if res.date|date('m') == '09' %}SEPTEMBER{% endif %}
  246.                                                             {% if res.date|date('m') == '10' %}OCTOBER{% endif %}
  247.                                                             {% if res.date|date('m') == '11' %}NOVEMBER{% endif %}
  248.                                                             {% if res.date|date('m') == '12' %}DECEMBER{% endif %}
  249.                                                         {% endif %}
  250.                                                                 {{res.date|date('Y')}}
  251.                                                 </p>
  252.                                                 </div>
  253.                                             </div>
  254.                                         </a>
  255.                                     </div>
  256.                                 </div>
  257.                                 {% else %}
  258.                                 {% endif %}
  259.                                     {% endif %}
  260.                             {% endfor %}
  261.                         </div>
  262.                         <div class="row" style="margin-top:30px;">
  263.                         {% for res in all %}
  264.                             {% if res.id not in lastsIds %}
  265.                         {% if res.afficher == 1 %}
  266.                             {% if app.request.locale == 'fr' %}
  267.                                 {% set titreNew = res.titreFr|replace({' ':'_'}) %}
  268.                             {% else %}
  269.                                 {% set titreNew = res.titreEn|replace({' ':'_'}) %}
  270.                             {% endif %}
  271.                             <div data-aos="fade-up" data-aos-duration="1000" class="col-xxl-4 col-sm-6 col-12" style="position: relative; padding-bottom : 30px;margin-top:42px;">
  272.                                 <div class="carte carteOther mt-5 mt-md-2">
  273.                                    <a href="{{path('actualitesD',{'id':res.id, 'titre': titreNew,'locale':app.request.locale})}}">
  274.                                         <div class="imgAnimee">
  275.                                             <img style="object-fit:cover;" class="img-fluid" src="
  276.                                             {% if res.image == 'ok' %}
  277.                                                 {{asset('uploads/actualites/cpi-actu-defaut.jpg')}}
  278.                                             {% else %}
  279.                                                 {{asset('uploads/actualites/'~res.image)}}
  280.                                             {% endif %}
  281.                                             "alt="salon aeronautique">
  282.                                             <div class="hover-effect  d-flex justify-content-center aligne-items-center" style="background-color : rgba(25,0,105,0.75);">
  283.                                                     <button type="button" class="btn btn-outline-light buttonMore hover-btn-actu" >{% if app.request.locale == 'fr' %}Lire l'article{% else %}Read the article{% endif %}</button>
  284.                                             </div>
  285.                                         </div>
  286.                                         <div class="texte-carte pt-1 pt-md-2">
  287.                                             <div class="titre">
  288.                                                  <p style="min-height:145px">{% if app.request.locale == 'fr' %}{{res.titreFr|slice(0,90)}}{% else %}{{res.titreEn|slice(0,90)}}{% endif %} ...</p>
  289.                                             </div>
  290.                                             <div class="description "style="font-size: 21px!important;">
  291.                                                <p data-aos="fade-right" data-aos-duration="1000">{% if app.request.locale == 'fr' %}{{res.introFr|slice(0,170)|raw }}...{% else %}{{res.introEn|slice(0,170)|raw }}...{% endif %}</p>
  292.                                             </div>
  293.                                            
  294.                                             <div class="date" style="position: absolute;">
  295.                                                 <img src="{{asset('img/actualites/clock.png')}}" alt="clock">
  296.                                                 <p>
  297.                                                 
  298.                                                 {{res.date|date('d')}}
  299.                                                         {% if app.request.locale == 'fr' %}
  300.                                                             {% if res.date|date('m') == '01' %}JANVIER{% endif %}
  301.                                                             {% if res.date|date('m') == '02' %}FEVRIER{% endif %}
  302.                                                             {% if res.date|date('m') == '03' %}MARS{% endif %}
  303.                                                             {% if res.date|date('m') == '04' %}AVRIL{% endif %}
  304.                                                             {% if res.date|date('m') == '05' %}MAI{% endif %}
  305.                                                             {% if res.date|date('m') == '06' %}JUIN{% endif %}
  306.                                                             {% if res.date|date('m') == '07' %}JUILLET{% endif %}
  307.                                                             {% if res.date|date('m') == '08' %}AOUT{% endif %}
  308.                                                             {% if res.date|date('m') == '09' %}SEPTEMBRE{% endif %}
  309.                                                             {% if res.date|date('m') == '10' %}OCTOBRE{% endif %}
  310.                                                             {% if res.date|date('m') == '11' %}NOVEMBRE{% endif %}
  311.                                                             {% if res.date|date('m') == '12' %}DECEMBRE{% endif %}
  312.                                                         {% else %}
  313.                                                             {% if res.date|date('m') == '01' %}JANUARY{% endif %}
  314.                                                             {% if res.date|date('m') == '02' %}FEBRUARY{% endif %}
  315.                                                             {% if res.date|date('m') == '03' %}MARCH{% endif %}
  316.                                                             {% if res.date|date('m') == '04' %}APRIL{% endif %}
  317.                                                             {% if res.date|date('m') == '05' %}MAY{% endif %}
  318.                                                             {% if res.date|date('m') == '06' %}JUNE{% endif %}
  319.                                                             {% if res.date|date('m') == '07' %}JULY{% endif %}
  320.                                                             {% if res.date|date('m') == '08' %}AUGUST{% endif %}
  321.                                                             {% if res.date|date('m') == '09' %}SEPTEMBER{% endif %}
  322.                                                             {% if res.date|date('m') == '10' %}OCTOBER{% endif %}
  323.                                                             {% if res.date|date('m') == '11' %}NOVEMBER{% endif %}
  324.                                                             {% if res.date|date('m') == '12' %}DECEMBER{% endif %}
  325.                                                         {% endif %}
  326.                                                             {{res.date|date('Y')}}</p>
  327.                                             </div>
  328.                                         </div>
  329.                                     </a>
  330.                                 </div>
  331.                             </div>
  332.                             {% else %}
  333.                                 {% endif %}
  334.                                     {% endif %}
  335.                             {% endfor %}
  336.                            
  337.                     </div>
  338.                 </div>
  339.             </div>
  340.         </div>
  341.          </section>
  342.     </main>
  343.    
  344.     
  345.     <!-- Assurez-vous d'ajuster les chemins vers les images selon la structure de votre projet et d'adapter le rendu HTML selon vos besoins. -->
  346.     
  347.     
  348.     
  349. {% endblock %}