11<link rel =" stylesheet" href =" /stylesheets/tablestyle.css" >
22<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 >
610 <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 >
1324 </div >
25+
1426 <div class =" row justify-content-center" >
1527 <div class =" col-12" >
16-
28+ <style >
29+ th ,td {
30+ text-align : center !important ;
31+ }
32+ </style >
1733 <div class =" table-responsive-lg" >
1834 <table id =" contest-table" class =" table table-striped hover" >
1935 <thead >
2036 <tr class =" bg-primary" >
2137 <th scope =" col" >Contest Name</th >
22- <th scope =" col" >Type</th >
2338 <th scope =" col" >Start Time</th >
2439 <th scope =" col" >Duration</th >
40+ <th scope =" col" >Rankings Fetched</th >
41+ <th scope =" col" >Predicted</th >
2542 </tr >
2643 </thead >
2744 <tbody >
2845 <% for ( let contest of contests ) { % >
2946 < 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>
4254 < td class = " startTime" >< %= contest .startTime % >< / td>
4355 < 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>
4462 < / tr>
4563 < % } %>
4664 </tbody >
5371
5472<script src =" https://cdn.jsdelivr.net/npm/simple-datatables@latest" type =" text/javascript" ></script >
5573<script >
74+ const dataTable = new simpleDatatables.DataTable (" #contest-table" , {
75+ searchable: true ,
76+ fixedHeight: true ,
77+ sortable: false ,
78+ });
5679
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 ) {
6980 const contests = document .getElementsByClassName (' startTime' )
7081 for (let contest of contests) {
7182 let startTime = new Date (contest .textContent )
7283 contest .textContent = startTime .toLocaleString ()
7384 }
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+ })
7592 </script >
0 commit comments