{# author: Marius Hofmann #}
{% macro format_money(float_value) -%}
{{ '{:10.2f} €'.format(float_value).replace('.', ',') }}
{% endmacro %}
{% macro format_mass(float_value) -%}
{{ '{:10.2f} kg'.format(float_value).replace('.', ',') }}
{% endmacro %}
{% macro format_distance(float_value) -%}
{{ '{:10.2f}m'.format(float_value).replace('.', ',') }}
{% endmacro %}
{% macro get_item_default_image(item) -%}
{% if item.images.all()[0] %}
{% else %}
{% endif %}
{% endmacro %}
{% macro get_item_shortened_desc(item) -%}
{% if item.description %}
{{ item.description|truncate(20, True, '...') }}
{% endif %}
{% endmacro %}
{% macro get_item_image_ligthbox(item) -%}
{% if item.images.all()[0] %}
{# Used this https://lokeshdhakar.com/projects/lightbox2/ to realize the lightbox#}