-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
308 lines (261 loc) · 14.3 KB
/
index.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
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
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="Crypto Coin Market">
<meta name="author" content="Mark Suscens">
<title>Crypto-Assets</title>
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css"
integrity="sha384-9aIt2nRpC12Uk9gS9baDl411NQApFmC26EwAOH8WgZl5MYYxFfc+NcPb1dKGj7Sk" crossorigin="anonymous">
<!-- Font Awesome -->
<script src="https://kit.fontawesome.com/e0c2649351.js" crossorigin="anonymous"></script>
<!-- Include applications css styles -->
<link rel="stylesheet" href="/assets/css/styles.css">
<link rel="stylesheet" href="/assets/css/searchComponentStyles.css">
</head>
<body>
<div class="container bg-white">
<!-- Header section; with logo and search bar -->
<br>
<div class="row">
<div class="col-sm-1" align="left">
<h1><a href="index.html"><i class="fas fa-chart-line"></i></a></h1>
</div>
<div class="col-sm-8" align="left">
<h1>The Crypto-Asset Market</h1>
<h5>Coins & tokens; and the Exchanges trading them</h5>
</div>
<div class="col-sm-3" align="right">
<br>
<div id="coinSearchComponent"></div> <!-- Component placeholder -->
<div id="exchangeSearchComponent"></div> <!-- Component placeholder -->
</div>
</div>
<hr>
<!-- Second row for Nav Tabs and all associated content -->
<div class="row">
<!-- Nav tabs across page -->
<ul class="nav nav-tabs" id="myTab" role="tablist">
<!-- Coins tab position -->
<li class="nav-item" onclick="toggleSearchComponent('coinSearchComponent', 'exchangeSearchComponent')">
<a class="nav-link active" id="coins-tab" data-toggle="tab" href="#coinsNavTabArea" role="tab"
aria-controls="coinsNavTabArea" aria-selected="true">Coins & Tokens</a>
</li>
<!-- Exchanges tab position -->
<li class="nav-item" onclick="toggleSearchComponent('exchangeSearchComponent', 'coinSearchComponent')">
<a class="nav-link" id="exchanges-tab" data-toggle="tab" href="#exchangesNavTabArea" role="tab"
aria-controls="exchangesNavTabArea" aria-selected="false">Exchanges</a>
</li>
</ul>
<!-- Tab Content -->
<div class="tab-content">
<!-- Coins tab content-->
<div class="tab-pane fade show active" id="coinsNavTabArea" role="tabpanel" aria-labelledby="coins-tab">
<div class="row">
<div class="col-sm-6" align="left">
</div>
<!-- Controls (above the Coins table): Currency Selector, Refresh, Paging -->
<div class="col-sm-6" align="right">
<div class="btn-group mt-n5">
<div id="currencySelectorComponent"></div> <!-- Component placeholder -->
<button class="btn btn-light ml-4" onclick="loadFirstPageIntoTable('coinsNavTabArea')">
<i class="fas fa-sync-alt"></i></button>
<nav aria-label="Next and Prevous page controls for the coin table">
<ul class="pagination ml-4">
<li class="page-item disabled" name="previousPageTableControl">
<a class="page-link" href="#" tabindex="-1"
onclick="loadPreviousPageIntoTable('coinsNavTabArea')">Previous 100</a>
</li>
<li class="page-item" name="nextPageTableControl">
<a class="page-link" href="#"
onclick="loadNextPageIntoTable('coinsNavTabArea')">Next 100</a>
</li>
</ul>
</nav>
</div>
</div>
</div>
<!-- Table of Coins -->
<div class="table-responsive">
<table class="table">
<thead class="sticky">
<tr>
<th id="rankColumn" name="sortColumn" title="Coins ranked by market capitalization"
dataObjectAttribute="market_cap_rank"
onclick="sortTableRows(event, 'coinsNavTabArea')"># <span><i
class="fas fa-sort"></i></span></th>
<th id="nameColumn" name="sortColumn" title="Coin's Icon, Name (Id)"
dataObjectAttribute="name"
onclick="sortTableRows(event,'coinsNavTabArea')">Coins <span><i
class="fas fa-sort"></i></span></th>
<th id="priceColumn" name="sortColumn" title="Coin's current market price (price per coin)"
dataObjectAttribute="current_price"
onclick="sortTableRows(event,'coinsNavTabArea')">Price <span><i
class="fas fa-sort"></i></span></th>
<th id="change1hrColumn" name="sortColumn" title="The coin's percentage price change over the last hour"
dataObjectAttribute="price_change_percentage_1h_in_currency"
onclick="sortTableRows(event,'coinsNavTabArea')">Change (1hr) <span><i
class="fas fa-sort"></i></span></th>
<th id="change24hrColumn" name="sortColumn" title="The coin's percentage price change over last 24 hours"
dataObjectAttribute="price_change_percentage_24h_in_currency"
onclick="sortTableRows(event,'coinsNavTabArea')">Change (24h) <span><i
class="fas fa-sort"></i></span></th>
<th id="change7dColumn" name="sortColumn" title="The coin's percentage price change over last 7 days"
dataObjectAttribute="price_change_percentage_7d_in_currency"
onclick="sortTableRows(event,'coinsNavTabArea')">Change (7d) <span><i
class="fas fa-sort"></i></span></th>
<th id="change30dColumn" name="sortColumn" title="The coin's percentage price change over last 30 days"
dataObjectAttribute="price_change_percentage_30d_in_currency"
onclick="sortTableRows(event,'coinsNavTabArea')">Change (30d) <span><i
class="fas fa-sort"></i></span></th>
<th id="change1yrColumn" name="sortColumn" title="The coin's percentage price change over last 365 days"
dataObjectAttribute="price_change_percentage_1y_in_currency"
onclick="sortTableRows(event,'coinsNavTabArea')">Change (1yr) <span><i
class="fas fa-sort"></i></span></th>
<th id="marketCapColumn" name="sortColumn" title="Market Capitalisation (total number of coins in circulation multiplied by the coin's current market price)"
dataObjectAttribute="market_cap"
onclick="sortTableRows(event,'coinsNavTabArea')">Market Cap <span><i
class="fas fa-sort"></i></span></th>
</tr>
</thead>
<tbody id="myCoinTableBody"></tbody>
</table>
</div>
<!-- Paging controls (below the Coins table) -->
<div align="right">
<div class="btn-group">
<nav aria-label="Next and Prevous page controls for the coin table">
<ul class="pagination ml-4">
<li class="page-item disabled" name="previousPageTableControl">
<a class="page-link" href="#" tabindex="-1"
onclick="loadPreviousPageIntoTable('coinsNavTabArea')">Previous 100</a>
</li>
<li class="page-item" name="nextPageTableControl">
<a class="page-link" href="#"
onclick="loadNextPageIntoTable('coinsNavTabArea')">Next 100</a>
</li>
</ul>
</nav>
</div>
</div>
<!-- Coin Tab Footer-->
<div class="row">
<div id="myCoinTableFooter" class="col-sm-12" align="center"></div>
</div>
</div>
<!-- Exchanges tab content -->
<div class="tab-pane fade" id="exchangesNavTabArea" role="tabpanel" aria-labelledby="exchanges-tab">
<!-- Controls for Exchange Tabs table -->
<div class="row">
<div class="col-sm-12" align="right">
<!-- Paging controls (above the Exchanges table) -->
<div class="btn-group mt-n5">
<button class="btn btn-light ml-4" onclick="loadFirstPageIntoTable('exchangesNavTabArea')">
<i class="fas fa-sync-alt"></i></button>
<nav aria-label="Next and Previous page controls for the Exchange table">
<ul class="pagination ml-4">
<li class="page-item disabled" name="previousPageTableControl"
title="Reload the previous 100 Exchanges into the table">
<a class="page-link" href="#" tabindex="-1"
onclick="loadPreviousPageIntoTable('exchangesNavTabArea')">Previous 100</a>
</li>
<li class="page-item" name="nextPageTableControl"
title="Load the next 100 Exchanges into the table">
<a class="page-link" href="#"
onclick="loadNextPageIntoTable('exchangesNavTabArea')">Next 100</a>
</li>
</ul>
</nav>
</div>
</div>
</div>
<!-- Table of Exchanges -->
<div class="table-responsive">
<table class="table" id="tableOfExchanges">
<thead class="sticky">
<tr>
<th id="exchangeRankColumn" name="sortColumn" title="Exchanges ranked by Trust Score"
dataObjectAttribute="trust_score_rank"
onclick="sortTableRows(event,'exchangesNavTabArea')"># <span><i
class="fas fa-sort"></i></span></th>
<th id="exchangeNameColumn" name="sortColumn" title="Exchange's Icon, Name (Id)"
dataObjectAttribute="name"
onclick="sortTableRows(event,'exchangesNavTabArea')">Exchange <span><i
class="fas fa-sort"></i></span></th>
<th id="tradeVolumeColumn" name="sortColumn" title="Exchange's trade over 24-hour period"
dataObjectAttribute="trade_volume_24h_btc"
onclick="sortTableRows(event,'exchangesNavTabArea')">Trade Volume<br>(in BTC)<span><i
class="fas fa-sort"></i></span></th>
<th id="exchangeCountryColumn" name="sortColumn" title="Where exchange is registered"
dataObjectAttribute="country"
onclick="sortTableRows(event,'exchangesNavTabArea')">Country <span><i
class="fas fa-sort"></i></span></th>
<th id="establishedYear" name="sortColumn" title="Exchange started operations"
dataObjectAttribute="year_established"
onclick="sortTableRows(event,'exchangesNavTabArea')">Exchange<br>Established <span><i
class="fas fa-sort"></i></span></th>
<th id="exchangeTrustScoreColumn" name="sortColumn" title="Coingeko's trust score for the exchange"
dataObjectAttribute="trust_score"
onclick="sortTableRows(event,'exchangesNavTabArea')">Trust Score<br>(out of 10) <span><i
class="fas fa-sort"></i></span></th>
</tr>
</thead>
<tbody id="myExchangeTableBody"></tbody>
</table>
</div>
<!-- Paging controls (below the Exchanges table) -->
<div align="right">
<div class="btn-group">
<nav aria-label="Next and Previous page controls for the Exchange table">
<ul class="pagination ml-4">
<li class="page-item disabled" name="previousPageTableControl">
<a class="page-link" href="#" tabindex="-1"
onclick="loadPreviousPageIntoTable('exchangesNavTabArea')">Previous 100</a>
</li>
<li class="page-item" name="nextPageTableControl">
<a class="page-link" href="#"
onclick="loadNextPageIntoTable('exchangesNavTabArea')">Next 100</a>
</li>
</ul>
</nav>
</div>
</div>
<!-- Exchange Table Footer-->
<div class="row">
<div id="myExchangeTableFooter" class="col-sm-12" align="center"></div>
</div>
</div>
</div>
</div>
<!-- Page footer -->
<div class="row" id="myPageFooter">
<div class="col-sm-6" align="left">
</div>
<div class="col-sm-6" align="left">
<p>Developed by Mark Suscens (2020-21)</p>
<p>(Powered by CoinGecko API)</p>
</div>
</div>
</div>
</body>
<footer>
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js"
integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj"
crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/umd/popper.min.js"
integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo"
crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/js/bootstrap.min.js"
integrity="sha384-OgVRvuATP1z7JjHLkuOU7Xw704+h835Lr+6QL9UvYjZE3Ipu6Tp75j7Bh/kR0JKI"
crossorigin="anonymous"></script>
<script src="/assets/js/frontend/helperFunctions.js"></script>
<script src="/assets/js/frontend/components/tableFunctions.js"></script>
<script src="/assets/js/backend/InterfaceAPI.js"></script>
<script src="/assets/js/frontend/components/searchComponentClass.js"></script>
<script src="/assets/js/frontend/components/componentClasses.js"></script>
<script src="/assets/js/frontend/pageLogic/indexLogic.js"></script>
</footer>
</html>