{# ################# CSS ################## #}
{% include "@StartPlatzStyle/CSS/_sp-connect.version-2021-winter.html.twig" %}
{# ################# HTML ################## #}
{# desktop layout #}
<div class="row d-none d-lg-inline-flex ArtikelCardblogPost rounded-lg my-3 mx-auto">
<div class="col-lg-5 rounded-left ArtikelImageHolderblogPost">
{% if entity.img %}
<img class="ArtikelImgblogPost p-2" src="{{ entity.img }}" alt=" ">
{% elseif item.imagelink %}
<img class="ArtikelImgblogPost p-2" src="{{ item.imagelink }}" alt=" ">
{% else %}
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="ArtikelImgblogPost bi bi-image-fill p-2" viewBox="0 0 16 16">
<path d="M.002 3a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2h-12a2 2 0 0 1-2-2V3zm1 9v1a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1V9.5l-3.777-1.947a.5.5 0 0 0-.577.093l-3.71 3.71-2.66-1.772a.5.5 0 0 0-.63.062L1.002 12zm5-6.5a1.5 1.5 0 1 0-3 0 1.5 1.5 0 0 0 3 0z"/>
</svg>
{% endif %}
</div>
<div class="col-lg-7 rounded-right ArtikelTextblogPost">
<div class="row">
<div class="col-12" style="height: 245px">
<h5 class="mt-4 px-2">
{{ entity.post_title }}
</h5>
<p class="px-2 xLineEllipsis" style="line-clamp: 6;-webkit-line-clamp: 6;">
{{ entity.post_content|striptags|raw }}
</p>
</div>
<div class="col-12">
<a target="_blank" class="btn btn-warning float-right"
href="{{ path('meta_feed_link', {'url':entity.guid|url_encode, 'feedId': item.id}) }}" role="button">
Read entire article
</a>
</div>
</div>
</div>
<div class="col-12 p-0 m-0">
{% if is_granted("ROLE_ADMIN") %}
<span class="px-2 py-1 mt-1 float-left bg-warning rounded">
{{ item.type }}
</span>
{% endif %}
</div>
</div>
{# mobile card #}
<div class="card cardArticleWidthblogPost my-3 d-lg-none rounded">
<div class="imgBlockMobileblogPost rounded-top">
{% if entity.img %}
<img class="card-img-top p-2" src="{{ entity.img }}" alt=" ">
{% elseif item.imagelink %}
<img class="card-img-top p-2 " src="{{ item.imagelink }}" alt=" ">
{% else %}
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="card-img-top bi bi-image-fill " viewBox="0 0 16 16">
<path d="M.002 3a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2h-12a2 2 0 0 1-2-2V3zm1 9v1a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1V9.5l-3.777-1.947a.5.5 0 0 0-.577.093l-3.71 3.71-2.66-1.772a.5.5 0 0 0-.63.062L1.002 12zm5-6.5a1.5 1.5 0 1 0-3 0 1.5 1.5 0 0 0 3 0z"/>
</svg>
{% endif %}
</div>
<div class="card-body cardBodyKnowhowblogPost rounded-bottom">
{% if is_granted("ROLE_ADMIN") %}
<span class="px-3 py-1 mb-2 bg-warning badge">
<b>
{{ item.type }}
</b>
</span>
{% endif %}
<h5 class="card-title">
{{ entity.post_title }}
</h5>
{% if entity.post_content|length > 600 %}
{% set teaser = entity.post_content[0:600] ~'...' %}
<p class="card-text">
{{ teaser|striptags|raw }}
</p>
{% else %}
<p class="card-text">
{{ entity.post_content|striptags|raw }}
</p>
{% endif %}
<a target="_blank" class="btn btn-warning float-right"
href="{{ path('meta_feed_link', {'url':entity.guid|url_encode, 'feedId': item.id}) }}" role="button">
Read entire article
</a>
</div>
</div>