1
+ <link rel =" stylesheet" href =" https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/css/bootstrap.min.css" >
2
+ <script src =" https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js" ></script >
3
+ <script src =" https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/js/bootstrap.min.js" ></script >
4
+ <script async src =" https://www.googletagmanager.com/gtag/js?id=UA-143874982-1" ></script >
5
+ <script async defer src =" https://buttons.github.io/buttons.js" ></script >
6
+ <script data-ad-client =" ca-pub-5213877146531950" async src =" https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js" ></script >
7
+ <div class =" container" >
8
+ <h1 class =" mb-5 mt-3" style =" text-align : center ;" >Ranking For <%= contests[0 ]._id %> </h1 >
9
+ <nav aria-label =" ..." >
10
+ <ul class =" pagination" >
11
+ <% if (page> 1 ) { % >
12
+
13
+ < li class = " page-item" >< a class = " page-link" href= " /contests/<%= contests[0]._id %>/ranking/1" > 1 < / a>< / li>
14
+ < li class = " page-item" >
15
+ < a class = " page-link" href= " /contests/<%= contests[0]._id %>/ranking/<%= page - 1 %>" tabindex= " -1" > Previous< / a>
16
+ < / li>
17
+ < % } %>
18
+
19
+ <li class =" page-item active" >
20
+ <a class =" page-link" href =" /contests/<%= contests[0]._id %>/ranking/<%= page%>" ><%= page %> <span class =" sr-only" >(current)</span ></a >
21
+ </li >
22
+ <% if (page< totalPages) { % >
23
+ < li class = " page-item" >
24
+ < a class = " page-link" href= " /contests/<%= contests[0]._id %>/ranking/<%= parseInt(page) + 1 %>" tabindex= " -1" > Next< / a>
25
+ < / li>
26
+ < li class = " page-item" >< a class = " page-link" href= " /contests/<%= contests[0]._id %>/ranking/<%= totalPages %> " >< %= totalPages % > < / a>< / li>
27
+ < % } %>
28
+
29
+ </ul >
30
+ </nav >
31
+ <div class =" table-responsive" >
32
+ <table class =" table table-hover table-striped table-fixed" >
33
+ <thead >
34
+ <tr >
35
+ <th >#</th >
36
+ <th >Rank</th >
37
+ <th >Name</th >
38
+ <th >Country Name</th >
39
+ </tr >
40
+ </thead >
41
+ <tbody >
42
+ <% if (contests[0 ].rankings ) { % >
43
+ < % for ( let i = 0 ; i < contests[0 ].rankings .length ; i++ ) { % >
44
+ < tr>
45
+ < td>< %= i+ 1 % > < / td>
46
+ < td>< %= contests[0 ].rankings [i].rank % > < / td>
47
+ < td>< a href= " https://leetcode.com/<%=contests[0].rankings[i]._id%>/" >< %= contests[0 ].rankings [i]._id % > < / a>< / td>
48
+ < td>< %= contests[0 ].rankings [i].country_name % > < / td>
49
+ < / tr>
50
+ < % } % >
51
+ < % } %>
52
+
53
+ </tbody >
54
+ </table >
55
+ <nav aria-label =" ..." >
56
+ <ul class =" pagination" >
57
+ <% if (page> 1 ) { % >
58
+
59
+ < li class = " page-item" >< a class = " page-link" href= " /contests/<%= contests[0]._id %>/ranking/1" > 1 < / a>< / li>
60
+ < li class = " page-item" >
61
+ < a class = " page-link" href= " /contests/<%= contests[0]._id %>/ranking/<%= page - 1 %>" tabindex= " -1" > Previous< / a>
62
+ < / li>
63
+ < % } %>
64
+
65
+ <li class =" page-item active" >
66
+ <a class =" page-link" href =" /contests/<%= contests[0]._id %>/ranking/<%= page%>" ><%= page %> <span class =" sr-only" >(current)</span ></a >
67
+ </li >
68
+ <% if (page< totalPages) { % >
69
+ < li class = " page-item" >
70
+ < a class = " page-link" href= " /contests/<%= contests[0]._id %>/ranking/<%= parseInt(page) + 1 %>" tabindex= " -1" > Next< / a>
71
+ < / li>
72
+ < li class = " page-item" >< a class = " page-link" href= " /contests/<%= contests[0]._id %>/ranking/<%= totalPages %> " >< %= totalPages % > < / a>< / li>
73
+ < % } %>
74
+
75
+ </ul >
76
+ </nav >
77
+ </div >
78
+ </div >
0 commit comments