templates/fronts/list_laboratoires.html.twig line 1

  1. {% extends 'base_front.html.twig' %}
  2. {% block title %}Hello DefaultController!{% endblock %}
  3. {% block body %}
  4. <!-- Content ============================================= -->
  5. <section id="content">
  6.     <div class="col-mt-30">
  7.         <div class="stats-section py-5">
  8.             <div class="container">
  9.                 <div class="row g-4 justify-content-center">
  10.                     <!-- Laboratoires -->
  11.                     <div class="col-lg-3 col-md-6">
  12.                         <div class="stat-card">
  13.                             <div class="stat-icon">
  14.                                 <img src="/front/icons/structure.png" alt="Laboratoires" class="img-fluid">
  15.                             </div>
  16.                            
  17.                             <div class="stat-content position-relative text-center">
  18.                                 <!-- Badge container with subtle border and shadow -->
  19.                                 <div class="stat-badge position-relative bg-white rounded-4 p-2 shadow-sm mb-3">
  20.                                     <!-- Animated counter number -->
  21.                                     <div class="stat-number counter display-3 fw-bold  mb-1" data-target="{{ nbrStructureRechercheLabo }}">0</div>
  22.                                 </div>
  23.                                 <!-- Title with animated underline -->
  24.                                 <h3 class="stat-title fs-5 fw-medium text-uppercase letter-spacing-1 position-relative d-inline-block px-3">
  25.                                     Laboratoires
  26.                                     <span class="title-underline"></span>
  27.                                 </h3>
  28.                                
  29.                             </div>
  30.                             <div class="stat-wave">
  31.                                 <svg viewBox="0 0 500 150" preserveAspectRatio="none"><path d="M0,50 C150,150 350,0 500,50 L500,150 L0,150 Z"></path></svg>
  32.                             </div>
  33.                         </div>
  34.                     </div>
  35.                     <!-- Unités -->
  36.                     <div class="col-lg-3 col-md-6">
  37.                         <div class="stat-card">
  38.                             <div class="stat-icon">
  39.                                 <img src="/front/icons/unite.png" alt="Unités" class="img-fluid">
  40.                             </div>
  41.                            
  42.                             <div class="stat-content position-relative text-center">
  43.                                 <!-- Badge container with subtle border and shadow -->
  44.                                 <div class="stat-badge position-relative bg-white rounded-4 p-2 shadow-sm mb-3">
  45.                                     <!-- Animated counter number -->
  46.                                     <div class="stat-number counter display-3 fw-bold  mb-1" data-target="{{ nbrStructureRechercheUnite }}">0</div>
  47.                                 </div>
  48.                                 <!-- Title with animated underline -->
  49.                                 <h3 class="stat-title fs-5 fw-medium text-uppercase letter-spacing-1 position-relative d-inline-block px-3">
  50.                                     Unités
  51.                                     <span class="title-underline"></span>
  52.                                 </h3>
  53.                                 
  54.                             </div>
  55.                             <div class="stat-wave">
  56.                                 <svg viewBox="0 0 500 150" preserveAspectRatio="none"><path d="M0,50 C150,150 350,0 500,50 L500,150 L0,150 Z"></path></svg>
  57.                             </div>
  58.                         </div>
  59.                     </div>
  60.                     <!-- Projets -->
  61.                     <div class="col-lg-3 col-md-6">
  62.                         <div class="stat-card">
  63.                             <div class="stat-icon">
  64.                                 <img src="/front/icons/projet.png" alt="Projets" class="img-fluid">
  65.                             </div>
  66.                             
  67.                             <div class="stat-content position-relative text-center">
  68.                                 <!-- Badge container with subtle border and shadow -->
  69.                                 <div class="stat-badge position-relative bg-white rounded-4 p-2 shadow-sm mb-3">
  70.                                     <!-- Animated counter number -->
  71.                                     <div class="stat-number counter display-3 fw-bold  mb-1" data-target="{{ nbrProjet }}">0</div>
  72.                                 </div>
  73.                                 <!-- Title with animated underline -->
  74.                                 <h3 class="stat-title fs-5 fw-medium text-uppercase letter-spacing-1 position-relative d-inline-block px-3">
  75.                                     Projets
  76.                                     <span class="title-underline"></span>
  77.                                 </h3>
  78.                                
  79.                             </div>
  80.                             <div class="stat-wave">
  81.                                 <svg viewBox="0 0 500 150" preserveAspectRatio="none"><path d="M0,50 C150,150 350,0 500,50 L500,150 L0,150 Z"></path></svg>
  82.                             </div>
  83.                         </div>
  84.                     </div>
  85.                     <!-- Chercheurs -->
  86.                     <div class="col-lg-3 col-md-6">
  87.                         <div class="stat-card">
  88.                             <div class="stat-icon">
  89.                                 <img src="/front/icons/chercheurs.png" alt="Chercheurs" class="img-fluid">
  90.                                 
  91.                             </div>
  92.                             
  93.                             <div class="stat-content position-relative text-center">
  94.                                 <!-- Badge container with subtle border and shadow -->
  95.                                 <div class="stat-badge position-relative bg-white rounded-4 p-2 shadow-sm mb-3">
  96.                                     <!-- Animated counter number -->
  97.                                     <div class="stat-number counter display-3 fw-bold mb-1" data-target="{{ nbrChercheursInscrit }}">0</div>
  98.                                 </div>
  99.                                 <!-- Title with animated underline -->
  100.                                 <h3 class="stat-title fs-5 fw-medium text-uppercase letter-spacing-1 position-relative d-inline-block px-3">
  101.                                     Chercheurs
  102.                                     <span class="title-underline"></span>
  103.                                 </h3>
  104.                                
  105.                             </div>
  106.                             <div class="stat-wave">
  107.                                 <svg viewBox="0 0 500 150" preserveAspectRatio="none"><path d="M0,50 C150,150 350,0 500,50 L500,150 L0,150 Z"></path></svg>
  108.                             </div>
  109.                         </div>
  110.                     </div>
  111.                 </div>
  112.             </div>
  113.         </div>
  114.         <div class="research-structures-section py-5">
  115.             <div class="container">
  116.                 <!-- Titre -->
  117.                 <h2 class="section-title text-center mb-5">Nos Structures de Recherche</h2>
  118.                 <!-- Filtres améliorés -->
  119.                 <div class="filter-container mb-5">
  120.                     <form id="filterForm" class="filter-form">
  121.                         <div class="row g-3">
  122.                             <div class="col-md-4">
  123.                                 <div class="filter-group">
  124.                                     <label for="filterEtablissement" class="filter-label">Filtrer par établissement</label>
  125.                                     <select name="filterEtablissement" id="filterEtablissement" class="form-select filter-select">
  126.                                         <option value="">Tous les établissements</option>
  127.                                         {% for etablissement in etablissements %}
  128.                                             <option value="{{ etablissement.id }}">{{ etablissement.nomLong }}</option>
  129.                                         {% endfor %}
  130.                                     </select>
  131.                                 </div>
  132.                             </div>
  133.                             <div class="col-md-4">
  134.                                 <div class="filter-group">
  135.                                     <label for="filterDomaine" class="filter-label">Filtrer par domaine</label>
  136.                                     <select name="filterDomaine" id="filterDomaine" class="form-select filter-select">
  137.                                         <option value="">Tous les domaines</option>
  138.                                         {% for domaine in domaines %}
  139.                                             <option value="{{ domaine.id }}">{{ domaine.nomFr }}</option>
  140.                                         {% endfor %}
  141.                                     </select>
  142.                                 </div>
  143.                             </div>
  144.                             <div class="col-md-4">
  145.                                 <div class="filter-group">
  146.                                     <label for="filterStructure" class="filter-label">Filtrer par Structure</label>
  147.                                     <div class="input-with-icon">
  148.                                         <input type="text" id="filterStructure" class="form-control" placeholder="Rechercher par structure">
  149.                                         <i class="fas fa-search"></i>
  150.                                     </div>
  151.                                 </div>
  152.                             </div>
  153.                         </div>
  154.                     </form>
  155.                 </div>
  156.                 <!-- Cartes des structures -->
  157.                 <div id="structureLaboContainer" class="row g-4">
  158.                     {% for stru in structureLabo %}
  159.                         <div class="col-lg-4 col-md-6 mb-4 structure-card" data-etablissement="{{ stru.etablissement.id }}"
  160.                         data-structure="{{ stru.nomLong }}"
  161.                         data-domaine="{% if stru.domaine is not null %}{{ stru.domaine.id }}{% else %}{% endif %}">
  162.                         <a href="{{ path('app_laboratoire_details', {'id': stru.id}) }}">
  163.                             <div class="structure-card-inner">
  164.                                 <div class="card-image">
  165.                                     {% if stru.logo is not null %}
  166.                                         <img src="/upload/structures/{{ stru.logo }}" alt="{{ stru.nomCourt }}" class="img-fluid"
  167.                                         style="width: 80%; height: 80%;">
  168.                                     {% else %}
  169.                                         <img src="/front/icons/structure-recherche.png" alt="{{ stru.nomCourt }}" class="img-fluid"
  170.                                         style="width: 80%; height: 80%;">
  171.                                     {% endif %}
  172.                                     <div class="card-badge">{{ stru.type == 1 ? 'Unite': stru.type == 2 ? ' Laboratoire':'Unité de service commun'}}</div>
  173.                                 </div>
  174.                                 <div class="card-content">
  175.                                     <h3 class="card-title">{{ stru.nomLong }}</h3>
  176.                                     <div class="card-footer">
  177.                                         <span class="institution">{{ stru.etablissement.nomLong }}</span>
  178.                                         {% if stru.domaine is not null %}
  179.                                           {{ stru.domaine.nomFr }}
  180.                                       {% endif %}
  181.                                       <span class="view-more">Voir plus <i class="fas fa-arrow-right"></i></span>
  182.                                   </div>
  183.                               </div>
  184.                           </div>
  185.                       </a>
  186.                   </div>
  187.               {% endfor %}
  188.               <!-- ... -->
  189.           </div>
  190.       </div>
  191.   </div>
  192.         
  193.     </div>
  194. </section>
  195. <!-- #content end -->
  196. <script>
  197.     document.addEventListener('DOMContentLoaded', function() {
  198.         const filterForm = document.getElementById('filterForm');
  199.         const structureCards = document.querySelectorAll('.structure-card');
  200.         function filterStructures() {
  201.             const filterEtablissement = document.getElementById('filterEtablissement').value;
  202.             const filterDomaine = document.getElementById('filterDomaine').value;
  203.             const filterStructure = document.getElementById('filterStructure').value.toLowerCase();
  204.             structureCards.forEach(card => {
  205.                 const etablissement = card.getAttribute('data-etablissement');
  206.                 const domaine = card.getAttribute('data-domaine');
  207.                 const structure = card.getAttribute('data-structure').toLowerCase();
  208.                 let isVisible = true;
  209.                 if (filterEtablissement && etablissement !== filterEtablissement) {
  210.                     isVisible = false;
  211.                 }
  212.                 if (filterDomaine && domaine !== filterDomaine) {
  213.                     isVisible = false;
  214.                 }
  215.                 if (filterStructure && !structure.includes(filterStructure)) {
  216.                     isVisible = false;
  217.                 }
  218.                 card.style.display = isVisible ? 'block' : 'none';
  219.             });
  220.         }
  221.         filterForm.addEventListener('change', filterStructures);
  222.     });
  223. </script>
  224. <script>
  225.     // Animation des compteurs
  226.     document.addEventListener('DOMContentLoaded', function() {
  227.         const counters = document.querySelectorAll('.counter');
  228.         const speed = 200;
  229.         
  230.         function animateCounters() {
  231.             counters.forEach(counter => {
  232.                 const target = +counter.getAttribute('data-target');
  233.                 const count = +counter.innerText;
  234.                 const increment = target / speed;
  235.                 
  236.                 if (count < target) {
  237.                     counter.innerText = Math.ceil(count + increment);
  238.                     setTimeout(animateCounters, 1);
  239.                 } else {
  240.                     counter.innerText = target;
  241.                 }
  242.             });
  243.         }
  244.         
  245.         // Déclencher l'animation lorsque la section est visible
  246.         const observer = new IntersectionObserver((entries) => {
  247.             entries.forEach(entry => {
  248.                 if (entry.isIntersecting) {
  249.                     animateCounters();
  250.                     observer.unobserve(entry.target);
  251.                 }
  252.             });
  253.         }, { threshold: 0.5 });
  254.         
  255.         observer.observe(document.querySelector('.stats-section'));
  256.     });
  257. </script>
  258. {% endblock %}