diff --git a/app/assets/stylesheets/config/_bootstrap_variables.scss b/app/assets/stylesheets/config/_bootstrap_variables.scss index 77cb850..a947346 100755 --- a/app/assets/stylesheets/config/_bootstrap_variables.scss +++ b/app/assets/stylesheets/config/_bootstrap_variables.scss @@ -14,7 +14,7 @@ $gray-base: $gray; $brand-primary: $primary; $brand-success: $green; $brand-info: $yellow; -$brand-danger: $red; +$brand-danger: $warn; $brand-warning: $orange; $brand-secondary: $secondary; @@ -52,3 +52,4 @@ $border-radius-small: 2px; } // Override other variables below! +$input-border-focus: $primary; diff --git a/app/assets/stylesheets/config/_colors.scss b/app/assets/stylesheets/config/_colors.scss index dfca064..f551eb7 100644 --- a/app/assets/stylesheets/config/_colors.scss +++ b/app/assets/stylesheets/config/_colors.scss @@ -8,6 +8,7 @@ $orange: #E67E22; $green: #32B796; $gray: #000000; $light-gray: #F4F4F4; +$warn: #3d63cc; $primary: #F55E4F; $secondary: #5ED17E; diff --git a/app/assets/stylesheets/pages/_settings.scss b/app/assets/stylesheets/pages/_settings.scss index 9e511d8..b7b0f6c 100644 --- a/app/assets/stylesheets/pages/_settings.scss +++ b/app/assets/stylesheets/pages/_settings.scss @@ -91,3 +91,22 @@ input:checked + .slider:before { .padding-right { padding-right: 10px; } + +.margin-right { + margin-right: 10px; +} + +.flex-inline { + display: flex; + flex-direction: row; + align-items: center; +} + +.center-screen { + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; + text-align: center; + min-height: 80vh; +} diff --git a/app/assets/stylesheets/users/_show.scss b/app/assets/stylesheets/users/_show.scss index e800dd4..90bc12d 100644 --- a/app/assets/stylesheets/users/_show.scss +++ b/app/assets/stylesheets/users/_show.scss @@ -4,6 +4,7 @@ display:flex; flex-direction: column; justify-content: center; + text-align: center; h2 { font-size: 1.5em; @@ -21,33 +22,38 @@ margin-right: .5em; } } - .profile-pic { - display: flex; - align-items: center; - margin-right: 3em; - img { - width: 10em; - } - } - - .profile-text { - display: flex; - flex-direction: column; - justify-content: center; - color: #f2321f; - h1 { - margin: 0 0 .5em 0 ; - } - h2 { - margin: 0; - } - .italics { - font-style: italic; - color: white; - } - } } +} +.profile-text { + display: flex; + flex-direction: column; + justify-content: center; + color: $primary; + h1 { + margin: 0 0 .5em 0 ; } + h2 { + margin: 0; + } + .italics { + font-style: italic; + color: white; + } +} +.vcenter { + display: inline-block; + vertical-align: middle; + float: none; +} +.vertical-padding { + padding-top: 5px; + padding-bottom: 5px; +} + +.vertical-margin { + margin-top: 5px; + margin-bottom: 5px; +} diff --git a/app/controllers/connections_controller.rb b/app/controllers/connections_controller.rb index 0a8b48b..f22135d 100644 --- a/app/controllers/connections_controller.rb +++ b/app/controllers/connections_controller.rb @@ -1,6 +1,5 @@ class ConnectionsController < ApplicationController def new - end def create @@ -10,9 +9,17 @@ class ConnectionsController < ApplicationController @connection.contact = contact_user if @connection.save - redirect_to contacts_path + contact_message = nil + if contact_user.first_name.nil? || contact_user.last_name.nil? + contact_message = "#{contact_user.email}" + else + contact_message = "#{contact_user.first_name} #{contact_user.last_name}" + end + flash[:notice] = "Added #{contact_message} to contacts" + redirect_to contacts_path else - + flash[:alert] = "Invalid email address!" + render 'new' end end end diff --git a/app/views/connections/new.html.erb b/app/views/connections/new.html.erb index 0543a78..e6db9ff 100644 --- a/app/views/connections/new.html.erb +++ b/app/views/connections/new.html.erb @@ -1,9 +1,23 @@ -