diff options
Diffstat (limited to 'web/views')
-rw-r--r-- | web/views/index.haml | 24 | ||||
-rw-r--r-- | web/views/style.scss | 55 |
2 files changed, 79 insertions, 0 deletions
diff --git a/web/views/index.haml b/web/views/index.haml new file mode 100644 index 0000000..186dd40 --- /dev/null +++ b/web/views/index.haml | |||
@@ -0,0 +1,24 @@ | |||
1 | !!! 5 | ||
2 | %html | ||
3 | %head | ||
4 | %title LINGO Bot Scoreboard | ||
5 | %link{ rel: "stylesheet", href: "style.css", type: "text/css"} | ||
6 | %body | ||
7 | #header | ||
8 | %img{ src: "header.png" } | ||
9 | #content | ||
10 | %h2 Bot Puzzles Scoreboard | ||
11 | %table#scores | ||
12 | %tr.scores-header | ||
13 | %th | ||
14 | %th{colspan: 2} Player | ||
15 | %th Score | ||
16 | - row_cycle = ["even", "odd"].cycle | ||
17 | - @scores.each_with_index do |score,index| | ||
18 | %tr{class: row_cycle.next} | ||
19 | %td.score-index #{index+1}. | ||
20 | %td.score-pfp | ||
21 | - if !score.avatar_url.nil? | ||
22 | %img{ src: score.avatar_url } | ||
23 | %td.score-name= score.username | ||
24 | %td.score-value= score.score | ||
diff --git a/web/views/style.scss b/web/views/style.scss new file mode 100644 index 0000000..a65cd94 --- /dev/null +++ b/web/views/style.scss | |||
@@ -0,0 +1,55 @@ | |||
1 | body { | ||
2 | background-color: black; | ||
3 | color: white; | ||
4 | font-family: sans-serif; | ||
5 | } | ||
6 | |||
7 | #header { | ||
8 | width: 100%; | ||
9 | |||
10 | img { | ||
11 | max-width: 80%; | ||
12 | margin: 0 auto; | ||
13 | display: block; | ||
14 | } | ||
15 | } | ||
16 | |||
17 | h2 { | ||
18 | text-align: center; | ||
19 | } | ||
20 | |||
21 | #scores { | ||
22 | margin: 0 auto; | ||
23 | border-spacing: 0px; | ||
24 | tr { | ||
25 | &.even { | ||
26 | background-color: gray; | ||
27 | } | ||
28 | &.odd { | ||
29 | background-color: purple; | ||
30 | } | ||
31 | th { | ||
32 | text-align: left; | ||
33 | padding-left: 0.5em; | ||
34 | padding-bottom: 0.5em; | ||
35 | } | ||
36 | td { | ||
37 | padding-right: 1em; | ||
38 | padding-top: 0.5em; | ||
39 | padding-bottom: 0.5em; | ||
40 | border-collapse: collapse; | ||
41 | &:first-child { | ||
42 | padding-left: 1em; | ||
43 | } | ||
44 | img { | ||
45 | width: 2em; | ||
46 | } | ||
47 | &.score-pfp { | ||
48 | width: 2em; | ||
49 | } | ||
50 | &.score-value { | ||
51 | text-align: center; | ||
52 | } | ||
53 | } | ||
54 | } | ||
55 | } \ No newline at end of file | ||