src/PortalBundle/Resources/views/Service/body-repair-sub-category.html.twig line 1

Open in your IDE?
  1. {% extends '@Portal/base.html.twig' %}
  2. {% block seo %}
  3.     {% if subCategory.getContentByLocale(app.request.locale).getSeoTitle() is defined and subCategory.getContentByLocale(app.request.locale).getSeoTitle() is not empty %}
  4.         {% set title = subCategory.getContentByLocale(app.request.locale).getSeoTitle() %}
  5.     {% else %}
  6.         {% set title = 'seo.body_repair.title'|trans({}, 'portal_base') %}
  7.     {% endif %}
  8.     {% if subCategory.getContentByLocale(app.request.locale).getSeoDescription() is defined and subCategory.getContentByLocale(app.request.locale).getSeoDescription() is not empty %}
  9.         {% set description = subCategory.getContentByLocale(app.request.locale).getSeoDescription() %}
  10.     {% else %}
  11.         {% set description = 'seo.body_repair.description'|trans({}, 'portal_base') %}
  12.     {% endif %}
  13.     <title>{{ title }}</title>
  14.     <meta name="description" content="{{ description }}"/>
  15. {% endblock %}
  16. {% block css %}
  17.     <link rel="stylesheet" href="{{ asset('bundles/portal/css/service.css') }}">
  18.     <link rel="stylesheet" href="{{ asset('bundles/portal/css/service/body-repair.css') }}">
  19.     <link rel='stylesheet' type='text/css' href='{{ asset('bundles/insurance/css/jquery.mCustomScrollbar.css') }}'/>
  20.     <link rel='stylesheet' type='text/css' href='{{ asset('bundles/core/css/bootstrap_build/carousel.css') }}'/>
  21.     <link rel='stylesheet' type='text/css' href='{{ asset('bundles/core/css/modules/gallery/lightgallery.css') }}'/>
  22.     <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.8.1/slick.css"
  23.           integrity="sha512-wR4oNhLBHf7smjy0K4oqzdWumd+r5/+6QO/vDda76MW5iug4PT7v86FoEkySIJft3XA0Ae6axhIvHrqwm793Nw=="
  24.           crossorigin="anonymous" referrerpolicy="no-referrer"/>
  25.     <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.8.1/slick-theme.css"
  26.           integrity="sha512-6lLUdeQ5uheMFbWm3CP271l14RsX1xtx+J5x2yeIDkkiBpeVTNhTqijME7GgRKKi6hCqovwCoBTlRBEC20M8Mg=="
  27.           crossorigin="anonymous" referrerpolicy="no-referrer"/>
  28. {% endblock %}
  29. {% block content %}
  30.     <section class="breadcrumbs__new">
  31.         <div class="container">
  32.             <ol class="vidi_breadcrumbs__new" itemscope itemtype="https://schema.org/BreadcrumbList">
  33.                 <li class="marker__none" itemprop="itemListElement" itemscope
  34.                     itemtype="https://schema.org/ListItem">
  35.                     <a itemprop="item" href="{{ path('portal_homepage') }}">
  36.                         <span class="breadcrumbs__link" itemprop="name">VIDI.UA</span></a>
  37.                     <meta itemprop="position" content="1"/>
  38.                 </li>
  39.                 <div class="arrow-bc"></div>
  40.                 <li itemprop="item" class="marker__none" itemprop="itemListElement" itemscope
  41.                     itemtype="https://schema.org/ListItem">
  42.                     <a itemprop="item" href="{{ path('portal_service_body_repair') }}">
  43.                         <span style="color: #ABABAB" class="breadcrumbs__link"
  44.                               itemprop="name">{{ 'service.all.service'|trans({}, 'portal_base') }}</span></a>
  45.                     <meta itemprop="position" content="2"/>
  46.                 </li>
  47.                 <div class="arrow-bc"></div>
  48.                 <li itemprop="item" class="marker__none" itemprop="itemListElement" itemscope
  49.                     itemtype="https://schema.org/ListItem">
  50.                     <a itemprop="item" href="{{ path('portal_service_body_repair') }}">
  51.                         <span style="color: #ABABAB" class="breadcrumbs__link"
  52.                               itemprop="name">{{ 'service.body_repair.title_body_repair_new'|trans({}, 'portal_base') }}</span></a>
  53.                     <meta itemprop="position" content="3"/>
  54.                 </li>
  55.                 <div class="arrow-bc"></div>
  56.                 <li itemprop="item" class="marker__none" itemprop="itemListElement" itemscope
  57.                     itemtype="https://schema.org/ListItem">
  58.                     <a itemprop="item"
  59.                        href="{{ path('portal_service_body_repair_category', { 'category': subCategory.parentCategory.url }) }}">
  60.                         <span style="color: #ABABAB" class="breadcrumbs__link"
  61.                               itemprop="name">{{ subCategory.parentCategory.getContentByLocale(app.request.locale).title }}</span></a>
  62.                     <meta itemprop="position" content="4"/>
  63.                 </li>
  64.                 <div class="arrow-bc"></div>
  65.                 <li itemprop="item" class="marker__none" itemprop="itemListElement" itemscope
  66.                     itemtype="https://schema.org/ListItem">
  67.                     <span style="color: #ABABAB" class="breadcrumbs__link"
  68.                           itemprop="name">{{ subCategory.getContentByLocale(app.request.locale).title }}</span>
  69.                     <meta itemprop="position" content="5"/>
  70.                 </li>
  71.             </ol>
  72.         </div>
  73.     </section>
  74.     <section class="section__list__body__repair__services">
  75.         <div class="container">
  76.             <div class="list__body__repair__services__wrapper">
  77.                 <div class="list__body__repair__services__title__wrapper">
  78.                     <h1 class="list__body__repair__services__title">{{ subCategory.getContentByLocale(app.request.locale).title }}</h1>
  79.                 </div>
  80.             </div>
  81.         </div>
  82.     </section>
  83.     {# Калькулятор кузовний ремонт #}
  84.     {% include '@Portal/Modules/calc-body-repair.html.twig' %}
  85.     <section class="section__body__repair__wrapper">
  86.         <div class="container">
  87.             <p>{{ subCategory.getContentByLocale(app.request.locale).description|raw }}</p>
  88.         </div>
  89.     </section>
  90.     {# Контакти/Карта #}
  91.     {% include '@Portal/Modules/contacts-and-map.html.twig' %}
  92.     {# Наші переваги #}
  93.     {% include '@Portal/Modules/our-advantages.html.twig' %}
  94.     {# Слйдер акційні пропозиції кузовний сервіс #}
  95.     {% include '@Portal/Modules/slider-special-body-service.html.twig' %}
  96.     <section class="section__recommend__brand">
  97.         <div class="container">
  98.             <div class="recommend__brand__wrapper">
  99.                 {% for brand in brands %}
  100.                     <div class="recommend__brand__content">
  101.                         <div class="recommend__brand__img"
  102.                              style="background-image: url('{{ sonata_path(brand.image, 'reference') }}')"></div>
  103.                         <p>{{ brand.name }}</p>
  104.                     </div>
  105.                 {% endfor %}
  106.             </div>
  107.         </div>
  108.     </section>
  109. {% endblock %}
  110. {% block pageJS %}
  111.     <!-- Facebook Pixel Code -->
  112.     <script>
  113.         !function (f, b, e, v, n, t, s) {
  114.             if (f.fbq) return;
  115.             n = f.fbq = function () {
  116.                 n.callMethod ?
  117.                     n.callMethod.apply(n, arguments) : n.queue.push(arguments)
  118.             };
  119.             if (!f._fbq) f._fbq = n;
  120.             n.push = n;
  121.             n.loaded = !0;
  122.             n.version = '2.0';
  123.             n.queue = [];
  124.             t = b.createElement(e);
  125.             t.async = !0;
  126.             t.src = v;
  127.             s = b.getElementsByTagName(e)[0];
  128.             s.parentNode.insertBefore(t, s)
  129.         }(window, document, 'script',
  130.             'https://connect.facebook.net/en_US/fbevents.js');
  131.         fbq('init', '846867434118875');
  132.         fbq('track', 'PageView');
  133.     </script>
  134.     <noscript><img height="1" width="1" style="display:none"
  135.                    src="https://www.facebook.com/tr?id=846867434118875&ev=PageView&noscript=1"
  136.         /></noscript>
  137.     <!-- End Facebook Pixel Code -->
  138.     <script>
  139.         app.onCustomEvent('appInit', function () {
  140.             app.loadJs("{{ asset('bundles/insurance/js/jquery.mCustomScrollbar.concat.min.js') }}");
  141.             app.loadJs("{{ asset('bundles/core/js/modules/slick/slick.js') }}", function () {
  142.                 $('.promotional__propositions__slider').slick({
  143.                     infinite: false,
  144.                     slidesToShow: 3.5,
  145.                     prevArrow: ' <img class="slick-prev" src="{{ asset('bundles/portal/img/slider-arrow-left.svg') }}">',
  146.                     nextArrow: ' <img class="slick-next" src="{{ asset('bundles/portal/img/slider-arrow-right.svg') }}">',
  147.                     slidesToScroll: 1,
  148.                     responsive: [
  149.                         {
  150.                             breakpoint: 768,
  151.                             settings: {
  152.                                 centerPadding: '30px',
  153.                                 slidesToShow: 2,
  154.                                 autoplay: true,
  155.                                 autoplaySpeed: 2000
  156.                             }
  157.                         },
  158.                         {
  159.                             breakpoint: 480,
  160.                             settings: {
  161.                                 centerPadding: '30px',
  162.                                 slidesToShow: 1,
  163.                                 autoplay: true,
  164.                                 autoplaySpeed: 2000
  165.                             }
  166.                         }
  167.                     ]
  168.                 });
  169.             });
  170.             app.loadJs("{{ asset('/bundles/core/js/modules/gallery/lightgallery.js') }}", function () {
  171.                 $('.section-padding-page').lightGallery({
  172.                     selector: '.body_repair-image'
  173.                 });
  174.             });
  175.             app.loadJs("{{ asset('bundles/portal/js/body-repair-calc.js') }}", function () {
  176.                 initRepairCalc({
  177.                     initUrl: '{{ path('portal_repair_calc_init') }}',
  178.                     saveUrl: '{{ path('form_repair_calc') }}',
  179.                     privacyUrl: '{{ privacyUrl }}',
  180.                 });
  181.             });
  182.             $('.js-repair-photo').on('submit', function (e) {
  183.                 e.preventDefault();
  184.                 var formData = new FormData(this);
  185.                 var $form = $(this);
  186.                 $('#check_privacy', $(this)).remove('error');
  187.                 if (!$('.js-repair-photo .js-form-privacy input').prop('checked')) {
  188.                     $('#check_privacy', $(this)).addClass('error');
  189.                     return false;
  190.                 }
  191.                 $.ajax({
  192.                     url: $form.attr('action'),
  193.                     type: 'POST',
  194.                     data: formData,
  195.                     success: function (data) {
  196.                         $('#modalSuccessMessagePopup').modal('show');
  197.                         try {
  198.                             dataLayer.push({
  199.                                 'event': 'event-to-go',
  200.                                 'eventAction': 'submit',
  201.                                 'eventCategory': 'sto-all',
  202.                                 'eventLabel': 'remont-kyzova'
  203.                             });
  204.                         } catch (e) {
  205.                             console.error('dataLayer event error');
  206.                         }
  207.                     },
  208.                     cache: false,
  209.                     contentType: false,
  210.                     processData: false
  211.                 });
  212.             });
  213.             var button = $("#repair_photo_files");
  214.             function readURL(input) {
  215.                 if (input.files.length == 0) {
  216.                     return;
  217.                 }
  218.                 $.each(input.files, function () {
  219.                     var reader = new FileReader();
  220.                     reader.onload = function (e) {
  221.                         var imgWr = $("<div class='review-foto-wrap'><div class='review-image'><img src=\"#\" alt=\"load image\" /></div></div>");
  222.                         $('.review-image img', imgWr).attr('src', e.target.result);
  223.                         button.after(imgWr);
  224.                     };
  225.                     reader.readAsDataURL(this);
  226.                 });
  227.             }
  228.             $("#repair_photo_files").change(function () {
  229.                 $('.review-foto-wrap').replaceWith('');
  230.                 readURL(this);
  231.             });
  232.         });
  233.     </script>
  234. {% endblock %}
  235. {% block suChatJS %}
  236.     {% include '@Portal/Modules/su-chat-widget.html.twig' %}
  237. {% endblock  %}