diff options
Diffstat (limited to 'app')
-rw-r--r-- | app/assets/stylesheets/wittle/general.css.scss | 2 | ||||
-rw-r--r-- | app/views/wittle/puzzles/show.html.haml | 16 |
2 files changed, 12 insertions, 6 deletions
diff --git a/app/assets/stylesheets/wittle/general.css.scss b/app/assets/stylesheets/wittle/general.css.scss index 06a7a83..b2b432d 100644 --- a/app/assets/stylesheets/wittle/general.css.scss +++ b/app/assets/stylesheets/wittle/general.css.scss | |||
@@ -83,7 +83,7 @@ input[type="range"]::-ms-thumb { | |||
83 | text-align: center; | 83 | text-align: center; |
84 | } | 84 | } |
85 | 85 | ||
86 | ol { | 86 | table { |
87 | width: max-content; | 87 | width: max-content; |
88 | margin: 0 auto; | 88 | margin: 0 auto; |
89 | } | 89 | } |
diff --git a/app/views/wittle/puzzles/show.html.haml b/app/views/wittle/puzzles/show.html.haml index d5d8b00..75ae288 100644 --- a/app/views/wittle/puzzles/show.html.haml +++ b/app/views/wittle/puzzles/show.html.haml | |||
@@ -14,12 +14,18 @@ | |||
14 | #scores | 14 | #scores |
15 | #by-time | 15 | #by-time |
16 | %h2 Fastest Solves | 16 | %h2 Fastest Solves |
17 | %ol | 17 | %table |
18 | - @puzzle.scores.where("seconds_taken IS NOT NULL").order(seconds_taken: :asc).each do |score| | 18 | - @puzzle.scores.where("seconds_taken IS NOT NULL").order(seconds_taken: :asc).each do |score| |
19 | %li= score.name | 19 | %tr |
20 | %td #{(i + 1)}. | ||
21 | %td= score.name | ||
22 | %td | ||
20 | #by-when | 23 | #by-when |
21 | %h2 Completion Order | 24 | %h2 Completion Order |
22 | %ol | 25 | %table |
23 | - @puzzle.scores.order(created_at: :desc).each do |score| | 26 | - @puzzle.scores.order(created_at: :asc).each_with_index do |score, i| |
24 | %li= score.name | 27 | %tr |
28 | %td #{(i + 1)}. | ||
29 | %td= score.name | ||
30 | %td= score.created_at.getlocal().strftime("%-I:%M:%S%P") | ||
25 | = render partial: "handle_puzzle" | 31 | = render partial: "handle_puzzle" |