{%- 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 post.title_image == "default" %} {%- assign image = 'hifis_page_title_background.jpg'-%} {%- else -%} {%- assign image = post.title_image -%} {%- endif -%} {%- assign img_url = site.directory.large_images | append: "phone/" | append: image | strip | relative_url -%} <div class="card"> <a href="{{ include.post.url | relative_url }}"> <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> {{ include.post.categories[0] | capitalize }} </span> </div> <div class="card-body"> <h3 class="card-title">{{ include.post.title }}</h3> </div> </a> </div>