templates/Includes/hotspot.html.twig line 1

Open in your IDE?
  1. {% set isPlain = isPlain|default(false) %}
  2. <div class="hotspot {{ isPlain ? 'hotspot--plain' : '' }} {{ styleModifier|default('') }} js-hotspot" style="left: {{ left|default(0) }}%; top: {{ top|default(0) }}%;">
  3.     {% if isPlain %}
  4.         <div class="hotspot__btn">
  5.             {#            <div class="avalanche-icon-container">#}
  6.             <span class="avalanche-icon {{ avalanche }}"></span>
  7.             {#            </div>#}
  8.         </div>
  9.     {% else %}
  10.         <button type="button" class="hotspot__btn position-relative js-hotspot__toggle {{ smallHotspot | default(null) ? 'hotspot__btn--small' : '' }}">
  11.             {% if img|default(false) %}
  12.                 <img src="{{ img }}" alt="" class="img-fluid hotspot__btn__img">
  13.             {% endif %}
  14.             {% if value|default(false) %}
  15.                 <span class="hotspot__btn__value text-nowrap strong">{{ value }}</span>
  16.             {% endif %}
  17.         </button>
  18.     {% endif %}
  19.     {% if detail|default(false) and not isPlain %}
  20.         <div class="hotspot__popover text-md-center">
  21.             <button type="button" class="btn-no-styling hotspot__popover__close js-hotspot__toggle js-hotspot__toggle-close">
  22.                 <span class="icon icon-close" aria-label="close" title="close"></span>
  23.             </button>
  24.             <div class="row row-gutter--2 align-items-center vertical-gutter--3">
  25.                 <div class="col-12 vertical-gutter__item">
  26.                     {% if detail.title|default(false) or title|default(false) %}
  27.                         <div class="font-decorative">{{ detail.title|default(false) ?: title }}</div>
  28.                     {% endif %}
  29.                     {% if detail.subtitle|default(false) or subtitle|default(false) %}
  30.                         {{ detail.subtitle|default(false) ?: subtitle}}
  31.                     {% endif %}
  32.                     {% if detail.image|default(false) %}
  33.                         {% set description = getImageDescription(detail.image, true) %}
  34.                         <img src="{{ detail.image.thumbnail('infobox') }}" title="{{ description|default('') }}" alt="{{ description|default('') }}" class="mt-1" width="75%">
  35.                     {% endif %}
  36.                 </div>
  37.                 {% if detail.hasWeatherDetail | default(null) %}
  38.                     <div class="col-4 col-md-12 vertical-gutter__item">
  39.                         <div class="weather-item weather-item--sm">
  40.                             <div class="row justify-content-center align-items-center">
  41.                                 <div class="col-auto">
  42.                                     <img alt="" class="img-fluid weather-item__img js-lazy-img" data-src="{{ img }}">
  43.                                 </div>
  44.                                 <div class="col-auto">
  45.                                     <div class=" mb-2 font-decorative text-uppercase fz14">
  46.                                         {{ 'weather.Heute'|trans }}
  47.                                     </div>
  48.                                     <div class="font-default-bold">
  49.                                         <span class="weather-item__val">{{ value }}C</span>
  50.                                     </div>
  51.                                 </div>
  52.                             </div>
  53.                         </div>
  54.                     </div>
  55.                 {% endif %}
  56.                 {% if (detail.link|default(false) and detail.link.href|default(false)) or
  57.                       (link|default(false) and link['href']|default(false))
  58.                 %}
  59.                     <div class="col-8 col-md-12 text-right text-md-center vertical-gutter__item">
  60.                         <a href="{{ detail.link.href|default(false) ?: link['href']|default(false) }}" {{ detail.link.target|default(false) ? 'target="' ~ detail.link.target ~ '"' : ''}} class="btn btn-sm btn-primary-light">{{ detail.link.text|default(false) ?: link['text']|default(false) }}</a>
  61.                     </div>
  62.                 {% endif %}
  63.             </div>
  64.         </div>
  65.     {% endif %}
  66. </div>