forgery/templates/macros.html
2024-11-27 20:31:06 +01:00

12 lines
297 B
HTML

{% macro compact(name, desc) %}
{% if not desc %}
{{ name }}
{% elif desc | length <= 150 %}
{{ name }} | {{ desc }}
{% else %}
<details>
<summary>{{ name }} | {{ desc | truncate(length=150) }}</summary>
{{ desc }}
</details>
{% endif %}
{% endmacro compact %}