forked from em/receptty.org
Oprava generování obrázků pro novou verzi Zoly
This commit is contained in:
parent
bd924f7fa3
commit
52d31b77bb
@ -17,7 +17,8 @@
|
|||||||
{% break %}
|
{% break %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
<img src="{{ resize_image(path=image, width=300, height=300, op="fill") }}" alt="{{ recipe.title }}">
|
{% set image = resize_image(path=image, width=300, height=300, op="fill") %}
|
||||||
|
<img src="{{ image.url }}" alt="{{ recipe.title }}">
|
||||||
<h3>{{ recipe.title }}</h3>
|
<h3>{{ recipe.title }}</h3>
|
||||||
{% if recipe.date %}<span class="date">{{ recipe.date | date(format="%d.%m.%Y") }}</span>{% endif %}
|
{% if recipe.date %}<span class="date">{{ recipe.date | date(format="%d.%m.%Y") }}</span>{% endif %}
|
||||||
</a>
|
</a>
|
||||||
@ -41,7 +42,8 @@
|
|||||||
{% macro recipe_image() %}
|
{% macro recipe_image() %}
|
||||||
{% for asset in page.assets %}
|
{% for asset in page.assets %}
|
||||||
{% if asset is matching("[img.](jpg|png)$") %}
|
{% if asset is matching("[img.](jpg|png)$") %}
|
||||||
<a href="/{{ asset }}"><img src="{{ resize_image(path=asset, width=900, height=400, op="fill") }}" alt="Náhled"></a>
|
{% set image = resize_image(path=asset, width=900, height=400, op="fill") %}
|
||||||
|
<a href="{{ get_url(path=asset) }}"><img src="{{ image.url }}" alt="Náhled"></a>
|
||||||
{% break %}
|
{% break %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
Loading…
Reference in New Issue
Block a user