src/DcSiteBundle/Resources/views/Lexus/Car/configuration.html.twig line 1

Open in your IDE?
  1. {% extends '@DcSite/Lexus/base.html.twig' %}
  2.   {% block title %}
  3.       <title>
  4.           {{ 'car.configuration_page.seo.title'|trans({
  5.               '%car%' : model.fullName,
  6.               '%year%' : model.year,
  7.               '%dealer%' : dealer.nameByLocale(app.request.locale),
  8.           }, 'dc_base') }}
  9.       </title>
  10.   {% endblock title %}
  11.   {% block seo %}
  12.     <meta name="description" content="{{ 'car.configuration_page.seo.description'|trans({
  13.         '%car%' : model.fullName,
  14.         '%year%' : model.year,
  15.         '%dealer%' : dealer.nameByLocale(app.request.locale),
  16.     }, 'dc_base') }}" />
  17.       {% if model.noindexFollow %}
  18.           <meta name="robots" content="noindex, follow" />
  19.       {% endif %}
  20.   {% endblock seo %}
  21. {% block ogtagDynamic %}
  22.     <meta property="og:title" content=" {{ 'car.configuration_page.seo.title'|trans({
  23.         '%car%' : model.fullName,
  24.         '%year%' : model.year,
  25.         '%dealer%' : dealer.nameByLocale(app.request.locale),
  26.     }, 'dc_base') }}"/>
  27.     <meta property="og:description" content="{{ 'car.configuration_page.seo.description'|trans({
  28.         '%car%' : model.fullName,
  29.         '%year%' : model.year,
  30.         '%dealer%' : dealer.nameByLocale(app.request.locale),
  31.     }, 'dc_base') }}"/>
  32. {% endblock ogtagDynamic %}
  33. {% block css %}
  34.     <link rel="stylesheet"  href="{{ asset('/bundles/dcsite/css/modules/NEW_CARD_CAR/base.css') }}"/>
  35.     <link rel="stylesheet" media="all" href="{{ asset('/bundles/dcsite/css/modules/NEW_CARD_CAR/color.css') }}"/>
  36.     <link rel="stylesheet" media="all" href="{{ asset('/bundles/dcsite/css/modules/car/equipment-comparing.css') }}"/>
  37.     <link rel="stylesheet"  href="{{ asset('/bundles/dcsite/css/lexus/car/card-car.css') }}"/>
  38.     <link rel="stylesheet"  href="{{ asset('/bundles/dcsite/css/lexus/car/color.css') }}"/>
  39.     <link rel="stylesheet"  href="{{ asset('/bundles/dcsite/css/modules/car/car-card_v3.css') }}"/>
  40. {% endblock %}
  41. {% block content %}
  42.     <main class="new__car-car">
  43.         <section class="main-card-car section-padding" id="gallery">
  44.             <div class="container">
  45.                 <div class="row">
  46.                     <div class="col-md-12 car-name">
  47.                         <h1>
  48.                             {{ 'car.equipments_prices'|trans({}, 'dc_base') }}
  49.                             {{ model.fullName }}
  50.                             {% if model.hasHybrid %}
  51.                                 <span class="car-hybrid"> {{ 'base.car_cat.hubrid'|trans({}, 'dc_toyota') }}</span>
  52.                             {% endif %}
  53.                         </h1>
  54.                     </div>
  55.                 </div>
  56.             </div>
  57.         </section>
  58.         <div class="navs sticky-top" id="nav-manu">
  59.             <div class="container">
  60.                 <div class="row">
  61.                     <div class="col-md-12">
  62.                         <ul class="navs-list mobile-scroll">
  63.                             <li class="navs-list-li">
  64.                                 <a href="#compare" class="navs-list-link">{{ 'car_page.new.complectation'|trans({}, 'dc_base') }}</a>
  65.                             </li>
  66.                             <li class="navs-list-li">
  67.                                 <a href="#vehiclePrice" class="navs-list-link">{{ 'car_page.new.price'|trans({}, 'dc_base') }}</a>
  68.                             </li>
  69.                             <li class="navs-list-li">
  70.                                 <a href="#th" class="navs-list-link">{{ 'car_page.new.tech'|trans({}, 'dc_base') }}</a>
  71.                             </li>
  72.                             <li class="navs-list-li">
  73.                                 <a href="{{ path('lexus_card_car', {url: model.url}) }}" class="navs-list-link">{{ 'car_page.new.overview'|trans({}, 'dc_base') }}</a>
  74.                             </li>
  75.                         </ul>
  76.                     </div>
  77.                 </div>
  78.             </div>
  79.         </div>
  80.         {% include '@DcSite/Modules/car/equipment-comparing.html.twig' %}
  81. {#        {% include '@DcSite/Modules/car/prices.html.twig' %}#}
  82.         {% include '@DcSite/Modules/vehicle/vehicle-price.html.twig' %}
  83.         {% include '@DcSite/Modules/car/tech.html.twig' %}
  84.     </main>
  85. {% endblock %}
  86. {% block pageJS %}
  87.     <script>
  88.         app.onCustomEvent('appInit', function () {
  89.             $('[data-toggle="tooltip"]').tooltip();
  90.             app.loadCss('{{ asset('/bundles/dcsite/css/modules/NEW_CARD_CAR/base.css') }}');
  91.             app.loadCss('{{ asset('/bundles/dcsite/css/modules/base-style/form-control.css') }}');
  92.             app.loadCss('{{ asset('/bundles/dcsite/css/modules/car/car-comparing.css') }}');
  93.             app.loadCss('{{ asset('/bundles/core/css/bootstrap_build/tables.css') }}');
  94.             app.loadCss('{{ asset('/bundles/core/css/modules/slick/slick.css') }}');
  95.             app.loadJs('{{ asset('/bundles/core/js/modules/slick/slick.js') }}');
  96.             app.loadJs('{{ asset('bundles/dcsite/js/compare.js') }}',function () {
  97.                 initCompareModule({
  98.                     initUrl: '{{ path('base_get_model_equipments', {id: model.vehicleId}) }}',
  99.                 });
  100.             });
  101.             app.loadJs('{{ asset('/bundles/dcsite/js/modules/vehicle/vehicle-price.js') }}', function () {
  102.                 initVehiclePrices({
  103.                     vehiclePrice: '{{ vehiclePrice|json_encode_replace|raw }}',
  104.                 });
  105.             });
  106.             app.lazyInit.lazyInit('th', function () {
  107.                 app.loadJs('{{ asset('/bundles/dcsite/js/modules/car/tech.js') }}',function () {
  108.                     initTechModule({
  109.                         initUrl: '{{ path('base-car-tech-load', {id: model.vehicleId}) }}',
  110.                     });
  111.                 });
  112.             });
  113.             $(window).scroll(function(){
  114.                 var $sections = $('section');
  115.                 $sections.each(function(i,el){
  116.                     var top  = $(el).offset().top-150-20;
  117.                     var bottom = top +$(el).height();
  118.                     var scroll = $(window).scrollTop();
  119.                     var id = $(el).attr('id');
  120.                     if( scroll > top && scroll < bottom){
  121.                         $('#nav-manu a.active').removeClass('active');
  122.                         $('#nav-manu a[href="#'+id+'"]').addClass('active');
  123.                     }
  124.                 })
  125.             });
  126.             $('#nav-manu a[href^="#"]').bind("click", function(e){
  127.                 var anchor = $(this);
  128.                 $('html, body').stop().animate({
  129.                     scrollTop: $(anchor.attr('href')).offset().top-50
  130.                 }, 750);
  131.                 e.preventDefault();
  132.             });
  133.         });
  134.     </script>
  135. {% endblock pageJS %}