{% extends "front/_common/_base.html.twig" %}
{% block linkcanonical %}
<link rel="canonical" href="{{ absolute_url(path('brand', {'slug': brand.slug})) }}">
{% endblock %}
{% block cssadicional %}{% endblock %}
{% block classbody %}{% endblock %}
{% block content %}
<section class="vw_man">
<div class="vw_man_banner" style="background-image: url('{{ asset(brand.bannerImage|image_path) }}');">
<div class="vw_man_container ww_center">
<ul>
<li><a href="{{ path('home') }}">Inicio</a></li>
<li><span>/</span></li>
<li><a>Marcas</a></li>
<li><span>/</span></li>
<li><a class="active">{{ brand.title }}</a></li>
</ul>
{% if brand.bannerText %}
<h2>{{ brand.bannerText }}</h2>
{% endif %}
{% if brand.bannerButtonShow and brand.bannerButtonText and brand.bannerButtonLink %}
<div class="vw_man_btn">
<a class="btn btn_lightblue btn_icon" href="{{ brand.bannerButtonLink }}" target="{{ brand.bannerButtonTarget|url_target }}">{{ brand.bannerButtonText }}<span class="icon-Group"></span></a>
</div>
{% endif %}
</div>
</div>
{% if brand.detailShow %}
<div class="vw_man_info ww_center">
<h3>{{ brand.detailTitle }}</h3>
{{ brand.detailText|raw }}
</div>
{% endif %}
</section>
{% if brand.featuresShow and brand.featuresItems|length > 0 %}
<section class="vw_man_tab">
<div class="vw_man_tab_row ww_center">
<div class="vw_man_wrap_nav">
<div class="vw_man_tab_nav">
{% for item in brand.featuresItems %}
<a class="vwman_tab" onclick="tabNav(event, 'tab-{{ loop.index }}')" href="">{{ item.title }}</a>
{% endfor %}
</div>
</div>
<div class="vw_man_tab_wrap">
{% for item in brand.featuresItems %}
<div class="vw_man_itm" id="tab-{{ loop.index }}">
<div class="vw_man_tab_info">
<h2>{{ item.title }}</h2>
<p>{{ item.text|raw }}</p>
</div>
<figure>
<img src="{{ asset(item.image|image_path) }}" width="" height="" alt="{{ item.image|split_alt }}">
</figure>
</div>
{% endfor %}
</div>
</div>
</section>
{% endif %}
{% endblock %}
{% block jsfinal %}
<script type="text/javascript">
function tabNav(evt, element) {
evt.preventDefault();
var i, tabcontent, tablinks;
tabcontent = document.getElementsByClassName("vw_man_itm");
for (i = 0; i < tabcontent.length; i++) {
tabcontent[i].classList.remove('active');
}
tablinks = document.getElementsByClassName("vwman_tab");
for (i = 0; i < tablinks.length; i++) {
tablinks[i].className = tablinks[i].className.replace(" active", "");
}
document.getElementById(element).classList.add('active')
evt.currentTarget.className += " active";
}
document.querySelectorAll('.vwman_tab')[0].click();
</script>
{% endblock %}