franca-theme-blog/templates/components/image.j2

11 lines
385 B
Django/Jinja

{% if post.image %}
<p>
{% if home or section %}
<a href="/{{ language }}{{ url }}" rel="permalink" title="{{ image_title }}">
<img loading="lazy" src="{{ post.thumbnail }}" alt="{{ image_title }}" class="home-image" />
</a>
{% else %}
<img loading="lazy" src="{{ post.image }}" alt="{{ image_title }}" class="post-image" />
{% endif %}
</p>
{% endif %}