diff --git a/app/assets/stylesheets/components/banner.scss b/app/assets/stylesheets/components/banner.scss index a801b2ec7..70555d2d1 100644 --- a/app/assets/stylesheets/components/banner.scss +++ b/app/assets/stylesheets/components/banner.scss @@ -1,14 +1,22 @@ +%banner, .banner { @include core-19; background: $turquoise; color: $white; display: block; - padding: $gutter-half $gutter; + padding: $gutter-half; margin: 0 0 $gutter 0; text-align: center; position: relative; +} + +.banner-with-tick { + + @extend %banner; + padding: $gutter-half $gutter; + &:before { @include core-24; content: '✔'; diff --git a/app/assets/stylesheets/components/sms-message.scss b/app/assets/stylesheets/components/sms-message.scss index 4fa727388..abdd5f9bf 100644 --- a/app/assets/stylesheets/components/sms-message.scss +++ b/app/assets/stylesheets/components/sms-message.scss @@ -45,27 +45,4 @@ margin: -$gutter-half 0 $gutter 0; } - &-history { - - background: $turquoise; - color: $white; - padding: $gutter-half; - @include bold-19; - margin: 0 0 $gutter 0; - - &-heading { - - @include bold-19; - margin: 0; - - &-time { - @include inline-block; - margin-left: 10px; - font-weight: normal; - } - - } - - } - } diff --git a/app/main/__init__.py b/app/main/__init__.py index 3d3ab5cde..578ea5e92 100644 --- a/app/main/__init__.py +++ b/app/main/__init__.py @@ -4,5 +4,5 @@ main = Blueprint('main', __name__) from app.main.views import ( index, sign_in, sign_out, register, two_factor, verify, sms, add_service, - code_not_received, jobs, dashboard, templates, service_settings, forgot_password, new_password + code_not_received, jobs, dashboard, templates, service_settings, forgot_password, new_password, styleguide ) diff --git a/app/main/views/styleguide.py b/app/main/views/styleguide.py new file mode 100644 index 000000000..516a39b6c --- /dev/null +++ b/app/main/views/styleguide.py @@ -0,0 +1,7 @@ +from flask import render_template +from app.main import main + + +@main.route('/_styleguide') +def styleguide(): + return render_template('views/styleguide.html') diff --git a/app/templates/components/banner.html b/app/templates/components/banner.html index 2dab12c5d..a03d2cb0a 100644 --- a/app/templates/components/banner.html +++ b/app/templates/components/banner.html @@ -1,3 +1,5 @@ -{% macro banner(body) %} -
+{% macro banner(body, with_tick=False) %} + {% endmacro %} diff --git a/app/templates/components/sms-message.html b/app/templates/components/sms-message.html index 38d30b877..d0d0f92ce 100644 --- a/app/templates/components/sms-message.html +++ b/app/templates/components/sms-message.html @@ -10,11 +10,3 @@ {% endif %} {% endmacro %} - -{% macro message_status(status, time) %} - -{% endmacro %} diff --git a/app/templates/views/job.html b/app/templates/views/job.html index 29ae57ba7..b733a5e61 100644 --- a/app/templates/views/job.html +++ b/app/templates/views/job.html @@ -14,7 +14,7 @@ GOV.UK Notify | Notifications activity- {{ banner(flash_message) }} + {{ banner(flash_message, with_tick=True) }}
Used to show the result of a user’s action.
+ {{ banner("This is a banner", with_tick=True) }} +Used to show some important statistics.
+ +Used to navigate to child pages.
+ + {{ browse_list([ + { + 'title': 'Change your username', + 'link': 'http://example.com', + }, + { + 'title': 'Change your password', + 'link': 'http://example.com', + 'hint': 'Your password is used to log in' + }, + { + 'title': 'Delete everything', + 'link': 'http://example.com', + 'hint': 'You can’t undo this', + 'destructive': True + } + ]) }} + ++ Used to submit forms and optionally provide a link to go back to the + previous page. +
++ Must be used inside a form. +
++ Adds a hidden CSRF token to the page. +
+ + {{ page_footer( + button_text='Save and continue' + ) }} + + {{ page_footer( + button_text='Delete', destructive=True + ) }} + + {{ page_footer( + button_text='Send', back_link='http://example.com', back_link_text="Back to dashboard" + ) }} + +Used to show or preview an SMS message.
+ +