templates/office/index.html.twig line 1

Open in your IDE?
  1. {% extends 'base.html.twig' %}
  2. {% block title %}{{ setting.siteName }} : nos offices{% endblock %}
  3. {% block body %}
  4. <section class="container py-4">
  5.     <div class="row pt-3">
  6.         <div class="col">
  7.             {# Breadcrumbs #}
  8.             <div class="row">
  9.                 <div class="col small">
  10.                     <nav style="--bs-breadcrumb-divider: url(&#34;data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8'%3E%3Cpath d='M2.5 0L1 1.5 3.5 4 1 6.5 2.5 8l4-4-4-4z' fill='%236c757d'/%3E%3C/svg%3E&#34;);"
  11.                         aria-label="breadcrumb">
  12.                         <ol class="breadcrumb small">
  13.                             <li class="breadcrumb-item"><a href="{{ path('app_home') }}"
  14.                                     class="text-decoration-none text-dark">Accueil</a></li>
  15.                             <li class="breadcrumb-item active" aria-current="page">Nos offices</li>
  16.                         </ol>
  17.                     </nav>
  18.                 </div>
  19.             </div>
  20.         </div>
  21.     </div>
  22.     <div class="row my-5">
  23.         <div class="col text-center">
  24.             <h1 class="color1 fw-700 text-uppercase" data-aos="fade-down" data-aos-duration="2000">{{ setting.officeTitre }}</h1>
  25.         </div>
  26.     </div>
  27.     <div class="row row row-cols-1 row-cols-md-3 g-4 mb-3">
  28.         {% for office in offices %}
  29.         <div class="col-lg-4 col-sm-12 offices-cards">
  30.             <div class="card h-100">
  31.                 <div class="card-body">
  32.                     <a href="{{ path('app_office_show', {'slug': office.slug}) }}" class="text-decoration-none text-dark">
  33.                         <h5 class="card-title color2 text-uppercase" data-aos="fade-left" data-aos-duration="2000">
  34.                             {{ office.titre }}
  35.                         </h5>
  36.                         <div class="card-text">
  37.                             <i class="bi bi-geo-alt-fill color2 me-2"></i>
  38.                             <span class="small">
  39.                                 {{ office.adresse }}
  40.                             </span>
  41.                             <br>
  42.                             <i class="bi bi-telephone-fill color2 me-2"></i>
  43.                             <span class="small">
  44.                                 {{ office.telephone }}
  45.                             </span>
  46.                             <div class="mt-4 hoverimage " style="height: 350px; position: relative;">
  47.                                 <div class="offices-color" data-aos="flip-left" data-aos-duration="2500" style="position: absolute; width: 100%; height: 100%; background-size: cover; background-repeat: no-repeat; background-position: center; background-image: url('{{ asset('assets/img/offices/' ~ office.imageBleu)|imagine_filter('offices') }}')">
  48.                                 </div>
  49.                                 <div class="offices-color nodisplay" style="position: absolute; height: 100%; width: 100%; background-size: cover; background-repeat: no-repeat; background-position: center; background-image: url('{{ asset('assets/img/offices/' ~ office.image)|imagine_filter('offices') }}')">
  50.                                 </div>
  51.                             </div>
  52.                             <div class="mt-4">
  53.                                 {{ office.presentation|replace({
  54.                                         '<div>': '<span>',
  55.                                         '</div>': '</span>',
  56.                                         '<p>': '<br><br>',
  57.                                         '</p>': '</span>',
  58.                                     })|raw }}
  59.                             </div>
  60.                         </div>
  61.                     </a>
  62.                 </div>
  63.             </div>
  64.         </div>
  65.         {% endfor %}
  66.     </div>
  67.     <div class="row row row-cols-1 row-cols-md-3">
  68.         {% for office in offices %}
  69.         <div class="col-lg-4 col-sm-12 offices-cards mobile-offices-cards-bg">
  70.             <div class="card h-100">
  71.                 <div class="card-body">
  72.                         {# <iframe src="{{ office.map }}" width="100%" height="400" style="border:0; border-radius: 50%;" allowfullscreen="" loading="lazy" referrerpolicy="no-referrer-when-downgrade"></iframe> #}
  73.                         <div class="googlemapsembed" data-url="{{ office.map }}" width="100%" height="400"></div>
  74.                     <div class="mt-4 text-center text-white small">
  75.                         {% if office.metro != null %}
  76.                         <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
  77.                             aria-hidden="true" role="img" class="iconify iconify--maki color2" width="25" height="25"
  78.                             preserveAspectRatio="xMidYMid meet" viewBox="0 0 15 15">
  79.                             <path fill="currentColor"
  80.                                 d="M5.5 0s-.75 0-1 1L3 6.5V10c0 1 1 1 1 1h7s1 0 1-1V6.5L10.5 1c-.273-1-1-1-1-1h-4zm1 1.5h2s.536 0 .75 1L10 6c.215 1.002-1 1-1 1H6s-1.215.002-1-1l.75-3.5c.214-1 .75-1 .75-1zM5 8a1 1 0 1 1 0 2a1 1 0 0 1 0-2zm1.75 0h1.5a.25.25 0 1 1 0 .5h-1.5a.25.25 0 1 1 0-.5zM10 8a1 1 0 1 1 0 2a1 1 0 0 1 0-2zm-5.875 4L3 15h1.5l.375-1h5.25l.375 1H12l-1.125-3h-1.5l.375 1h-4.5l.375-1h-1.5z">
  81.                             </path>
  82.                         </svg>
  83.                         {{ office.metro|replace({
  84.                                 '<p>': '<span>',
  85.                                 '</p>': '</span>'
  86.                             })|raw }}<br><br>
  87.                         {% endif %}
  88.                         {% if office.bus != null %}
  89.                         <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
  90.                             aria-hidden="true" role="img" class="iconify iconify--bxs color2" width="25" height="25"
  91.                             preserveAspectRatio="xMidYMid meet" viewBox="0 0 24 24">
  92.                             <path fill="currentColor"
  93.                                 d="M21 6.021c.003-.146-.007-1.465-1.3-2.735C18.427 2.036 17.143 2 17 2H6.996c-.239 0-1.493.063-2.708 1.302C3.036 4.578 3 5.859 3 6v3H2v3h1v6c0 .734.406 1.373 1 1.721V21a1 1 0 0 0 1 1h1a1 1 0 0 0 1-1v-1h10v1a1 1 0 0 0 1 1h1a1 1 0 0 0 1-1v-1.277A1.99 1.99 0 0 0 21 18v-6h1V9h-1V6.021zM9 4h6v2H9V4zM6.5 18a1.5 1.5 0 1 1 .001-3.001A1.5 1.5 0 0 1 6.5 18zm4.5-5H5V8h6v5zm6.5 5a1.5 1.5 0 1 1 .001-3.001A1.5 1.5 0 0 1 17.5 18zm1.5-5h-6V8h6v5z">
  94.                             </path>
  95.                         </svg>
  96.                         {{ office.bus|replace({
  97.                                 '<p>': '<span>',
  98.                                 '</p>': '</span>'
  99.                             })|raw }}<br><br>
  100.                         {% endif %}
  101.                         {% if office.parking != null %}
  102.                         <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
  103.                             aria-hidden="true" role="img" class="iconify iconify--ri color2" width="25" height="25"
  104.                             preserveAspectRatio="xMidYMid meet" viewBox="0 0 24 24">
  105.                             <path fill="currentColor"
  106.                                 d="M11 14h1.5a3.5 3.5 0 0 0 0-7H9v10h2v-3zM4 3h16a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1zm7 6h1.5a1.5 1.5 0 0 1 0 3H11V9z">
  107.                             </path>
  108.                         </svg>
  109.                         {{ office.parking|replace({
  110.                                 '<p>': '<span>',
  111.                                 '</p>': '</span>'
  112.                             })|raw }}<br><br>
  113.                         {% endif %}
  114.                         {% if office.accesPmr != null %}
  115.                         <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
  116.                             aria-hidden="true" role="img" class="iconify iconify--bx color2" width="25" height="25"
  117.                             preserveAspectRatio="xMidYMid meet" viewBox="0 0 24 24">
  118.                             <circle cx="9" cy="4" r="2" fill="currentColor"></circle>
  119.                             <path fill="currentColor"
  120.                                 d="M16.98 14.804A1 1 0 0 0 16 14h-4.133l-.429-3H16V9h-4.847l-.163-1.142A1 1 0 0 0 10 7H9a1.003 1.003 0 0 0-.99 1.142l.877 6.142A2.009 2.009 0 0 0 10.867 16h4.313l.839 4.196c.094.467.504.804.981.804h3v-2h-2.181l-.839-4.196z">
  121.                             </path>
  122.                             <path fill="currentColor"
  123.                                 d="M12.51 17.5c-.739 1.476-2.25 2.5-4.01 2.5A4.505 4.505 0 0 1 4 15.5a4.503 4.503 0 0 1 2.817-4.167l-.289-2.025C3.905 10.145 2 12.604 2 15.5C2 19.084 4.916 22 8.5 22a6.497 6.497 0 0 0 5.545-3.126l-.274-1.374H12.51z">
  124.                             </path>
  125.                         </svg>
  126.                         {{ office.accesPmr|replace({
  127.                                 '<p>': '<span>',
  128.                                 '</p>': '</span>'
  129.                             })|raw }}<br><br>
  130.                         {% endif %}
  131.                     </div>
  132.                 </div>
  133.             </div>
  134.         </div>
  135.         {% endfor %}
  136.     </div>
  137. </section>
  138. <section class="container-fluid offices-cards-prefooter">
  139. </section>
  140. <script>
  141.     let imageContainer = document.querySelectorAll('.hoverimage');
  142.     imageContainer.forEach(container => {
  143.         container.addEventListener('mouseover', function() {
  144.             let bgImage = container.children[1];
  145.             if (bgImage.classList.contains('nodisplay') != false)
  146.             {
  147.                 bgImage.classList.remove('nodisplay');
  148.             }
  149.         })
  150.         container.addEventListener('mouseleave', function() {
  151.             let bgImage = container.children[1];
  152.             if (bgImage.classList.contains('nodisplay') == false)
  153.             {
  154.                 bgImage.classList.add('nodisplay');
  155.             }
  156.         })
  157.     })
  158. </script>
  159. {% endblock %}