docbrown/app/views/users/index.html.erb
2018-02-28 16:11:08 -05:00

40 lines
1.6 KiB
Text

<% title params[:user_board].titleize %>
<div class="leaderboard-page">
<div class="leaderboard-container">
<header>
<h1><%=params[:user_board].titleize%></h1>
</header>
<% @users.each do |user| %>
<div class="leaderboard-user">
<div class="profile-pic">
<a href="<%= user.path %>">
<img alt="<%= user.username %> profile image" src="<%= ProfileImage.new(user).get(100)%>" />
</a>
</div>
<div class="content">
<a href="<%= user.path %>" class="user-name"><h3><%= user.name %></h3></a>
<div>
<% if user.twitter_username.present? %>
<a href="http://twitter.com/<%= user.twitter_username %>" target="_blank" rel="noopener"><%= icon("twitter","22") %> <%= user.twitter_username %></a>
<% end %>
<% if user.github_username.present? %>
<a href="http://github.com/<%= user.github_username %>" target="_blank" rel="noopener"><%= icon("github","22") %> <%= user.github_username %></a>
<% end %>
<% if user.website_url.present? %>
<a href="<%= user.website_url %>" target="_blank" rel="noopener"><%= icon("link","22") %> <%= beautified_url(user.website_url) %></a>
<% end %>
</div>
</div>
</div>
<% end %>
</div>
<div class="bottom">
<% if params[:user_board].downcase == "followers" %>
When someone follows you, your posts are prioritized on their home page. ❤️
<% else %>
When you follow someone, their posts are prioritized on your home page. ❤️
<% end %>
</div>
</div>