templates/ProfilePreview/nearest_profiles.html.twig line 1

Open in your IDE?
  1. {% import '_macros/price_helpers.html.twig' as price_helpers %}
  2. {% import 'ProfilePreview/utils/macros.partial.twig' as macros %}
  3. {# {% macro minPrice(prices) %}
  4.     {% set valid = prices|filter(v => v is not null and v != 0) %}
  5.     {% if valid is not empty %}
  6.         {% set sorted = valid|sort %}
  7.         {{ sorted[0] }}
  8.     {% else %}
  9.         —
  10.     {% endif %}
  11. {% endmacro %} #}
  12. <noindex>
  13. <div class="recommendation{{ componentClass is defined ? ' ' ~ componentClass : '' }} mb-4" id="profileRecommendations">
  14.     <div class="recommendation-heading d-flex-c">
  15.         <h2 class="text-xxl">Проститутки рядом</h2>
  16.     </div>
  17.     <div class="recommendation-container">
  18.         <div class="recommendation-list d-grid " id="profileNearestContainer">
  19.             {% for profile in nearest_profiles %}
  20.                 <div class="recommendation-item d-flex swiper-slide card profile-card white-round" data-profile-id="{{ profile.id }}">
  21.                     <a class="card-link" href="{{ path('profile_preview.page', {city: profile.city.uriIdentity, profile: profile.uriIdentity}) }}" target="_blank">
  22.                         <span class="visually-hidden">{{ profile.name|trans }}</span>
  23.                     </a>
  24.                     <div class="card-layout d-grid">
  25.                         <div class="card__avatar profile-card__avatar">
  26.                             <div class="profile-card__avatar-link">
  27.                                 {%- set photo = profile|avatar -%}
  28.                                 {%- set station = null -%}
  29.                                 {% if profile.stations|length > 0 %}
  30.                                     {%- set station = profile.stations|first -%}
  31.                                 {% endif %}
  32.                                 {%- if photo and photo.path -%}
  33.                                     {%- set photoType = photo.type == 'photo' ? 'profile_media' : 'profile_media_avatar' -%}
  34.                                     <img class="card__avatar-image profile-card__avatar-image"
  35.                                         src="{{ responsive_asset(photo.path, photoType, "220x308", "jpg") }}"
  36.                                         alt="Эскортница {{ profile.name|trans }}, {{ 'год'|plural(profile.personParameters.age) }},{{ station ? " " ~ station.name ~ "," : '' }} снять, {{ profile.id }}" width="220" height="308">
  37.                                 {%- endif -%}
  38.                             </div>
  39.                             <div class="profile-card__icons d-flex-c">
  40.                                 <div data-tippy-icon="{% if profile.selfies|length > 0 %}Есть{% else %}Нет{% endif %} селфи"{% if profile.selfies|length > 0 %} data-tippy-instance{% endif %}>
  41.                                     <svg class="profile-card__icon{% if profile.selfies|length == 0 %} off{% endif %}" width="20" height="20">
  42.                                         <use href="#selfie"></use>
  43.                                     </svg>
  44.                                 </div>
  45.                                 <div data-tippy-icon="{% if profile.selfies|length > 0 %}Есть{% else %}Нет{% endif %} видео"{% if profile.videos|length > 0 %} data-tippy-instance {% endif %}>
  46.                                     <svg class="profile-card__icon{% if profile.videos|length == 0 %} off{% endif %}" width="20" height="20">
  47.                                         <use href="#video"></use>
  48.                                     </svg>
  49.                                 </div>
  50.                                 <div data-tippy-icon="{% if profile.selfies|length > 0 %}Есть отзывы{% else %}Нет отзывов{% endif %}"{% if profile.comments|length > 0 %} data-tippy-instance {% endif %}>
  51.                                     <svg class="profile-card__icon{% if profile.comments|length == 0 %} off{% endif %}" width="20" height="20">
  52.                                         <use href="#comment"></use>
  53.                                     </svg>
  54.                                 </div>
  55.                             </div>
  56.                         </div>
  57.                         <div class="profile-card__info">
  58.                             <div class="profile-card__personal clr-text-base">
  59.                                 {# <div class="profile-card__personal-item d-flex"><span class="profile-card__personal-title">Возраст</span><span class="profile-card__personal-value fw-600 ml-auto">{{ profile.personParameters.age }}</span></div> #}
  60.                                 <div class="profile-card__personal-item d-flex"><span class="profile-card__personal-title">Грудь</span><span class="profile-card__personal-value fw-600 ml-auto">{{ profile.personParameters.breastSize ? profile.personParameters.breastSize : '-' }}</span></div>
  61.                                 <div class="profile-card__personal-item d-flex"><span class="profile-card__personal-title">Рост</span><span class="profile-card__personal-value fw-600 ml-auto">{{ profile.personParameters.height ? profile.personParameters.height : '-' }}</span></div>
  62.                                 <div class="profile-card__personal-item d-flex"><span class="profile-card__personal-title">Вес</span><span class="profile-card__personal-value fw-600 ml-auto">{{ profile.personParameters.weight ? profile.personParameters.weight : '-' }}</span></div>
  63.                             </div>
  64.                             {# {%- set currencyProfile -%}{{ profile.city.countryCode|country_currency }}{%- endset -%} #}
  65.                             {%- set currencyProfile -%}р{%- endset -%}
  66.                             <div class="card-time profile-card-time">
  67.                                 <div class="card-time-item d-flex clr-pre-white-bg"><span class="card-time-title">Час</span><span class="card-time-value fw-700 ml-auto clr-main-text">{{ price_helpers._get_min(profile.apartmentsPricing.oneHourPrice,
  68.                                 profile.takeOutPricing.oneHourPrice,
  69.                                 currencyProfile) }}</span></div>
  70.                                 <div class="card-time-item d-flex clr-pre-white-bg"><span class="card-time-title">2 часа</span><span class="card-time-value fw-700 ml-auto clr-main-text">{{ price_helpers._get_min(profile.apartmentsPricing.twoHoursPrice,
  71.                                 profile.takeOutPricing.twoHoursPrice,
  72.                                 currencyProfile) }}</span></div>
  73.                                 <div class="card-time-item d-flex clr-pre-white-bg"><span class="card-time-title">Ночь</span><span class="card-time-value fw-700 ml-auto clr-main-text">{{ price_helpers._get_min(profile.apartmentsPricing.nightPrice,
  74.                                 profile.takeOutPricing.nightPrice,
  75.                                 currencyProfile) }}</span></div>
  76.                             </div>
  77.                             <div class="profile-card__tags d-flex">
  78.                                 {% set hasApartmentsPricing = (profile.apartmentsPricing.oneHourPrice or profile.apartmentsPricing.twoHoursPrice or profile.apartmentsPricing.nightPrice) %}
  79.                                 {% set hasTakeoutPricing = (profile.takeOutPricing.oneHourPrice or profile.takeOutPricing.twoHoursPrice or profile.takeOutPricing.nightPrice) %}
  80.                                 {% set nameMapping = {
  81.                                     'Секс анальный': 'Анал',
  82.                                     'Массаж классический': 'Массаж',
  83.                                     'Куннилингус': 'Куни',
  84.                                     'Минет без резинки': 'МБР',
  85.                                     'Секс классический': 'Классика',
  86.                                     'Окончание в рот': 'ОВР'
  87.                                 } %}
  88.                                 {% if hasApartmentsPricing and hasTakeoutPricing %}
  89.                                     <div class="profile-card__tags-item clr-main-text">Апарты и выезд</div>
  90.                                 {% endif %}
  91.                                 {% for service in profile.providedServices %}
  92.                                     {% if service.name in nameMapping|keys %}
  93.                                         <div class="profile-card__tags-item clr-main-text">{{ nameMapping[service.name] }}</div>
  94.                                     {% endif %}
  95.                                 {% endfor %}
  96.                             </div>
  97.                         </div>
  98.                     </div>
  99.                     <div class="card__bio-name profile-card__bio-name">
  100.                         <div class="profile-card__bio-link fw-700"><span class="profile-card__bio-text mr-1">{{ profile.name|trans }}</span><span class="profile-card__bio-age mr-1">{{ profile.personParameters.age }}</span></div>
  101.                     </div>
  102.                     {% if profile.stations|length > 0 %}
  103.                         {%- set station = profile.stations|first -%}
  104.                         <div class="profile-card__bio">
  105.                             <div class="profile-card__metro">
  106.                                 <div class="card__metro-link metro-link">
  107.                                     <a class="metro-icons d-flex-c" href="{{ path('profile_list.list_by_station', {'city': profile.city.uriIdentity, 'station': station.uriIdentity}) }}">
  108.                                         {%- include 'components/metro/icon_generate.partial.twig' with {data: station.id|station_lines} -%}
  109.                                         {{- station.name -}}
  110.                                     </a>
  111.                                 </div>
  112.                             </div>
  113.                         </div>
  114.                     {% endif %}
  115.                     <div class="profile-card__bio profile-card__bio-with-text">
  116.                         {% set description = profile.description|trans %}
  117.                         <p class="profile-card__bio-desc mb-2">
  118.                             {{- description|length > 100 ? description|slice(0, 100) : description }}...
  119.                         </p>
  120.                     </div>
  121.                     {# <div class="profile-card__bio">
  122.                         {% set onlyPhoneNumber = profile.phoneNumber|replace({' ': '', '-': '', '(': '', ')': ''}) %}
  123.                         <button class="card__phone profile-card__phone btn btn-main-border btn-fluid fw-600" type="button" onclick="this.classList.add('d-none');this.nextElementSibling.classList.remove('d-none')">
  124.                             <svg class="btn-icon" width="21" height="20" fill="none">
  125.                                 <path d="M6.583 2.5H3.666a.836.836 0 0 0-.833.834C2.833 11.159 9.175 17.5 17 17.5a.836.836 0 0 0 .833-.833v-2.908a.836.836 0 0 0-.833-.834 9.503 9.503 0 0 1-2.975-.475.7.7 0 0 0-.259-.041.854.854 0 0 0-.591.241l-1.834 1.834A12.625 12.625 0 0 1 5.85 8.992l1.833-1.833a.836.836 0 0 0 .208-.85 9.467 9.467 0 0 1-.475-2.975.836.836 0 0 0-.833-.834Z"></path>
  126.                             </svg>
  127.                             <span class="btn-text">Показать телефон</span>
  128.                         </button>
  129.                         <!--noindex-->
  130.                         <a href="tel:{{ onlyPhoneNumber }}" rel="nofollow" class="card__phone profile-card__phone btn btn-main-border btn-fluid fw-600 is-active d-none">
  131.                             <svg class="btn-icon" width="21" height="20" fill="none">
  132.                                 <path d="M6.583 2.5H3.666a.836.836 0 0 0-.833.834C2.833 11.159 9.175 17.5 17 17.5a.836.836 0 0 0 .833-.833v-2.908a.836.836 0 0 0-.833-.834 9.503 9.503 0 0 1-2.975-.475.7.7 0 0 0-.259-.041.854.854 0 0 0-.591.241l-1.834 1.834A12.625 12.625 0 0 1 5.85 8.992l1.833-1.833a.836.836 0 0 0 .208-.85 9.467 9.467 0 0 1-.475-2.975.836.836 0 0 0-.833-.834Z"></path>
  133.                             </svg>
  134.                             <span class="btn-text">{{- profile.phoneNumber -}}</span>
  135.                         </a>
  136.                         <!--/noindex-->
  137.                     </div> #}
  138.                 </div>
  139.             {% endfor %}
  140.         </div>
  141.     </div>
  142. </div>
  143. {# <script>
  144.     document.addEventListener('DOMContentLoaded', function() {
  145.         const profileIdList = [];
  146.         {% for profile in nearest_profiles %}
  147.             profileIdList.push({{ profile.id }});
  148.         {% endfor %}
  149.         window.increase_shows({profiles: profileIdList});
  150.     });
  151. </script> #}
  152. </noindex>