templates/_partials/home/services-section.html.twig line 1

Open in your IDE?
  1. <div class="bg_color_1 pt-0 mt-5 container container-custom margin_80_0">
  2.     <div class="">
  3.         <h2 class="mb-2">{{ 'home.bonCoinsDivertissant'|trans([],'home_page') }}</h2>
  4.         <p>
  5.             {{ 'home.sloganData'|trans([],'home_page') }}
  6.         </p>
  7.     </div>
  8.     {% for category in categories %}
  9.         {% if category.attractions |length != 0 %}
  10.             <div class="row d-flex flex-row mb-md-5" id="#{{ category.name }}">
  11.                 <div class="col-12 col-md-3 d-flex mr-2 mb-3">
  12.                     <div class="d-flex text-dark justify-content-center align-items-center"
  13.                          style="width: 100%;  border-radius: 7px; margin-right: 10px; background-color: initial; box-shadow: 0 0px 1px rgba(0, 0, 0, 0.0);">
  14.                         <h3 class="card-title text-center" style="color: #bd2879 !important; "><a
  15.                                     href="{{ path('app_coin_by_category', {'category': category.id, 'name': category.slug }) }}"><i
  16.                                         class="{{ category.icone is not defined ? '' : category.icone }}"
  17.                                         style="color: #1e90a0;"></i>&nbsp;{{ category.name }}</a></h3>
  18.                     </div>
  19.                 </div>
  20.                 <div class="carousel-container col-12 col-md-9 d-flex flex-row">
  21.                     <div class="mon-carousel">
  22.                         {% for attraction in category.attractions %}
  23.                             <div class="ma-card" style="width: 100%; position: relative;">
  24.                                 <span class="text-center"
  25.                                       style="position: absolute; top: 5px; right: 5px; font-size: 30px; z-index: 10;  color: #ff0000; background-color: white; height: 45px; width: 45px; border-radius: 5px 10px; border: 1px solid black;">
  26.                                     {% set isFavorite = false %}
  27.                                     {% set favorite_id = 0 %}
  28.                                     {% if isAuthenticated %}
  29.                                         {% for favorite in attraction.favorites %}
  30.                                             {% if favorite.user is defined and favorite.user.id is defined and user is defined and user.id is defined %}
  31.                                                 {% if favorite.user.id == user.id %}
  32.                                                     {% set isFavorite = true %}
  33.                                                     {% set favorite_id = favorite.id %}
  34.                                                 {% endif %}
  35.                                             {% endif %}
  36.                                         {% endfor %}
  37.                                     {% endif %}
  38.                                     {% set favoritePath = isFavorite ? path('services_delete_favory', {'id': favorite_id }) : path('app_add_favorite', {'id': attraction.id }) %}
  39.                                       <a href="{{ favoritePath }}">
  40.                                           {% if isFavorite %}
  41.                                               <i class="fas fa-heart"></i>
  42.                                           {% else %}
  43.                                               <i class="far fa-heart"></i>
  44.                                           {% endif %}
  45.                                       </a>
  46.                                 </span>
  47.                                 <figure style="position: relative">
  48.                                     <a href="{{ path('app_services_attraction', {'id': attraction.id}) }}">
  49.                                         <div class="height-img-carousel" style="width: 100%">
  50.                                             <img src="{{ attraction.url | length > 0 ? attraction.url : asset('build/images/autres/1-600.c14c1b04.jpg') }}"
  51.                                                  class="" alt="{{ attraction.name | title }}"
  52.                                                  style="width: 100%; border-radius: 8px; vertical-align: middle; min-height: 200px;">
  53.                                         </div>
  54.                                     </a>
  55.                                 </figure>
  56.                                 <div class="mt-2">
  57.                                     <h6 style="font-weight: 700; padding-bottom: 0px !important; margin-bottom: 0px; display: flex; justify-content: space-between; align-items: center;">
  58.                                         <a class="text-dark"
  59.                                            href="{{ path('app_services_attraction', {'id': attraction.id}) }}">{{ attraction.name | title }}</a>
  60.                                         {% if attraction.isCertify == true %}
  61.                                             <span style="font-size: 25px; color: #3982f8;"><i
  62.                                                         class="fas fa-badge-check"></i></span>
  63.                                         {% endif %}
  64.                                     </h6>
  65.                                     {% if attraction.address | length > 0 %}
  66.                                         <span style="font-weight: 600"><i class="far fa-map-marker-alt"
  67.                                                                           style="font-size: 15px; color: #e6007e;"></i>&nbsp;{{ attraction.address.neighborhood | title }} {{ attraction.address.neighborhood | length > 0 ? ',': '' }} {{ attraction.address.city | title }}, {{ attraction.address.country | country_name('fr') }}</span>
  68.                                     {% endif %}
  69.                                     <p style="font-size: 13px;">
  70.                                         <span class="badge bg-dark">{{ attraction.rate is defined ? attraction.rate : 0 }}</span>&nbsp;
  71.                                         {% if attraction.price is defined and attraction.price != 0 %}
  72.                                             {{ 'home.fourchettePrix'|trans({'price':attraction.price | number_format(0, '.'), 'device': attraction.currency  },'home_page') | raw }}
  73.                                         {% else %}
  74.                                             Prix non disponible
  75.                                         {% endif %}
  76.                                     </p>
  77.                                 </div>
  78.                             </div>
  79.                         {% endfor %}
  80.                         <div class="ma-card d-flex justify-content-center align-items-center"
  81.                              style="width: 100%; position: relative; border: 2px solid #c5c5c5; border-radius: 20px; box-shadow: rgba(0, 0, 0, 0.16) 0px 3px 6px, rgba(0, 0, 0, 0.23) 0px 3px 6px;">
  82.                             <h3 class="card-title text-center"
  83.                                 style="color: #bd2879 !important; border-radius: 20px;  ">
  84.                                 <a href="{{ path('app_coin_by_category', {'category': category.id, 'name': category.slug }) }}"
  85.                                    style="font-size: 30px;">
  86.                                     Voir plus&nbsp; <i class="fas fa-chevron-circle-right"></i>
  87.                                 </a>
  88.                             </h3>
  89.                         </div>
  90.                     </div>
  91.                     <button class="prev-button hide">&lt;</button>
  92.                     <button class="next-button">&gt;</button>
  93.                 </div>
  94.             </div>
  95.         {% endif %}
  96.     {% endfor %}
  97. </div>