From ae484fbeada1393ecfa11c9a2149bbaf2e156609 Mon Sep 17 00:00:00 2001 From: Mario See Date: Wed, 27 Feb 2019 11:25:47 -0500 Subject: [PATCH] add username to author info (#1912) in both sticky nav on the side and about the author section at the end of the article --- app/assets/stylesheets/sticky-nav.scss | 6 ++++- app/views/articles/_about_author.html.erb | 3 +++ app/views/articles/_sticky_nav.html.erb | 27 ++++++++++++++--------- 3 files changed, 25 insertions(+), 11 deletions(-) diff --git a/app/assets/stylesheets/sticky-nav.scss b/app/assets/stylesheets/sticky-nav.scss index ffbef92cd..294de4291 100644 --- a/app/assets/stylesheets/sticky-nav.scss +++ b/app/assets/stylesheets/sticky-nav.scss @@ -24,12 +24,16 @@ height: 35px; border-radius: 360px; margin-right: 5px; - vertical-align: -9px; + vertical-align: -2px; } .primary-sticky-nav-author-name{ font-size:1.3em; font-weight: bold; } + .primary-sticky-nav-author-username { + font-size:0.8em; + font-weight: bold; + } .primary-sticky-nav-author-summary{ font-weight: 400; color: $medium-gray; diff --git a/app/views/articles/_about_author.html.erb b/app/views/articles/_about_author.html.erb index 93fa6e2fe..801cab7fb 100644 --- a/app/views/articles/_about_author.html.erb +++ b/app/views/articles/_about_author.html.erb @@ -8,6 +8,9 @@

<%= @user.name %><%= follow_button(@user) %>

<%= @user.summary %>

+ + @<%= @user.username %> + <% if @user.twitter_username.present? %> <%= icon("twitter","22") %> <%= @user.twitter_username %> diff --git a/app/views/articles/_sticky_nav.html.erb b/app/views/articles/_sticky_nav.html.erb index b39dd1ea5..e60d37aba 100644 --- a/app/views/articles/_sticky_nav.html.erb +++ b/app/views/articles/_sticky_nav.html.erb @@ -33,16 +33,23 @@

- - - <%= @actor.name %> - - -
- <% if @actor.tag_line.present? %> - <%= truncate (@actor.tag_line || @actor.summary || "Posts in this tag"), length: 200 %> - <% end %> +
+ + +
+
+ <% if @actor.tag_line.present? %> + <%= truncate (@actor.tag_line || @actor.summary || "Posts in this tag"), length: 200 %> + <% end %> +
<%= follow_button(@actor) %>
@@ -121,4 +128,4 @@ <% end %>
<% end %> -<% end %> \ No newline at end of file +<% end %>