You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
713 B
HTML
21 lines
713 B
HTML
4 years ago
|
{% macro print_recipe(recipe) %}
|
||
|
<article>
|
||
|
<a href="{{ recipe.permalink }}">
|
||
|
{% set_global image_found = 0 %}
|
||
|
{% for asset in recipe.assets %}
|
||
|
{% if asset is matching("[img.](jpg|png)$") %}
|
||
|
<img src="{{ resize_image(path=asset, width=300, height=300, op="fill") }}" alt="Náhled">
|
||
|
{% set_global image_found = 1 %}
|
||
|
{% break %}
|
||
|
{% endif %}
|
||
|
{% endfor %}
|
||
|
{% if image_found == 0 %}
|
||
|
<img src="/temp.jpg" alt="Náhradní obrázek">
|
||
|
{% endif %}
|
||
|
{% set_global image_found = 0 %}
|
||
|
{% if recipe.title %}<h3>{{ recipe.title }}</h3>{% endif %}
|
||
|
</a>
|
||
|
{% if recipe.date %}<span class="date">{{ recipe.date | date(format="%d.%m.%Y") }}</span>{% endif %}
|
||
|
</article>
|
||
|
{% endmacro print_recipe %}
|