safing-web/_includes/thumbnail_blog.html
2020-07-31 15:09:58 +02:00

30 lines
1.2 KiB
HTML

<li class="list-none mt-10 md:mt-0">
<div class="block transform hover:scale-95 duration-150 ease-in-out">
<a href="{{ post.url }}">
<div class="relative" style="max-width: 365px;">
{% if post.custom_thumbnail_name == null %}
<img src="{{ site.img_url }}thumbnails/blog/placeholder.png">
{% else %}
<img src="{{ site.img_url }}thumbnails/blog/{{ post.custom_thumbnail_name }}.png">
{% endif %}
{% if post.progress_update == true %}
<span class="absolute text-white right-0 bottom-0 pr-3 pb-3" style="font-size: 3.1rem; font-weight: 800;" >#{{ post.title | slice: 2, 2 }}</span>
{% endif %}
</div>
<div class="pt-6">
<span class="opacity-25">
{% if include.pre_header %}
{{ include.pre_header }} -
{% endif %}
{{ post.date | date: "%-d. %b %Y" }}
</span>
{% if post.progress_update == true %}
{% assign title_length = post.title | size %}
<p>{{ post.title | slice: 7, title_length }} - #{{ post.title | slice: 2, 2 }}</p>
{% else %}
<p>{{ post.title }}</p>
{% endif %}
</div>
</a>
</div>
</li>