-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
119 lines (110 loc) · 4.03 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
<!DOCTYPE html>
<html lang="en" style="height: 100%">
<head>
<meta charset="utf-8">
<title>Market UI</title>
<link rel="stylesheet" href="css/theme.default.css">
<!-- user theme must be included after default theme to override it -->
<link rel="stylesheet" href="css/theme.user.css">
<link rel="stylesheet" href="css/styles.css">
<link rel="stylesheet" href="css/debug.css">
<style>
/* reusable layout here, styling in styles.css */
.flexbox { display: flex; }
.toolbar > * { margin: 0.3rem; }
.growing { flex-grow: 1; }
.gap-children > *:not(:last-child) { margin-right: 0.5rem; }
.col2-right td:nth-child(2) { text-align: right; }
.cols-right td { text-align: right; }
.pad-cells td { padding: 0.1rem 0.3rem 0; }
.sticky-header th { position: sticky; top: 0; }
.scroll { overflow: hidden scroll; }
table.fixed-width {
table-layout: fixed;
width: 1px; /* must be overriden by columns, see table-layout spec */
}
table.fixed-width td { overflow: hidden; }
.market-name {
/* should fit XXXXXXXX/XXXX (13ch), ~140px at 16px font-size */
width: 14ch;
}
.medium-floats {
/* should fit 9999999.99999999 (16ch), ~166px at 16px font-size */
width: 16ch;
}
.large-floats {
/* should fit 999999999.99999999 (18ch), ~180px at 16px font-size */
width: 18ch;
}
.flexcenter { display: flex; align-items: center; }
/* disable until polished */
#markets-ws-btn { display: none; }
/* disable until fixed */
#autoupdate, #update-books-ws-btn { display: none; }
</style>
</head>
<body style="height: 100%; margin: 0;">
<div class="flexbox"
style="height: 100%; flex-flow: column;">
<div class="flexbox toolbar"
style="max-width: 57em; flex-flow: row-reverse wrap;">
<input id="markets-ws-btn" type="button" value="markets ws on" disabled>
<input id="update-markets-btn" type="button" value="up markets" disabled>
<input id="update-books-ws-btn" type="button" value="full books ws" disabled>
<input id="update-books-btn" type="button" value="up books" disabled>
<div id="autoupdate" class="flexcenter">
<label for="autoupdate-toggle">auto-update</label><input type="checkbox" id="autoupdate-toggle">
</div>
</div>
<div class="growing flexbox gap-children"
style="overflow: hidden; padding: 0.4rem;">
<!-- order books widget -->
<div style="overflow: hidden;"
class="flexbox gap-children">
<div id="asks-widget" class="scroll border">
<table id="asks-table"
class="fixed-width sticky-header cols-right pad-cells">
<colgroup>
<col class="large-floats">
<col class="medium-floats">
</colgroup>
<thead><tr>
<th><span class="base-ticker">B</span> amount</th>
<th><span class="quote-ticker">Q</span> ask price</th>
</tr></thead>
<tbody id="asks-tbody"></tbody>
</table>
</div>
<div id="bids-widget" class="scroll border">
<table id="bids-table"
class="fixed-width sticky-header cols-right pad-cells">
<colgroup>
<col class="medium-floats">
<col class="large-floats">
</colgroup>
<thead><tr>
<th><span class="quote-ticker">Q</span> bid price</th>
<th><span class="base-ticker">B</span> amount</th>
</tr></thead>
<tbody id="bids-tbody"></tbody>
</table>
</div>
</div>
<!-- markets table widget -->
<div class="scroll border">
<table id="markets-table"
class="fixed-width sticky-header pad-cells row-clickable col2-right no-col-border">
<colgroup>
<col class="market-name">
<col class="medium-floats">
</colgroup>
<thead><tr><th>market</th><th>price</th></tr></thead>
<tbody id="markets-tbody"></tbody>
</table>
</div>
</div>
</div>
<script defer src="js/src.js"></script>
<script defer src="js/test.js"></script>
</body>
</html>