From 13a40786efbb7025af7888fcfed3772b72e14bc5 Mon Sep 17 00:00:00 2001 From: Rosemary Sanchez Date: Mon, 22 Jul 2013 17:02:40 -0600 Subject: Style error messaging. --- app/assets/stylesheets/custom.css.scss | 1 + app/assets/stylesheets/forms.css.scss | 14 ++++++++++++++ app/assets/stylesheets/media-queries.css.scss | 2 +- app/assets/stylesheets/settings.css.scss | 1 + app/views/sign_ups/_form.html.erb | 19 +++++++++---------- 5 files changed, 26 insertions(+), 11 deletions(-) (limited to 'app') diff --git a/app/assets/stylesheets/custom.css.scss b/app/assets/stylesheets/custom.css.scss index 5aa1d06..7d67e79 100644 --- a/app/assets/stylesheets/custom.css.scss +++ b/app/assets/stylesheets/custom.css.scss @@ -69,6 +69,7 @@ a{ } #new_sign_up{ + position: relative; label{ font-style: italic; font-weight: 200; diff --git a/app/assets/stylesheets/forms.css.scss b/app/assets/stylesheets/forms.css.scss index 23ad0c8..96d50be 100644 --- a/app/assets/stylesheets/forms.css.scss +++ b/app/assets/stylesheets/forms.css.scss @@ -45,3 +45,17 @@ input[type="submit"][disabled] { background-color: #8BC980; *background-color: #003bb3; } + + +#error_explanation{ + position: absolute; + bottom: -10px; + + ul{ + margin: 0; + li{ + list-style-type: none; + color: $red; + } + } +} diff --git a/app/assets/stylesheets/media-queries.css.scss b/app/assets/stylesheets/media-queries.css.scss index 14b913a..de3348a 100644 --- a/app/assets/stylesheets/media-queries.css.scss +++ b/app/assets/stylesheets/media-queries.css.scss @@ -3,7 +3,7 @@ .container { min-height: 600px; } } -@media (min-width: 979px) and (orientation: landscape) { +@media (max-width: 979px) and (orientation: landscape) { h1#logo { float: none; } #new_sign_up{ .field{ diff --git a/app/assets/stylesheets/settings.css.scss b/app/assets/stylesheets/settings.css.scss index 55f1506..2bb1e16 100644 --- a/app/assets/stylesheets/settings.css.scss +++ b/app/assets/stylesheets/settings.css.scss @@ -3,3 +3,4 @@ $blue: #719ad0; $green: #8bc980; $orange: #e17a26; $lightgreen: #B1DBAA; +$red: #cc0000; diff --git a/app/views/sign_ups/_form.html.erb b/app/views/sign_ups/_form.html.erb index f43a252..8a70ca4 100644 --- a/app/views/sign_ups/_form.html.erb +++ b/app/views/sign_ups/_form.html.erb @@ -1,17 +1,16 @@ <%= form_for(@sign_up) do |f| %> - <% if @sign_up.errors.any? %> -
- -
- <% end %> -
<%= f.label :email, "Want to know when we're ready to launch?" %> <%= f.email_field :email, placeholder: 'Email' %> + <% if @sign_up.errors.any? %> +
+
    + <% @sign_up.errors.full_messages.each do |msg| %> +
  • <%= msg %>
  • + <% end %> +
+
+ <% end %>
<%= f.submit "Sign up now" %> -- cgit v1.2.3