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.                 {%- set isSelfies = profile.selfies is iterable ? (profile.selfies|length > 0) : profile.selfies -%}
  21.                 {%- set isVideos = profile.videos is iterable ? (profile.videos|length > 0) : profile.videos -%}
  22.                 {%- set isComments = profile.comments is iterable ? (profile.comments|length > 0) : profile.comments -%}
  23.                 <div class="recommendation-item d-flex swiper-slide card profile-card white-round" data-profile-id="{{ profile.id }}">
  24.                     <a class="card-link" href="{{ path('profile_preview.page', {city: profile.city.uriIdentity, profile: profile.uriIdentity}) }}" target="_blank">
  25.                         <span class="visually-hidden">{{ profile.name|trans }}</span>
  26.                     </a>
  27.                     <div class="card-layout d-grid">
  28.                         <div class="card__avatar profile-card__avatar">
  29.                             <div class="profile-card__avatar-link">
  30.                                 {%- set photo = profile|avatar -%}
  31.                                 {%- set station = null -%}
  32.                                 {% if profile.stations|length > 0 %}
  33.                                     {%- set station = profile.stations|first -%}
  34.                                 {% endif %}
  35.                                 {%- if photo and photo.path -%}
  36.                                     {%- set photoType = photo.type == 'photo' ? 'profile_media' : 'profile_media_avatar' -%}
  37.                                     <img class="card__avatar-image profile-card__avatar-image"
  38.                                         src="{{ responsive_asset(photo.path, photoType, "220x308", "jpg") }}"
  39.                                         alt="Эскортница {{ profile.name|trans }}, {{ 'год'|plural(profile.personParameters.age) }},{{ station ? " " ~ station.name ~ "," : '' }} снять, {{ profile.id }}" width="220" height="308">
  40.                                 {%- endif -%}
  41.                             </div>
  42.                             <div class="profile-card__icons d-flex-c">
  43.                                 <div data-tippy-icon="{{ isSelfies ? 'Есть' : 'Нет' }} селфи">
  44.                                     <svg class="profile-card__icon{{ isSelfies ? '' : ' off' }}" width="20" height="20">
  45.                                         <use href="#selfie"></use>
  46.                                     </svg>
  47.                                 </div>
  48.                                 <div data-tippy-icon="{{ isVideos ? 'Есть' : 'Нет' }} видео">
  49.                                     <svg class="profile-card__icon{{ isVideos ? '' : ' off' }}" width="20" height="20">
  50.                                         <use href="#video"></use>
  51.                                     </svg>
  52.                                 </div>
  53.                                 <div data-tippy-icon="{{ isComments ? 'Есть' : 'Нет' }} отзывы">
  54.                                     <svg class="profile-card__icon{{ isComments ? '' : ' off' }}" width="20" height="20">
  55.                                         <use href="#comment"></use>
  56.                                     </svg>
  57.                                 </div>
  58.                             </div>
  59.                         </div>
  60.                         <div class="profile-card__info">
  61.                             <div class="profile-card__personal clr-text-base">
  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.age }}</span></div> #}
  63.                                 <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>
  64.                                 <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>
  65.                                 <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>
  66.                             </div>
  67.                             {# {%- set currencyProfile -%}{{ profile.city.countryCode|country_currency }}{%- endset -%} #}
  68.                             {%- set currencyProfile -%}р{%- endset -%}
  69.                             <div class="card-time profile-card-time">
  70.                                 <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,
  71.                                 profile.takeOutPricing.oneHourPrice,
  72.                                 currencyProfile) }}</span></div>
  73.                                 <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,
  74.                                 profile.takeOutPricing.twoHoursPrice,
  75.                                 currencyProfile) }}</span></div>
  76.                                 <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,
  77.                                 profile.takeOutPricing.nightPrice,
  78.                                 currencyProfile) }}</span></div>
  79.                             </div>
  80.                             <div class="profile-card__tags d-flex">
  81.                                 {% set hasApartmentsPricing = (profile.apartmentsPricing.oneHourPrice or profile.apartmentsPricing.twoHoursPrice or profile.apartmentsPricing.nightPrice) %}
  82.                                 {% set hasTakeoutPricing = (profile.takeOutPricing.oneHourPrice or profile.takeOutPricing.twoHoursPrice or profile.takeOutPricing.nightPrice) %}
  83.                                 {% set nameMapping = {
  84.                                     'Секс анальный': 'Анал',
  85.                                     'Массаж классический': 'Массаж',
  86.                                     'Куннилингус': 'Куни',
  87.                                     'Минет без резинки': 'МБР',
  88.                                     'Секс классический': 'Классика',
  89.                                     'Окончание в рот': 'ОВР'
  90.                                 } %}
  91.                                 {% if hasApartmentsPricing and hasTakeoutPricing %}
  92.                                     <div class="profile-card__tags-item clr-main-text">Апарты и выезд</div>
  93.                                 {% endif %}
  94.                                 {% for service in profile.providedServices %}
  95.                                     {% if service.name in nameMapping|keys %}
  96.                                         <div class="profile-card__tags-item clr-main-text">{{ nameMapping[service.name] }}</div>
  97.                                     {% endif %}
  98.                                 {% endfor %}
  99.                             </div>
  100.                         </div>
  101.                     </div>
  102.                     <div class="card__bio-name profile-card__bio-name">
  103.                         <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>
  104.                     </div>
  105.                     {% if profile.stations|length > 0 %}
  106.                         {%- set station = profile.stations|first -%}
  107.                         <div class="profile-card__bio">
  108.                             <div class="profile-card__metro">
  109.                                 <div class="card__metro-link metro-link">
  110.                                     <a class="metro-icons d-flex-c" href="{{ path('profile_list.list_by_station', {'city': profile.city.uriIdentity, 'station': station.uriIdentity}) }}">
  111.                                         {%- include 'components/metro/icon_generate.partial.twig' with {data: station.id|station_lines} -%}
  112.                                         {{- station.name -}}
  113.                                     </a>
  114.                                 </div>
  115.                             </div>
  116.                         </div>
  117.                     {% endif %}
  118.                     <div class="profile-card__bio profile-card__bio-with-text">
  119.                         {% set description = profile.description|trans %}
  120.                         <p class="profile-card__bio-desc mb-2">
  121.                             {{- description|length > 100 ? description|slice(0, 100) : description }}...
  122.                         </p>
  123.                     </div>
  124.                     {# <div class="profile-card__bio">
  125.                         {% set onlyPhoneNumber = profile.phoneNumber|replace({' ': '', '-': '', '(': '', ')': ''}) %}
  126.                         <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')">
  127.                             <svg class="btn-icon" width="21" height="20" fill="none">
  128.                                 <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>
  129.                             </svg>
  130.                             <span class="btn-text">Показать телефон</span>
  131.                         </button>
  132.                         <!--noindex-->
  133.                         <a href="tel:{{ onlyPhoneNumber }}" rel="nofollow" class="card__phone profile-card__phone btn btn-main-border btn-fluid fw-600 is-active d-none">
  134.                             <svg class="btn-icon" width="21" height="20" fill="none">
  135.                                 <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>
  136.                             </svg>
  137.                             <span class="btn-text">{{- profile.phoneNumber -}}</span>
  138.                         </a>
  139.                         <!--/noindex-->
  140.                     </div> #}
  141.                 </div>
  142.             {% endfor %}
  143.         </div>
  144.     </div>
  145. </div>
  146. {# <script>
  147.     document.addEventListener('DOMContentLoaded', function() {
  148.         const profileIdList = [];
  149.         {% for profile in nearest_profiles %}
  150.             profileIdList.push({{ profile.id }});
  151.         {% endfor %}
  152.         window.increase_shows({profiles: profileIdList});
  153.     });
  154. </script> #}
  155. </noindex>