-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
254 lines (196 loc) · 10.2 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
<!doctype html>
<html lang="en">
<head>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-103013509-5"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-103013509-5');
</script>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>Helical Wheels</title>
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css"
integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
<!-- Our stylesheet -->
<link rel="stylesheet" type="text/css" href="style.css" />
</head>
<body>
<a href="https://github.com/smsaladi/helicalwheel" class="github-corner" aria-label="View source on GitHub"><svg width="80" height="80" viewBox="0 0 250 250" style="fill:#151513; color:#fff; position: absolute; top: 0; border: 0; right: 0;" aria-hidden="true"><path d="M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z"></path><path d="M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2" fill="currentColor" style="transform-origin: 130px 106px;" class="octo-arm"></path><path d="M115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 197.7,73.2 200.1,77.6 C213.8,80.2 216.3,84.9 216.3,84.9 C212.7,93.1 206.9,96.0 205.4,96.6 C205.1,102.4 203.0,107.8 198.3,112.5 C181.9,128.9 168.3,122.5 157.7,114.1 C157.9,116.9 156.7,120.9 152.7,124.9 L141.0,136.5 C139.8,137.7 141.6,141.9 141.8,141.8 Z" fill="currentColor" class="octo-body"></path></svg></a><style>.github-corner:hover .octo-arm{animation:octocat-wave 560ms ease-in-out}@keyframes octocat-wave{0%,100%{transform:rotate(0)}20%,60%{transform:rotate(-25deg)}40%,80%{transform:rotate(10deg)}}@media (max-width:500px){.github-corner:hover .octo-arm{animation:none}.github-corner .octo-arm{animation:octocat-wave 560ms ease-in-out}}</style>
<div class="jumbotron">
<h1 class="display-4">Helical Wheels</h1>
<p class="lead">A WIP</p>
<hr class="my-2">
<p>
This is our 21st century helical wheel diagram. You are welcome!
</p>
<p>
If the site takes more than a second to load, refresh and it should be there.<br>
Recommended Browser: Chrome
</p>
</div>
<div class="container-fluid">
<ul class="nav nav-tabs justify-content-center">
<li class="nav-item">
<a class="nav-link active" id="home-tab" data-toggle="tab" href="#home" role="tab" aria-controls="home" aria-selected="true">Home</a>
</li>
<li class="nav-item">
<a class="nav-link" id="profile-tab" data-toggle="tab" href="#about" role="tab" aria-controls="about" aria-selected="false">About Us</a>
</li>
</ul>
<div class="tab-content" id="myTabContent">
<div class="tab-pane fade" id="about" role="tabpanel" aria-labelledby="about-tab">
<br><br><center><h2>About Us</h2> </center>
<br>
<p> Welcome! The two of us (Tina and Shyam) have created this site
to be a more user-friendly way to create helical wheel diagrams.
All of the code to display the helical wheel diagrams themselves were written in <a href=https://github.com/d3/d3>D3.js</a>
using <a href=https://observablehq.com>Observable</a>.
</p>
<p>Tina Wang is an undergrad Computer Science major at Caltech.
Find more about her <a href=http://tina-wang.me>here</a>.</p>
<p>Shyam Saladi is a biophysicist and engineer at Caltech.
Check out his site <a href=https://shyam.saladi.org>here</a> for more about him.</p>
</div>
<div class="tab-pane fade show active" id="home" role="tabpanel" aria-labelledby="home-tab">
<div class="row fill" >
<div class="col"><div class="row"><div class="col-5">
<p id="viewof-inputText"></p>
<p id="viewof-inputAngle"></p>
<p id="viewof-currColors"></p>
<p id="viewof-labelOption"></p>
<div id="viewof-numsOn"></div>
<div id="viewof-residuesOn"></div>
<p id="viewof-strokeThickness"></p>
<p id="viewof-labelColor"></p>
<p id="viewof-numColor"></p>
<p id="viewof-hMoment"></p>
<p id="viewof-hFace"></p>
<p id="viewof-customColorInput"></p>
<p id="viewof-customColor"></p>
</div></div></div>
<div class="col"><div class="row"><div class="col-8">
<center>
<p id="viewof-slider"></p>
<p id="chart"></p>
<p id="svgSave"></p>
</center>
</div></div></div>
</div>
<div class="row justify-content-md-left"><div class="col-2">
<div id="viewof-copyButton"></div>
<br>
<div class="social-media-sharers">
<div id="viewof-shareButtons"></div>
</div>
</div>
</div>
<div class="row justify-content-md-center"><div class="col-8">
<p>Use this only if color scheme is set to "Custom."</p>
<div id="accordion">
<div class="card">
<div class="card-header" id="headingOne">
<h5 class="mb-0">
<button class="btn btn-link" data-toggle="collapse" data-target="#collapseOne" aria-expanded="false" aria-controls="collapseOne">
Custom Color Picker
</button>
</h5>
</div>
<div id="collapseOne" class="collapse" aria-labelledby="headingOne" data-parent="#accordion">
<div class="card-body">
<div class="row">
<div class="col-sm-2"><p id="viewof-hColor"></p></div>
<div class="col-sm-2"><p id="viewof-kColor"></p></div>
<div class="col-sm-2"><p id="viewof-rColor"></p></div>
<div class="col-sm-2"><p id="viewof-dColor"></p></div>
<div class="col-sm-2"><p id="viewof-eColor"></p></div>
<div class="col-sm-2"><p id="viewof-sColor"></p></div>
<div class="col-sm-2"><p id="viewof-tColor"></p></div>
<div class="col-sm-2"><p id="viewof-nColor"></p></div>
<div class="col-sm-2"><p id="viewof-qColor"></p></div>
<div class="col-sm-2"><p id="viewof-aColor"></p></div>
<div class="col-sm-2"><p id="viewof-lColor"></p></div>
<div class="col-sm-2"><p id="viewof-iColor"></p></div>
<div class="col-sm-2"><p id="viewof-mColor"></p></div>
<div class="col-sm-2"><p id="viewof-fColor"></p></div>
<div class="col-sm-2"><p id="viewof-wColor"></p></div>
<div class="col-sm-2"><p id="viewof-yColor"></p></div>
<div class="col-sm-2"><p id="viewof-pColor"></p></div>
<div class="col-sm-2"><p id="viewof-gColor"></p></div>
</div>
</div>
</div>
</div></div>
</div>
</div>
</div>
</div>
</div>
<script type="module">
// import notebook from "https://api.observablehq.com/@tinaswang/helical-wheel-visualization-wip-2019_05_16.js";
// import notebook from "https://api.observablehq.com/@tinaswang/helical-wheel-visualization-wip-2019_05_14.js";
import notebook from "https://api.observablehq.com/@tinaswang/helical-wheel-visualization-wip-2019_05_16/2.js";
// Local import isn't working right now, oddly enough
const renders = {
"viewof inputAngle": "#viewof-inputAngle",
"viewof inputText": "#viewof-inputText",
"viewof labelOption": "#viewof-labelOption",
"viewof currColors": "#viewof-currColors",
"viewof strokeThickness": "#viewof-strokeThickness",
"viewof labelColor": "#viewof-labelColor",
"viewof numColor": "#viewof-numColor",
"viewof hMoment": "#viewof-hMoment",
"viewof hFace": "#viewof-hFace",
"viewof customColorInput" : "#viewof-customColorInput",
"viewof customColor" : "#viewof-customColor",
"svgSave": "#svgSave",
"chart": "#chart",
"viewof slider": "#viewof-slider",
"viewof copyButton" : "#viewof-copyButton",
"viewof shareButtons" : "#viewof-shareButtons",
"viewof numsOn" : "#viewof-numsOn",
"viewof residuesOn" : "#viewof-residuesOn",
// We have many color pickers
"viewof hColor": "#viewof-hColor",
"viewof kColor": "#viewof-kColor",
"viewof rColor": "#viewof-rColor",
"viewof dColor": "#viewof-dColor",
"viewof eColor": "#viewof-eColor",
"viewof sColor": "#viewof-sColor",
"viewof tColor": "#viewof-tColor",
"viewof nColor": "#viewof-nColor",
"viewof qColor": "#viewof-qColor",
"viewof aColor": "#viewof-aColor",
"viewof vColor": "#viewof-vColor",
"viewof lColor": "#viewof-lColor",
"viewof iColor": "#viewof-iColor",
"viewof mColor": "#viewof-mColor",
"viewof fColor": "#viewof-fColor",
"viewof wColor": "#viewof-wColor",
"viewof yColor": "#viewof-yColor",
"viewof pColor": "#viewof-pColor",
"viewof gColor": "#viewof-gColor",
"viewof cColor": "#viewof-cColor",
};
import {Runtime, Inspector} from "https://unpkg.com/@observablehq/runtime@4/dist/runtime.js";
for (let i in renders)
renders[i] = document.querySelector(renders[i]);
Runtime.load(notebook, (variable) => {
if (renders[variable.name])
return new Inspector(renders[variable.name]);
});
</script>
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js"
integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js"
integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"
integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.0/jquery.min.js"></script>
</body>
</html>