{% extends 'Slivki/index.html.twig' %}
{% block title %}{{ parent() }}{{ currentPage is defined and currentPage != 1 ? ' - Страница №' ~ currentPage }}{% endblock %}
{% block left_sidebar %}
{% if constant('\\Slivki\\Entity\\Category::NEW_YEAR_CATEGORY_ID') == categoryID %}
{{ getSidebar(constant('\\Slivki\\Entity\\Category::NEW_YEAR_SALE_CATEGORY_ID')) }}
{% else %}
{{ parent() }}
{% endif %}
{% endblock %}
{% block mainColumnClass %}{{ parent() }}category-page{% endblock %}
{% block topContentBlock %}
{% if tourismHotFeed is defined and tourismHotFeed|length > 0 %}
<div class="top-content-block clearfix category-hotfeed-wrapper">
<div id="mainHotFeed">
<div class="title"><i> </i> ГОРЯЩИЕ И НОВЫЕ ТУРЫ</div>
<div class="tourism-hotfeed swiper-container" id="mainHotFeedSlider" data-offset="0" data-type="{{ constant('Slivki\\Entity\\HotFeed::TYPE_OFFER_TOURISM_PAGE') }}">
<div class="swiper-wrapper">
{{ tourismHotFeed|raw }}
</div>
<div class="swiper-button swiper-button-prev"></div>
<div class="swiper-button swiper-button-next"></div>
</div>
</div>
</div>
{% endif %}
{% endblock %}
{% block main_content %}
{# rodenTeaserBannerABTest #}
{% if categoryID == constant('Slivki\\Entity\\Category::TOP_CATEGORY_ID') %}
{% set abValue = app.session.get('rodenTeaserBannerABTest', '0') %}
{% set utmCampaign = 'utm_campaign=abw-woman' %}
{% set imgUri = '/roden-lady.jpg' %}
{% if abValue == 0 %}
{% set utmCampaign = 'utm_campaign=abw-vip' %}
{% set imgUri = '/roden-vip.jpg' %}
{{ app.session.set('rodenTeaserBannerABTest', 1) }}
{% else %}
{{ app.session.set('rodenTeaserBannerABTest', 0) }}
{% endif %}
{% set category = category|replace({'utm_campaign=roden_pop': utmCampaign, '/slivki-img/1496324948_.jpg': imgUri}) %}
{% set categoryBanner = app.user and app.user.hasRole(constant('\\Slivki\\Entity\\UserGroup::ROLE_ADS_FREE')) ? ''
: getCategoryBanner(categoryID) %}
{% set category = category|replace({'<div id="category-banner-placeholder" style="display:none"></div>': categoryBanner}) %}
{% endif %}
{# end rodenTeaserBannerABTest #}
{{ category|raw }}
{% if lastMonthPurchaseCount is defined %}
<input id="lastMonthPurchaseCount" type="hidden" value="{{ lastMonthPurchaseCount|json_encode }}">
{% endif %}
{% endblock %}
{% block javascripts %}
{{ parent() }}
{# <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="text/javascript" src="//yastatic.net/share2/share.js" charset="utf-8"></script>
<script type="module" src="/js/category.js?v={{ category_js_version }}" type="text/javascript"></script>
<script type="module" type="text/javascript" src="/js/work_examples/work_examples.js?v={{ work_examples_js_version }}"></script>
{% endblock %}
{% block RTBHouse %}
{% if categoryID == constant('Slivki\\Entity\\Category::NEW_OFFER_CATEGORY_ID') %}
<script>
try{ (function() {
var prefix = "", hash = "TS5TS2S9bdSbgKBA4Q2H", rtbhTags = []; rtbhTags.push("pr_"+hash+"_newoffers"); 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>
{% else %}
<script>
try{ (function() {
var prefix = "", hash = "TS5TS2S9bdSbgKBA4Q2H", rtbhTags = []; rtbhTags.push("pr_"+hash+"_category2_"+document.getElementById('categoryID').value); 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>
{% endif %}
{% endblock %}