mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-24 00:07:02 -04:00
Merge pull request #543 from alphagov/left-align-itemised-big-numbers
Make right-aligned big numbers left aligned
This commit is contained in:
@@ -11,10 +11,9 @@
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.big-number-right-aligned {
|
.big-number-smaller {
|
||||||
@extend %big-number;
|
@extend %big-number;
|
||||||
@include bold-36($tabular-numbers: true);
|
@include bold-36($tabular-numbers: true);
|
||||||
text-align: right;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.big-number-with-status {
|
.big-number-with-status {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
{% macro big_number(number, label, label_link=None, currency='', right_aligned=False) %}
|
{% macro big_number(number, label, label_link=None, currency='', smaller=False) %}
|
||||||
<div class="big-number{% if right_aligned %}-right-aligned{% endif %}">
|
<div class="big-number{% if smaller %}-smaller{% endif %}">
|
||||||
{% if number is number %}
|
{% if number is number %}
|
||||||
{% if currency %}
|
{% if currency %}
|
||||||
{{ "{}{:,.2f}".format(currency, number) }}
|
{{ "{}{:,.2f}".format(currency, number) }}
|
||||||
|
|||||||
@@ -47,7 +47,7 @@
|
|||||||
<div class='grid-row'>
|
<div class='grid-row'>
|
||||||
<div class='column-half'>
|
<div class='column-half'>
|
||||||
<div class="keyline-block">
|
<div class="keyline-block">
|
||||||
{{ big_number("Unlimited", 'free email allowance', right_aligned=True) }}
|
{{ big_number("Unlimited", 'free email allowance', smaller=True) }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class='column-half'>
|
<div class='column-half'>
|
||||||
@@ -57,10 +57,10 @@
|
|||||||
(sms_chargeable * sms_rate),
|
(sms_chargeable * sms_rate),
|
||||||
'spent on text messages',
|
'spent on text messages',
|
||||||
currency="£",
|
currency="£",
|
||||||
right_aligned=True
|
smaller=True
|
||||||
) }}
|
) }}
|
||||||
{% else %}
|
{% else %}
|
||||||
{{ big_number(sms_allowance_remaining, 'free text messages left', right_aligned=True) }}
|
{{ big_number(sms_allowance_remaining, 'free text messages left', smaller=True) }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -21,21 +21,21 @@
|
|||||||
<div class='column-half'>
|
<div class='column-half'>
|
||||||
<h2 class='heading-small'>Emails</h2>
|
<h2 class='heading-small'>Emails</h2>
|
||||||
<div class="keyline-block">
|
<div class="keyline-block">
|
||||||
{{ big_number(emails_sent, 'sent', right_aligned=True) }}
|
{{ big_number(emails_sent, 'sent', smaller=True) }}
|
||||||
{{ big_number("Unlimited", 'free allowance', right_aligned=True) }}
|
{{ big_number("Unlimited", 'free allowance', smaller=True) }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class='column-half'>
|
<div class='column-half'>
|
||||||
<h2 class='heading-small'>Text messages</h2>
|
<h2 class='heading-small'>Text messages</h2>
|
||||||
<div class="keyline-block">
|
<div class="keyline-block">
|
||||||
{{ big_number(sms_sent, 'sent', right_aligned=True) }}
|
{{ big_number(sms_sent, 'sent', smaller=True) }}
|
||||||
{{ big_number(sms_free_allowance, 'free allowance', right_aligned=True) }}
|
{{ big_number(sms_free_allowance, 'free allowance', smaller=True) }}
|
||||||
{{ big_number(sms_allowance_remaining, 'free allowance remaining', right_aligned=True) }}
|
{{ big_number(sms_allowance_remaining, 'free allowance remaining', smaller=True) }}
|
||||||
{% if sms_chargeable %}
|
{% if sms_chargeable %}
|
||||||
{{ big_number(
|
{{ big_number(
|
||||||
sms_chargeable,
|
sms_chargeable,
|
||||||
'at {:.1f}p per message'.format(sms_rate * 100),
|
'at {:.1f}p per message'.format(sms_rate * 100),
|
||||||
right_aligned=True
|
smaller=True
|
||||||
) }}
|
) }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
@@ -54,7 +54,7 @@
|
|||||||
(sms_chargeable * sms_rate),
|
(sms_chargeable * sms_rate),
|
||||||
'spent',
|
'spent',
|
||||||
currency="£",
|
currency="£",
|
||||||
right_aligned=True
|
smaller=True
|
||||||
) }}
|
) }}
|
||||||
</div>
|
</div>
|
||||||
<p>
|
<p>
|
||||||
|
|||||||
Reference in New Issue
Block a user