-
Notifications
You must be signed in to change notification settings - Fork 0
/
index_new.html
91 lines (82 loc) · 3.31 KB
/
index_new.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
<!DOCTYPE html>
<head>
<link rel="stylesheet" href="css/bootstrap.min.css"/>
</head>
<body>
<nav class="navbar sticky-top navbar-expand-lg navbar-dark bg-dark">
<a class="navbar-brand" href="/">BC-OSM</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNavAltMarkup" aria-controls="navbarNavAltMarkup" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse justify-content-end" id="navbarNavAltMarkup">
<div class="navbar-nav">
<a class="nav-item nav-link" href="#">Home</a>
<a class="nav-item nav-link active" href="#">Login <span class="sr-only">(current)</span></a>
<a class="nav-item nav-link" href="#">FAQ</a>
</div>
</div>
</nav>
<div class="jumbotron jumbotron-fluid">
<div class="container">
<% if (!email) { %>
<!-- If user email field isn't defined -->
<h5>One last step! Please select your school and enter your email so that you can be contacted if you win.</h5>
<form action="/set_details" method="POST">
<div class="form-row">
<div class="form-group col-md-4">
<label for="inputCity" class="col-form-label">Email</label>
<input type="text" class="form-control" id="inputCity">
</div>
<div class="form-group col-md-4">
<label for="inputState" class="col-form-label">School</label>
<select id="inputState" name="school" class="form-control">
<option value="UBC">University of British Columbia</option>
<option value="SFU">Simon Fraser University</option>
<option value="UVIC">University of Victoria</option>
<option value="BCIT">British Columbia Institute of Technology</option>
</select>
</div>
</div>
<button type="submit" value="submit" class="btn btn-primary">Submit</button>
</form>
<% } else { %>
<p><b>Name:</b> <%= user.displayName %></p>
<p><b>Username:</b> <%= user.username %></p>
<p><b>School:</b> <%= school %></p>
<p><b>Email:</b> <%= email %></p>
<p><b>Pull requests:</b>
<% if (pull_requests) { %>
<ol>
<% for(var i=0; i<pull_requests.length; i++) {%>
<li class="leaderboard-user">
<span><b><a href="<%= pull_requests[i].html_url %>"><%= pull_requests[i].title %></a></b></span>
</li>
<% } %>
</ol>
<% } %>
</p>
NOTE: Pull requests are updated every hour and only count if they are a contribution to a public project that is not your own.
<% if (!deactivated) { %>
<p>
<b>Your account is active and you are currently on the <a href="/" style="text-decoration:none">leaderboard.</b>
<form action="/deactivate">
<input type="submit" class="button btn-danger" value="Deactivate Account" />
</form>
</p>
<% } else { %>
<p>
<b>You have been removed from the leaderboard and your account is currently disabled.</b>
<form action="/activate">
<input type="submit" class="button btn-success" value="Activate account" />
</form>
</p>
<% } %>
<% } %>
</div>
</div>
<!-- Scripts -->
<script src="js/jquery-3.2.1.min.js"></script>
<script src="js/popper.min.js"></script>
<script src="js/bootstrap.min.js"></script>
</body>
</html>