From 1f39452b3ec93e7e417e2d9ae2364332b855b97d Mon Sep 17 00:00:00 2001 From: Emil Miler Date: Sun, 2 May 2021 17:39:07 +0200 Subject: [PATCH] =?UTF-8?q?Zm=C4=9Bna=20logiky=20pro=20v=C3=BDb=C4=9Br=20o?= =?UTF-8?q?br=C3=A1zku=20receptu?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- templates/macros.html | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/templates/macros.html b/templates/macros.html index 54a41f6..a5ec653 100644 --- a/templates/macros.html +++ b/templates/macros.html @@ -10,19 +10,15 @@ {% endif %} > - {% set_global image_found = 0 %} + {% set_global image = "../static/temp.jpg" %} {% for asset in recipe.assets %} {% if asset is matching("[img.](jpg|png)$") %} - Náhled - {% set_global image_found = 1 %} + {% set_global image = asset %} {% break %} {% endif %} {% endfor %} - {% if image_found == 0 %} - Náhradní obrázek - {% endif %} - {% set_global image_found = 0 %} - {% if recipe.title %}

{{ recipe.title }}

{% endif %} + {{ recipe.title }} +

{{ recipe.title }}

{% if recipe.date %}{{ recipe.date | date(format="%d.%m.%Y") }}{% endif %}