From 8e0210a91a4c8800963371f46085c2bb34d9bebe Mon Sep 17 00:00:00 2001 From: Emil Miler Date: Sun, 2 May 2021 11:28:52 +0200 Subject: [PATCH] =?UTF-8?q?Zm=C4=9Bna=20logiky=20pro=20v=C3=BDb=C4=9Br=20o?= =?UTF-8?q?br=C3=A1zku=20nebo=20placeholderu?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- templates/macros.html | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/templates/macros.html b/templates/macros.html index d4238e0..c41105b 100644 --- a/templates/macros.html +++ b/templates/macros.html @@ -171,17 +171,14 @@ {% endmacro %} {% macro profile_picture(profile) %} - {% set_global img_found = 0 %} + {% set_global img = "../static/placeholder-avatar.jpg" %} {% for asset in profile.assets %} {% if asset is matching("img.(jpg|png)$") %} - {% set_global img_found = 1 %} - {{ profile.title }} + {% set_global img = asset %} {% break %} {% endif %} {% endfor %} - {% if not img_found == 1 %} - {{ profile.title }} - {% endif %} + {{ profile.title }} {% endmacro %} {% macro profile_info(profile) %} @@ -221,17 +218,14 @@