-
Notifications
You must be signed in to change notification settings - Fork 18
/
index.html
executable file
·151 lines (131 loc) · 2.92 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
<html>
<head>
<meta charset="UTF-8">
<link href="https://fonts.googleapis.com/css?family=Rubik" rel="stylesheet">
<style>
head {
margin: 0;
padding: 0;
}
body {
margin: 0;
padding: 0;
font-family: Rubik, "Helvetica Neue", Helvetica, sans-serif;
}
#toolbar {
height: 80px;
width: 100%;
position: absolute;
bottom: 0;
background-color: #fafafa;
border-top: #dadcdf 1px solid;
display: flex;
align-items: center;
}
#toolbar button {
border: none;
background: transparent;
background-image: none;
flex-grow: 0;
outline: none; /* Alas, this prototype is already totally inaccessible. */
font-family: inherit;
}
#toolbar button:active {
opacity: 0.5;
}
#toolbar button img {
user-select: none;
-webkit-user-drag: none;
user-drag: none;
}
.title {
text-align: center;
flex-grow: 1;
font-weight: 500;
font-size: 22;
margin: 0;
}
.stack {
justify-content: center;
display: flex;
flex-direction: column;
padding: 0 20px;
}
.stack:first-of-type {
margin-left: 10px;
}
.stack:last-of-type {
margin-right: 10px;
}
.stack img {
margin: 0 auto;
height: 30px;
}
.stack p,
.stack label {
margin: 0;
margin-top: 6px;
text-align: center;
width: 100%;
font-size: 14;
}
#toolbar .selectContainer {
height: 30px;
display: flex;
flex-direction: column;
justify-content: flex-end;
width: 130px;
}
#loading, #hint {
display: flex;
align-items: center;
background-color: #aaa;
width: 100%;
height: 100%;
position: absolute;
top: 0;
left: 0;
transition: opacity 0.5s;
pointer-events: none;
}
#hint {
background-color: transparent;
color: #ddd;
}
#loading p, #hint p {
margin: 0 auto;
font-size: 32;
}
</style>
<script language="javascript" type="text/javascript" src="https://storage.googleapis.com/scrying-pen-models/cat-flat.js"></script>
<script language="javascript" type="text/javascript" src="lib/p5.min.js"></script>
<script language="javascript" type="text/javascript" src="lib/deeplearn.js"></script>
<script language="javascript" type="text/javascript" src="lib/sketch_rnn.js"></script>
<script language="javascript" type="text/javascript" src="index.js"></script>
</head>
<body>
<div id="sketch" style="cursor: crosshair;"></div>
<div id="hint"><p>Draw here!</p></div>
<div id="loading"><p>Loading…</p></div>
<div id="toolbar">
<button class="stack" id="clearButton">
<img src="img/clear.png" />
<p>Clear</p>
</button>
<button class="stack" onclick="window.open('https://github.com/andymatuschak/scrying-pen/blob/master/README.md', '_blank');">
<img src="img/info.png" />
<p>About</p>
</button>
<p class="title">Scrying Pen</p>
<div class="stack">
<div class="selectContainer">
<select id="model">
</select>
</div>
<label for="model">
Model
</label>
</div>
</div>
</body>
</html>