templates/facility/partials/facility-tabbing-content.html.twig line 120

Open in your IDE?
  1. {% set liftsExist = lifts is defined and lifts|length > 0 %}
  2. {% set slopesExist = slopes is defined and slopes|length > 0 %}
  3. {% set miscExist = misc is defined and misc|length > 0 %}
  4. {% set salePointsExists = salesPoints is defined and salesPoints|length > 0 %}
  5. <section class="{{ className|default('') }} js-affix__container">
  6.     <div class="container js-smoothscroll">
  7.         {% if not liftsExist and not slopesExist and not miscExist %}
  8.             <div class="mt-5 text-center">
  9.                 {{ 'facility.overview.no-facilities'|trans }}
  10.             </div>
  11.         {% endif %}
  12.         <ul class="list-unstyled scroll-links pt-32 mb-64 mb-md-80">
  13.             {% if liftsExist %}
  14.                 <li class="scroll-link__item">
  15.                     <a class="js-smoothscroll__link scroll-link__link" href="#lifts">
  16.                         <span class="icon icon-arrow-down scroll-link__icon" aria-hidden="true"></span>
  17.                         {{ 'facility.overview.lifts'|trans }}
  18.                     </a>
  19.                 </li>
  20.             {% endif %}
  21.             {% if slopesExist %}
  22.                 <li class="scroll-link__item">
  23.                     <a class="js-smoothscroll__link scroll-link__link" href="#slopes">
  24.                         <span class="icon icon-arrow-down scroll-link__icon" aria-hidden="true"></span>
  25.                         {{ 'facility.overview.slopes'|trans }}
  26.                     </a>
  27.                 </li>
  28.             {% endif %}
  29.             {% if miscExist %}
  30.                 <li class="scroll-link__item">
  31.                     <a class="js-smoothscroll__link scroll-link__link" href="#misc">
  32.                         <span class="icon icon-arrow-down scroll-link__icon" aria-hidden="true"></span>
  33.                         {{ 'facility.overview.miscellaneous'|trans }}
  34.                     </a>
  35.                 </li>
  36.             {% endif %}
  37.             {% if salePointsExists %}
  38.                 <li class="scroll-link__item">
  39.                     <a class="js-smoothscroll__link scroll-link__link" href="#misc">
  40.                         <span class="icon icon-arrow-down scroll-link__icon" aria-hidden="true"></span>
  41.                         {{ 'facility.overview.salesPoints'|trans }}
  42.                     </a>
  43.                 </li>
  44.             {% endif %}
  45.         </ul>
  46.         <div class="row">
  47.             <div class="col-12 col-md-8">
  48.                 {% if liftsExist %}
  49.                     {{ include('facility/partials/lifts.html.twig', { 'lifts': lifts, 'liftTypes': liftTypes }) }}
  50.                 {% endif %}
  51.                 {% if slopesExist %}
  52.                     {{ include('facility/partials/slopes.html.twig', { 'slopes': slopes, 'slopeTypes': slopeTypes }) }}
  53.                 {% endif %}
  54.                 {% if miscExist %}
  55.                     {{ include('facility/partials/misc.html.twig', { 'misc': misc }) }}
  56.                 {% endif %}
  57.                 {% if salePointsExists %}
  58.                     {{ include('facility/partials/salespoints.html.twig', { 'salesPoints': salesPoints }) }}
  59.                 {% endif %}
  60.             </div>
  61.             <div class="col-md-4 d-md-block d-none">
  62.                 {% if snippet|default(false) %}
  63.                     <div class="js-affix__placeholder h-100">
  64.                         <div class="js-affix" data-affix-offset="96">
  65.                             <div class="live-item live-item--box-shadow">
  66.                                 <div class="live-item__toptitle">{{ snippet.getEditable('toptitle').data }}</div>
  67.                                 <div class="live-item__title mb-md-3">{{ snippet.getEditable('title').data }}</div>
  68.                                 <div class="live-item__content">
  69.                                     {{ snippet.getEditable('text').data }}
  70.                                 </div>
  71.                                 {% if snippet.getEditable('link').data.path %}
  72.                                     <a class="btn btn-tertiary mt-32" href="{{ snippet.getEditable('link').data.path }}"
  73.                                        target="{{ snippet.getEditable('link').data.target }}"
  74.                                     >
  75.                                         {{ snippet.getEditable('link').data.text }}
  76.                                     </a>
  77.                                 {% endif %}
  78.                             </div>
  79.                         </div>
  80.                     </div>
  81.                 {% endif %}
  82.                 {% if weather|default(false) %}
  83.                     {% set forecast = weather.forecasts.items[0] %}
  84.                     {% set wind = forecast.windForce and forecast.windDirection %}
  85.                     <div class="weather-item weather-item--box-shadow mt-3 pb-32">
  86.                         <h3 class="weather-item__toptitle mb-2 d-inline-block">{{ weather.name }}</h3>
  87.                         <time class="weather-item__title d-block mb-32" datetime="{{ forecast.date('Y-m-d') }}">
  88.                             {{ ('general.weekday.' ~ forecast.date|date('l'))|trans }}, {{ forecast.date|date('d//.m//.Y') }}
  89.                         </time>
  90.                         <div class="row gy-32 gy-md-64 gx-3">
  91.                             <div class="col-3">
  92.                                 <div class="weather-item__max">{{ forecast.tempMax }} {{ 'general.degree'|trans }}</div>
  93.                                 <div class="weather-item__min">{{ forecast.tempMin }} {{ 'general.degree'|trans }}</div>
  94.                             </div>
  95.                             <div class="col-3 text-center">
  96.                                 <span class="weather-item__icon icon icon-elements"></span>
  97.                                 <div class="weather-item__description">{{ 'weather.icon.morning'|trans }}</div>
  98.                             </div>
  99.                             <div class="col-3 text-center">
  100.                                 <span class="weather-item__icon icon icon-elements"></span>
  101.                                 <div class="weather-item__description">{{ 'weather.icon.afternoon'|trans }}</div>
  102.                             </div>
  103.                             <div class="col-3 text-center">
  104.                                 <span class="weather-item__icon icon icon-wind text-secondary"></span>
  105.                                 <div class="weather-item__description">
  106.                                     {{ forecast.windForce }} {{ 'general.km/h'|trans }}
  107.                                 </div>
  108.                             </div>
  109.                         </div>
  110.                         <a class="arrow-link mt-32" href="{{ getSiteConfig().weatherDocument }}">
  111.                             <span>{{ 'facility.overview.weather-link'|trans }}</span>
  112.                             <span class="arrow-link__icon icon icon-arrow-right"></span>
  113.                         </a>
  114.                     </div>
  115.                 {% endif %}
  116.                 {% if warnings %}
  117.                     {% for warning in warnings %}
  118.                         <ul class="facilities-warnings list-unstyled d-none d-md-block">
  119.                             <li class="facilities-warnings__item">
  120.                                 <div class="d-flex align-items-center mb-2">
  121.                                     <span class="icon icon-{{ warning.priority == '1' ? 'warning' : 'info' }} facilities-warnings__icon" aria-hidden="true"></span>
  122.                                     <span class="facilities-warnings__title">{{ warning.title|trans }}</span>
  123.                                 </div>
  124.                                 <span class="facilities-warnings__text">{{ warning.content }}</span>
  125.                             </li>
  126.                         </ul>
  127.                     {% endfor %}
  128.                 {% endif %}
  129.             </div>
  130.         </div>
  131.     </div>
  132. </section>