docbrown/app/views/users/_liquid.html.erb

26 lines
1.2 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>
</div>
</div>