templates/AtechNetCoreBundle/Homepage/index.html.twig line 1

Open in your IDE?
  1. {% extends 'AtechNetCoreBundle/base.html.twig' %}
  2. {% import "AtechNetCoreBundle/macros.html.twig" as macros %}
  3. {% block head %}
  4.     {{ parent() }}
  5.     {% if banners.items|length > 1 %}
  6.         {% for bannerItem in banners.items %}
  7.             <link rel="preload" as="image" href="{{ bannerItem.image }}">
  8.         {% endfor %}
  9.     {% endif %}
  10. {% endblock %}
  11. {% block content %}
  12.     {% set defaultLocale = app.request.session.get('defaultLocale') %}
  13.     {% if banners is not null and banners.items|length > 0 %}
  14.         <div class="promotions px-0 px-xl-0">
  15.             <div class="container">
  16.                 {% for message in app.flashes('pastPayResult') %}
  17.                     <div class="alert alert-info" role="alert">
  18.                         {{ message }}
  19.                     </div>
  20.                 {% endfor %}
  21.                 <div class="grid-wrapper">
  22.                     {% if banners.items|length > 1 %}
  23.                         <div id="bannersCarouselIndicators" class="banner carousel slide" data-bs-ride="carousel">
  24.                             <div class="carousel-indicators">
  25.                                 {% for banner in banners.items %}
  26.                                     <button
  27.                                         type="button"
  28.                                         data-bs-target="#bannersCarouselIndicators"
  29.                                         data-bs-slide-to="{{ loop.index - 1 }}"
  30.                                         class="active"
  31.                                         {% if loop.index == 1 %}
  32.                                             aria-current="true"
  33.                                         {% endif %}
  34.                                         aria-label="Slide {{ loop.index }}">
  35.                                     </button>
  36.                                 {% endfor %}
  37.                             </div>
  38.                             <div class="carousel-inner">
  39.                                 {% for bannerItem in banners.items %}
  40.                                     <div class="carousel-item{% if loop.index == 1 %} active{% endif %}" data-bs-interval="{{ banners.interval }}">
  41.                                         <a href="{{ bannerItem.link }}" onclick="gtag('event','select_promotion',{creative_name:'homepage-tab-banner',promotion_name:'homepage-tab-banner', promotion_id: '{{ bannerItem.parentId }}_{{ bannerItem.itemId }}', promotion_name: '{{ bannerItem.link }}', items: [
  42.                                             {%- for item in banners.gtagEventItems  -%}
  43.                                                 {item_id: '{{ item.item_id }}',item_name: '{{ item.item_name }}',index: '{{ item.index }}',promotion_id: '{{ item.promotion_id }}',promotion_name: '{{ item.promotion_name }}'},
  44.                                             {%- endfor -%}
  45.                                         ]})">
  46.                                             <img decoding="async" src="{{ bannerItem.image }}" class="d-block w-100" alt="#{{ loop.index }}" width="820" height="340" >
  47.                                         </a>
  48.                                     </div>
  49.                                 {% endfor %}
  50.                             </div>
  51.                             <button class="carousel-control-prev" type="button" data-bs-target="#bannersCarouselIndicators" data-bs-slide="prev">
  52.                                 <img  loading="lazy" decoding="async" src="{{ asset('theme/images/icon/arrow-left.svg') }}" alt="{{ 'Arrow left'|trans }}">
  53.                                 <span class="visually-hidden">{{ 'Previous slide'|trans }}</span>
  54.                             </button>
  55.                             <button class="carousel-control-next" type="button" data-bs-target="#bannersCarouselIndicators" data-bs-slide="next">
  56.                                 <img loading="lazy" decoding="async" src="{{ asset('theme/images/icon/arrow-right.svg') }}" alt="{{ 'Arrow right'|trans }}">
  57.                                 <span class="visually-hidden">{{ 'Next slide'|trans }}</span>
  58.                             </button>
  59.                             <div id="carousel-loader">
  60.                                 <div class="current-percent"></div>
  61.                             </div>
  62.                         </div>
  63.                     {% else %}
  64.                         <div class="banner">
  65.                             <a href="{{ banners.items[0].link }}" onclick="gtag('event','select_promotion',{creative_name:'homepage-tab-banner',promotion_name:'homepage-tab-banner', items:[]})" id="homepage-tab-banner">
  66.                                 <picture>
  67.                                     <img loading="lazy" decoding="async" src="{{ banners.items[0].image }}" alt="banner" width="820" height="340" />
  68.                                 </picture>
  69.                             </a>
  70.                         </div>
  71.                     {% endif %}
  72.                     {% if smallBanners is not empty %}
  73.                         {% if smallBanners.upper.image is defined and smallBanners.upper is not empty %}
  74.                             <div class="small-banner upper">
  75.                                 <a href="{{ smallBanners.upper.link }}" onclick="gtag('event','select_promotion',{creative_name:'homepage-featured-category',promotion_name:'homepage-featured-category',items:[]})" id="homepage-featured-category">
  76.                                     <img loading="lazy" decoding="async" src="{{ smallBanners.upper.image }}" alt="{{ smallBanners.upper.title }}" width="550" height="244">
  77.                                 </a>
  78.                             </div>
  79.                         {% else %}
  80.                             {% if smallBanners.upper.display == const('Banner::BANNER_DISPLAY_TYPE_CATEGORY_GROUP') and featuredCategory.upper is defined and featuredCategory.upper is not empty %}
  81.                                 <div class="featured-category-box{% if featuredCategory.upper.isWizard is defined and featuredCategory.upper.isWizard %} wizard{% endif %} upper">
  82.                                     <a href="{{ featuredCategory.upper.href }}" onclick="gtag('event','select_promotion',{creative_name:'homepage-featured-category',promotion_name:'homepage-featured-category',items:[]})" id="homepage-featured-category">
  83.                                         <img loading="lazy" decoding="async" src="{{ featuredCategory.upper.image }}" alt="{{ featuredCategory.upper.title }}" width="376" height="210">
  84.                                         <div class="description">
  85.                                             <h3 class="mb-1 mb-md-2 mb-xl-3"><strong>{{ featuredCategory.upper.title }}</strong></h3>
  86.                                             <p class="mb-1">{{ featuredCategory.upper.description }}</p>
  87.                                             <span>{{ 'Featured category view'|trans }}</span>
  88.                                         </div>
  89.                                     </a>
  90.                                 </div>
  91.                             {% elseif smallBanners.upper.display == const('Banner::BANNER_DISPLAY_TYPE_PRODUCT') and featuredProduct.upper is defined and featuredProduct.upper is not empty %}
  92.                                 <div class="featured-product-box upper">
  93.                                     <div class="recommendation-label">
  94.                                         <span>{{ 'Recommended'|trans }}</span>
  95.                                     </div>
  96.                                     <a href="{{ featuredProduct.upper.href }}" class="featured-product-wrapper" onclick="gtag('event','select_promotion',{creative_name:'homepage-featured-product',promotion_name:'homepage-featured-product',items:[{item_id:'{{ featuredProduct.upper.code }}',item_name:'{{ featuredProduct.upper.title }}',discount:{{ featuredProduct.upper.special|number_format(2, '.', '') }},index:0,item_brand:'{{ featuredProduct.upper.vendor }}',price:{{ featuredProduct.upper.price|number_format(2, '.', '') }},quantity:1}]})" id="homepage-featured-product">
  97.                                         <div class="product-image me-3">
  98.                                             {% if featuredProduct.upper.carouselImages is defined %}
  99.                                                 <div id="featuredProduct-upper-carousel" class="carousel slide" data-bs-ride="carousel">
  100.                                                     <div class="carousel-inner">
  101.                                                         {% for image in featuredProduct.upper.carouselImages %}
  102.                                                             <div class="carousel-item {% if loop.first %}active{% endif %}"  data-bs-interval="8000">
  103.                                                                 <img loading="lazy" decoding="async" src="{{ image }}" class="d-block w-100" alt="{{ featuredProduct.upper.vendor }} {{ featuredProduct.upper.title }}">
  104.                                                             </div>
  105.                                                         {% endfor %}
  106.                                                     </div>
  107.                                                 </div>
  108.                                             {% else %}
  109.                                                 <img loading="lazy" decoding="async" src="{{ featuredProduct.upper.image }}" alt="{{ featuredProduct.upper.vendor }} {{ featuredProduct.upper.title }}">
  110.                                             {% endif %}
  111.                                         </div>
  112.                                         <div class="product-info">
  113.                                             <div class="product-title mb-1 mb-md-2 mb-xl-3">{% if featuredProduct.upper.isCustomTitle is defined %} {{- featuredProduct.upper.title -}} {% else  %}{{- featuredProduct.upper.vendor }} {{ featuredProduct.upper.title -}} {% endif %}</div>
  114.                                             <p class="product-description mb-2 mb-md-3">{{- featuredProduct.upper.attributesListTxt|raw -}}</p>
  115.                                             <div class="prices">
  116.                                                 {% if featuredProduct.upper.isDiscounted %}
  117.                                                     <span class="discounted">
  118.                                                 {{- featuredProduct.upper.special|price(currency, precision) -}}
  119.                                             </span>
  120.                                                 {% endif %}
  121.                                                 <span class="price{{ featuredProduct.upper.isDiscounted ? ' discounted-on' : '' }}">
  122.                                             {{- featuredProduct.upper.price|price(currency, precision) -}}
  123.                                         </span>
  124.                                             </div>
  125.                                         </div>
  126.                                     </a>
  127.                                     <script>
  128.                                         gtag("event", "view_promotion", {
  129.                                             creative_name: "homepage-tab-banner",
  130.                                             promotion_name: "homepage-tab-banner",
  131.                                             {% if banners.items|length > 1 -%}
  132.                                             items: [
  133.                                                 {% for item in banners.gtagEventItems  %}
  134.                                                 {
  135.                                                     "item_id": "{{ item.item_id }}",
  136.                                                     "item_name": "{{ item.item_name }}",
  137.                                                     "index": "{{ item.index }}",
  138.                                                     "promotion_id": "{{ item.promotion_id }}",
  139.                                                     "promotion_name": "{{ item.promotion_name }}"
  140.                                                 },
  141.                                                 {% endfor %}
  142.                                             ]
  143.                                             {% else -%}
  144.                                             items: []
  145.                                             {% endif -%}
  146.                                         });
  147.                                         gtag("event", "view_promotion", {
  148.                                             creative_name: "homepage-featured-category",
  149.                                             promotion_name: "homepage-featured-category",
  150.                                             items: []
  151.                                         });
  152.                                         gtag("event", "view_promotion", {
  153.                                             creative_name: "homepage-featured-product",
  154.                                             promotion_name: "homepage-featured-product",
  155.                                             items: [
  156.                                                 {
  157.                                                     item_id: "{{ featuredProduct.upper.code }}",
  158.                                                     item_name: "{{ featuredProduct.upper.title }}",
  159.                                                     discount: {{ featuredProduct.upper.special|number_format(2, '.', '') }},
  160.                                                     index: 0,
  161.                                                     item_brand: "{{ featuredProduct.upper.vendor }}",
  162.                                                     price: {{ featuredProduct.upper.price|number_format(2, '.', '') }},
  163.                                                     quantity: 1
  164.                                                 }
  165.                                             ]
  166.                                         });
  167.                                     </script>
  168.                                 </div>
  169.                             {% else %}
  170.                                 <div class="small-banner upper"></div>
  171.                             {% endif %}
  172.                         {% endif %}
  173.                         {% if smallBanners.lower.image is defined and  smallBanners.lower is not empty %}
  174.                             <div class="small-banner lower">
  175.                                 <a href="{{ smallBanners.lower.link }}" onclick="gtag('event','select_promotion',{creative_name:'homepage-featured-category',promotion_name:'homepage-featured-category',items:[]})" id="homepage-featured-category">
  176.                                     <img loading="lazy" decoding="async" src="{{ smallBanners.lower.image }}" alt="{{ smallBanners.lower.title }}" width="550" height="244">
  177.                                 </a>
  178.                             </div>
  179.                         {% else %}
  180.                             {% if smallBanners.lower.display == const('Banner::BANNER_DISPLAY_TYPE_CATEGORY_GROUP') and featuredCategory.lower is defined and featuredCategory.lower is not empty %}
  181.                                 <div class="featured-category-box{% if featuredCategory.lower.isWizard is defined and featuredCategory.lower.isWizard %} wizard{% endif %} lower">
  182.                                     <a href="{{ featuredCategory.lower.href }}" onclick="gtag('event','select_promotion',{creative_name:'homepage-featured-category',promotion_name:'homepage-featured-category',items:[]})" id="homepage-featured-category">
  183.                                         <img loading="lazy" decoding="async" src="{{ featuredCategory.lower.image }}" alt="{{ featuredCategory.lower.title }}" width="376" height="210">
  184.                                         <div class="description">
  185.                                             <h3 class="mb-1 mb-md-2 mb-xl-3"><strong>{{ featuredCategory.lower.title }}</strong></h3>
  186.                                             <p class="mb-1">{{ featuredCategory.lower.description }}</p>
  187.                                             <span>{{ 'Featured category view'|trans }}</span>
  188.                                         </div>
  189.                                     </a>
  190.                                 </div>
  191.                             {% elseif smallBanners.lower.display == const('Banner::BANNER_DISPLAY_TYPE_PRODUCT') and featuredProduct.lower is defined and featuredProduct.lower is not empty %}
  192.                                 <div class="featured-product-box lower">
  193.                                     <div class="recommendation-label">
  194.                                         <span>{{ 'Recommended'|trans }}</span>
  195.                                     </div>
  196.                                     <a href="{{ featuredProduct.lower.href }}" class="featured-product-wrapper" onclick="gtag('event','select_promotion',{creative_name:'homepage-featured-product',promotion_name:'homepage-featured-product',items:[{item_id:'{{ featuredProduct.lower.code }}',item_name:'{{ featuredProduct.lower.title }}',discount:{{ featuredProduct.lower.special|number_format(2, '.', '') }},index:0,item_brand:'{{ featuredProduct.lower.vendor }}',price:{{ featuredProduct.lower.price|number_format(2, '.', '') }},quantity:1}]})" id="homepage-featured-product">
  197.                                         <div class="product-image me-3">
  198.                                             {% if featuredProduct.lower.carouselImages is defined %}
  199.                                                 <div id="featuredProduct-lower-carousel" class="carousel slide" data-bs-ride="carousel">
  200.                                                     <div class="carousel-inner">
  201.                                                         {% for image in featuredProduct.lower.carouselImages %}
  202.                                                             <div class="carousel-item {% if loop.first %}active{% endif %}">
  203.                                                                 <img loading="lazy" decoding="async" src="{{ image }}" class="d-block w-100" alt="{{ featuredProduct.lower.vendor }} {{ featuredProduct.lower.title }}">
  204.                                                             </div>
  205.                                                         {% endfor %}
  206.                                                     </div>
  207.                                                 </div>
  208.                                             {% else %}
  209.                                                 <img loading="lazy" decoding="async" src="{{ featuredProduct.lower.image }}" alt="{{ featuredProduct.lower.vendor }} {{ featuredProduct.lower.title }}">
  210.                                             {% endif %}
  211.                                         </div>
  212.                                         <div class="product-info">
  213.                                             <div class="product-title mb-1 mb-md-2 mb-xl-3">{% if featuredProduct.lower.isCustomTitle is defined %} {{- featuredProduct.lower.title -}} {% else  %}{{- featuredProduct.lower.vendor }} {{ featuredProduct.lower.title -}} {% endif %}</div>
  214.                                             <p class="product-description mb-2 mb-md-3">{{- featuredProduct.lower.attributesListTxt|raw -}}</p>
  215.                                             <div class="prices">
  216.                                                 {% if featuredProduct.lower.isDiscounted %}
  217.                                                     <span class="discounted">
  218.                                                 {{- featuredProduct.lower.special|price(currency, precision) -}}
  219.                                             </span>
  220.                                                 {% endif %}
  221.                                                 <span class="price{{ featuredProduct.lower.isDiscounted ? ' discounted-on' : '' }}">
  222.                                             {{- featuredProduct.lower.price|price(currency, precision) -}}
  223.                                         </span>
  224.                                             </div>
  225.                                         </div>
  226.                                     </a>
  227.                                     <script>
  228.                                         gtag("event", "view_promotion", {
  229.                                             creative_name: "homepage-tab-banner",
  230.                                             promotion_name: "homepage-tab-banner",
  231.                                             {% if banners.items|length > 1 -%}
  232.                                             items: [
  233.                                                 {% for item in banners.gtagEventItems  %}
  234.                                                 {
  235.                                                     "item_id": "{{ item.item_id }}",
  236.                                                     "item_name": "{{ item.item_name }}",
  237.                                                     "index": "{{ item.index }}",
  238.                                                     "promotion_id": "{{ item.promotion_id }}",
  239.                                                     "promotion_name": "{{ item.promotion_name }}"
  240.                                                 },
  241.                                                 {% endfor %}
  242.                                             ]
  243.                                             {% else -%}
  244.                                             items: []
  245.                                             {% endif -%}
  246.                                         });
  247.                                         gtag("event", "view_promotion", {
  248.                                             creative_name: "homepage-featured-category",
  249.                                             promotion_name: "homepage-featured-category",
  250.                                             items: []
  251.                                         });
  252.                                         gtag("event", "view_promotion", {
  253.                                             creative_name: "homepage-featured-product",
  254.                                             promotion_name: "homepage-featured-product",
  255.                                             items: [
  256.                                                 {
  257.                                                     item_id: "{{ featuredProduct.lower.code }}",
  258.                                                     item_name: "{{ featuredProduct.lower.title }}",
  259.                                                     discount: {{ featuredProduct.lower.special|number_format(2, '.', '') }},
  260.                                                     index: 0,
  261.                                                     item_brand: "{{ featuredProduct.lower.vendor }}",
  262.                                                     price: {{ featuredProduct.lower.price|number_format(2, '.', '') }},
  263.                                                     quantity: 1
  264.                                                 }
  265.                                             ]
  266.                                         });
  267.                                     </script>
  268.                                 </div>
  269.                             {% else %}
  270.                                 <div class="small-banner lower"></div>
  271.                             {% endif %}
  272.                         {% endif %}
  273.                     {% endif %}
  274.                 </div>
  275.             </div>
  276.         </div>
  277.     {% endif %}
  278.     {% include 'AtechNetCoreBundle/Module/advantages.html.twig' with {'warrantyYear': warrantyYear, 'reviewCount': reviewCount, 'lang': lang} %}
  279.     {% if featuredCategories %}
  280.         <section class="featured-categories">
  281.             <div class="container">
  282.                 {% for category in featuredCategories %}
  283.                     <div class="link-item">
  284.                         <a href="{{ category.href }}">
  285.                             <div class="image-wrapper">
  286.                                 <img loading="lazy" decoding="async" src="{{ asset('theme/images/category/' ~ category.image) }}" alt="{{ category.title }}">
  287.                             </div>
  288.                             <div class="featured-category-title"><span>{{ category.title }}</span></div>
  289.                             <div class="arrow-right"></div>
  290.                         </a>
  291.                     </div>
  292.                 {% endfor %}
  293.             </div>
  294.         </section>
  295.     {% endif %}
  296.     <div class="main-content">
  297.         <div class="container">
  298.             {{ include(template_from_string(content_top)) }}
  299.             <!-- Product selection tab -->
  300.             <section class="main-products-carousel">
  301.                 <h3>{{ 'Popular product list'|trans }}</h3>
  302.                 <div class="owl-carousel" id="main-products-carousel">
  303.                     {% if mainProducts %}
  304.                         {{ macros.printProducts(mainProducts, currency, precision, 12, true, true, false) }}
  305.                     {% endif %}
  306.                 </div>
  307.                 <script>
  308.                     if ( window.dataLayer ) {
  309.                         window.dataLayer.push({ ecommerce: null });  // Clear the previous ecommerce object.
  310.                         window.dataLayer.push({
  311.                             event: "view_item_list",
  312.                             ecommerce: {
  313.                                 item_list_id: "homepage-popular-products",
  314.                                 item_list_name: "homepage-popular-products",
  315.                                 items: [
  316.                                 {% for mainProduct in mainProducts %}{% if loop.index > 1 %},{% endif %}{
  317.                                         item_id: "{{ mainProduct.id }}",
  318.                                         item_name: "{{ mainProduct.title }}",
  319.                                         discount: {{ mainProduct.rawDiscountPrice }},
  320.                                         index: {{ loop.index }},
  321.                                         item_brand: "{{ mainProduct.vendor }}",
  322.                                         price: {{ mainProduct.rawPrice }},
  323.                                         quantity: 1
  324.                                     }
  325.                                 {% endfor %}
  326.                                 ]
  327.                             }
  328.                         });
  329.                     }
  330.                 </script>
  331.             </section>
  332.         </div>
  333.         <div class="testimonial-wrapper{% if domainId == const('Domain::DOMAIN_ID_RT_EU') %} eu-trustindex{% endif %}">
  334.             <div class="container">
  335.                 {%- if domainId == const('Domain::DOMAIN_ID_RT_EU') -%}
  336.                     <script defer async src='https://cdn.trustindex.io/loader.js?757dc6b28849419b02269e1ac4f'></script>
  337.                 {% else %}
  338.                     {{ include(template_from_string(content_reviews)) }}
  339.                 {%- endif -%}
  340.             </div>
  341.         </div>
  342.         <div id="preload-content-center">
  343.             <div class="category-selection">
  344.                 <div class="row preload">
  345.                     <div class="col-md-6">
  346.                         <div class="category-selection-item">
  347.                             <div class="category-selection-desc">
  348.                             {% for i in 1..4 %}
  349.                                 <div class="row">
  350.                                     <div class="col-3 col-sm-2"></div>
  351.                                     <div class="col-9 col-sm-10"></div>
  352.                                 </div>
  353.                             {% endfor %}
  354.                             </div>
  355.                         </div>
  356.                     </div>
  357.                     <div class="col-md-6">
  358.                         <div class="row wrapper">
  359.                             {% for i in 1..4 %}
  360.                                 <div class="col-sm-6"></div>
  361.                             {% endfor %}
  362.                         </div>
  363.                     </div>
  364.                 </div>
  365.             </div>
  366.             <div class="bazar-product-list">
  367.                 <div class="row preload">
  368.                     {% for i in 1..4 %}
  369.                         <div class="col-6 col-sm-4 col-lg-3">
  370.                             <div class="preload-item">
  371.                                 <div class="image"></div>
  372.                                 <div class="title1"></div>
  373.                                 <div class="title2"></div>
  374.                                 <div class="description"></div>
  375.                                 <div class="prices"></div>
  376.                                 <div class="button"></div>
  377.                             </div>
  378.                         </div>
  379.                     {% endfor %}
  380.                 </div>
  381.             </div>
  382.             <div class="blog-list" style="border: 0;">
  383.                 <div class="row preload">
  384.                     {% for i in 1..4 %}
  385.                         <div class="col-sm-12 col-lg-3">
  386.                             <div class="preload-item">
  387.                                 <div class="image"></div>
  388.                                 <div class="title1"></div>
  389.                                 <div class="title2"></div>
  390.                                 <div class="description"></div>
  391.                             </div>
  392.                         </div>
  393.                     {% endfor %}
  394.                 </div>
  395.             </div>
  396.             <div class="heureka-list">
  397.                 <div class="row preload">
  398.                     <div class="col-sm-3">
  399.                         <div class="preload-item heureka-logo">
  400.                             <div class="image" style="border-radius: 200px;"></div>
  401.                             <div class="title1"></div>
  402.                         </div>
  403.                     </div>
  404.                     {% for i in 1..3 %}
  405.                         <div class="col-sm-3">
  406.                             <div class="preload-item">
  407.                                 <div class="image"></div>
  408.                                 <div class="title1"></div>
  409.                                 <div class="title2"></div>
  410.                             </div>
  411.                         </div>
  412.                     {% endfor %}
  413.                 </div>
  414.             </div>
  415.         </div>
  416.         <div id="content-center"></div>
  417.         {{ include(template_from_string(content_bottom)) }}
  418.     </div>
  419. {% endblock %}
  420. {% block stylesheets %}
  421.     <link rel="stylesheet" href="{{ asset('theme/owl-carousel/assets/owl.carousel.min.css'|appendAssetCache) }}">
  422.     {{ parent() }}
  423. {% endblock %}
  424. {% block javascripts %}
  425.     {{ parent() }}
  426.     <script type="text/javascript" src="{{ asset('theme/owl-carousel/owl.carousel.min.js'|appendAssetCache) }}"></script>
  427.     <script>
  428.         var mainProductsOwlObject = {
  429.             loop: false,
  430.             startPosition: 0,
  431.             dots: true,
  432.             checkVisibility: false,
  433.             nav: true,
  434.             navText: [
  435.                 `<i class="fas fa-chevron-left"></i><span class="visually-hidden">{{ 'Previous slide'|trans }}</span>`,
  436.                 `<i class="fas fa-chevron-right"></i><span class="visually-hidden">{{ 'Next slide'|trans }}</span>`
  437.             ],
  438.             responsive: {
  439.                 1330: {
  440.                     nav: true,
  441.                     items: 4,
  442.                     stagePadding: 10,
  443.                     margin: 0
  444.                 },
  445.                 990: {
  446.                     items: 4,
  447.                     nav: false,
  448.                     stagePadding: 10,
  449.                     margin: 20
  450.                 },
  451.                 576: {
  452.                     items: 3,
  453.                     nav: false,
  454.                     dots: true,
  455.                     stagePadding: 0
  456.                 },
  457.                 0: {
  458.                     items: 2,
  459.                     nav: false,
  460.                     dots: true,
  461.                     stagePadding: 0,
  462.                     mergeFit: true
  463.                 }
  464.             }
  465.         };
  466.         $(document).ready(function() {
  467.             $("#main-products-carousel").owlCarousel(mainProductsOwlObject);
  468.             $('#main-products-carousel').equation({
  469.                 carousel: true, 
  470.                 selectors: [
  471.                     '.product-list-item .product-list-details .product-list-name', 
  472.                     '.product-list-item .product-list-details .product-list-attributes'
  473.                 ]
  474.             });
  475.             $('#main-products-carousel .owl-dot').each(function(index) {
  476.                 $(this).attr('aria-label', "{{ 'Go to slide'|trans }}" + (index + 1));
  477.             });
  478.             $.ajax({
  479.                 method: 'GET',
  480.                 url: '{{ path("homepage_bottom_content_ajax") }}',
  481.                 success: function(response) {
  482.                     let result = response.replace(/\s/g,' ');
  483.                     $('#content-center').html(result).show();
  484.                     setCarousels();
  485.                     $('#preload-content-center').hide();
  486.                 }
  487.             });
  488.         });
  489.         function owlInitialized () {
  490.             $(".product-list .row.preload").remove();
  491.         }
  492.         function setCarousels () {
  493.             $('#categorySelection .carousel-inner').owlCarousel({
  494.                 items: 1,
  495.                 dots: false,
  496.                 nav: true,
  497.                 loop: true,
  498.                 navText: [
  499.                     '<i class="fas fa-chevron-left"></i>',
  500.                     '<i class="fas fa-chevron-right"></i>'
  501.                 ]
  502.             });
  503.             $("#homepage-blog-carousel").owlCarousel({
  504.                 items: 3,
  505.                 loop: false,
  506.                 startPosition: 0,
  507.                 nav: false,
  508.                 dots: true,
  509.                 responsive: {
  510.                     990: {
  511.                         items: 3,
  512.                         dots: false,
  513.                         stagePadding: 0
  514.                     },
  515.                     590: {
  516.                         items: 2,
  517.                         dots: true,
  518.                         stagePadding: 0
  519.                     },
  520.                     0: {
  521.                         items: 1,
  522.                         dots: true,
  523.                         stagePadding: 0
  524.                     }
  525.                 }
  526.             });
  527.             $("#under-amount-products-carousel").owlCarousel({
  528.                 loop: false,
  529.                 startPosition: 0,
  530.                 checkVisibility: false,
  531.                 margin: 20,
  532.                 navText: [
  533.                     '<i class="fas fa-chevron-left"></i>', 
  534.                     '<i class="fas fa-chevron-right"></i>'
  535.                 ],
  536.                 responsive: {
  537.                     1330: {
  538.                         nav: true,
  539.                         dots: true,
  540.                         items: 3
  541.                     },
  542.                     767: {
  543.                         items: 3,
  544.                         nav: false,
  545.                         dots: true
  546.                     },
  547.                     670: {
  548.                         items: 2,
  549.                         nav: false,
  550.                         dots: true,
  551.                         margin: 10,
  552.                         stagePadding: 40
  553.                     },
  554.                     380: {
  555.                         items: 1,
  556.                         nav: false,
  557.                         dots: true,
  558.                         mergeFit: true,
  559.                         margin: 10,
  560.                         stagePadding: 12
  561.                     },
  562.                     0: {
  563.                         items: 1,
  564.                         nav: false,
  565.                         dots: true,
  566.                         mergeFit: true,
  567.                         margin: 10,
  568.                         stagePadding: 12
  569.                     }
  570.                 }
  571.             });
  572.         }
  573.         {% if banners is not null and  banners.items|length > 1 %}
  574.             const myCarousel = document.getElementById("bannersCarouselIndicators");
  575.             const carouselIndicator = myCarousel.querySelector("#carousel-loader .current-percent");
  576.             let intervalID;
  577.             const carousel = new bootstrap.Carousel(myCarousel);
  578.             const carouselUpper = document.getElementById("featuredProduct-upper-carousel")
  579.                     ? new bootstrap.Carousel(document.getElementById("featuredProduct-upper-carousel"))
  580.                     : null;
  581.             const carouselLower = document.getElementById("featuredProduct-lower-carousel")
  582.                 ? new bootstrap.Carousel(document.getElementById("featuredProduct-lower-carousel"))
  583.                 : null;
  584.             window.addEventListener("load", function () {
  585.                 fillCarouselIndicator();
  586.             });
  587.             myCarousel.addEventListener("slid.bs.carousel", function (e) {
  588.                 fillCarouselIndicator();
  589.             });
  590.             function fillCarouselIndicator() {
  591.                 carouselIndicator.style.width = 0;
  592.                 clearInterval(intervalID);
  593.                 carousel.pause();
  594.                 if (carouselUpper)
  595.                 {
  596.                     carouselUpper.pause();
  597.                 }
  598.                 if (carouselLower)
  599.                 {
  600.                     carouselLower.pause();
  601.                 }
  602.                 let i = 0;
  603.                 intervalID = setInterval(function () {
  604.                     i++;
  605.                     myCarousel.querySelector(".current-percent").style.width = i + "%";
  606.                     if (i >= 100) {
  607.                         carousel.next();
  608.                         if (carouselUpper)
  609.                         {
  610.                             carouselUpper.next();
  611.                         }
  612.                         if (carouselLower)
  613.                         {
  614.                             carouselLower.next();
  615.                         }
  616.                     }
  617.                 }, {{ banners.interval > 0 ? banners.interval : 3 }} * 10);
  618.             }
  619.         {% endif %}
  620.     </script>
  621. {% endblock %}
  622. {% block title %}{{ 'default page title' | trans }} - {{ parent() }}{% endblock %}
  623. {% block meta %}
  624.     {% set domainTLD = app.request.session.get('defaultLocale') %}
  625.     {% if domainTLD == 'en' %}
  626.         {% set domainTLD = 'eu' %}
  627.     {% endif %}
  628.     <meta name="description" content="{{ 'default page description' | trans }}" />
  629.     <meta property="og:url" content="{{ app.request.uri }}" />
  630.     <meta property="og:type" content="website" />
  631.     <meta property="og:locale" content="{{ app.request.locale |ogLocale }}" />
  632.     <meta property="og:title" content="{{ 'default page title' | trans }}" />
  633.     <meta property="og:description" content="{{ 'default page description' | trans }}" />
  634.     <meta property="og:image" content="https://www.furbify.{{ domainTLD }}/theme/images/furbify-share-image.png" />
  635. {% endblock %}
  636. {% block header %}
  637.     {{ include(template_from_string(header)) }}
  638. {% endblock %}
  639. {% block footer %}
  640.     {{ include(template_from_string(footer)) }}
  641. {% endblock %}
  642. {% block schema %}
  643. {{ parent() }}
  644. {% set _baseUrl = app.request.schemeAndHttpHost %}
  645. <script type="application/ld+json">
  646. {
  647.     "@context": "https://schema.org",
  648.     "@type": "OnlineStore",
  649.     "@id": "{{ _baseUrl }}/#store",
  650.     "name": "Furbify Online Store",
  651.     "url": "{{ _baseUrl }}",
  652.     "priceRange": "€€",
  653.     "currenciesAccepted": "EUR",
  654.     "paymentAccepted": ["Credit Card", "PayPal", "Bank Transfer"],
  655.     "hasReturnPolicy": {
  656.         "@type": "MerchantReturnPolicy",
  657.         "applicableCountry": "EU",
  658.         "returnPolicyCategory": "https://schema.org/MerchantReturnFiniteReturnWindow",
  659.         "merchantReturnDays": 14,
  660.         "returnMethod": "https://schema.org/ReturnByMail",
  661.         "returnFees": "https://schema.org/FreeReturn"
  662.     },
  663.     "shippingDetails": {
  664.         "@type": "OfferShippingDetails",
  665.         "shippingRate": {"@type": "MonetaryAmount", "value": "0", "currency": "EUR"},
  666.         "shippingDestination": {
  667.             "@type": "DefinedRegion",
  668.             "addressCountry": ["AT", "BE", "BG", "HR", "CY", "CZ", "DK", "EE", "FI", "FR", "DE", "GR", "HU", "IE", "IT", "LV", "LT", "LU", "MT", "NL", "PL", "PT", "RO", "SK", "SI", "ES", "SE"]
  669.         },
  670.         "deliveryTime": {
  671.             "@type": "ShippingDeliveryTime",
  672.             "handlingTime": {"@type": "QuantitativeValue", "minValue": 1, "maxValue": 2, "unitCode": "DAY"},
  673.             "transitTime": {"@type": "QuantitativeValue", "minValue": 2, "maxValue": 7, "unitCode": "DAY"}
  674.         }
  675.     },
  676.     "parentOrganization": {"@id": "{{ _baseUrl }}/#organization"}
  677. }
  678. </script>
  679. <script type="application/ld+json">
  680. {
  681.     "@context": "https://schema.org",
  682.     "@type": "BreadcrumbList",
  683.     "itemListElement": [{
  684.         "@type": "ListItem",
  685.         "position": 1,
  686.         "name": "{{ 'Home'|trans|e('js') }}",
  687.         "item": "{{ _baseUrl }}"
  688.     }]
  689. }
  690. </script>
  691. {% endblock %}