Showing
7 changed files
with
79 additions
and
2 deletions
app/assets/stylesheets/root.scss
0 → 100644
1 | +// | ||
2 | +.container { | ||
3 | + display: grid; | ||
4 | + grid-template-rows: 10vh auto; | ||
5 | + grid-template-columns: auto auto auto; | ||
6 | +} | ||
7 | + | ||
8 | +.navbar { | ||
9 | + grid-row: 1; | ||
10 | + grid-columns: 1/4; | ||
11 | +} | ||
12 | + | ||
13 | +.content { | ||
14 | + grid-row: 2; | ||
15 | + justify-self: center; | ||
16 | +} | ||
17 | + | ||
18 | +.left { | ||
19 | + grid-column: 1; | ||
20 | +} | ||
21 | + | ||
22 | +.center { | ||
23 | + grid-column: 2; | ||
24 | +} | ||
25 | + | ||
26 | +.right { | ||
27 | + grid-column: 3; | ||
28 | +} | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
... | @@ -2,7 +2,7 @@ class ApplicationController < HeimdallEngine::ApplicationController | ... | @@ -2,7 +2,7 @@ class ApplicationController < HeimdallEngine::ApplicationController |
2 | protect_from_forgery with: :exception | 2 | protect_from_forgery with: :exception |
3 | 3 | ||
4 | def root | 4 | def root |
5 | - @leaderboard = check_leaderboard | 5 | + @leaders = check_leaderboard |
6 | @upcoming_matches = check_matches | 6 | @upcoming_matches = check_matches |
7 | @results = check_results | 7 | @results = check_results |
8 | end | 8 | end |
... | @@ -10,7 +10,7 @@ class ApplicationController < HeimdallEngine::ApplicationController | ... | @@ -10,7 +10,7 @@ class ApplicationController < HeimdallEngine::ApplicationController |
10 | private | 10 | private |
11 | 11 | ||
12 | def check_leaderboard | 12 | def check_leaderboard |
13 | - User.all.order_by(&:user_score).take(5) | 13 | + (User.all.sort {|a,b| a.user_score <=> b.user_score }).take(5) |
14 | end | 14 | end |
15 | 15 | ||
16 | def check_matches | 16 | def check_matches | ... | ... |
app/views/application/_leaderboard.html.slim
0 → 100644
app/views/application/_login.html.slim
0 → 100644
File mode changed
app/views/application/_results.html.slim
0 → 100644
app/views/application/root.html.slim
0 → 100644
-
Please register or login to post a comment