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

Open in your IDE?
  1. {% set titleColor = isDefinedAndNotEmpty(promotion.titleColor) ? promotion.titleColor : 'white' %}
  2. {% set shortTextColor = isDefinedAndNotEmpty(promotion.shortTextColor) ? promotion.shortTextColor : 'black' %}
  3. <section class="promo-header">
  4.     <div class="promo-header-fixed js-fixed-header">
  5.          <picture-component class="js-picture-component is-absolute" :image="{{ picture_data(promotion.image, null) }}"></picture-component>
  6.         <div class="container">
  7.             <div class="promo-header--big-col" style="color: {{ titleColor }}">
  8.                 {% for hotel in promotion.hotels %}
  9.                 <h2 class="promo-header--pretitle">{{ hotel.title }} / {{ hotel.city }}</h2>
  10.                 {% endfor %}
  11.                 <h1 class="promo-header--title" id="title-anchor">{{ promotion.title }}</h1>
  12.                 {% if promotion.showMiraiBookingBar %}
  13.                     {% include 'partials/global/booking_promo.html.twig' with {'promotion': promotion}%}
  14.                 {% endif %}
  15.             </div>
  16.             <div class="promo-header--small-col" style="color: {{ shortTextColor }}">
  17.                 <div class="promo-header--price">
  18.                     {% if promotion.showFrom %}
  19.                         {{ 'app.promotions.from' | trans }}
  20.                     {% endif %}
  21.                     <span>{{ promotion.priceTranslation }}</span>
  22.                     {% if promotion.showTo %}
  23.                         {{ 'app.promotions.to' | trans }}
  24.                     {% endif %}
  25.                     <span>{{ promotion.priceTo }}</span>
  26.                 </div>
  27.                 <div class="promo-header--pricetext">
  28.                     {{ promotion.offer }}
  29.                     {{ promotion.shortText }}
  30.                 </div>
  31.                 {% if not promotion.showMiraiBookingBar %}
  32.                     {% if promotion.isActive == true %}
  33.                         <a class="promo-header--link button green is-dark js-promos" href="{{ promotion.externalUrl }}"
  34.                             target="_blank">
  35.                             <span>{{ 'app.global.book' | trans }}</span>
  36.                         </a>
  37.                     {% else %}
  38.                         <div class="promo-header--text">{{ 'app.global.not_available' | trans }}</div>
  39.                         <a class="promo-header--button button green is-dark" href="{{ url('promotions') }}">
  40.                             <span>{{ 'app.global.not_available_button' | trans }}</span>
  41.                         </a>
  42.                     {% endif %}
  43.                 {% endif %}
  44.                 {# TODO.end #}
  45.             </div>
  46.         </div>
  47.         <div class="promo-header--anchor-mobile">
  48.             <div class="promo-header--anchor-mobile--price">
  49.                 {% if promotion.showFrom %}
  50.                     {{ 'app.promotions.from' | trans }}
  51.                 {% endif %}
  52.                 <span> {{ promotion.priceTranslation }}</span>
  53.             </div>
  54.             <div class="promo-header--anchor-mobile--btn">
  55.                 <a href="#title-anchor"> {{ 'app.promotions.reserve_mobile' | trans }}</a>
  56.             </div>
  57.         </div>
  58.     </div>
  59. </section>