templates/parts/slider.html.twig line 1

Open in your IDE?
  1. <div id="carouselBlock" class="carousel slide carousel-fade mb-10 carousel-big-controls" data-bs-ride="carousel">
  2.     <div class="carousel-inner">
  3.         {% set first = 0 %}
  4.         {% for item in carousel %}
  5.             <div class="carousel-item {% if first == 0 %}active{% endif %}">
  6.                 {% set filePath = '/uploads/'~item.image.file %}
  7.                 <a href="{{ path('app_city_news_detail', {'city':center.url, 'url':item.url}) }}" title="{{ item.title }}"><img
  8.                             src="{{ asset(filePath) }}" class="d-block w-100" alt="{{ item.title }}"></a>
  9.                 <a href="{{ path('app_city_news_detail', {'city':center.url, 'url':item.url}) }}" class="card card-arrow bg-white text-red-hover"  title="{{ item.title }}">
  10.                     <div class="card-body">
  11.                         <h5 class="card-title">{{ item.title }}</h5>
  12.                     </div>
  13.                 </a>
  14.             </div>
  15.             {% set first = first+1 %}
  16.         {% endfor %}
  17.         <div class="carousel-item {% if first == 0 %}active{% endif %}">
  18.             <img src="{{ asset('assets/images/homepage/shopping-mall.jpg') }}"
  19.                  class="d-block w-100 {% if first == 0 %}active{% endif %}" alt="{{ center.title }}">
  20.             <div class="carousel-caption">
  21.                 <h5 class="carousel-title black">{{ center.title }}</h5>
  22.                 {% set openingHour = center.openingHours.first %}
  23.                 <p class="carousel-description black">Otvorené do {{ openingHour.timeTill|date('H:i') }} h.</p>
  24.             </div>
  25.         </div>
  26.     </div>
  27.     <button class="carousel-control-prev" type="button" data-bs-target="#carouselBlock" data-bs-slide="prev">
  28.         <span class="carousel-control-prev-icon" aria-hidden="true"></span>
  29.         <span class="visually-hidden">Previous</span>
  30.     </button>
  31.     <button class="carousel-control-next" type="button" data-bs-target="#carouselBlock" data-bs-slide="next">
  32.         <span class="carousel-control-next-icon" aria-hidden="true"></span>
  33.         <span class="visually-hidden">Next</span>
  34.     </button>
  35. </div>