-
Notifications
You must be signed in to change notification settings - Fork 1
/
leaderboard.html
107 lines (107 loc) · 3.13 KB
/
leaderboard.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Leaderboard</title>
<style>
body {
font-family: Arial, sans-serif;
background-color: #004c6d;
color: #333;
margin: 0;
padding: 20px;
}
.container {
max-width: 600px;
margin: auto;
background: #8fbbce;
padding: 20px;
border-radius: 8px;
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}
h1 {
text-align: center;
color: #ffeb3b;
}
h3 {
border-bottom: 2px solid #007bff;
padding-bottom: 5px;
color: #ffeb3b;
}
.btn {
background-color: #007bff;
color: white;
border: none;
border-radius: 5px;
padding: 10px 15px;
cursor: pointer;
margin-top: 10px;
display: inline-block;
}
.btn:hover {
background-color: #0056b3;
}
table {
width: 100%;
border-collapse: collapse;
margin-top: 20px;
}
th, td {
border: 1px solid black;
padding: 10px;
text-align: center;
}
th {
background-color: #ffeb3b;
color: white;
}
tr:nth-child(even) {
background-color: #f9f9f9;
}
tr:hover {
background-color: #f1f1f1;
}
input {
width: calc(100% - 22px);
padding: 10px;
margin: 5px 0;
border: 1px solid #ccc;
border-radius: 5px;
}
</style>
</head>
<body>
<div class="container">
<h1>Leaderboard</h1>
<div class="score-container">
<div class="recent-score">
<h3>Recent Scores</h3>
<button id="refresh" type="button" class="btn">Refresh</button>
<table id="score-table">
<thead>
<tr>
<th>Team ID</th>
<th>Round 1 Score</th>
<th>Round 2 Score</th>
<th>Round 3 Score</th>
<th>Total Score</th>
</tr>
</thead>
<tbody id="score-list"></tbody>
</table>
</div>
<div class="add-score">
<h3>Add your Score</h3>
<form id="add-form">
<input type="text" id="teamId" placeholder="Team ID" required>
<input type="number" id="round" placeholder="Round (1, 2, or 3)" required min="1" max="3">
<input type="number" id="score" placeholder="Your Score" required>
<button id="submit" type="submit" class="btn">Submit</button>
</form>
</div>
</div>
</div>
<script src="leaderboard.js"></script>
</body>
</html>