{% set bereichBg = '#333333' %}
{% set bereichColor = '#ffffff' %}
{% set bereichTitle = '' %}
{% if forcedBereich %}
{% set bereichTitle = forcedBereich.title %}
{% if forcedBereich.color and forcedBereich.color is not null %}
{% set bereichBg = 'rgb(' ~ article.bereiche[0].color.r ~ ',' ~ forcedBereich.color.g ~ ',' ~ forcedBereich.color.b ~ ')' %}
{% endif %}
{% if forcedBereich.colorText and forcedBereich.color is not null %}
{% set bereichColor = 'rgb(' ~ forcedBereich.colorText.r ~ ',' ~ forcedBereich.colorText.g ~ ',' ~ forcedBereich.colorText.b ~ ')' %}
{% endif %}
{% elseif article.bereiche | length > 0 %}
{% set bereichTitle = article.bereiche[0].title %}
{% if article.bereiche[0].color and article.bereiche[0].color is not null %}
{% set bereichBg = 'rgb(' ~ article.bereiche[0].color.r ~ ',' ~ article.bereiche[0].color.g ~ ',' ~ article.bereiche[0].color.b ~ ')' %}
{% endif %}
{% if article.bereiche[0].colorText %}
{% set bereichColor = 'rgb(' ~ article.bereiche[0].colorText.r ~ ',' ~ article.bereiche[0].colorText.g ~ ',' ~ article.bereiche[0].colorText.b ~ ')' %}
{% endif %}
{% endif %}
{#<div class="grid grid-cols-1 grid-cols items-start shadow-card rounded-md bg-white group {% if fullHeight %}h-full{% else %}mb-10{% endif %}">#}
<div class="shadow-card rounded-md bg-white dark:bg-neutral-900 dark:text-white group {% if fullHeight %}h-full{% else %}mb-10{% endif %}">
<div class="relative">
<a href="/themen/artikel/{{ article.key }}">
<div class="relative block overflow-hidden rounded-t-md" style="background-color: {{ bereichBg }}">
<div class="w-full aspect-w-4 aspect-h-3 md:aspect-w-16 md:aspect-h-9" style="background: linear-gradient(0deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.5));">
{% set hasImage = article.image and article.image is not null %}
{% if hasImage %}
{{ article.image.getThumbnail('themaThumbnail').html | replace({ '<img': '<img class="w-full h-full object-cover group-hover:rotate-2 group-hover:scale-110 duration-1000 transition-all" style="object-position: center 10%"' }) | raw }}
{% else %}
<img src="{{ asset('static/images/waves-small.webp') }}" alt="" class="w-full h-full object-cover mix-blend-multiply">
{% endif %}
</div>
<div class="absolute block top-5 left-5 rounded-md text-xs px-3 pt-2 pb-1 font-mont-heavy uppercase" style="background-color: {{ bereichBg }}; color: {{ bereichColor }};">{{ bereichTitle }}</div>
</div>
</a>
</div>
<div class="relative p-5">
<div class="flex gap-5 justify-between mb-5">
<div class="text-xs text-gray-500">
{{ article.articleDate | date('d.m.Y') }}
</div>
<div class="text-xs">
{% if article.sponsor and article.sponsor.title %}
Werbefinanziert
{% endif %}
</div>
</div>
<a href="/themen/artikel/{{ article.key }}" class="text-xl md:text-2xl text-blue-light hover:text-black dark:hover:text-white transition-all font-mont-heavy">{{ article.title }}</a>
{% if article.subTitle %}
<div class="mt-5 mb-5 text-sm">{{ article.subTitle }}</div>
{% else %}
<div class="mt-5 mb-5 text-sm">{{ article.excerpt }}</div>
{% endif %}
</div>
</div>