src/DcSiteBundle/Resources/views/Subaru/Accessories/accessories-catalog.html.twig line 1

Open in your IDE?
  1. {% extends '@DcSite/Subaru/base.html.twig' %}
  2. {% block title %}
  3.     {% include '@DcSiteBundle/Modules/acessories/module/block-seo.html.twig' %}
  4. {% endblock title %}
  5. {% block seo %}
  6. {% endblock seo %}
  7. {% block ogtagDynamic %}
  8.     {% include '@DcSiteBundle/Modules/acessories/module/og-tag-dnamic.htm.twig' %}
  9. {% endblock ogtagDynamic %}
  10. {% block canonical %}
  11.     <link rel="canonical" href="{{ url(app.request.attributes.get('_route'), app.request.attributes.get('_route_params')) }}"/>
  12. {% endblock canonical %}
  13. {% block css %}
  14.     <link rel="stylesheet" href="{{ asset('/bundles/dcsite/css/toyota_odessa/reset.css') }}">
  15.     <link rel="stylesheet" type="text/css" href="{{ asset('/bundles/core/css/modules/slick/slick.css') }}">
  16.     <link rel="stylesheet" type="text/css" href="{{ asset('/bundles/core/css/modules/slick/slick-theme.min.css') }}">
  17.     <link rel="stylesheet" href="{{ asset('/bundles/dcsite/css/toyota_odessa/service/accessories-catalog.css') }}">
  18. {% endblock %}
  19. {% block content %}
  20.     <section class="breadcrumbs__new">
  21.         {% set contentId = 1 %}
  22.         <div class="container">
  23.             <ol class="global_breadcrumbs__new" itemscope itemtype="https://schema.org/BreadcrumbList">
  24.                 <li class="marker__none" itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem">
  25.                     <a itemprop="item" href="{{ path('subaru_homepage') }}">
  26.                         <span class="breadcrumbs__link" itemprop="name">SUBARU</span></a>
  27.                     <meta itemprop="position" content="{{ contentId }}"/>
  28.                 </li>
  29.                 {% if breadcrumbs is defined %}
  30.                     {% for item in breadcrumbs %}
  31.                         {% set contentId = contentId + 1 %}
  32.                         <div class="arrow-bcs"> ❯</div>
  33.                         <li itemprop="itemListElement" itemscope
  34.                             itemtype="https://schema.org/ListItem">
  35.                             {% if item.parent is null %}
  36.                                 <a itemprop="item" href="{{ path('shop_accessory_catalog') }}">
  37.                                     <span class="breadcrumbs__link" itemprop="name">{{ item.title(app.request.locale) }}</span></a>
  38.                             {% else %}
  39.                                 <a itemprop="item" href="{{ path('shop_accessory_category', {categoryUrl:item.url}) }}">
  40.                                     <span class="breadcrumbs__link"  itemprop="name">{{ item.title(app.request.locale) }}</span></a>
  41.                             {% endif %}
  42.                             <meta itemprop="position" content="{{ contentId }}"/>
  43.                         </li>
  44.                     {% endfor %}
  45.                 {% elseif model is defined %}
  46.                     <div class="arrow-bcs"> ❯</div>
  47.                     <li class="marker__none" itemprop="itemListElement" itemscope
  48.                         itemtype="https://schema.org/ListItem">
  49.                         <a itemprop="item" href="{{ path('shop_accessory_catalog') }}">
  50.                             <span class="breadcrumbs__link" itemprop="name">{{ 'configurator.tabs.acc'|trans({}, 'dc_base') }}</span>
  51.                         </a>
  52.                         <meta itemprop="position" content="{{ contentId }}"/>
  53.                     </li>
  54.                 {% endif %}
  55.                 {% set contentId = contentId + 1 %}
  56.                 <div class="arrow-bcs"> ❯</div>
  57.                 <li itemprop="item" class="marker__none" itemprop="itemListElement" itemscope
  58.                     itemtype="https://schema.org/ListItem">
  59.                     {% if model is defined %}
  60.                     <a itemprop="item" href="{{ path('subaru_shop_accessory_model', {'modelUrl': model.url}) }}">
  61.                         {% elseif category is defined %}
  62.                         <a itemprop="item" href="{{ path('shop_accessory_catalog') }}">
  63.                             {% else %}
  64.                             <a itemprop="item" href="#" style="{{ variation is defined ? '' : 'color: #ABABAB;' }}">
  65.                                 {% endif %}
  66.                                 {% if category is defined %}
  67.                                     <span class="breadcrumbs__link" itemprop="name">{{ category.title(app.request.locale) }}</span>
  68.                                 {% endif %}
  69.                                 {% if model is defined %}
  70.                                     <span class="breadcrumbs__link" itemprop="name">{{ model.title }}</span>
  71.                                 {% endif %}
  72.                                 <meta itemprop="position" content="{{ contentId }}"/>
  73.                             </a>
  74.                         </a>
  75.                     </a>
  76.                 </li>
  77.                 {% if variation is defined %}
  78.                     <div class="arrow-bcs"> ❯</div>
  79.                     <li itemprop="item" class="marker__none" itemprop="itemListElement" itemscope
  80.                         itemtype="https://schema.org/ListItem">
  81.                         <span style="color: #ABABAB;" class="breadcrumbs__link" itemprop="name">{{ variation.years }}</span>
  82.                         <meta itemprop="position" content="{{ contentId }}"/>
  83.                     </li>
  84.                 {% endif %}
  85.             </ol>
  86.         </div>
  87.     </section>
  88.     {% include '@DcSiteBundle/Modules/acessories/accessories-catalog.html.twig' %}
  89. {% endblock %}
  90. {% block pageJs %}
  91.     <script>
  92.         app.onCustomEvent('appInit', function () {
  93.             app.loadJs('{{ asset('/bundles/dcsite/js/accessories-filter.js') }}', function () {
  94.                 initAccessoriesFilters({
  95.                     initUrl: '{{ path('base_accessories_filter_init') }}',
  96.                     baseAccessoryUrl: '{{ path('shop_accessory_catalog') }}',
  97.                     buildUrl: '{{ path('base_accessories_filter_build_url') }}',
  98.                     params: {{ baseParams|json_encode|raw }},
  99.                     categoryUrl: '{{ app.request.get('categoryUrl') }}',
  100.                     modelUrl: '{{ app.request.get('modelUrl') }}',
  101.                     filterParams: {{ filterParams|json_encode|raw }},
  102.                     currentVariation: {{ variation is defined ? variation|json_encode|raw : '[]' }},
  103.                     carModels: {{ accessoryModel is defined ? accessoryModel|json_encode|raw : '[]' }},
  104.                     modelVariations: {{ modelVariations is defined ? modelVariations|json_encode|raw : '[]' }},
  105.                 });
  106.             });
  107.             app.loadJs('{{ asset('bundles/core/js/modules/slick/slick.js') }}', function () {
  108.                 $('.accessories-slider').slick({
  109.                     slidesToShow: 11,
  110.                     slidesToScroll: 1,
  111.                     fade: false,
  112.                     infinite: false,
  113.                     swipe: false,
  114.                     variableWidth: true,
  115.                     arrows: true,
  116.                     prevArrow: '<img class="acces-slick-arrows slick-prev" src="{{ asset('/bundles/dcsite/img/toyota_odessa/acces-prev.svg') }}" alt="prev">',
  117.                     nextArrow: '<img class="acces-slick-arrows slick-next" src="{{ asset('/bundles/dcsite/img/toyota_odessa/acces-next.svg') }}" alt="next">',
  118.                     responsive: [
  119.                         {
  120.                             breakpoint: 1200,
  121.                             settings: {
  122.                                 slidesToShow: 8,
  123.                                 slidesToScroll: 1,
  124.                                 variableWidth: false,
  125.                                 swipe: true,
  126.                                 fade: false,
  127.                                 arrows: true
  128.                             }
  129.                         },
  130.                         {
  131.                             breakpoint: 991,
  132.                             settings: {
  133.                                 slidesToShow: 5,
  134.                                 slidesToScroll: 1,
  135.                                 variableWidth: false,
  136.                                 swipe: true,
  137.                                 fade: false,
  138.                                 arrows: true
  139.                             }
  140.                         },
  141.                         {
  142.                             breakpoint: 768,
  143.                             settings: {
  144.                                 slidesToShow: 4,
  145.                                 slidesToScroll: 1,
  146.                                 variableWidth: false,
  147.                                 swipe: true,
  148.                                 fade: false,
  149.                                 arrows: true
  150.                             }
  151.                         },
  152.                         {
  153.                             breakpoint: 568,
  154.                             settings: {
  155.                                 slidesToShow: 3,
  156.                                 slidesToScroll: 1,
  157.                                 variableWidth: false,
  158.                                 swipe: true,
  159.                                 fade: false,
  160.                                 arrows: true
  161.                             }
  162.                         }
  163.                     ]
  164.                 });
  165.                 $(".accessories__filter__mobile").click(function(){
  166.                     $(".accessories__catalog__filter__wrapper").addClass("active");
  167.                 });
  168.                 $(".catalog__filter__close").click(function(){
  169.                     $(".accessories__catalog__filter__wrapper").removeClass("active");
  170.                 });
  171.             });
  172.         });
  173.     </script>
  174. {% endblock %}