templates/front/brand/brand.html.twig line 4

Open in your IDE?
  1. {% extends "front/_common/_base.html.twig" %}
  2. {% block linkcanonical %}
  3.     <link rel="canonical" href="{{ absolute_url(path('brand', {'slug': brand.slug})) }}">
  4. {% endblock %}
  5. {% block cssadicional %}{% endblock %}
  6. {% block classbody %}{% endblock %}
  7. {% block content %}
  8.     <section class="vw_man">
  9.         <div class="vw_man_banner" style="background-image: url('{{ asset(brand.bannerImage|image_path) }}');">
  10.             <div class="vw_man_container ww_center">
  11.                 <ul>
  12.                     <li><a href="{{ path('home') }}">Inicio</a></li>
  13.                     <li><span>/</span></li>
  14.                     <li><a>Marcas</a></li>
  15.                     <li><span>/</span></li>
  16.                     <li><a class="active">{{ brand.title }}</a></li>
  17.                 </ul>
  18.                 {% if brand.bannerText %}
  19.                     <h2>{{ brand.bannerText }}</h2>
  20.                 {% endif %}
  21.                 {% if brand.bannerButtonShow and brand.bannerButtonText and brand.bannerButtonLink %}
  22.                     <div class="vw_man_btn">
  23.                         <a class="btn btn_lightblue btn_icon" href="{{ brand.bannerButtonLink }}" target="{{ brand.bannerButtonTarget|url_target }}">{{ brand.bannerButtonText }}<span class="icon-Group"></span></a>
  24.                     </div>
  25.                 {% endif %}
  26.             </div>
  27.         </div>
  28.         {% if brand.detailShow %}
  29.             <div class="vw_man_info ww_center">
  30.                 <h3>{{ brand.detailTitle }}</h3>
  31.                 {{ brand.detailText|raw }}
  32.             </div>
  33.         {% endif %}
  34.     </section>
  35.     {% if brand.featuresShow and brand.featuresItems|length > 0 %}
  36.         <section class="vw_man_tab">
  37.             <div class="vw_man_tab_row ww_center">
  38.                 <div class="vw_man_wrap_nav">
  39.                     <div class="vw_man_tab_nav">
  40.                         {% for item in brand.featuresItems %}
  41.                             <a class="vwman_tab" onclick="tabNav(event, 'tab-{{ loop.index }}')" href="">{{ item.title }}</a>
  42.                         {% endfor %}
  43.                     </div>
  44.                 </div>
  45.                 <div class="vw_man_tab_wrap">
  46.                     {% for item in brand.featuresItems %}
  47.                         <div class="vw_man_itm" id="tab-{{ loop.index }}">
  48.                             <div class="vw_man_tab_info">
  49.                                 <h2>{{ item.title }}</h2>
  50.                                 <p>{{ item.text|raw }}</p>
  51.                             </div>
  52.                             <figure>
  53.                                 <img src="{{ asset(item.image|image_path) }}" width="" height="" alt="{{ item.image|split_alt }}">
  54.                             </figure>
  55.                         </div>
  56.                     {% endfor %}
  57.                 </div>
  58.             </div>
  59.         </section>
  60.     {% endif %}
  61. {% endblock %}
  62. {% block jsfinal %}
  63.     <script type="text/javascript">
  64.         function tabNav(evt, element) {
  65.             evt.preventDefault();
  66.             var i, tabcontent, tablinks;
  67.             tabcontent = document.getElementsByClassName("vw_man_itm");
  68.             for (i = 0; i < tabcontent.length; i++) {
  69.                 tabcontent[i].classList.remove('active');
  70.             }
  71.             tablinks = document.getElementsByClassName("vwman_tab");
  72.             for (i = 0; i < tablinks.length; i++) {
  73.                 tablinks[i].className = tablinks[i].className.replace(" active", "");
  74.             }
  75.             document.getElementById(element).classList.add('active')
  76.             evt.currentTarget.className += " active";
  77.         }
  78.         document.querySelectorAll('.vwman_tab')[0].click();
  79.     </script>
  80. {% endblock %}