templates/front/centres.html.twig line 1

Open in your IDE?
  1. {% extends 'front.html.twig' %}
  2. {% block title %}Nos centres | CIMEF-INTERNATIONAL{% endblock %}
  3. {% block styleSheets %}
  4. <style id='wp-emoji-styles-inline-css' type='text/css'>
  5. #map {
  6.     height: 500px;
  7.     width: 100%;
  8. }
  9. .title{
  10.     font-family: arial;
  11.     font-weight: bolder;
  12. }
  13. .wrap_header_banner .overlay-slider {
  14.     position: absolute;
  15.     top: 0;
  16.     left: 0;
  17.     padding-top: 30px; 
  18.     width: 100%;
  19.     height: 100%;
  20.     background-color: rgba(0, 0, 0, 0.6392156863);
  21. }
  22. .card_centre{
  23.     /*border: 1px solid #ededed;*/
  24.     border-radius: 5px; 
  25.     margin: 10px;
  26. }
  27. .card_centre:hover{
  28.     box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
  29. }
  30. .text-center{
  31.     text-align: center;
  32.     padding: 10px;
  33.     margin-top: -10px;
  34. }
  35. .titre-formation{
  36.     font-weight: bold; 
  37.     font-size: 16px !important; 
  38.     font-family: arial; 
  39.     color: #051a53;
  40. }
  41. /*# sourceURL=wp-emoji-styles-inline-css */
  42. </style>
  43. {% endblock %}
  44. {% block mapjs %}
  45.     <link rel="stylesheet" href="https://unpkg.com/leaflet@1.9.4/dist/leaflet.css"/>
  46.     <script src="https://unpkg.com/leaflet@1.9.4/dist/leaflet.js"></script>
  47. {% endblock %}
  48. {% block body %}
  49. {% include 'section/navbar.html.twig' %}
  50. <div class="wrap_header_banner" style="height: 200px; background: url({{ asset('public/inter/wp-content/uploads/2023/06/header-banner.jpg')}});">
  51.     <div class="overlay-slider">
  52.         <div class="row_site">
  53.             <div class="container_site">
  54.                 <div class="cover_color"></div>
  55.                 <div class="header_banner_el">
  56.                     <div class="header_breadcrumbs">
  57.                         <div id="breadcrumbs">
  58.                         <ul class="breadcrumb">
  59.                             <li><a href="{{ path('front.inter.index') }}" style="color: #fff!important;" title="accueil">Accueil</a></li>
  60.                             <li class="li_separator"><span class="separator"><i class="ovaicon-next" style="color: #fff!important;"></i></span></li>
  61.                             <li style="color: #fff!important;">Nos centres</li>
  62.                         </ul>
  63.                         </div>
  64.                     </div>
  65.                     <h1 class="header_title" style="color: #fff!important;">Nos centres </h1>
  66.                 </div>
  67.             </div>
  68.         </div>
  69.     </div>
  70. </div>
  71. <div style="padding-top: 50px; padding-bottom: 50px;" data-elementor-type="wp-page" data-elementor-id="405" class="elementor elementor-405">
  72.    <section class="elementor-section elementor-top-section elementor-element elementor-element-574990e elementor-section-boxed elementor-section-height-default elementor-section-height-default" data-id="574990e" data-element_type="section">
  73.       <div class="elementor-container elementor-column-gap-no">
  74.          <div class="elementor-column elementor-col-120 elementor-top-column elementor-element elementor-element-eabb843" data-id="eabb843" data-element_type="column">
  75.             <div class="elementor-widget-wrap elementor-element-populated">
  76.                <div class="elementor-element elementor-element-a45a98c elementor-widget elementor-widget-gimont_elementor_heading" data-id="a45a98c" data-element_type="widget" data-widget_type="gimont_elementor_heading.default">
  77.                   <div class="elementor-widget-container">
  78.                      <div class="ova-heading template_1" style="padding-left: 50px; padding-right: 50px;">
  79.                         <span class="line"></span>
  80.                         <span class="subtitle">Nos centres</span>
  81.                         <h2 class="title" style="font-size: 28px;">Nos centres de formations</h2>
  82.         
  83.                         <p class="desc" style="margin-top: -20px;">
  84.                             Présent à Abidjan, Paris, Dakar et Casablanca, le CIMEF vous accompagne dans vos projets de formation, de reconversion professionnelle ou de 
  85.                             développement d’entreprise.Nos équipes locales sont disponibles pour vous conseiller et répondre à toutes vos questions sous 24h.</p>
  86.                      <br>
  87.                         <div class="row">
  88.                             {% if ville != null %}
  89.                                 {% for vil in ville %}
  90.                                 <div class="col-lg-4 col-md-4 col-sm-12">
  91.                                     <a href="{{ path('front.detail.centre',{'slug': vil.slug}) }}">
  92.                                     <div class="card_centre">
  93.                                         {% if vil.image !=null %}
  94.                                             <img loading="lazy" style="border-top-left-radius: 5px; border-top-right-radius: 5px; width: 100%; height: 250px;" src="{{ asset('public/uploads/images/actualites/' ~ vil.image) }}" 
  95.                                             class="attachment-ovaev_event_thumbnail size-ovaev_event_thumbnail wp-post-image" alt="{{ vil.nom }}" decoding="async" 
  96.                                             srcset="{{ asset('public/uploads/images/centres/' ~ vil.image) }}" sizes="(max-width: 600px) 100vw, 600px" />
  97.                                         {% else %}
  98.                                             <img loading="lazy" style="width: 100%; height: 250px;" src="{{ asset('public/inter/logo-inter.jpg') }}" 
  99.                                             class="attachment-ovaev_event_thumbnail size-ovaev_event_thumbnail wp-post-image" alt="Logo CIMEF INTERNATIONAL"
  100.                                             sizes="(max-width: 600px) 100vw, 600px"/>
  101.                                         {% endif %}
  102.                                         <div class="text-center">
  103.                                             <h2 class="titre-formation">{{ vil.nom }}</h2>
  104.                                         </div>
  105.                                     </div>
  106.                                     </a>
  107.                                 </div>
  108.                                 {% endfor %}
  109.                             {% endif %}
  110.                         </div>
  111.                      </div>
  112.                      <div style="margin-top: 80px; margin-bottom: 80px; border: 7px solid #ededed;">
  113.                          <div id="map"></div>
  114.                      </div>
  115.                          
  116.                   </div>
  117.                </div>
  118.             </div>
  119.          </div>
  120.       </div>
  121.    </section>
  122.    
  123.   <script>
  124.   /*
  125.     // Icône personnalisée
  126.     var customIcon = L.icon({
  127.         iconUrl: 'https://raw.githubusercontent.com/pointhi/leaflet-color-markers/master/img/marker-icon-red.png',
  128.         shadowUrl: 'https://cdnjs.cloudflare.com/ajax/libs/leaflet/1.7.1/images/marker-shadow.png',
  129.         iconSize: [25, 41],
  130.         iconAnchor: [12, 41],
  131.         popupAnchor: [1, -34]
  132.     });
  133.     // Layers de base
  134.     var planLayer = L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
  135.         attribution: '&copy; OpenStreetMap contributors'
  136.     });
  137.     var satelliteLayer = L.tileLayer(
  138.         'https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}',
  139.         {
  140.             attribution: '© Esri, Maxar'
  141.         }
  142.     );
  143.     // Initialisation de la carte (Plan par défaut)
  144.     var map = L.map('map', {
  145.         center: [20, 0],
  146.         zoom: 2,
  147.         layers: [planLayer]
  148.     });
  149.     // Bouton Plan / Satellite
  150.     L.control.layers({
  151.         "Plan": planLayer,
  152.         "Satellite": satelliteLayer
  153.     }).addTo(map);
  154.     // Données venant de Twig
  155.     var locations = {{ locations|json_encode|raw }};
  156.     var markers = [];
  157.     
  158.     locations.forEach(function(location) {
  159.     var marker = L.marker([location.lat, location.lng], { icon: customIcon })
  160.         .addTo(map)
  161.         .bindPopup(`
  162.             <strong>${location.ville}</strong><br>
  163.             <a href="https://www.google.com/maps?q=&layer=c&cbll=${location.lat},${location.lng}"
  164.                target="_blank">
  165.                Voir Street View
  166.             </a>
  167.         `);
  168.     markers.push(marker);
  169. });
  170. // Zoom + ouverture popup
  171.     function zoomOn(lat, lng) {
  172.         map.setView([lat, lng], 12);
  173.         markers.forEach(function(marker) {
  174.             var position = marker.getLatLng();
  175.             if (position.lat === lat && position.lng === lng) {
  176.                 marker.openPopup();
  177.             }
  178.         });
  179.     }
  180.         
  181.     */
  182. </script>
  183.  
  184.    
  185. <script>
  186.     var customIcon = L.icon({
  187.         iconUrl: 'https://raw.githubusercontent.com/pointhi/leaflet-color-markers/master/img/marker-icon-red.png', // Changer ici pour une autre couleur
  188.         shadowUrl: 'https://cdnjs.cloudflare.com/ajax/libs/leaflet/1.7.1/images/marker-shadow.png',
  189.         iconSize: [25, 41],  // Taille du marqueur
  190.         iconAnchor: [12, 41], // Ancre du marqueur
  191.         popupAnchor: [1, -34] // Position du popup
  192.     });
  193.     
  194.     var map = L.map('map').setView([20, 0], 2); // Vue centrée sur la France
  195.     L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
  196.         attribution: '&copy; OpenStreetMap contributors'
  197.     }).addTo(map);
  198.     var locations = {{ locations|json_encode|raw }};
  199.     var markers = [];
  200.     locations.forEach(function(location) {
  201.         var marker = L.marker([location.lat, location.lng], { icon: customIcon }).addTo(map)
  202.             .bindPopup(location.ville);
  203.         markers.push(marker);
  204.     });
  205.     function zoomOn(lat, lng) {
  206.         map.setView([lat, lng], 12); // Zoom sur la position
  207.     }
  208.     function zoomOn(lat, lng) {
  209.         map.setView([lat, lng], 12);
  210.         
  211.         // Trouver et ouvrir la popup du marqueur correspondant
  212.         markers.forEach(function(marker) {
  213.         var position = marker.getLatLng();
  214.         if (position.lat === lat && position.lng === lng) {
  215.             marker.openPopup();
  216.         }
  217.     });
  218. }
  219. </script>
  220.    
  221. </div>
  222. {% include 'section/footer.html.twig' %}               
  223. {% endblock %}