{% extends 'Slivki/mobile/base.html.twig' %}
{% block styles %}
<link rel="stylesheet" href="/css/swiper/swiper.min.css" />
{{ parent() }}
{% endblock %}
{% block topContent %}
{% include "Slivki/mobile#{regional_template_path}/top_block.html.twig" %}
{% if mainHotFeed != '' %}
<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 %}
{% endblock %}
{% block content %}
<div class="content-title alt-font text-slivki" data-html="true" data-original-title="Промокоды<br> Уникальные предложения!<br> Лучшие цены!<br>" data-placement="bottom" data-toggle="tooltip">
<h1>{{ metaInfo.title }}</h1>
{{ smallCity is not defined or not smallCity ? ' (' ~ getActiveOffersCount(cityID) ~ ')' }}
</div>
<div class="categories-list{{ topLevelCategoryIDList|length == 1 ? ' one-category-city' }}">
{% for categoryID, categoryBox in categoryBoxList %}
{% set categoryBanner = app.user and app.user.hasRole(constant('\\Slivki\\Entity\\UserGroup::ROLE_ADS_FREE')) ? ''
: getCategoryBanner(categoryID) %}
{{ categoryBox|replace({'<div id="categoryBannerPlaceholder"></div>': categoryBanner})|raw }}
{% endfor %}
</div>
{% if topLevelCategoryIDList|length > 1 %}
<div id="mainPageLoader" class="w-100"><img class="d-block d-none mx-auto my-3" src="/images/preloader-mob.svg" width="30" height="30"></div>
{% endif %}
{% if cityID == constant('Slivki\\Entity\\City::DEFAULT_CITY_ID') %}
<div id="mainBottomBlock" class="my-1 w-100">
<div class="row no-gutters">
<div class="col-6">
<a id="moreCategories" href="#">Еще акции<br/>с промокодами</a>
</div>
<div class="col-6">
<a class="mr-0" href="{{ path('sales') }}">Новости<br/>скидок</a>
</div>
</div>
<div class="row no-gutters">
<div class="col-4">
<a class="text-white" style="background-image: url(/images/landing_photoguides.jpg)"
href="{{ getURL(constant('Slivki\\Repository\\SeoRepository::RESOURCE_URL_SALE_CATEGORY'), constant('Slivki\\Entity\\Category::PHOTOGUIDE_SALE_CATEGORY_ID')) }}">Фотогиды</a>
</div>
<div class="col-4">
<a class="text-white" style="background-image: url(/images/landing_fliers.jpg)"
href="{{ path('flierLanding') }}">Листовки</a>
</div>
<div class="col-4">
<a class="mr-0 text-white" style="background-image: url(/images/landing_sushi.jpg)"
href="/eda/sushi">Суши</a>
</div>
</div>
{% if app.user %}
<a href="{{ base_url }}/WatchList"><i class="slivki-icon-eye-1"></i> Недавно просмотренные акции</a>
{% else %}
<a data-toggle="modal" data-target=".modal-auth"><i class="slivki-icon-eye-1"></i> Недавно просмотренные акции</a>
{% endif %}
</div>
{% elseif topLevelCategoryIDList|length > 2 %}
<div class="px-2 w-100">
<a id="moreCategories" class="btn bg-slivki btn-block my-2 more-categories-button" href="#">Еще категории</a>
</div>
{% endif %}
<input id="topLevelCategoryIDList" type="hidden" value="{{ topLevelCategoryIDList|json_encode }}">
{% endblock %}
{% block popup %}
{{ parent() }}
{% include 'Slivki/mobile/select_city.html.twig' %}
{{ getMainMenu(false, false) }}
{% endblock %}
{% block javascripts %}
<script src="/js/swiper-js/swiper.min.js"></script>
{{ parent() }}
<script src="/mobile/js/index.js?v=4"></script>
{% if smallCity is defined and smallCity %}
<script src="//api-maps.yandex.ru/2.1.29/?lang=ru-RU" type="text/javascript"></script>
<script src="//mourner.github.io/simplify-js/simplify.js"></script>
<script type="module" src="/mobile/js/category.min.js?v={{ mobile_category_js_version }}"></script>
{% endif %}
{% endblock %}
{% block RTBHouse %}
<script>
try{ (function() {
var prefix = "", hash = "TS5TS2S9bdSbgKBA4Q2H", rtbhTags = []; rtbhTags.push("pr_"+hash+"_home"); rtbhTags.push("pr_"+hash+"_uid_"+document.getElementById('rtbhUID').value);
var key = "__rtbhouse.lid", lid = window.localStorage.getItem(key); if (!lid) {
lid = ""; var pool = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
for (var i = 0; i < 20; i++) lid += pool.charAt(Math.floor(Math.random() * pool.length)); window.localStorage.setItem(key, lid);}
rtbhTags.push("pr_"+hash+"_lid_" + lid);
var ifr = document.createElement("iframe"),
sr = encodeURIComponent(document.referrer ? document.referrer : ""),
su = encodeURIComponent(document.location.href ? document.location.href : ""),
ifrSrc = "https://"+prefix+"creativecdn.com/tags?type=iframe", tmstmp = encodeURIComponent("" + Date.now()); for(var i=0; i<rtbhTags.length; i++) {ifrSrc += "&id=" + encodeURIComponent(rtbhTags[i]);}
ifrSrc += "&su=" + su + "&sr=" + sr + "&ts=" + tmstmp;
ifr.setAttribute("src", ifrSrc); ifr.setAttribute("width", "1");
ifr.setAttribute("height", "1"); ifr.setAttribute("scrolling", "no");
ifr.setAttribute("frameBorder", "0"); ifr.setAttribute("style", "display:none");
ifr.setAttribute("referrerpolicy", "no-referrer-when-downgrade"); if(document.body){document.body.appendChild(ifr);}
else{window.addEventListener('DOMContentLoaded', function(){document.body.appendChild(ifr);});}
})();} catch(e) {} </script>
{% endblock %}