-
Huste, Tobias authored
- Use default font instead of Hermann - Reduce size by removing the image and some metainformation
Huste, Tobias authored- Use default font instead of Hermann - Reduce size by removing the image and some metainformation
post_card_image.html 1.39 KiB
{%- comment -%}
This is a card displaying post metadata as well as the title image.
Parameters:
post: The post which sould be displayed on the card
{%- endcomment -%}
{%- if include.post.title_image == "default" %}
{%- assign img_url = site.directory.images
| append: 'HIFIS_LOGO_news_cards.svg'
| strip
| relative_url -%}
{%- else -%}
{%- assign img_url = site.directory.large_images
| append: "phone/"
| append: include.post.title_image
| strip
| relative_url -%}
{%- endif -%}
<div class="card {{ include.class }}">
<img class="card-img-top card-img-equal" src="{{ img_url }}" alt="Title image">
<div class="card-img-overlay">
<span class="badge badge-secondary">
<i class="fas fa-calendar-day" aria-hidden="true"></i>
{{ include.post.data | date: "%d. %b. %y" }}
</span>
<span class="badge badge-dark">
<i class="fas fa-tag" aria-hidden="true"></i>
{%- for category in include.post.categories -%}
{%- unless site.languages contains category -%}
{{ category | capitalize }}
{%- endunless -%}
{%- endfor -%}
</span>
</div>
<div class="card-body">
<a href="{{ include.post.url | relative_url }}" class="stretched-link">
<h4 class="card-title">{{ include.post.title }}</h4>
</a>
</div>
</div>