Permalink
Browse files

Merge pull request #10 from mmalecki/person-href

Add permalinks for people in high scores
  • Loading branch information...
2 parents 96a2c41 + fd2c959 commit 123c4e60718bb11bbed236273bbccf83001b10f3 @leereilly committed Jul 20, 2012
Showing with 9 additions and 2 deletions.
  1. +7 −1 public/css/style.css
  2. +2 −1 views/high_scores.erb
View
8 public/css/style.css
@@ -104,4 +104,10 @@ h2 {
h3 {
/**text-align: center;*/
color: lightblue;
-}
+}
+
+.permalink {
+ font-size: small;
+ color: darkgray
+}
+
View
3 views/high_scores.erb
@@ -9,12 +9,13 @@
<th class="small">User</th>
</tr>
<% @high_scores.each do |high_score| %>
- <tr>
+ <tr <% unless high_score[:login].nil? %>id="person-<%= high_score[:login] %>" <% end %>>
<div itemscope itemtype="http://data-vocabulary.org/Person">
<td class="small"><%= high_score[:contributions]*100 %></td>
<% unless high_score[:login].nil? %>
<td class="small"><img itemprop="photo" src="http://0.gravatar.com/avatar/<%= high_score[:gravatar_id] %>?s=10&d=identicon" width="50" height="50"></td>
<td class="small"><span itemprop="nickname"><a href="/<%= high_score[:login] %>"><%= high_score[:login] %></a></span></td>
+ <td class="small"><a class="permalink" href="#person-<%= high_score[:login] %>">&para;</a></td>
<% else %>
<td class="small"><img itemprop="photo" src="http://0.gravatar.com/avatar/dummy?s=10&d=identicon" width="50" height="50"></td>
<td class="small"><span itemprop="name"><%= high_score[:name] %></span></td>

0 comments on commit 123c4e6

Please sign in to comment.