1
1
<link rel =" stylesheet" href =" /stylesheets/tablestyle.css" >
2
2
<link href =" https://cdn.jsdelivr.net/npm/simple-datatables@latest/dist/style.css" rel =" stylesheet" type =" text/css" >
3
-
4
- <section class =" content" >
5
- <h2 class =" mb-5 mt-5" style =" text-align : center ; " >Leetcode Rating Predictor</h2 >
3
+ <section class =" content mt-5" >
4
+ <div class =" mb-4 text-center" >
5
+ <h2 style =" font-weight : bold ;" >Leetcode Rating Predictor</h2 >
6
+ <div class =" text-muted" >
7
+ <i >Get your rating changes right after the completion of Leetcode contests</i >
8
+ </div >
9
+ </div >
6
10
<div class =" container" >
7
- <div align =" center" >
8
- <a href =" https://chrome.google.com/webstore/detail/lc-predictor/jfhgaegpgiepniiebglgjhhfnjcibphh" target =" _blank" >
9
- <img
10
- src =" https://i.imgur.com/iswHnpJ.png" alt =" Chrome Web Store" >
11
- </img >
12
- </a >
11
+ <div class =" d-flex justify-content-around" >
12
+ <div >
13
+ <a href =" https://chrome.google.com/webstore/detail/lc-predictor/jfhgaegpgiepniiebglgjhhfnjcibphh"
14
+ target =" _blank" >
15
+ <img src =" https://i.imgur.com/iswHnpJ.png" alt =" Chrome Web Store" style =" max-width : 90% ;" >
16
+ </img >
17
+ </a >
18
+ </div >
19
+ <div >
20
+ <iframe class =" mt-1"
21
+ src =" https://ghbtns.com/github-btn.html?user=SysSn13&repo=leetcode-rating-predictor&type=star&count=true&size=large"
22
+ frameborder =" 0" scrolling =" 0" width =" 170" height =" 30" title =" GitHub" ></iframe >
23
+ </div >
13
24
</div >
25
+
14
26
<div class =" row justify-content-center" >
15
27
<div class =" col-12" >
16
-
28
+ <style >
29
+ th ,td {
30
+ text-align : center !important ;
31
+ }
32
+ </style >
17
33
<div class =" table-responsive-lg" >
18
34
<table id =" contest-table" class =" table table-striped hover" >
19
35
<thead >
20
36
<tr class =" bg-primary" >
21
37
<th scope =" col" >Contest Name</th >
22
- <th scope =" col" >Type</th >
23
38
<th scope =" col" >Start Time</th >
24
39
<th scope =" col" >Duration</th >
40
+ <th scope =" col" >Rankings Fetched</th >
41
+ <th scope =" col" >Predicted</th >
25
42
</tr >
26
43
</thead >
27
44
<tbody >
28
45
<% for ( let contest of contests ) { % >
29
46
< tr>
30
- < td>
31
- < % if (contest .rankings_fetched ) { % >
32
- < a href= " /contest/<%= contest._id %>/ranking/1" style= " text-decoration:none" >< %= contest ._id % >< / a>
33
- < % } else {% >
34
- < %= contest ._id % >
35
- < % } % >
36
- < / td>
37
- < % if (contest .startTime > Date .now ()) { % >
38
- < td> Upcoming< / td>
39
- < % } else { % >
40
- < td> Virtual< / td>
41
- < % } % >
47
+ < td>
48
+ < % if (contest .rankings_fetched ) { % >
49
+ < a href= " /contest/<%= contest._id %>/ranking/1" style= " text-decoration:none" >< %= contest ._id % >< / a>
50
+ < % } else {% >
51
+ < %= contest ._id % >
52
+ < % } % >
53
+ < / td>
42
54
< td class = " startTime" >< %= contest .startTime % >< / td>
43
55
< td>< %= (contest .endTime - contest .startTime )/ 60000 % > minutes< / td>
56
+ < td>
57
+ < %= contest .rankings_fetched ? " Yes" : " No" % >
58
+ < / td>
59
+ < td>
60
+ < %= contest .ratings_predicted ? " Yes" : " No" % >
61
+ < / td>
44
62
< / tr>
45
63
< % } %>
46
64
</tbody >
53
71
54
72
<script src =" https://cdn.jsdelivr.net/npm/simple-datatables@latest" type =" text/javascript" ></script >
55
73
<script >
74
+ const dataTable = new simpleDatatables.DataTable (" #contest-table" , {
75
+ searchable: true ,
76
+ fixedHeight: true ,
77
+ sortable: false ,
78
+ });
56
79
57
- const dataTable = new simpleDatatables.DataTable (" #contest-table" , {
58
- searchable: true ,
59
- fixedHeight: true ,
60
- sortable: false ,
61
- });
62
-
63
- const contests = document .getElementsByClassName (' startTime' )
64
- for (let contest of contests) {
65
- let startTime = new Date (contest .textContent )
66
- contest .textContent = startTime .toLocaleString ()
67
- }
68
- dataTable .on (' datatable.page' , function (page ) {
69
80
const contests = document .getElementsByClassName (' startTime' )
70
81
for (let contest of contests) {
71
82
let startTime = new Date (contest .textContent )
72
83
contest .textContent = startTime .toLocaleString ()
73
84
}
74
- })
85
+ dataTable .on (' datatable.page' , function (page ) {
86
+ const contests = document .getElementsByClassName (' startTime' )
87
+ for (let contest of contests) {
88
+ let startTime = new Date (contest .textContent )
89
+ contest .textContent = startTime .toLocaleString ()
90
+ }
91
+ })
75
92
</script >
0 commit comments