templates/website/home/banner-section.html.twig line 1

Open in your IDE?
  1. {% from 'utils.html.twig' import ico, imgUpload %}
  2. {% if isModuleActive('banner_module') and banners|length > 0 %}
  3.     {% set bannerFull   = getConfig('banner_full') %}
  4.     {% set bannerClass  = bannerFull? 'home-banner-full':'home-banner' %}
  5.     {% set bannerOption = bannerFull? 'home-banner-full':'' %}
  6.     {% set bannerAfter  = searchAfterBanner? 'banner-search-after':'banner-search-apart' %}
  7. <div class="{{ ['banner', bannerClass, bannerAfter]|join(' ') }}" data-status="loading">
  8.     {% if not bannerFull %}
  9.         <div class="container banner-container mobile--wid">
  10.     {% endif %}
  11.         <div class="js--slider banner-slider" id="banner-slider" data-slider-options-label="banner-slider">
  12.             {% for banner in banners %}
  13.                 <div class="banner-item">
  14.                     <div class="item-box">
  15.                         {% if banner.link %}
  16.                             <a href="{{ banner.link }}">
  17.                         {% endif %}
  18.                             {{ imgUpload(banner.image, enum('AbstractEnum::PATH_OTHERS'), bannerOption, banner.title)}}
  19.                             {% if isDarkTheme %}
  20.                                 <div class="banner-mask"></div>
  21.                                 <div class="banner-mask-bottom-before"></div>
  22.                             {% endif %}
  23.                             <div class="legend">
  24.                                 {% if banner.title != null %}
  25.                                     {# <p class="title">{{ banner.title }} {{ banner.title }} {{ banner.title }}</p> #}
  26.                                     <p class="title">{{ banner.title }}</p>
  27.                                 {% endif %}
  28.                                 {% if banner.subtitle != null %}
  29.                                     <p class="subtitle">{{ banner.subtitle }}</p>
  30.                                 {% endif %}
  31.                             </div>
  32.                         {% if banner.link %}
  33.                             </a>
  34.                         {% endif %}
  35.                     </div>
  36.                 </div>
  37.             {% endfor %}
  38.         </div>
  39.         <div id="banner-nav-dots" class="banner-nav-dots">
  40.             {% for ind in range(1, banners|length) %}
  41.                 <button></button>
  42.             {% endfor %}
  43.         </div>
  44.         <div id="banner-seta-prev" class="banner-seta banner-seta-prev">{{ ico('chevron-left')  }}</div>
  45.         <div id="banner-seta-next" class="banner-seta banner-seta-next">{{ ico('chevron-right') }}</div>
  46.     {% if not bannerFull %}</div>{% endif %}
  47. </div>
  48. {% if isDarkTheme %}
  49. <div class="banner-mask-bottom-after">
  50.     <div></div>
  51. </div>
  52. {% endif %}
  53. {% endif %}