templates/partials/promotions_detail/promo_detail.html.twig line 1

Open in your IDE?
  1. <section class="promo-detail">
  2.     <div class="container">
  3.         <div class="promo-detail--ckeditor">
  4.             <div class="promo-detail--ckeditor-includes">
  5.                 {{ promotion.content | raw }}
  6.             </div>
  7.             {% if promotion.secondContent %}
  8.                 <div class="promo-detail--ckeditor-forget">
  9.                     {{ promotion.secondContent | raw }}
  10.                 </div>
  11.             {% endif %}
  12.             {% if promotion.thirdContent %}
  13.                 <div class="promo-detail--ckeditor-others">
  14.                     {{ promotion.thirdContent | raw }}
  15.                 </div>
  16.             {% endif %}
  17.             {% if promotion.document %}
  18.                 <div class="promo-detail--more-info">
  19.                     <a href="{{ promotion.document| file_url }}" target="_blank"
  20.                     class="promo-header--button button green">
  21.                         <span>{{ promotion.documentTitle }}</span>
  22.                     </a>
  23.                 </div>
  24.             {% endif %}
  25.             <div class="introduction--links">
  26.                 {% if promotion.popUpGalleryTitle %}
  27.                     <a href="#" class="introduction--link-gallery link black js-gallery-open"
  28.                     data-dest="introduction--gallery">
  29.                         <span>{{ promotion.popUpGalleryTitle }}</span>
  30.                     </a>
  31.                 {% endif %}
  32.             </div>
  33.             {% if promotion.popUpGalleryTitle %}
  34.                 <div class="introduction--gallery js-gallery-container">
  35.                     <div class="introduction--gallery-content">
  36.                         <div class="introduction--gallery-slider js-gallery-slider">
  37.                             {% for media in promotion.popUpGallery.medias %}
  38.                                 {% if media is youtubeVideo %}
  39.                                     <a data-src="{{ media|media_url }}" >
  40.                                         <img src="{{ get_thumbnail_url(media) }}" >
  41.                                     </a>
  42.                                 {% else %}
  43.                                     <a data-src="{{ media|resize(1280)|file_url }}">
  44.                                         <img src="{{ media|resize(1280)|file_url }}">
  45.                                     </a>
  46.                                 {% endif %}
  47.                             {% endfor %}
  48.                         </div>
  49.                     </div>
  50.                 </div>
  51.             {% endif %}
  52.         </div>
  53.         <div class="promo-detail--booking">
  54.             {% if promotion.gallery is not null %}
  55.                 <div class="promo-detail--image">
  56.                     <div class="media-slide {% if promotion.gallery.galleryHasMedias|length > 1 %} js-media-slide{% endif %}">
  57.                         {% for image in promotion.gallery.medias %}
  58.                             {% if image is youtubeVideo %}
  59.                                 <div class="promo-description--item has-video" style="overflow: hidden;">
  60.                                     <video id=""
  61.                                         autoplay
  62.                                         class="js-responsive-video preload-video"
  63.                                         data-desktop=""
  64.                                         data-tablet=""
  65.                                         data-mobile=""
  66.                                         loop
  67.                                         muted
  68.                                         data-setup=
  69.                                             '{
  70.                                                 "techOrder": ["youtube"],
  71.                                                 "sources": [{
  72.                                                                 "type": "video/youtube",
  73.                                                                 "src":
  74.                                                                 "{{ 'https://www.youtube.com/watch?v='~image.reference }}?modestbranding=1&;showinfo=0&;autohide=1&;rel=0;"
  75.                                                             }]
  76.                                             }'
  77.                                     >
  78.                                     </video>
  79.                                 </div>
  80.                             {% else %}
  81.                                 <div class="promo-description--item">
  82.                                     <picture-component class="js-picture-component is-absolute" :image="{{ picture_data(image, null) }}"></picture-component>
  83.                                 </div>
  84.                             {% endif %}
  85.                         {% endfor %}
  86.                     </div>
  87.                 </div>
  88.             {% endif %}
  89.             {% if promotion.testimonials | length > 0 %}
  90.                 <div class="testimonials">
  91.                     <div class="testimonials--title">{{ 'app.promotions.testimonials' | trans | upper }}</div>
  92.                     <div class="media-slide js-media-slide">
  93.                         {% for testimonial in promotion.testimonials if (testimonial.enabled and testimonial.locale == app.request.locale) %}
  94.                             <div class="container-slide">
  95.                                 <div class="testimonials--top">
  96.                                     <div class="testimonials--top-left"><span>{{ testimonial.score }}</span>/5</div>
  97.                                     <div class="testimonials--top-right">
  98.                                         <div class="testimonials--top-right--hotel">
  99.                                             <i class="testimonials--top-icon">
  100.                                                 {% include 'partials/global/svg/location.svg.twig' %}
  101.                                             </i>
  102.                                             {{ testimonial.hotel.title }}
  103.                                         </div>
  104.                                         <div
  105.                                             class="testimonials--top-right--date">{{ testimonial.createdAt | date('d-m-Y') }}</div>
  106.                                     </div>
  107.                                 </div>
  108.                                 <div class="testimonials--content">
  109.                                     <div class="testimonials--content-title">{{ testimonial.author | title }}</div>
  110.                                     <div class="testimonial--content-text">
  111.                                         {{ testimonial.message }}
  112.                                     </div>
  113.                                 </div>
  114.                             </div>
  115.                         {% endfor %}
  116.                     </div>
  117.                 </div>
  118.             {% endif %}
  119.         </div>
  120.     </div>
  121. </section>