<div>
{% set locationStore = [ ['garmisch', 'Garmisch Partenkirchen'],['hohenpeissenberg','Hohenpeißenberg'], ['altenstadt', 'Schongau'], ['holzkirchen', 'Bad Tölz'] ] %}
{% set locationSelect = pimcore_select('location', {
store: locationStore,
width: 300,
class: "align-middle",
defaultValue: "garmisch"
}) %}
{% set location = locationSelect.getData() %}
{% if location == 'garmisch' %}
{% set locationName = 'Garmisch Partenkirchen' %}
{% elseif location == 'hohenpeissenberg' %}
{% set locationName = 'Hohenpeißenberg' %}
{% elseif location == 'altenstadt' %}
{% set locationName = 'Altenstadt' %}
{% elseif location == 'holzkirchen' %}
{% set locationName = 'Bad Tölz' %}
{% endif %}
{% if editmode %}
{% block scripts %}
{{ encore_entry_script_tags('app') }}
{% endblock %}
{% block stylesheets %}
{{ encore_entry_link_tags('style') }}
{% endblock %}
{% block head_links %}
{{ pimcore_head_link() }}
{% endblock %}
<div style="display: inline-block; margin-left: 100px;" class="editmode-label">
<span>Snippet Content</span>
<div class="editmode-label">
<span>Für welchen Ort soll das Wetter vorhergesagt werden:</span>
<div>{{ locationSelect|raw }}</div>
</div>
<br>
<div class="bg-white shadow-card p-5 transition">
<div class="h-[50px]">
<h4 class="uppercase text-dark-blue text-sm">
{{ pimcore_input('title', {
width: 400,
placeholder: 'Wetter',
class: 'h-[50px] font-mont-heavy text-dark-blue uppercase'
}) }}
</h4>
</div>
</div>
<div class="bg-white p-5">
<h4 class="uppercase text-blue-light text-sm">
{{ pimcore_link('forecast-link') }}
</h4>
</div>
</div>
{% else %}
{% if pimcore_input('title') %}
<div class="fade-in delay-300">
<div class="group relative bg-white dark:bg-neutral-900 dark:text-white rounded shadow-card p-5 md:hover:shadow-md transition">
<div class="h-[200px]">
<div class="flex h-full flex-col justify-between">
<div class="col">
<a href="/radio/service#wetter"><h4 class="uppercase text-dark-blue dark:text-blue-light text-sm md:group-hover:translate-x-2 transition duration-300 ease-out">{{ pimcore_input('title') }}</h4></a>
<p class="uppercase text-gray-400 md:group-hover:translate-x-2 transition duration-300 ease-out">In {{ locationName }}</p>
</div>
<div class="col-auto">
<div class="vue-app">
<weather source="/api/get-dwd-weather?station={{ location }}"></weather>
</div>
</div>
<div class="col">
<h4 class="text-right uppercase text-blue-light text-sm md:group-hover:-translate-x-2 transition duration-300 ease-out">
{{ pimcore_link('forecast-link') }}
</h4>
</div>
</div>
</div>
</div>
</div>
{% endif %}
{% endif %}
</div>