templates/Includes/weather-slide.html.twig line 1

Open in your IDE?
  1. {# @var \Pimcore\Model\DataObject\WeatherStation weatherStation #}
  2. {% set items = [
  3.     {
  4.         "id": "today-tab",
  5.         "text": "general.Heute"|trans ~ ", " ~ carbon().today().format('d.m.Y'),
  6.         "href": "#today",
  7.         "isActive": true,
  8.         "targetId": "today",
  9.         "content": include('Includes/Partials/weather-tab-content-today.html.twig')
  10.     },
  11.     {
  12.         "id": "tomorrow-tab",
  13.         "text": "general.Morgen"|trans ~ ", " ~ carbon().tomorrow().format('d.m.Y'),
  14.         "href": "#tomorrow",
  15.         "isActive": false,
  16.         "targetId": "tomorrow",
  17.         "content": include('Includes/Partials/weather-tab-content-tomorrow.html.twig')
  18.     },
  19.     {
  20.         "id": "nextdays-tab",
  21.         "text": "genearl.5-Tages-Vorschau"|trans,
  22.         "href": "#nextdays",
  23.         "isActive": false,
  24.         "targetId": "nextdays",
  25.         "content": include('Includes/Partials/weather-tab-content-nextdays.html.twig')
  26.     }
  27. ] %}
  28. <section class="slide slide--has-bg content-block js-fade-in">
  29.     {% set bgImage = getCurrentWeatherImage(weatherStation, siteConfig) %}
  30.     {% if bgImage %}
  31.         <div class="slide__bg js-lazy-img js-lazy-img--bg" data-lazy-img-background="{{ bgImage.thumbnail('region-slide-bg').path|raw }}"></div>
  32.     {% endif %}
  33.     <div class="container">
  34.         {{ include('Includes/title-block.html.twig', {
  35.             title: weatherStation.name ~ ' (' ~ weatherStation.altitude ~ 'm)',
  36.             subtitle: 'weather-slide.Wie wird’s die Tage'|trans,
  37.             isCentered: true,
  38.             isWhite: true,
  39.             styleModifier: 'title-block--shadow'
  40.         }) }}
  41.         {{ include('Includes/tabs.html.twig', _context) }}
  42.         <div class="tab-content" role="tabpanel">
  43.             <div class="tab-content" role="tabpanel">
  44.                 {% for item in items %}
  45.                     <div class="tab-pane fade {{ item.isActive ? 'show active' : '' }}" id="{{ item.targetId }}" aria-labelledby="{{ item.id }}">
  46.                         {{ item.content|raw }}
  47.                     </div>
  48.                 {% endfor %}
  49.             </div>
  50.         </div>
  51.     </div>
  52. </section>