{% if editmode %}
{{ include('Layout/includes/css.html.twig') }}
{{ include('Layout/includes/encore.html.twig', {
'staticDebugMode': staticDebugMode,
'file': 'js/content'
}) }}
<div class="editmode-box editmode-box--info">
<div class="editmode-box__header">
Weather Station
</div>
{{ pimcore_relation('weatherStation', {'types': ['object'], 'subtypes': ['object'], 'classes': ['WeatherStation']}) }}
</div>
{% endif %}
<section class="slide slide--has-bg {{ styleModifier|default('') }}">
{% if pimcore_relation('weatherStation').element %}
{% set bgImage = getCurrentWeatherImage( pimcore_relation('weatherStation').element , siteConfig) %}
{% if bgImage|default('') %}
<div class="slide__bg js-lazy-img js-lazy-img--bg" data-lazy-img-background="{{ bgImage.thumbnail('region-slide-bg').path|raw }}"></div>
{% endif %}
{% endif %}
<div class="container">
{{ include('Includes/title-block-editable.html.twig', {
isCentered: true,
isWhite: true,
styleModifier: 'title-block--shadow'
}) }}
{% if not pimcore_relation('weatherStation').empty %}
{% set today = pimcore_relation('weatherStation').element.today %}
<div class="row scrolling-row">
{% if today %}
<div class="col-md-7 col-11">
<div class="weather-box bg-secondary">
<div class="row">
<div class="col-4">
{{ include('Includes/Partials/weather-item.html.twig', {
title: 'weather-slide.Morgends'|trans,
date: today.date.format('d.m.Y'),
icon: today.symb06,
min: today.temp06
}) }}
</div>
<div class="col-4">
{{ include('Includes/Partials/weather-item.html.twig', {
title: 'weather-slide.Mittags'|trans,
date: today.date.format('d.m.Y'),
icon: today.symb12,
min: today.temp12
}) }}
</div>
<div class="col-4">
{{ include('Includes/Partials/weather-item.html.twig', {
title: 'weather-slide.Abends'|trans,
date: today.date.format('d.m.Y'),
icon: today.symb18,
min: today.temp18
}) }}
</div>
</div>
</div>
</div>
{% endif %}
{% set tomorrow = pimcore_relation('weatherStation').element.tomorrow %}
{% set overmorrow = pimcore_relation('weatherStation').element.overmorrow %}
{% if tomorrow or overmorrow %}
<div class="col-md-5 col-10">
<div class="weather-box bg-secondary">
<div class="row">
{% if tomorrow %}
<div class="col-6">
{{ include('Includes/Partials/weather-item.html.twig', {
title: 'weather-slide.Morgen'|trans,
date: tomorrow.date.format('d.m.Y'),
icon: tomorrow.symbDay,
min: tomorrow.tminDay,
max: tomorrow.tmaxDay
}) }}
</div>
{% endif %}
{% if overmorrow %}
<div class="col-6">
{{ include('Includes/Partials/weather-item.html.twig', {
title: 'weather-slide.Übermorgen'|trans,
date: overmorrow.date.format('d.m.Y'),
icon: overmorrow.symbDay,
min: overmorrow.tminDay,
max: overmorrow.tmaxDay
}) }}
</div>
{% endif %}
</div>
</div>
</div>
{% endif %}
</div>
{% endif %}
</div>
</section>