-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathleaderboard.html
More file actions
211 lines (191 loc) · 6.31 KB
/
Copy pathleaderboard.html
File metadata and controls
211 lines (191 loc) · 6.31 KB
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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
---
layout: dash
title: BITS 19 - Leaderboards
---
<script type="text/javascript">
var date = "July 20, 2019 07:00:00 PM";
</script>
<div class="main-panel">
<!--Navbar-->
<nav class="navbar navbar-expand-lg navbar-sticky fixed-top " id="navigation-example" style="background:blue;">
<div class="container-fluid">
<div class="navbar-wrapper">
<div class="navbar-brand">Leaderboards</div>
<i class="material-icons" style="font-size:100%; position: relative; color:#a9afbbd1;">update</i>
<h6>
<div id="lastsync" style="position:absolute; color:#a9afbbd1;"></div>
<h6>
</div>
<button class="navbar-toggler" type="button" data-toggle="collapse" aria-controls="navigation-index"
aria-expanded="false" aria-label="Toggle navigation" data-target="#navigation-example">
<span class="sr-only">Toggle navigation</span>
<span class="navbar-toggler-icon icon-bar"></span>
<span class="navbar-toggler-icon icon-bar"></span>
<span class="navbar-toggler-icon icon-bar"></span>
</button>
<div class="collapse navbar-collapse justify-content-end">
<ul class="navbar-nav">
<li class="nav-item">
<a class="nav-link" href="./">
<i class="material-icons">home</i>
<p class="d-lg-none d-md-block">
Home Page
</p>
</a>
</li>
</ul>
</div>
</div>
</nav>
<!-- End Navbar -->
<div class="content" style="margin-top: -12px !important;">
<div class="container-fluid">
<div class="row first">
<div class="col-md-12">
<a class="btn btn-primary mb-4" href="https://docs.google.com/spreadsheets/d/10VE5IVUoh6ThRUZ95w_H0Az2ff7FY76xNbBDZSN7I3s/edit?usp=sharing" role="button" target="_blank">Leaderboards sheet</a>
</div>
</div>
<div class="row" id="myUL">
<div class="col-md-12">
<table class="table table bordered table-striped">
<!-- Table head -->
<thead>
<tr>
<th>Place</th>
<th>Name</th>
<th>Class</th>
</tr>
</thead>
<!-- Table head -->
<!-- Table body -->
<tbody>
<tr>
<td>1</td>
<td>Chamidu Jayanath Amarasinghe</td>
<td>10-06</td>
</tr>
<tr>
<td>2</td>
<td>Sasindu Chameth Methsukha</td>
<td>10-05</td>
</tr>
<tr>
<td>3</td>
<td>Inuka Sanudaya Batawala</td>
<td>08-02</td>
</tr>
</tbody>
<!-- Table body -->
</table>
</div>
</div>
<br/>
<br/>
<div class="row" id="myUL">
<div class="col-md-12">
<table class="table table bordered table-striped" id="myTable">
<!-- Table head -->
<thead>
<tr>
<!--a onclick="sortTable"-->
<th>Name</th>
<th>Class</th>
<th>Marks</th>
</tr>
</thead>
<!-- Table head -->
<!-- Table body -->
<tbody>
{% for name in site.data.leaderboard %}
<tr>
<td>{{ name.name }}</td>
<td>{{ name.class }}</td>
<td>{{ name.marks }}</td>
</tr>
{% endfor %}
</tbody>
<!-- Table body -->
</table>
</div>
</div>
<br/>
<br/>
<div class="row" id="myUL">
<div class="col-md-12">
<table class="table table bordered table-striped" id="myTable">
<!-- Table head -->
<thead>
<tr>
<th>Test</th>
<th>Name</th>
<th>Class</th>
</tr>
</thead>
<!-- Table head -->
<!-- Table body -->
<tbody>
{% for name in site.data.testleaderboard %}
<tr>
<td>{{ name.test }}</td>
<td>{{ name.name }}</td>
<td>{{ name.class }}</td>
</tr>
{% endfor %}
</tbody>
<!-- Table body -->
</table>
</div>
</div>
</div>
</div>
<!---->
<style>
tr:nth-child(even) {
background-color: #253f7b;
}
tbody>tr:nth-of-type(odd) {
background-color: #1f2940 !important;
}
thead>tr{
background: linear-gradient(60deg, #2196f3, #006dc3);
}
thead>tr th{
color: white !important;
}
</style>
<script>
function sortTableloads() {
var table, rows, switching, i, x, y, shouldSwitch;
table = document.getElementById("myTable");
switching = true;
/*Make a loop that will continue until
no switching has been done:*/
while (switching) {
//start by saying: no switching is done:
switching = false;
rows = table.rows;
/*Loop through all table rows (except the
first, which contains table headers):*/
for (i = 1; i < (rows.length - 1); i++) {
//start by saying there should be no switching:
shouldSwitch = false;
/*Get the two elements you want to compare,
one from current row and one from the next:*/
x = rows[i].getElementsByTagName("TD")[2];
y = rows[i + 1].getElementsByTagName("TD")[2];
//check if the two rows should switch place:
if (Number(x.innerHTML) < Number(y.innerHTML)) {
//if so, mark as a switch and break the loop:
shouldSwitch = true;
break;
}
}
if (shouldSwitch) {
/*If a switch has been marked, make the switch
and mark that a switch has been done:*/
rows[i].parentNode.insertBefore(rows[i + 1], rows[i]);
switching = true;
}
}
}
</script>