mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-02-11 22:14:06 -05:00
25 lines
791 B
HTML
25 lines
791 B
HTML
{% macro big_number(number, label, link=None, currency='', smaller=False, smallest=False) %}
|
|
{% if link %}
|
|
<a class="usa-link display-flex" href="{{ link }}">
|
|
{% endif %}
|
|
<span class="big-number{% if smaller %}-smaller{% endif %}{% if smallest %}-smallest{% endif %}">
|
|
<span class="big-number-number">
|
|
{% if number is number %}
|
|
{% if currency %}
|
|
{{ "{}{:,.2f}".format(currency, number) }}
|
|
{% else %}
|
|
{{ "{:,}".format(number) }}
|
|
{% endif %}
|
|
{% else %}
|
|
{{ number }}
|
|
{% endif %}
|
|
</span>
|
|
{% if label %}
|
|
<span class="big-number-label">{{ label }}</span>
|
|
{% endif %}
|
|
</span>
|
|
{% if link %}
|
|
</a>
|
|
{% endif %}
|
|
{% endmacro %}
|