-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
140 lines (125 loc) · 4.6 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
<!doctype html>
<html>
<head>
<meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,minimum-scale=1,user-scalable=no" />
<script type="module" src="/node_modules/@finos/perspective-viewer/dist/cdn/perspective-viewer.js"></script>
<script type="module" src="/node_modules/@finos/perspective-workspace/dist/cdn/perspective-workspace.js"></script>
<script type="module" src="/node_modules/@finos/perspective-viewer-datagrid/dist/cdn/perspective-viewer-datagrid.js"></script>
<script type="module" src="/node_modules/@finos/perspective-viewer-d3fc/dist/cdn/perspective-viewer-d3fc.js"></script>
<link rel="preload" href="/node_modules/@finos/perspective-viewer/dist/cdn/perspective-viewer.wasm" as="fetch" type="application/wasm" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/highlightjs/[email protected]/build/styles/monokai.min.css" />
<script src="https://cdn.jsdelivr.net/gh/highlightjs/[email protected]/build/highlight.min.js"></script>
<script src="https://cdn.jsdelivr.net/gh/highlightjs/[email protected]/build/languages/rust.min.js"></script>
<script src="https://cdn.jsdelivr.net/gh/highlightjs/[email protected]/build/languages/javascript.min.js"></script>
<link rel="stylesheet" crossorigin="anonymous" href="/node_modules/@finos/perspective-viewer/dist/css/pro.css" />
<link rel="stylesheet" crossorigin="anonymous" href="/node_modules/@finos/perspective-workspace/dist/css/pro.css" />
<script type="module" src="client.js"></script>
<style>
html {
font-family: Arial;
}
perspective-workspace {
background-color: white;
position: absolute;
top: 35%;
left: 25%;
bottom: 0;
right: 0;
width: 75%;
height: 65%;
}
#scoreboard {
position: absolute;
top: 0;
left: 0;
bottom: 0;
right: 75%;
padding: 15px;
overflow-y: scroll;
}
#candidates {
position: absolute;
top: 0;
left: 25%;
bottom: 65%;
right: 0;
display: flex;
flex-direction: row;
}
pre {
z-index: 1;
border: 1px solid #999;
border-radius: 3px;
overflow: scroll;
height: 100%;
overflow: auto;
}
code {
height: 100%;
}
code.lose {
opacity: 0.25;
}
#candidates > div {
flex: 1 1 50%;
margin: 10px;
overflow: hidden;
}
#scoreboard div {
display: flex;
flex-direction: row;
}
button {
border: 1px solid #999;
border-radius: 3px;
margin: 4px;
flex: 1 1 50%;
cursor: pointer;
font-family: Arial;
font-size: 14px;
padding: 15px 4px;
}
.running {
pointer-events: none;
}
.win button {
border-color: #006611;
background-color: #006611;
color: white;
}
.running button:not(.selected) {
opacity: 0.3;
}
.lose button {
border-color: #660000;
background-color: #660000;
color: white;
}
.disabled {
pointer-events: none;
opacity: 0.5;
}
#total_score {
font-size: 18px;
padding: 8px;
}
</style>
</head>
<body>
<div id="candidates">
<div>
<span>JavaScript</span>
<pre><code id="js_pre" class="language-javascript"></code></pre>
</div>
<div>
<span>Rust (WebAssembly)</span>
<pre><code id="rust_pre" class="language-rust"></code></pre>
</div>
</div>
<div id="scoreboard">
<div id="total_score">Scoreboard</div>
<br />
</div>
<perspective-workspace></perspective-workspace>
</body>
</html>