From ede07e6e38a346b3ff0bbccefb655f3ae0a32504 Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Wed, 29 Nov 2023 23:01:44 -0500 Subject: Rewrite web component with Sinatra --- web/views/index.haml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 web/views/index.haml (limited to 'web/views/index.haml') 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 @@ +!!! 5 +%html + %head + %title LINGO Bot Scoreboard + %link{ rel: "stylesheet", href: "style.css", type: "text/css"} + %body + #header + %img{ src: "header.png" } + #content + %h2 Bot Puzzles Scoreboard + %table#scores + %tr.scores-header + %th + %th{colspan: 2} Player + %th Score + - row_cycle = ["even", "odd"].cycle + - @scores.each_with_index do |score,index| + %tr{class: row_cycle.next} + %td.score-index #{index+1}. + %td.score-pfp + - if !score.avatar_url.nil? + %img{ src: score.avatar_url } + %td.score-name= score.username + %td.score-value= score.score -- cgit 1.4.1