templates/Slivki/mobile/offer/category.html.twig line 1

Open in your IDE?
  1. {% extends 'Slivki/mobile/base.html.twig' %}
  2. {% block styles %}
  3.     {% if tourismHotFeed is defined and tourismHotFeed|length > 0 %}
  4.         <link rel="stylesheet" href="/css/swiper/swiper.min.css" />
  5.     {% endif %}
  6.     <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/fancybox/3.3.5/jquery.fancybox.min.css" />
  7.     {{ parent() }}
  8. {% endblock %}
  9. {% block title %}{{ parent() }}{{ currentPage is defined and currentPage != 1 ? ' - Страница №' ~ currentPage }}{% endblock %}
  10. {% block content %}
  11.     <input id="isCategoryPageMobile" type="hidden">
  12.     {% if tourismHotFeed is defined and tourismHotFeed|length > 0 %}
  13.         <div id="mainHotFeed" class="px-1 position-relative">
  14.             <h6 class="clearfix">
  15.                 <span class="blink text-slivki">·</span>
  16.                 <div class="d-inline-block alt-bold-font">ГОРЯЩИЕ И НОВЫЕ ТУРЫ</div>
  17.             </h6>
  18.             <div id="mainHotFeedSlider" class="swiper-container" data-offset="0" data-type="{{ constant('Slivki\\Entity\\HotFeed::TYPE_OFFER_TOURISM_PAGE') }}">
  19.                 <div class="swiper-wrapper">
  20.                     {{ tourismHotFeed|raw }}
  21.                 </div>
  22.                 <div class="swiper-button swiper-button-prev"></div>
  23.                 <div class="swiper-button swiper-button-next"></div>
  24.             </div>
  25.         </div>
  26.     {% endif %}
  27.     <div class="px-1">
  28.         {% set categoryBanner = app.user and app.user.hasRole(constant('\\Slivki\\Entity\\UserGroup::ROLE_ADS_FREE')) ? ''
  29.             : getCategoryBanner(categoryID) %}
  30.         {{ category|replace({'<div id="categoryBannerPlaceholder"></div>': categoryBanner})|raw }}
  31.     </div>
  32.     {% if lastMonthPurchaseCount is defined %}
  33.         <input id="lastMonthPurchaseCount" type="hidden" value="{{ lastMonthPurchaseCount|json_encode }}">
  34.     {% endif %}
  35. {% endblock %}
  36. {% block javascripts %}
  37.     {% if tourismHotFeed is defined and tourismHotFeed|length > 0 %}
  38.         <script src="/js/swiper-js/swiper.min.js"></script>
  39.     {% endif %}
  40.     <script src="https://api-maps.yandex.ru/2.1/?lang=ru_RU" type="text/javascript"></script>
  41.     <script src="https://yastatic.net/es5-shims/0.0.2/es5-shims.min.js"></script>
  42.     <script src="https://yastatic.net/share2/share.js"></script>
  43.     <script src="//mourner.github.io/simplify-js/simplify.js"></script>
  44.     <script src="https://cdnjs.cloudflare.com/ajax/libs/fancybox/3.3.5/jquery.fancybox.min.js"></script>
  45.     {{ parent() }}
  46.     <script type="module" src="/mobile/js/category.min.js?v={{ mobile_category_js_version }}"></script>
  47.     <script type="module" type="text/javascript" src="/js/work_examples/work_examples.js?v={{ work_examples_js_version }}"></script>
  48. {% endblock %}
  49. {% block popup %}
  50.     {{ parent() }}
  51.     {% include 'Slivki/mobile/share_block.html.twig' %}
  52. {% endblock %}
  53. {% block brandingBanner %}
  54.     {% if not (app.user and app.user.hasRole(constant('\\Slivki\\Entity\\UserGroup::ROLE_ADS_FREE'))) %}
  55.         {% set brandingBanner = getBrandingBanner(app.user, brandingBannerCategoryIDs is defined ? brandingBannerCategoryIDs : []) %}
  56.         {% if brandingBanner and brandingBanner.getMobileDivider() %}
  57.             <input type="hidden" id="brandingBannerImage" value="{{ brandingBanner.getMobileDivider() }}"
  58.                    data-oid="{{ brandingBanner.getID() }}" data-id="{{ brandingBanner.getBannerID() }}"
  59.                    data-branding="{{ brandingBanner.getBannerID() }}" data-url="{{ brandingBanner.getUrl()|trim }}"
  60.                    data-right-side-url="{{ brandingBanner.getRightSideUrl()|trim }}">
  61.         {% endif %}
  62.     {% endif %}
  63. {% endblock %}
  64. {% block RTBHouse %}
  65.     {% if categoryID == constant('Slivki\\Entity\\Category::NEW_OFFER_CATEGORY_ID') %}
  66.         <script>
  67.             try{ (function() {
  68.                 var prefix = "", hash = "TS5TS2S9bdSbgKBA4Q2H", rtbhTags = []; rtbhTags.push("pr_"+hash+"_newoffers"); rtbhTags.push("pr_"+hash+"_uid_"+document.getElementById('rtbhUID').value);
  69.                 var key = "__rtbhouse.lid", lid = window.localStorage.getItem(key); if (!lid) {
  70.                     lid = ""; var pool = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
  71.                     for (var i = 0; i < 20; i++) lid += pool.charAt(Math.floor(Math.random() * pool.length)); window.localStorage.setItem(key, lid);}
  72.                 rtbhTags.push("pr_"+hash+"_lid_" + lid);
  73.                 var ifr = document.createElement("iframe"),
  74.                     sr = encodeURIComponent(document.referrer ? document.referrer : ""),
  75.                     su = encodeURIComponent(document.location.href ? document.location.href : ""),
  76.                     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]);}
  77.                 ifrSrc += "&su=" + su + "&sr=" + sr + "&ts=" + tmstmp;
  78.                 ifr.setAttribute("src", ifrSrc); ifr.setAttribute("width", "1");
  79.                 ifr.setAttribute("height", "1"); ifr.setAttribute("scrolling", "no");
  80.                 ifr.setAttribute("frameBorder", "0"); ifr.setAttribute("style", "display:none");
  81.                 ifr.setAttribute("referrerpolicy", "no-referrer-when-downgrade"); if(document.body){document.body.appendChild(ifr);}
  82.                 else{window.addEventListener('DOMContentLoaded', function(){document.body.appendChild(ifr);});}
  83.             })();} catch(e) {} </script>
  84.     {% else %}
  85.         <script>
  86.             try{ (function() {
  87.                 var prefix = "", hash = "TS5TS2S9bdSbgKBA4Q2H", rtbhTags = []; rtbhTags.push("pr_"+hash+"_category2_"+document.getElementById('categoryID').value); rtbhTags.push("pr_"+hash+"_uid_"+document.getElementById('rtbhUID').value);
  88.                 var key = "__rtbhouse.lid", lid = window.localStorage.getItem(key); if (!lid) {
  89.                     lid = ""; var pool = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
  90.                     for (var i = 0; i < 20; i++) lid += pool.charAt(Math.floor(Math.random() * pool.length)); window.localStorage.setItem(key, lid);}
  91.                 rtbhTags.push("pr_"+hash+"_lid_" + lid);
  92.                 var ifr = document.createElement("iframe"),
  93.                     sr = encodeURIComponent(document.referrer ? document.referrer : ""),
  94.                     su = encodeURIComponent(document.location.href ? document.location.href : ""),
  95.                     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]);}
  96.                 ifrSrc += "&su=" + su + "&sr=" + sr + "&ts=" + tmstmp;
  97.                 ifr.setAttribute("src", ifrSrc); ifr.setAttribute("width", "1");
  98.                 ifr.setAttribute("height", "1"); ifr.setAttribute("scrolling", "no");
  99.                 ifr.setAttribute("frameBorder", "0"); ifr.setAttribute("style", "display:none");
  100.                 ifr.setAttribute("referrerpolicy", "no-referrer-when-downgrade"); if(document.body){document.body.appendChild(ifr);}
  101.                 else{window.addEventListener('DOMContentLoaded', function(){document.body.appendChild(ifr);});}
  102.             })();} catch(e) {} </script>
  103.     {% endif %}
  104. {% endblock %}