Skip to content

Instantly share code, notes, and snippets.

@konishi
Created August 3, 2011 08:06
Show Gist options
  • Save konishi/1122143 to your computer and use it in GitHub Desktop.
Save konishi/1122143 to your computer and use it in GitHub Desktop.
ちょっと試しに投稿
<% rank = 1 %>
<% count_target.good_users.each do |user| %>
<% if rank >= 11 %>
<% break %>
<% end %>
<div class="good-ranking-box">
<% if rank > 3 %>
<div class="ranking-other">
<% else %>
<div class="ranking-<%= rank %>">
<% end %>
<p class="good-ranking-result"><%= user.good_count_with target %></p>
<p class="good-ranking-text">good!</p>
</div>
</div>
<a href="<%= url_for user_path(user) %>"><%= image_url user.profile_image_url, :class => "user-icon-middle" %></a>
<div class="user-name-status-box">
<p class="user-name-middle"><a href="<%= url_for user_path(user) %>"><%= user.url_name %></a></p>
<p class="user-status-small"><span class="bold">23</span>&nbsp;Questions&nbsp;<span class="bold">31</span>&nbsp;Answers</p>
</div>
<div class="reset-float"></div>
<div class="partition-h-middle"></div>
<% rank += 1 %>
<% end %>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment