templates/fronts/list_laboratoires.html.twig line 1
{% extends 'base_front.html.twig' %}{% block title %}Hello DefaultController!{% endblock %}{% block body %}<!-- Content ============================================= --><section id="content"><div class="col-mt-30"><div class="stats-section py-5"><div class="container"><div class="row g-4 justify-content-center"><!-- Laboratoires --><div class="col-lg-3 col-md-6"><div class="stat-card"><div class="stat-icon"><img src="/front/icons/structure.png" alt="Laboratoires" class="img-fluid"></div><div class="stat-content position-relative text-center"><!-- Badge container with subtle border and shadow --><div class="stat-badge position-relative bg-white rounded-4 p-2 shadow-sm mb-3"><!-- Animated counter number --><div class="stat-number counter display-3 fw-bold mb-1" data-target="{{ nbrStructureRechercheLabo }}">0</div></div><!-- Title with animated underline --><h3 class="stat-title fs-5 fw-medium text-uppercase letter-spacing-1 position-relative d-inline-block px-3">Laboratoires<span class="title-underline"></span></h3></div><div class="stat-wave"><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></div></div></div><!-- Unités --><div class="col-lg-3 col-md-6"><div class="stat-card"><div class="stat-icon"><img src="/front/icons/unite.png" alt="Unités" class="img-fluid"></div><div class="stat-content position-relative text-center"><!-- Badge container with subtle border and shadow --><div class="stat-badge position-relative bg-white rounded-4 p-2 shadow-sm mb-3"><!-- Animated counter number --><div class="stat-number counter display-3 fw-bold mb-1" data-target="{{ nbrStructureRechercheUnite }}">0</div></div><!-- Title with animated underline --><h3 class="stat-title fs-5 fw-medium text-uppercase letter-spacing-1 position-relative d-inline-block px-3">Unités<span class="title-underline"></span></h3></div><div class="stat-wave"><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></div></div></div><!-- Projets --><div class="col-lg-3 col-md-6"><div class="stat-card"><div class="stat-icon"><img src="/front/icons/projet.png" alt="Projets" class="img-fluid"></div><div class="stat-content position-relative text-center"><!-- Badge container with subtle border and shadow --><div class="stat-badge position-relative bg-white rounded-4 p-2 shadow-sm mb-3"><!-- Animated counter number --><div class="stat-number counter display-3 fw-bold mb-1" data-target="{{ nbrProjet }}">0</div></div><!-- Title with animated underline --><h3 class="stat-title fs-5 fw-medium text-uppercase letter-spacing-1 position-relative d-inline-block px-3">Projets<span class="title-underline"></span></h3></div><div class="stat-wave"><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></div></div></div><!-- Chercheurs --><div class="col-lg-3 col-md-6"><div class="stat-card"><div class="stat-icon"><img src="/front/icons/chercheurs.png" alt="Chercheurs" class="img-fluid"></div><div class="stat-content position-relative text-center"><!-- Badge container with subtle border and shadow --><div class="stat-badge position-relative bg-white rounded-4 p-2 shadow-sm mb-3"><!-- Animated counter number --><div class="stat-number counter display-3 fw-bold mb-1" data-target="{{ nbrChercheursInscrit }}">0</div></div><!-- Title with animated underline --><h3 class="stat-title fs-5 fw-medium text-uppercase letter-spacing-1 position-relative d-inline-block px-3">Chercheurs<span class="title-underline"></span></h3></div><div class="stat-wave"><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></div></div></div></div></div></div><div class="research-structures-section py-5"><div class="container"><!-- Titre --><h2 class="section-title text-center mb-5">Nos Structures de Recherche</h2><!-- Filtres améliorés --><div class="filter-container mb-5"><form id="filterForm" class="filter-form"><div class="row g-3"><div class="col-md-4"><div class="filter-group"><label for="filterEtablissement" class="filter-label">Filtrer par établissement</label><select name="filterEtablissement" id="filterEtablissement" class="form-select filter-select"><option value="">Tous les établissements</option>{% for etablissement in etablissements %}<option value="{{ etablissement.id }}">{{ etablissement.nomLong }}</option>{% endfor %}</select></div></div><div class="col-md-4"><div class="filter-group"><label for="filterDomaine" class="filter-label">Filtrer par domaine</label><select name="filterDomaine" id="filterDomaine" class="form-select filter-select"><option value="">Tous les domaines</option>{% for domaine in domaines %}<option value="{{ domaine.id }}">{{ domaine.nomFr }}</option>{% endfor %}</select></div></div><div class="col-md-4"><div class="filter-group"><label for="filterStructure" class="filter-label">Filtrer par Structure</label><div class="input-with-icon"><input type="text" id="filterStructure" class="form-control" placeholder="Rechercher par structure"><i class="fas fa-search"></i></div></div></div></div></form></div><!-- Cartes des structures --><div id="structureLaboContainer" class="row g-4">{% for stru in structureLabo %}<div class="col-lg-4 col-md-6 mb-4 structure-card" data-etablissement="{{ stru.etablissement.id }}"data-structure="{{ stru.nomLong }}"data-domaine="{% if stru.domaine is not null %}{{ stru.domaine.id }}{% else %}{% endif %}"><a href="{{ path('app_laboratoire_details', {'id': stru.id}) }}"><div class="structure-card-inner"><div class="card-image">{% if stru.logo is not null %}<img src="/upload/structures/{{ stru.logo }}" alt="{{ stru.nomCourt }}" class="img-fluid"style="width: 80%; height: 80%;">{% else %}<img src="/front/icons/structure-recherche.png" alt="{{ stru.nomCourt }}" class="img-fluid"style="width: 80%; height: 80%;">{% endif %}<div class="card-badge">{{ stru.type == 1 ? 'Unite': stru.type == 2 ? ' Laboratoire':'Unité de service commun'}}</div></div><div class="card-content"><h3 class="card-title">{{ stru.nomLong }}</h3><div class="card-footer"><span class="institution">{{ stru.etablissement.nomLong }}</span>{% if stru.domaine is not null %}{{ stru.domaine.nomFr }}{% endif %}<span class="view-more">Voir plus <i class="fas fa-arrow-right"></i></span></div></div></div></a></div>{% endfor %}<!-- ... --></div></div></div></div></section><!-- #content end --><script>document.addEventListener('DOMContentLoaded', function() {const filterForm = document.getElementById('filterForm');const structureCards = document.querySelectorAll('.structure-card');function filterStructures() {const filterEtablissement = document.getElementById('filterEtablissement').value;const filterDomaine = document.getElementById('filterDomaine').value;const filterStructure = document.getElementById('filterStructure').value.toLowerCase();structureCards.forEach(card => {const etablissement = card.getAttribute('data-etablissement');const domaine = card.getAttribute('data-domaine');const structure = card.getAttribute('data-structure').toLowerCase();let isVisible = true;if (filterEtablissement && etablissement !== filterEtablissement) {isVisible = false;}if (filterDomaine && domaine !== filterDomaine) {isVisible = false;}if (filterStructure && !structure.includes(filterStructure)) {isVisible = false;}card.style.display = isVisible ? 'block' : 'none';});}filterForm.addEventListener('change', filterStructures);});</script><script>// Animation des compteursdocument.addEventListener('DOMContentLoaded', function() {const counters = document.querySelectorAll('.counter');const speed = 200;function animateCounters() {counters.forEach(counter => {const target = +counter.getAttribute('data-target');const count = +counter.innerText;const increment = target / speed;if (count < target) {counter.innerText = Math.ceil(count + increment);setTimeout(animateCounters, 1);} else {counter.innerText = target;}});}// Déclencher l'animation lorsque la section est visibleconst observer = new IntersectionObserver((entries) => {entries.forEach(entry => {if (entry.isIntersecting) {animateCounters();observer.unobserve(entry.target);}});}, { threshold: 0.5 });observer.observe(document.querySelector('.stats-section'));});</script>{% endblock %}