templates/Slivki/mobile/index.html.twig line 1

Open in your IDE?
  1. {% extends 'Slivki/mobile/base.html.twig' %}
  2. {% block styles %}
  3.     <link rel="stylesheet" href="/css/swiper/swiper.min.css" />
  4.     {{ parent() }}
  5. {% endblock %}
  6. {% block topContent %}
  7.     {% include "Slivki/mobile#{regional_template_path}/top_block.html.twig" %}
  8.     {% if mainHotFeed != '' %}
  9.         <div id="mainHotFeed" class="px-1 position-relative">
  10.             <h6 class="clearfix">
  11.                 <span class="blink text-slivki">·</span>
  12.                 <div class="d-inline-block alt-bold-font">ГОРЯЧАЯ ЛЕНТА</div>
  13.             </h6>
  14.             <div id="mainHotFeedSlider" class="swiper-container" data-offset="0" data-type="{{ constant('Slivki\\Entity\\HotFeed::TYPE_MAIN_PAGE') }}">
  15.                 <div class="swiper-wrapper">
  16.                     {{ mainHotFeed|raw }}
  17.                 </div>
  18.                 <div class="swiper-button swiper-button-prev"></div>
  19.                 <div class="swiper-button swiper-button-next"></div>
  20.             </div>
  21.         </div>
  22.     {% endif %}
  23. {% endblock %}
  24. {% block content %}
  25.     <div class="content-title alt-font text-slivki" data-html="true" data-original-title="Промокоды<br> Уникальные предложения!<br> Лучшие цены!<br>" data-placement="bottom" data-toggle="tooltip">
  26.         <h1>{{ metaInfo.title }}</h1>
  27.         {{ smallCity is not defined or not smallCity ? ' (' ~ getActiveOffersCount(cityID) ~ ')' }}
  28.     </div>
  29.     <div class="categories-list{{ topLevelCategoryIDList|length == 1 ? ' one-category-city' }}">
  30.         {% for categoryID, categoryBox in categoryBoxList %}
  31.             {% set categoryBanner = app.user and app.user.hasRole(constant('\\Slivki\\Entity\\UserGroup::ROLE_ADS_FREE')) ? ''
  32.                 : getCategoryBanner(categoryID) %}
  33.             {{ categoryBox|replace({'<div id="categoryBannerPlaceholder"></div>': categoryBanner})|raw }}
  34.         {% endfor %}
  35.     </div>
  36.     {% if topLevelCategoryIDList|length > 1 %}
  37.         <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>
  38.     {% endif %}
  39.     {% if cityID == constant('Slivki\\Entity\\City::DEFAULT_CITY_ID') %}
  40.         <div id="mainBottomBlock" class="my-1 w-100">
  41.             <div class="row no-gutters">
  42.                 <div class="col-6">
  43.                     <a id="moreCategories" href="#">Еще акции<br/>с промокодами</a>
  44.                 </div>
  45.                 <div class="col-6">
  46.                     <a class="mr-0" href="{{ path('sales') }}">Новости<br/>скидок</a>
  47.                 </div>
  48.             </div>
  49.             <div class="row no-gutters">
  50.                 <div class="col-4">
  51.                     <a class="text-white" style="background-image: url(/images/landing_photoguides.jpg)"
  52.                        href="{{ getURL(constant('Slivki\\Repository\\SeoRepository::RESOURCE_URL_SALE_CATEGORY'), constant('Slivki\\Entity\\Category::PHOTOGUIDE_SALE_CATEGORY_ID')) }}">Фотогиды</a>
  53.                 </div>
  54.                 <div class="col-4">
  55.                     <a class="text-white" style="background-image: url(/images/landing_fliers.jpg)"
  56.                        href="{{ path('flierLanding') }}">Листовки</a>
  57.                 </div>
  58.                 <div class="col-4">
  59.                     <a class="mr-0 text-white" style="background-image: url(/images/landing_sushi.jpg)"
  60.                        href="/eda/sushi">Суши</a>
  61.                 </div>
  62.             </div>
  63.             {% if app.user %}
  64.                 <a href="{{ base_url }}/WatchList"><i class="slivki-icon-eye-1"></i> Недавно просмотренные акции</a>
  65.             {% else %}
  66.                 <a data-toggle="modal" data-target=".modal-auth"><i class="slivki-icon-eye-1"></i> Недавно просмотренные акции</a>
  67.                     {% endif %}
  68.         </div>
  69.     {% elseif topLevelCategoryIDList|length > 2 %}
  70.         <div class="px-2 w-100">
  71.             <a id="moreCategories" class="btn bg-slivki btn-block my-2 more-categories-button" href="#">Еще категории</a>
  72.         </div>
  73.     {% endif %}
  74.     <input id="topLevelCategoryIDList" type="hidden" value="{{ topLevelCategoryIDList|json_encode }}">
  75. {% endblock %}
  76. {% block popup %}
  77.     {{ parent() }}
  78.     {% include 'Slivki/mobile/select_city.html.twig' %}
  79.     {{ getMainMenu(false, false) }}
  80. {% endblock %}
  81. {% block javascripts %}
  82.     <script src="/js/swiper-js/swiper.min.js"></script>
  83.     {{ parent() }}
  84.     <script src="/mobile/js/index.js?v=4"></script>
  85.     {% if smallCity is defined and smallCity %}
  86.         <script src="//api-maps.yandex.ru/2.1.29/?lang=ru-RU" type="text/javascript"></script>
  87.         <script src="//mourner.github.io/simplify-js/simplify.js"></script>
  88.         <script type="module" src="/mobile/js/category.min.js?v={{ mobile_category_js_version }}"></script>
  89.     {% endif %}
  90. {% endblock %}
  91. {% block RTBHouse %}
  92.     <script>
  93.         try{ (function() {
  94.             var prefix = "", hash = "TS5TS2S9bdSbgKBA4Q2H", rtbhTags = []; rtbhTags.push("pr_"+hash+"_home"); rtbhTags.push("pr_"+hash+"_uid_"+document.getElementById('rtbhUID').value);
  95.             var key = "__rtbhouse.lid", lid = window.localStorage.getItem(key); if (!lid) {
  96.                 lid = ""; var pool = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
  97.                 for (var i = 0; i < 20; i++) lid += pool.charAt(Math.floor(Math.random() * pool.length)); window.localStorage.setItem(key, lid);}
  98.             rtbhTags.push("pr_"+hash+"_lid_" + lid);
  99.             var ifr = document.createElement("iframe"),
  100.                 sr = encodeURIComponent(document.referrer ? document.referrer : ""),
  101.                 su = encodeURIComponent(document.location.href ? document.location.href : ""),
  102.                 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]);}
  103.             ifrSrc += "&su=" + su + "&sr=" + sr + "&ts=" + tmstmp;
  104.             ifr.setAttribute("src", ifrSrc); ifr.setAttribute("width", "1");
  105.             ifr.setAttribute("height", "1"); ifr.setAttribute("scrolling", "no");
  106.             ifr.setAttribute("frameBorder", "0"); ifr.setAttribute("style", "display:none");
  107.             ifr.setAttribute("referrerpolicy", "no-referrer-when-downgrade"); if(document.body){document.body.appendChild(ifr);}
  108.             else{window.addEventListener('DOMContentLoaded', function(){document.body.appendChild(ifr);});}
  109.         })();} catch(e) {} </script>
  110. {% endblock %}