ducky/web
2015-06-30
Parent:b9d0efb44eaa
ducky/web/src/styles/_flashes.scss
Update our profile model to use our refresh helper. Update our profile model to send the correct authorization header when making requests, and if the request fails because the OAuth token has expired, try to use the refresh token to obtain a new access token, then retry the request.
1 $base-spacing: 1.5em !default;
2 $alert-color: #fff6bf !default;
3 $error-color: #fbe3e4 !default;
4 $notice-color: #e5edf8 !default;
5 $success-color: #e6efc2 !default;
7 @mixin flash($color) {
8 background-color: $color;
9 color: darken($color, 60%);
10 display: block;
11 font-weight: 500;
12 margin-bottom: $base-spacing / 2;
13 padding: $base-spacing / 2;
14 text-align: center;
16 a {
17 color: darken($color, 70%);
18 text-decoration: underline;
20 &:focus,
21 &:hover {
22 color: darken($color, 90%);
23 }
24 }
25 }
27 .flash-alert {
28 @include flash($alert-color);
29 }
31 .flash-error {
32 @include flash($error-color);
33 }
35 .flash-notice {
36 @include flash($notice-color);
37 }
39 .flash-success {
40 @include flash($success-color);
41 }