{% extends '@DcSite/Mazda/base.html.twig' %}
{% block seo %}
<title>
{{ 'car.configuration_page.seo.title'|trans({
'%car%' : model.fullName,
'%year%' : model.year,
'%dealer%' : dealer.nameByLocale(app.request.locale),
}, 'dc_base') }}
</title>
<meta name="description" content="{{ 'car.configuration_page.seo.description'|trans({
'%car%' : model.fullName,
'%year%' : model.year,
'%dealer%' : dealer.nameByLocale(app.request.locale),
}, 'dc_base') }}" />
{% if model.noindexFollow %}
<meta name="robots" content="noindex, follow" />
{% endif %}
{% endblock seo %}
{% block ogtagDynamic %}
<meta property="og:title" content=" {{ 'car.configuration_page.seo.title'|trans({
'%car%' : model.fullName,
'%year%' : model.year,
'%dealer%' : dealer.nameByLocale(app.request.locale),
}, 'dc_base') }}"/>
<meta property="og:description" content="{{ 'car.configuration_page.seo.description'|trans({
'%car%' : model.fullName,
'%year%' : model.year,
'%dealer%' : dealer.nameByLocale(app.request.locale),
}, 'dc_base') }}"/>
{% endblock ogtagDynamic %}
{% block css %}
<link rel="stylesheet" href="{{ asset('/bundles/dcsite/css/modules/NEW_CARD_CAR/base.css') }}"/>
<link rel="stylesheet" media="all" href="{{ asset('/bundles/dcsite/css/modules/NEW_CARD_CAR/color.css') }}"/>
<link rel="stylesheet" media="all" href="{{ asset('/bundles/dcsite/css/modules/car/equipment-comparing.css') }}"/>
<link rel="stylesheet" href="{{ asset('/bundles/dcsite/css/mazda/car/card-car.css') }}"/>
<link rel="stylesheet" href="{{ asset('/bundles/dcsite/css/mazda/car/color.css') }}"/>
<link rel="stylesheet" href="{{ asset('/bundles/dcsite/css/modules/car/car-card_v3.css') }}"/>
{% endblock %}
{% block content %}
<main class="new__car-car">
<section class="main-card-car section-padding" id="gallery">
<div class="container">
<div class="row">
<div class="col-md-12 car-name">
<h1>
{{ 'car.equipments_prices'|trans({}, 'dc_base') }}
{{ model.fullName }}
{% if model.hasHybrid %}
<span class="car-hybrid"> {{ 'base.car_cat.hubrid'|trans({}, 'dc_toyota') }}</span>
{% endif %}
</h1>
</div>
</div>
</div>
</section>
<div class="navs sticky-top" id="nav-manu">
<div class="container">
<div class="row">
<div class="col-md-12">
<ul class="navs-list mobile-scroll">
<li class="navs-list-li">
<a href="#compare" class="navs-list-link">{{ 'car_page.new.complectation'|trans({}, 'dc_base') }}</a>
</li>
<li class="navs-list-li">
<a href="#vehiclePrice" class="navs-list-link">{{ 'car_page.new.price'|trans({}, 'dc_base') }}</a>
</li>
<li class="navs-list-li">
<a href="#th" class="navs-list-link">{{ 'car_page.new.tech'|trans({}, 'dc_base') }}</a>
</li>
<li class="navs-list-li">
<a href="{{ path('mazda_card_car', {car: model.url}) }}" class="navs-list-link">{{ 'car_page.new.overview'|trans({}, 'dc_base') }}</a>
</li>
</ul>
</div>
</div>
</div>
</div>
{% include '@DcSite/Modules/car/equipment-comparing.html.twig' %}
{# {% include '@DcSite/Modules/car/prices.html.twig' %}#}
{% include '@DcSite/Modules/vehicle/vehicle-price.html.twig' %}
{% include '@DcSite/Modules/car/tech.html.twig' %}
</main>
{% endblock %}
{% block pageJS %}
<script>
app.onCustomEvent('appInit', function () {
$('[data-toggle="tooltip"]').tooltip();
app.loadCss('{{ asset('/bundles/dcsite/css/modules/NEW_CARD_CAR/base.css') }}');
app.loadCss('{{ asset('/bundles/dcsite/css/modules/base-style/form-control.css') }}');
app.loadCss('{{ asset('/bundles/dcsite/css/modules/car/car-comparing.css') }}');
app.loadCss('{{ asset('/bundles/core/css/bootstrap_build/tables.css') }}');
app.loadCss('{{ asset('/bundles/core/css/modules/slick/slick.css') }}');
app.loadJs('{{ asset('/bundles/core/js/modules/slick/slick.js') }}');
app.loadJs('{{ asset('bundles/dcsite/js/compare.js') }}',function () {
initCompareModule({
initUrl: '{{ path('base_get_model_equipments', {id: model.vehicleId}) }}',
});
});
app.loadJs('{{ asset('/bundles/dcsite/js/modules/vehicle/vehicle-price.js') }}', function () {
initVehiclePrices({
vehiclePrice: '{{ vehiclePrice|json_encode_replace|raw }}',
});
});
app.lazyInit.lazyInit('th', function () {
app.loadJs('{{ asset('/bundles/dcsite/js/modules/car/tech.js') }}',function () {
initTechModule({
initUrl: '{{ path('base-car-tech-load', {id: model.vehicleId}) }}',
});
});
});
$(window).scroll(function(){
var $sections = $('section');
$sections.each(function(i,el){
var top = $(el).offset().top-150-20;
var bottom = top +$(el).height();
var scroll = $(window).scrollTop();
var id = $(el).attr('id');
if( scroll > top && scroll < bottom){
$('#nav-manu a.active').removeClass('active');
$('#nav-manu a[href="#'+id+'"]').addClass('active');
}
})
});
$('#nav-manu a[href^="#"]').bind("click", function(e){
var anchor = $(this);
$('html, body').stop().animate({
scrollTop: $(anchor.attr('href')).offset().top-50
}, 750);
e.preventDefault();
});
});
</script>
{% endblock pageJS %}