mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-03-02 07:11:14 -05:00
Refactor dashboard banner CSS and fix its text
Switches the CSS to use flexbox for layout and uses a macro to let the text support single and multiple messsages.
This commit is contained in:
@@ -145,10 +145,12 @@
|
||||
|
||||
.banner-dashboard {
|
||||
|
||||
$baseline-shift: -5px;
|
||||
$baseline-shift: 5px;
|
||||
|
||||
display: block;
|
||||
position: relative;
|
||||
display: block; // for browsers that don't support flexbox
|
||||
display: flex;
|
||||
align-items: baseline;
|
||||
flex-wrap: wrap;
|
||||
padding: $gutter-two-thirds 0;
|
||||
border-top: 1px solid $border-colour;
|
||||
border-bottom: 1px solid $border-colour;
|
||||
@@ -156,29 +158,36 @@
|
||||
text-decoration: none;
|
||||
|
||||
&:focus {
|
||||
border-color: $focus-colour;
|
||||
box-shadow: 0 3px 0 0 $focus-colour, 0 -3px 0 0 $focus-colour;
|
||||
color: $text-colour;
|
||||
border: none;
|
||||
}
|
||||
|
||||
&-count,
|
||||
&-meta {
|
||||
float: left; // for browsers that don't support flexbox
|
||||
}
|
||||
|
||||
&-count {
|
||||
@include bold-36;
|
||||
@include govuk-font(36, $weight: bold);
|
||||
padding-right: 5px;
|
||||
position: relative;
|
||||
// remove the top of the extra line-height this introduces
|
||||
top: $baseline-shift;
|
||||
margin-top: -$baseline-shift;
|
||||
flex: 0 1 0.85ch;
|
||||
}
|
||||
|
||||
&-count-label {
|
||||
@include bold-24;
|
||||
@include govuk-font(24, $weight: bold);
|
||||
text-decoration: underline;
|
||||
position: relative;
|
||||
top: $baseline-shift;
|
||||
padding-right: govuk-spacing(6);
|
||||
flex: 2 1 auto;
|
||||
}
|
||||
|
||||
&-meta {
|
||||
@include core-19;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
bottom: $gutter-two-thirds - $baseline-shift;
|
||||
@include govuk-font(19);
|
||||
float: right;
|
||||
text-align: right;
|
||||
flex: initial;
|
||||
}
|
||||
|
||||
& + .banner-dashboard {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
{% from "components/big-number.html" import big_number, big_number_with_status %}
|
||||
{% from "components/message-count-label.html" import message_count_label %}
|
||||
|
||||
<div class="ajax-block">
|
||||
{% if inbound_sms_summary != None %}
|
||||
@@ -7,7 +8,7 @@
|
||||
{{ inbound_sms_summary.count|format_thousands }}
|
||||
</span>
|
||||
<span class="banner-dashboard-count-label">
|
||||
text messages received
|
||||
{{ message_count_label(inbound_sms_summary.count, 'sms', suffix='received') }}
|
||||
</span>
|
||||
{% if inbound_sms_summary.most_recent %}
|
||||
<span class="banner-dashboard-meta">
|
||||
|
||||
Reference in New Issue
Block a user