templates/themes/ismart/block/home-banner.html.twig line 1

Open in your IDE?
  1. {#<section class="home-banner">#}
  2. {#    {% if isMobile %}#}
  3. {#        <div class="slider-1 home-slider  blaze-slider overflow-visible">#}
  4. {#            <div class="blaze-container">#}
  5. {#                <div class="blaze-track-container">#}
  6. {#                    <div class="blaze-track">#}
  7. {#                        {% set items = block.content | json_decode %}#}
  8. {#                        {% for itm in items %}#}
  9. {#                            {% set youtube = '' %}#}
  10. {#                            {% set video = '' %}#}
  11. {#                            {% set videoSrc = '' %}#}
  12. {#                            {% if itm.videoUrl is not empty %}#}
  13. {#                                {% set youtube = 'youtube' %}#}
  14. {#                                {% set video = 'video' %}#}
  15. {#                                {% set videoSrc = itm.videoUrl %}#}
  16. {#                            {% endif %}#}
  17. {#                            {% if itm.videoFile is not empty %}#}
  18. {#                                {% set youtube = '' %}#}
  19. {#                                {% set video = 'video' %}#}
  20. {#                                {% set videoSrc = itm.videoFile %}#}
  21. {#                            {% endif %}#}
  22. {#                            <a {% if itm.url is not empty %}href="{{ itm.url }}" {% endif%} class="item {{ video }} {{ youtube }}" {% if videoSrc is not empty %} video-src="{{ videoSrc }}{% endif %}">#}
  23. {#                                {% if videoSrc is not empty %}#}
  24. {#                                    <i class="zmdi zmdi-youtube-play"></i>#}
  25. {#                                {% endif %}#}
  26. {#                                <picture class="d-block w-100 picture-lazy">#}
  27. {#                                    {% if isMobile %}#}
  28. {#                                        <img loading="lazy" class="img-fluid"#}
  29. {#                                             src="{{ asset('themes/ismart') }}/img/compressed.webp"#}
  30. {#                                             src="{{ getImageWebp(getImageBySize(itm.image,'small')) }}"#}
  31. {#                                             data-src="{{ getImageWebp(getImageBySize(itm.image,'thumb')) }}">#}
  32. {#                                    {% else %}#}
  33. {#                                        <img loading="lazy" class="img-fluid"#}
  34. {#                                             src="{{ getImageWebp(getImageBySize(itm.image,'small')) }}"#}
  35. {#                                             data-src="{{ getImageWebp(getImageBySize(itm.image,'feature')) }}">#}
  36. {#                                    {% endif %}#}
  37. {#                                </picture>#}
  38. {#                            </a>#}
  39. {#                        {% endfor %}#}
  40. {#                    </div>#}
  41. {#                </div>#}
  42. {#                <button class="blaze-prev" aria-label="Go to previous slide">#}
  43. {#                    <svg data-name="Layer 1" id="Layer_1" viewBox="0 0 64 64" xmlns="http://www.w3.org/2000/svg"><title/><path d="M12.5,32,45.17,0,51.5,6.62,25.24,32,51.5,57.38,45.17,64Z" data-name="&lt;Compound Path&gt;" id="_Compound_Path_"/></svg>#}
  44. {#                </button>#}
  45. {#                <button class="blaze-next" aria-label="Go to next slide">#}
  46. {#                    <svg data-name="Layer 1" id="Layer_1" viewBox="0 0 64 64" xmlns="http://www.w3.org/2000/svg"><title/><path d="M51.66,32,19,0,12.66,6.62,38.91,32,12.66,57.38,19,64Z" data-name="&lt;Compound Path&gt;" id="_Compound_Path_"/></svg>#}
  47. {#                </button>#}
  48. {#                <div class="blaze-pagination d-flex align-items-center justify-content-center flex-row"></div>#}
  49. {#            </div>#}
  50. {#        </div>#}
  51. {#    {% else %}#}
  52. {#        <div class="slider-1">#}
  53. {#            {% set items = block.content | json_decode %}#}
  54. {#            {% for itm in items %}#}
  55. {#                {% set youtube = '' %}#}
  56. {#                {% set video = '' %}#}
  57. {#                {% set videoSrc = '' %}#}
  58. {#                {% if itm.videoUrl is not empty %}#}
  59. {#                    {% set youtube = 'youtube' %}#}
  60. {#                    {% set video = 'video' %}#}
  61. {#                    {% set videoSrc = itm.videoUrl %}#}
  62. {#                {% endif %}#}
  63. {#                {% if itm.videoFile is not empty %}#}
  64. {#                    {% set youtube = '' %}#}
  65. {#                    {% set video = 'video' %}#}
  66. {#                    {% set videoSrc = itm.videoFile %}#}
  67. {#                {% endif %}#}
  68. {#                <a {% if itm.url is not empty %}href="{{ itm.url }}" {% endif%} class="item {{ video }} {{ youtube }}" {% if videoSrc is not empty %} video-src="{{ videoSrc }}{% endif %}">#}
  69. {#                    {% if videoSrc is not empty %}#}
  70. {#                        <i class="zmdi zmdi-youtube-play"></i>#}
  71. {#                    {% endif %}#}
  72. {#                    <picture class="d-block w-100 picture-lazy">#}
  73. {#                        <img loading="lazy" class="img-fluid"#}
  74. {#                             src="{{ itm.image }}" />#}
  75. {#                             src="{{ getImageWebp(getImageBySize(itm.image,'small')) }}"#}
  76. {#                             data-src="{{ getImageWebp(itm.image) }}">#}
  77. {#                    </picture>#}
  78. {#                </a>#}
  79. {#            {% endfor %}#}
  80. {#        </div>#}
  81. {#    {% endif %}#}
  82. {#</section>#}
  83. <section class="home-banner">
  84.     <div class="slider-1">
  85.         {% set items = block.content | json_decode %}
  86.         {% for itm in items %}
  87.             {% set youtube = '' %}
  88.             {% set video = '' %}
  89.             {% set videoSrc = '' %}
  90.             {% if itm.videoUrl is not empty %}
  91.                 {% set youtube = 'youtube' %}
  92.                 {% set video = 'video' %}
  93.                 {% set videoSrc = itm.videoUrl %}
  94.             {% endif %}
  95.             {% if itm.videoFile is not empty %}
  96.                 {% set youtube = '' %}
  97.                 {% set video = 'video' %}
  98.                 {% set videoSrc = itm.videoFile %}
  99.             {% endif %}
  100.             <a {% if itm.url is not empty %}href="{{ itm.url }}" {% endif%} class="item {{ video }} {{ youtube }}" {% if videoSrc is not empty %} video-src="{{ videoSrc }}{% endif %}">
  101.                 {% if videoSrc is not empty %}
  102.                     <i class="zmdi zmdi-youtube-play"></i>
  103.                 {% endif %}
  104.                 <img src="{{ itm.image }}" class="img-fluid d-none d-sm-block" alt="" />
  105.                 <img src="{{ itm.image }}" class="img-fluid d-block d-sm-none" alt="" />
  106.             </a>
  107.         {% endfor %}
  108.     </div>
  109. </section>