-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathexplore.html
More file actions
211 lines (196 loc) · 8.14 KB
/
explore.html
File metadata and controls
211 lines (196 loc) · 8.14 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
<!DOCTYPE html>
<html>
<head>
<title>CF Stonks</title>
<meta charset="UTF-8">
<meta name="renderer" content="webkit">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<link rel="icon" href="./favicon.png">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.6.0/dist/css/bootstrap.min.css" integrity="sha384-B0vP5xmATw1+K9KRQjQERJvTumQW0nPEzvF6L/Z6nronJ3oUOFUFpCjEUQouq2+l" crossorigin="anonymous">
<meta name="keywords" content="codeforces,stock,stonks,market,trading,game">
<meta name="description" content="A virtual Stock Market based off of CodeForces">
<meta name="title" content="CF Stonks">
<meta name="Author" content="CodeTiger">
<link rel="stylesheet" href="./css/main.css">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.11.2/css/all.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-toggle/2.2.2/css/bootstrap-toggle.css" integrity="sha512-9tISBnhZjiw7MV4a1gbemtB9tmPcoJ7ahj8QWIc0daBCdvlKjEA48oLlo6zALYm3037tPYYulT0YQyJIJJoyMQ==" crossorigin="anonymous" referrerpolicy="no-referrer" />
<script src="https://code.jquery.com/jquery-3.6.0.min.js" integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.11.0/umd/popper.min.js" integrity="sha384-b/U6ypiBEHpOf/4+1nzFpr53nxSS+GLCkfwBdFNTxtclqqenISfwAzpKaMNFNmj4" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@4.6.0/dist/js/bootstrap.min.js" integrity="sha384-+YQ4JLhjyBLPDQt//I+STsc9iw4uQqACwlvpslubQzn4u2UU2UFM80nGisd026JF" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
<script src="https://cdn.jsdelivr.net/jquery.flot/0.8.3/jquery.flot.min.js" type="text/javascript"></script>
<script src="https://cdn.jsdelivr.net/jquery.flot/0.8.3/jquery.flot.time.js" type="text/javascript"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-toggle/2.2.2/js/bootstrap-toggle.min.js" integrity="sha512-F636MAkMAhtTplahL9F6KmTfxTmYcAcjcCkyu0f0voT3N/6vzAuJ4Num55a0gEJ+hRLHhdz3vDvZpf6kqgEa5w==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
</head>
<body>
<nav class="navbar sticky-top navbar-expand-lg navbar-dark bg-dark">
<a class="mb-0 h1 navbar-brand active" href="./">Stonks CF</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav mr-auto">
<li class="nav-item">
<a class="nav-link" href="./">Home</a>
</li>
<li class="nav-item">
<a class="nav-link" href="./profile.html">Profile</a>
</li>
<li class="nav-item active">
<a class="nav-link" href="./explore.html">Explore</a>
</li>
<li class="nav-item">
<a class="nav-link" href="./transactions.html">Transactions</a>
</li>
<li class="nav-item">
<a class="nav-link" href="./leaderboard.html">Leaderboard</a>
</li>
<li class="nav-item">
<a class="nav-link" href="./chats.html">Chats</a>
</li>
<li class="nav-item">
<a class="nav-link" href="./about.html">About</a>
</li>
</ul>
<div class="form-inline navbar-si">
<button class="btn btn-outline-light lrB navBtn" type="button" onclick="window.location.replace('register.html');">Register</button>
<button class="btn btn-outline-light lrB navBtn" type="button" onclick="window.location.replace('login.html');">Login</button>
</div>
</div>
</nav>
<div class="container main-container">
<div class="card shadow-sm stats-card" style="margin-bottom: 30px;">
<div class="card-header">
<h3>Available Stocks</h3>
</div>
<div class="card-body">
<table class="table leaderboard">
<thead style="text-align: center;">
<tr>
<th style="width: 10em;border-top: none;">Name</th>
<th style="width: 6em;border-top: none;">Current Price</th>
<th style="width: 3em;border-top: none">QTY</th>
</tr>
</thead>
<tbody style="text-align: center;" id="availables">
</tbody>
</table>
<hr>
<center><button class="btn btn-lg btn-outline-secondary" type="button" onclick="loadAll();">Load All</button></center>
</div>
</div>
<div class="input-group mb-3">
<input type="text" class="form-control" placeholder="CodeForces username" aria-label="CodeForces username" id="username">
<div class="input-group-append">
<button class="btn btn-primary" type="button" onclick="search();">Search</button>
</div>
</div>
<div id="usersRatingGraphPlaceholder" style="width:100%;height: 400px;"></div>
<div class="row">
<div class="col-lg-4">
<div class="card shadow-sm stats-card">
<div class="card-body">
<div class="profile-card-header">Stock Price</div>
<div class="profile-number" id="cfvalue">$103.97</div>
<br>
<div class="profile-card-header">QTY. Available</div>
<div class="profile-number" id="qtyleft">323</div>
</div>
</div>
<div class="card shadow-sm stats-card">
<div class="card-body">
<div class="profile-card-header">Net Worth</div>
<div class="profile-number" id="networth">N/A</div>
<br>
<div class="profile-card-header">Growth</div>
<div class="profile-number" id="growth">N/A</div>
<br>
<div class="profile-card-header">Cash</div>
<div class="profile-number" id="cash">N/A</div>
</div>
</div>
<div class="card shadow-sm stats-card">
<div class="card-body">
<div class="profile-card-header">Rank</div>
<div class="profile-number" id="rank">#30 / 500</div>
</div>
</div>
</div>
<div class="col-lg-8">
<div class="card shadow-sm stats-card">
<div class="card-header">
<h5>Change Chart</h5>
</div>
<div class="card-body">
<canvas id="changeChart"></canvas>
</div>
</div>
</div>
</div>
<div class="row events">
<div class="col-lg-12">
<div class="card shadow-sm stats-card">
<div class="card-header">
<h3>Owners</h3>
</div>
<div class="card-body">
<table class="table">
<thead style="text-align: center;">
<tr>
<th style="width: 10em;border-top: none;">Name</th>
<th style="width: 3em;border-top: none">QTY</th>
<th style="width: 4em;border-top: none">Total</th>
<th style="width: 3em;border-top: none">%</th>
</tr>
</thead>
<tbody style="text-align: center;" id="owners">
</tbody>
</table>
</div>
</div>
<div class="card shadow-sm stats-card">
<div class="card-header">
<h3>Holdings</h3>
</div>
<div class="card-body">
<table class="table">
<thead style="text-align: center;">
<tr>
<th style="width: 10em;border-top: none;">Name</th>
<th style="width: 6em;border-top: none;">Current Price</th>
<th style="width: 6em;border-top: none">Purchase Price</th>
<th style="width: 3em;border-top: none">QTY</th>
</tr>
</thead>
<tbody style="text-align: center;" id="holdings">
</tbody>
</table>
</div>
</div>
<div class="card shadow-sm stats-card">
<div class="card-header">
<h3>Trade History</h3>
</div>
<div class="card-body">
<table class="table">
<thead style="text-align: center;">
<tr>
<th style="width: 10em;border-top: none;">Name</th>
<th style="width: 6em;border-top: none;">Time</th>
<th style="width: 6em;border-top: none">Purchase Price</th>
<th style="width: 3em;border-top: none">QTY</th>
<th style="width: 3em;border-top: none">Action</th>
</tr>
</thead>
<tbody style="text-align: center;" id="history">
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
<script src="./javascript/helpers.js"></script>
<script src="./javascript/explore.js"></script>
</body>
</html>