Skip to content

Commit

Permalink
Fixed leaderboard rankings with the help of some CSS 3 trickery.
Browse files Browse the repository at this point in the history
I guess it needs to be this way until this is fixed
meteor/meteor#489
  • Loading branch information
Alexander Bjerkan committed Oct 4, 2013
1 parent f6d93f4 commit 4d0bd10
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
14 changes: 14 additions & 0 deletions client/css/programming-ladder.less
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,20 @@ form .editor {
margin-right: 5px
}
}

/* Hack for leaderboard ranking until this is fixed
https://github.com/meteor/meteor/issues/489
*/
.leaderboard {
counter-reset: rank;
}
.rank::before {
counter-increment: rank;
content: counter(rank)".";
}



.edit-problem-buttons {
button:not(:last-child) {
margin-right: 15px;
Expand Down
4 changes: 2 additions & 2 deletions client/views/leaderboard/leaderboard.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template name="leaderboard">
<table class="table table-striped table-hover">
<table class="leaderboard table table-striped table-hover">
<tr>
<th>#</th>
<th>User</th>
Expand All @@ -10,7 +10,7 @@
</tr>
{{#each users}}
<tr>
<td>1</td>
<td class="rank"><!--Empty on purpose. Handled through CSS --></td>
<td>{{username}}</td>
<td>{{score}}</td>
{{#if currentIsAdmin}}
Expand Down

0 comments on commit 4d0bd10

Please sign in to comment.