templates/frontend/banner/_banner.html.twig line 1

  1. {% if banners | length > 0 %}
  2.     <div class="owl-carousel owl-theme">
  3.         {% for banner in banners %}
  4.             <div class="item"><img width="300" src="{{ asset(banner.image) }}" alt=""/></div>
  5.         {% endfor %}
  6.     </div>
  7.     <script>
  8.         $('.owl-carousel').owlCarousel({
  9.             loop: true,
  10.             autoplay: true,
  11.             margin: 10,
  12.             animateOut: 'fadeOut',
  13.             responsive: {
  14.                 0: {
  15.                     items: 1
  16.                 },
  17.                 600: {
  18.                     items: 1
  19.                 },
  20.                 1000: {
  21.                     items: 1
  22.                 }
  23.             }
  24.         });
  25.     </script>
  26. {% endif %}