{% extends 'Slivki/mobile/base.html.twig' %}
{% block styles %}
<link rel="stylesheet" href="/css/swiper/swiper.min.css" />
{{ parent() }}
{% endblock %}
{% block content %}
<input id="categoryID" type="hidden" value="{{ currentCategoryID }}"/>
<nav aria-label="breadcrumb">
<ol class="breadcrumb m-0 py-1 px-2 bg-white">
<li class="breadcrumb-item"><a href="{{ base_url }}">Главная</a></li>
{% if currentCategoryID > 0 %}
{% if isChildOfVideoGuide is defined and isChildOfVideoGuide %}
<li class="breadcrumb-item">
<a href="{{ getURL("Slivki:Sale:category", videoguideCategory.category.getID()) }}">
{{ videoguideCategory.category.getName() }}
</a>
</li>
{% else %}
<li class="breadcrumb-item"><a href="{{ base_url }}{{ path('sales') }}">Новости скидок</a></li>
{% endif %}
{% if parentCategory is defined %}
<li class="breadcrumb-item"><a href="{{ getURL("Slivki:Sale:category", parentCategory.category.getID()) }}">{{ parentCategory.category.getName() }}</a></li>
{% endif %}
<li class="breadcrumb-item text-muted">{{ currentCategory.category.getName() }}</li>
{% else %}
<li class="breadcrumb-item text-muted">Новости скидок</li>
{% endif %}
</ol>
</nav>
<div class="content-title alt-font">
<h1>{{ currentCategoryID > 0 ? currentCategory.category.getName() : 'Новости скидок' }}</h1>
({{ currentCategoryID > 0 ? currentCategory.entityList|length : getActiveSalesCount() }})
</div>
{% if firstBanner is defined and firstBanner %}
{% include 'Slivki/mobile/banner/banner.html.twig' with {'banner': firstBanner} only %}
{% endif %}
{% if isVideoguideCategory is not defined or not isVideoguideCategory %}
<div id="mustBeFixedContainer">
<div id="mustBeFixed" class="py-1">
<ul class="capsule-menu">
{% apply spaceless %}
{% for category in saleMenu %}
<li>
<a href="{{ getURL("Slivki:Sale:category", category.category.getID()) }}" {{ category.category.getID() == currentCategoryID ? 'class="active"'}}>
{{ category.category.getName() }} <span>{{ category.category.getEntityCount() }}</span>
</a>
</li>
{% endfor %}
{% endapply %}
</ul>
</div>
</div>
{% else %}
{% include 'Slivki/mobile/sale/videoguide/menu.html.twig' %}
{% endif %}
<div class="px-2 mb-2">
{% if isVideoguideCategory is not defined or not isVideoguideCategory %}
{% include 'Slivki/mobile/sale/category_map.html.twig' %}
{% endif %}
{% if mainHotFeed is defined %}
<div id="mainHotFeed" class="px-1 position-relative">
<h6 class="clearfix">
<span class="blink text-slivki">·</span>
<div class="d-inline-block alt-bold-font">ГОРЯЧАЯ ЛЕНТА</div>
</h6>
<div id="mainHotFeedSlider" class="swiper-container" data-offset="0" data-type="{{ constant('Slivki\\Entity\\HotFeed::TYPE_MAIN_PAGE') }}">
<div class="swiper-wrapper">
{{ mainHotFeed|raw }}
</div>
<div class="swiper-button swiper-button-prev"></div>
<div class="swiper-button swiper-button-next"></div>
</div>
</div>
{% endif %}
{% include 'Slivki/mobile/sale/category.html.twig' %}
{% if currentCategoryID == 0 %}
<img class="d-block my-3 mx-auto" id='saleCategoryListLoader' src='/images/image-preview-ajax-loader.gif' alt='Загрузка...'/>
{% endif %}
</div>
{% endblock %}
{% block popup %}
{{ parent() }}
{% if not app.user %}
{% include 'Slivki/popups/comment_only_registered_popup.html.twig' with {'id': 'onlyRegistered'} %}
{% endif %}
{% endblock %}
{% block javascripts %}
<script src="/js/swiper-js/swiper.min.js"></script>
<script src="https://api-maps.yandex.ru/2.1/?lang=ru_RU" type="text/javascript"></script>
<script src="//mourner.github.io/simplify-js/simplify.js"></script>
{{ parent() }}
<script src="/mobile/js/sales.min.js?v={{ mobile_sales_js_version }}"></script>
{% endblock %}