Skip to content
Snippets Groups Projects
Unverified Commit a93f3de6 authored by Nik | Klampfradler's avatar Nik | Klampfradler
Browse files

Auto-scale image proportionally in blog card

parent 39dbd638
No related branches found
No related tags found
No related merge requests found
......@@ -2,7 +2,8 @@
<div class="card-image">
<a href="{{ post.permalink }}">
<figure class="image is-4by3">
<img src="{{ get_url(path="@/" ~ post.relative_path, trailing_slash=true) }}{{ post.extra.depiction.image | safe }}" alt="{{ post.extra.depiction.alt }}" />
{% set image = resize_image(path="@/" ~ post.colocated_path ~ "/" ~ post.extra.depiction.image, width=800, height=600) -%}
<img src="{{ image.url }}" alt="{{ post.extra.depiction.alt }}" />
{% if post.extra.depiction.credits %}
<figcaption>{{ post.extra.depiction.credits }}</figcaption>
{% endif %}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment