# HG changeset patch # User nanaya # Date 1433640275 -32400 # Node ID bf9e350f8a2bdc8512e7711222a9da4ebf72feb7 # Parent 62fef621f39cbd5f67f94e6a85c2615ca90e0073 Add styling to the alerts. diff -r 62fef621f39c -r bf9e350f8a2b app/assets/stylesheets/_components.scss --- a/app/assets/stylesheets/_components.scss Sun Jun 07 10:13:25 2015 +0900 +++ b/app/assets/stylesheets/_components.scss Sun Jun 07 10:24:35 2015 +0900 @@ -3,3 +3,15 @@ input[type=radio] { margin-right: $spacing/2; } + +.alert { + padding: $spacing; +} + +.alert-danger { + background-color: $danger; +} + +.alert-info { + background-color: $info; +} diff -r 62fef621f39c -r bf9e350f8a2b app/assets/stylesheets/_layout.scss --- a/app/assets/stylesheets/_layout.scss Sun Jun 07 10:13:25 2015 +0900 +++ b/app/assets/stylesheets/_layout.scss Sun Jun 07 10:24:35 2015 +0900 @@ -40,3 +40,7 @@ font-family: Segoe UI, Helvetica Neue, Helvetica, Arial, sans-serif; font-size: 12px; } + +.alert { + flex: none; +} diff -r 62fef621f39c -r bf9e350f8a2b app/assets/stylesheets/_variables.scss --- a/app/assets/stylesheets/_variables.scss Sun Jun 07 10:13:25 2015 +0900 +++ b/app/assets/stylesheets/_variables.scss Sun Jun 07 10:24:35 2015 +0900 @@ -1,2 +1,5 @@ $spacing: 10px; $screen-sm: 600px; + +$danger: scale-color(#f00, $lightness: 90%); +$info: scale-color(#0f0, $lightness: 90%); diff -r 62fef621f39c -r bf9e350f8a2b app/views/layouts/application.html.erb --- a/app/views/layouts/application.html.erb Sun Jun 07 10:13:25 2015 +0900 +++ b/app/views/layouts/application.html.erb Sun Jun 07 10:24:35 2015 +0900 @@ -16,9 +16,9 @@

+ <%= render "layouts/alerts" %> +
- <%= render "layouts/alerts" %> - <%= yield %>