src/DcSiteBundle/Resources/views/Honda/Car/catalog.html.twig line 1

Open in your IDE?
  1. {% extends '@DcSite/Honda/base.html.twig' %}
  2. {% set categoryUrl = category.url is defined ? category.url : null %}
  3. {% block seo %}
  4.     {% if categoryUrl is null %}
  5.         <title>{{ 'seo.model_lineup.title'|trans({}, 'dc_honda') }}</title>
  6.         <meta name="description"
  7.               content="{{ 'seo.model_lineup.description'|trans({'%phone%': dealer.phone}, 'dc_honda') }}"/>
  8.     {% else %}
  9.         <title>{{ 'seo.model_category.title'|trans({'%category%': category.title}, 'dc_honda') }}</title>
  10.         <meta name="description"
  11.               content="{{ 'seo.model_category.desc'|trans({'%category%': category.title}, 'dc_honda') }}"/>
  12.     {% endif %}
  13. {% endblock seo %}
  14. {% block ogtagDynamic %}
  15.     {% if categoryUrl is null %}
  16.         <meta property="og:title" content="{{ 'seo.model_lineup.title'|trans({}, 'dc_honda') }}"/>
  17.         <meta property="og:description"
  18.               content="{{ 'seo.model_lineup.description'|trans({'%phone%': dealer.phone}, 'dc_honda') }}"/>
  19.     {% else %}
  20.         <meta property="og:title"
  21.               content="{{ 'seo.model_category.title'|trans({'%category%': category.title}, 'dc_honda') }}"/>
  22.         <meta property="og:description"
  23.               content="{{ 'seo.model_category.desc'|trans({'%category%': category.title}, 'dc_honda') }}"/>
  24.     {% endif %}
  25. {% endblock ogtagDynamic %}
  26. {% block css %}
  27.     <link rel="stylesheet" type="text/css" href="{{ asset('bundles/dcsite/css/modules/car/catalog-model-range-item.css') }}">
  28. {% endblock %}
  29. {% block content %}
  30.     <section class="breadcrumbs__new">
  31.         <div class="container">
  32.             <ol class="global_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('honda_homepage') }}">
  36.                         <span class="breadcrumbs__link" itemprop="name">HONDA</span></a>
  37.                     <meta itemprop="position" content="1"/>
  38.                 </li>
  39.                 <div class="arrow-bcs"> ❯</div>
  40.                 <li itemprop="item" class="marker__none" itemprop="itemListElement" itemscope
  41.                     itemtype="https://schema.org/ListItem">
  42.                     <span style="color: #A9A9A9;" class="breadcrumbs__link" itemprop="name">Модельний ряд</span>
  43.                     <meta itemprop="position" content="2"/>
  44.                 </li>
  45.             </ol>
  46.         </div>
  47.     </section>
  48.     <section class="model-lineup section-padding">
  49.         <div class="container">
  50.             <div class="row row-tabs">
  51.                 <div class="col-md-6 section-title mb-0">
  52.                     {% if categoryUrl is null %}
  53.                         <h1>{{ 'main.model_line'|trans({}, 'dc_honda') }} Honda</h1>
  54.                     {% else %}
  55.                         <h1 class="section-title-page">{{ 'seo.model_category.h1'|trans({'%category%': category.title}, 'dc_honda') }}</h1>
  56.                     {% endif %}
  57.                 </div>
  58.                 <div class="col-sm-12 col-md-12 col-lg-6 col-xl-6">
  59.                     <div class="nav nav-tabs justify-content-end tabs_btn" id="nav-tab-model" role="tablist">
  60.                         <a class="nav-item nav-link {% if categoryUrl is null %}active{% endif %}"
  61.                            href="{{ path('honda_model_lineup') }}">
  62.                             <h2>{{ 'pages.car.all_model'|trans({}, 'dc_base') }}</h2>
  63.                         </a>
  64.                         {% for categoryItem in catalog %}
  65.                             <a class="nav-item nav-link {% if categoryUrl == categoryItem.url %}active{% endif %}"
  66.                                href="{{ path('honda_model_catalog_category', {category: categoryItem.url}) }}">
  67.                                 <h2>{{ categoryItem.title }}</h2>
  68.                             </a>
  69.                         {% endfor %}
  70.                     </div>
  71.                 </div>
  72.             </div>
  73.             <div class="row">
  74.                 <div class="col-md-12">
  75.                     <div class="row">
  76.                         {% for item in catalogVehicle %}
  77.                             <div class="col-sm-12 col-md-6 col-lg-4 col-xl-3">
  78.                                 <div class="model-card">
  79.                                     <div class="model-image flexbox-wrapper">
  80.                                         <a href="{{ path('honda_card_car', { car: item.url }) }}">
  81.                                             <img src="{{ item.image }}" alt="{{ item.title }}">
  82.                                         </a>
  83.                                     </div>
  84.                                     <div class="card-body">
  85.                                         <a href="{{ path('honda_card_car', { car: item.url }) }}">
  86.                                             <h2 class="car-name">
  87.                                                 {{ item.title }}
  88.                                                 {% if item.hasHybrid %}
  89.                                                     <span class="car-hybrid"> Hybrid</span>
  90.                                                 {% endif %}
  91.                                             </h2>
  92.                                         </a>
  93.                                         <span class="car-price d-block mb-2">{{ 'main.price'|trans({}, 'dc_honda') }} {{ 'main.from'|trans({}, 'dc_honda') }} {{ item.price|price }} грн</span>
  94.                                         <a href="{{ path('honda_service_consultation', {'carId': item.id}) }}"
  95.                                            class="btn btn-primary w-100">Тест-драйв</a>
  96.                                     </div>
  97.                                 </div>
  98.                             </div>
  99.                         {% endfor %}
  100.                     </div>
  101.                 </div>
  102.             </div>
  103.         </div>
  104.     </section>
  105.     {% include '@DcSite/Modules/car/catalog-model-range-item.html.twig' with { name: 'honda_model_lineup_pages' } %}
  106. {% endblock %}