templates/Shop/brandList.html.twig line 1

Open in your IDE?
  1. {% extends 'product.html.twig' %}
  2. {% block content %}
  3.   <style>
  4.     .category-color{
  5.           z-index: 999999 !important;
  6.           position: absolute !important;
  7.           margin-top: 3em !important;
  8.           margin-left: -3em !important;
  9.           color: white !important;
  10.           background-color: #000 !important;
  11.     }
  12.   </style>
  13.     <main id="main" role="main">
  14.       
  15.      {% include 'Shop/includes/productTopMenu.html.twig' with {'document': document, 'locale' : locale} %}
  16.       <div class="brands-block">
  17.         <div class="container">
  18.           <ul class="alphabet-list">
  19.             
  20.                 {% set num = false %}
  21.                 {% for i in 1..9 %}
  22.                   {% if i in filter %}
  23.                       {% set num = true %}
  24.                   {% endif %}
  25.                 {% endfor %}
  26.                 
  27.            
  28.             <li class="{{ num ? 'active' : '' }}"><a href="#scroll-1-9" class="smooth-scroll">1-9</a></li>
  29.             {% set alphas = range('A', 'Z') %}
  30.             {% for alpha in alphas%}
  31.             
  32.                 <li><a class="{{ alpha in filter ? '' : 'disabled ' }}smooth-scroll" href="#scroll-{{ alpha|lower }}">{{ alpha }}</a></li>
  33.             {% endfor %}
  34.           </ul>
  35.           {% set num = false %}                 
  36.             {% for key,brands in brandsSorted %}
  37.               <div class="brand-list-block" id="scroll-{{ key|lower }}">
  38.                 <h2>{{ key }}</h2>
  39.                   <ul class="brand-list">                    
  40.                       {% for brand in brands %}
  41.                           {% set url = "/" ~ locale ~ "/product/list?category=" ~ brand.getId() %}
  42.                           <li class="brand-wrap">                          
  43.                                 <div class="logo" title="{{ brand.getAlcoholType() }}">
  44.                                   <div class="logo-wrap">
  45.                                     <a class="brand-link" href="{{ url }}" title="{{ brand.getAlcoholType() }}">
  46.                                     {% if brand.getTypeImage() %}
  47.                                       {{ brand.getTypeImage().getThumbnail('brand').html|raw }}
  48.                                       <h2 class="category-color">{{ brand.getAlcoholType() }}</h2>
  49.                                     {% else %}
  50.                                         <h2>{{ brand.getAlcoholType() }}</h2>
  51.                                     {% endif %}
  52.                                     </a>
  53.                                   </div>
  54.                                 </div>
  55.                           </li>
  56.                       {% endfor %}                  
  57.                   </ul>
  58.               </div>
  59.             {% endfor %}               
  60.         </div>
  61.       </div>
  62.     </main>
  63. {% endblock %}