templates/shared/menu_deroulant.html.twig line 1

Open in your IDE?
  1. {% block body %}
  2. <div class="your-class">
  3.    {% for property in properties %}
  4.         <div class="carousel-item position-relative">
  5.     <a href="{{ path('app_properties_show', { 'id': property.id }) }}">
  6.         {% if property.images|length > 0 %}
  7.             <img style="width: 450px; height: 400px;" src="{{ asset('images/properties/' ~ property.images[0].imagename) }}" alt="{{ property.title }}">
  8.             <h4 class="position-absolute text-white" style="bottom: 0; left: 0; right: 0; margin-bottom:0; background: linear-gradient(to top, rgba(0,0,0,0.9), rgba(255,255,255,0)); padding: 15px;">{{ property.title }}</h4>
  9.         {% else %}
  10.             <img src="{{ asset('images/no-image.png') }}" style="width: 450px; height: 400px;" alt="No image available">
  11.         {% endif %}
  12.     </a>
  13. </div>
  14.    {% endfor %}
  15. </div>
  16. {% endblock %}
  17. </div>
  18. {% block javascripts %}
  19. <script type="text/javascript">
  20. $(document).ready(function(){
  21.   $('.your-class').slick({
  22.     vertical: true,
  23.     infinite: true,
  24.     slidesToShow: 1,
  25.     slidesToScroll: 1,
  26.     autoplay: true,             
  27.     autoplaySpeed: 3500,    
  28.     arrows: false         
  29.       });
  30. });
  31. </script>
  32. {% endblock %}