From b2de34dc0c3732cc2a28808d44906f24ab6b4990 Mon Sep 17 00:00:00 2001 From: Emil Miler Date: Thu, 9 Nov 2023 10:36:59 +0100 Subject: [PATCH] Oprava whitespace overflow v background-image --- templates/macros.html | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/templates/macros.html b/templates/macros.html index af82705..9a24155 100644 --- a/templates/macros.html +++ b/templates/macros.html @@ -18,15 +18,15 @@ {% endmacro print_recipe %} {% macro recipe_preview_image(recipe) %} - {% set_global image = "../static/temp.jpg" %} - {% for asset in recipe.assets %} - {% if asset is matching("[img.](jpg|png)$") %} - {% set_global image = asset %} - {% break %} - {% endif %} - {% endfor %} - {% set image = resize_image(path=image, width=300, height=300, op="fill") %} - {{ image.url }} + {%- set_global image = "../static/temp.jpg" %} + {%- for asset in recipe.assets %} + {%- if asset is matching("[img.](jpg|png)$") %} + {%- set_global image = asset %} + {%- break %} + {%- endif %} + {%- endfor %} + {%- set image = resize_image(path=image, width=300, height=300, op="fill") %} + {{- image.url -}} {% endmacro recipe_preview_image %} {% macro pagination() %}