add username to author info (#1912)

in both sticky nav on the side and about the author section at the end of the article
This commit is contained in:
Mario See 2019-02-27 11:25:47 -05:00 committed by Ben Halpern
parent a1b5dfbe89
commit ae484fbead
3 changed files with 25 additions and 11 deletions

View file

@ -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;

View file

@ -8,6 +8,9 @@
<h4><a href="/<%= @user.username %>"><%= @user.name %></a><%= follow_button(@user) %></h4>
<p><%= @user.summary %></p>
<p class="social">
<a href="/<%= @user.username %>">
@<%= @user.username %>
</a>
<% if @user.twitter_username.present? %>
<a href="http://twitter.com/<%= @user.twitter_username %>" target="_blank" rel="noopener">
<%= icon("twitter","22") %> <%= @user.twitter_username %>

View file

@ -33,16 +33,23 @@
<div class="primary-sticky-nav" id="article-show-primary-sticky-nav">
<div class="primary-sticky-nav-element primary-sticky-nav-author">
<a href="<%= @actor.path %>"><img src="<%= ProfileImage.new(@actor).get(90) %>" class="primary-sticky-nav-author-top-profile-image" /></a>
<span class="primary-sticky-nav-author-name">
<a href="<%= @actor.path %>">
<%= @actor.name %>
</a>
</span>
<div class="primary-sticky-nav-author-summary">
<% if @actor.tag_line.present? %>
<%= truncate (@actor.tag_line || @actor.summary || "Posts in this tag"), length: 200 %>
<% end %>
<div style="display:inline-block">
<div class="primary-sticky-nav-author-name">
<a href="<%= @actor.path %>">
<%= @actor.name %>
</a>
</div>
<div class="primary-sticky-nav-author-username">
<a href="<%= @actor.path %>">
@<%= @actor.username %>
</a>
</div>
</div>
<div class="primary-sticky-nav-author-summary">
<% if @actor.tag_line.present? %>
<%= truncate (@actor.tag_line || @actor.summary || "Posts in this tag"), length: 200 %>
<% end %>
</div>
<div class="primary-sticky-nav-author-follow">
<%= follow_button(@actor) %>
</div>
@ -121,4 +128,4 @@
<% end %>
</div>
<% end %>
<% end %>
<% end %>