docbrown/app/views/users/_liquid.html.erb
Mac Siri 9ebd742712
[deploy] Reintroduce sticky_nav changes (ab81f36 & 7f92855) (#10263)
* Revert "[deploy] Revert removal of unneeded eager load (if needed) (#10179)"

This reverts commit 11c7b148da.

* Revert "[deploy] Revert "Migrate ProfileImage to Images::Profile (#10055)" (#10149)"

This reverts commit 5657067e55.
2020-09-09 15:33:13 -04:00

43 lines
2.1 KiB
Text

<div class="<%= "ltag__user ltag__user__id__#{user.id}" %>" style="<%= "border-color:#{user.darker_color};box-shadow: 3px 3px 0px #{user.darker_color};" %>">
<style>
.ltag__user__id__<%= user.id %> .follow-action-button {
background-color: <%= user_colors[:bg] %> !important;
color: <%= user_colors[:text] %> !important;
border-color: <%= user_colors[:bg].casecmp("#ffffff").zero? ? user_colors[:text] : user_colors[:bg] %> !important;
}
</style>
<% if user_path.present? %>
<a href="<%= user_path %>" class="ltag__user__link profile-image-link">
<div class="ltag__user__pic">
<img src="<%= Images::Profile.call(user.profile_image_url, length: 150) %>" alt="<%= "#{user.username} image" %>" />
</div>
</a>
<% else %>
<div class="ltag__user__pic">
<img src="<%= Images::Profile.call(user.profile_image_url, length: 150) %>" alt="<%= "#{user.username} image" %>" />
</div>
<% end %>
<div class="ltag__user__content">
<h2><%= link_to_if user_path.present?, user.name, user_path, class: "ltag__user__link" %><%= follow_button %></h2>
<div class="ltag__user__summary">
<%= link_to_if user_path.present?, user.summary, user_path, class: "ltag__user__link" %>
</div>
<p class="ltag__user__social">
<% if !user.twitter_username.blank? %>
<a href="https://twitter.com/<%= user.twitter_username %>" target="_blank" rel="noopener">
<%= image_tag("/assets/twitter-logo.svg", class: "icon-img", alt: "twitter logo") %><%= user.twitter_username %>
</a>
<% end %>
<% if !user.github_username.blank? %>
<a href="https://github.com/<%= user.github_username %>" target="_blank" rel="noopener">
<%= image_tag("/assets/github-logo.svg", class: "icon-img", alt: "github logo") %><%= user.github_username %>
</a>
<% end %>
<% if !user.website_url.blank? %>
<a href="<%= user.website_url %>" target="_blank" rel="noopener">
<%= image_tag("/assets/link.svg", class: "icon-img", alt: "external link icon") %><%= user.website_url %>
</a>
<% end %>
</p>
</div>
</div>