From 7bb7ef32bad6a981d961a5a21a76c6a73a8259c0 Mon Sep 17 00:00:00 2001 From: Ben Halpern Date: Wed, 6 Jun 2018 21:05:22 -0400 Subject: [PATCH 1/2] Fix height issue on user profile header (#397) --- app/assets/stylesheets/user-profile-header.scss | 12 ++++++------ app/views/articles/_user_metadata.html.erb | 6 ++++++ 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/app/assets/stylesheets/user-profile-header.scss b/app/assets/stylesheets/user-profile-header.scss index e95e081dc..2d601274d 100644 --- a/app/assets/stylesheets/user-profile-header.scss +++ b/app/assets/stylesheets/user-profile-header.scss @@ -213,7 +213,7 @@ } .user-profile-header-container{ @media screen and ( min-width: 1100px ){ - width: calc( 100% - 400px); + width: calc( 100% - 420px); margin-left: 6%; } } @@ -225,7 +225,7 @@ right: 0px; top: 0px; bottom: 0px; - width: 350px; + width: 370px; } .user-metadata-details-inner{ padding: 8px 0px; @@ -244,8 +244,8 @@ .row{ padding: calc(5px + 0.2vw) 0px; display: inline-block; - padding-left: 18px; - width: 300px; + padding-left: 16px; + width: 322px; max-width:92%; } .key{ @@ -256,8 +256,8 @@ } .value{ display: inline-block; - font-size: 0.9em; - margin-bottom: 5px; + font-size: 0.85em; + margin-bottom: 4px; } } } diff --git a/app/views/articles/_user_metadata.html.erb b/app/views/articles/_user_metadata.html.erb index 99b31fc71..ed793fad9 100644 --- a/app/views/articles/_user_metadata.html.erb +++ b/app/views/articles/_user_metadata.html.erb @@ -3,6 +3,7 @@ color: <%= HexComparer.new([user_colors(@user)[:bg], user_colors(@user)[:text]]).brightness(0.95) %> } +
<% end %> <% else %> + <% if @user.email_public && @user.employer_name.present? && @user.location.present? && @user.education.present? %> + + <% end %> <% if @user.email_public %>
From 96ff516e097ed24d61b1ec359204eec32cac9b4b Mon Sep 17 00:00:00 2001 From: Ben Halpern Date: Wed, 6 Jun 2018 21:16:29 -0400 Subject: [PATCH 2/2] Adjust user header style (#398) * Fix height issue on user profile header * Adjust user header style --- app/views/articles/_user_metadata.html.erb | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/app/views/articles/_user_metadata.html.erb b/app/views/articles/_user_metadata.html.erb index ed793fad9..f53e5c5df 100644 --- a/app/views/articles/_user_metadata.html.erb +++ b/app/views/articles/_user_metadata.html.erb @@ -38,9 +38,15 @@
<% end %> <% else %> - <% if @user.email_public && @user.employer_name.present? && @user.location.present? && @user.education.present? %> + <% if @user.email_public && + @user.employer_name.present? && + @user.location.present? && + @user.education.present? && + @user.education.size > 25 && + @user.summary.to_s.size < 145 + %> <% end %> <% if @user.email_public %>