Skip to content

Commit

Permalink
change style of stats page
Browse files Browse the repository at this point in the history
  • Loading branch information
driedyam committed Jan 16, 2014
1 parent c102b70 commit 74504f5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
4 changes: 3 additions & 1 deletion app/assets/stylesheets/pong.scss
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,9 @@ a [class*=" icon-"]:before {
.stat {
position: relative;
background-color: #888;
h1 {
margin: 10px;
display: inline-block;
h4 {
color: #fff;
position: absolute;
top: 10px;
Expand Down
12 changes: 6 additions & 6 deletions app/views/stats/index.html.haml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
- content_for :title, "Stats"
#games_played.stat
%h1 Who's playing the most?
%h4 Who's playing?
#winning_matches.stat
%h1 Who's winning the most?
%h4 Who's winning?
#winning_percentage.stat
%h1 Who's has the highest percentage of winning?
%h4 Who wins most of the time?

= javascript_include_tag 'pie'
:javascript
$('document').ready(function () {
Raphael("games_played", 800, 800).pieChart(400, 400, 200, #{@matches_values}, #{@matches_labels}, "#ccc");
Raphael("winning_matches", 800, 800).pieChart(400, 400, 200, #{@winning_matches}, #{@winning_matches_labels}, "#ccc");
Raphael("winning_percentage", 800, 800).pieChart(400, 400, 200, #{@winning_percentage}, #{@winning_percentage_labels}, "#ccc");
Raphael("games_played", 450, 450).pieChart(200, 200, 100, #{@matches_values}, #{@matches_labels}, "#ccc");
Raphael("winning_matches", 450, 450).pieChart(200, 200, 100, #{@winning_matches}, #{@winning_matches_labels}, "#ccc");
Raphael("winning_percentage", 450, 450).pieChart(200, 200, 100, #{@winning_percentage}, #{@winning_percentage_labels}, "#ccc");
});

0 comments on commit 74504f5

Please sign in to comment.