forked from pcottle/learnGitBranching
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
454 lines (409 loc) · 13.8 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
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=800, initial-scale=0.25">
<title>Learn Git Branching</title>
<meta name="author" content="Peter Cottle">
<meta property="og:title" content="Learn Git Branching"/>
<meta property="og:type" content="website"/>
<meta property="og:url" content="http://pcottle.github.io/learnGitBranching/index.html?demo"/>
<meta property="og:image" content="http://pcottle.github.io/learnGitBranching/assets/learnGitBranching.png"/>
<meta property="og:description" content="A interactive Git visualization tool to educate and challenge!"/>
<link rel="stylesheet" href="build/main.4c3b3cd5.css" type="text/css" charset="utf-8">
<link rel="stylesheet" href="src/style/font-awesome.css" type="text/css" charset="utf-8">
</head>
<body>
<!-- lol noscript. I did not write 9k+ lines of JS just for you to bounce off my website -->
<noscript>
<div style="z-index:1000000;background:red;color:white;position:absolute;top:0;left:0;height:300px;width:300px;">
This application simulates a git repository in your browser, so you will need
JS to use the app. Try enabling and refreshing the page -- Thanks!
</div>
</noscript>
<!-- The entire interface is within this div -->
<div id="interfaceWrapper" class="box horizontal flex1">
<div id="controls" class="box vertical flex1 visBackgroundColor">
<div id="commandLineHistory" class="box vertical flex3">
<div class="toolbar box vertical center">
<div class="controls box horizontal justify">
<div class="box flex1">
<div class="close">
</div>
</div>
<div class="box flex1">
<div class="minimize">
</div>
</div>
<div class="box flex1">
<div class="plus">
</div>
</div>
</div>
<div>
<i class="icon-home"></i>
<span class="intl-aware" data-intl="learn-git-branching">
Learn Git Branching
</span>
</div>
</div>
<div id="terminal" class="box flex1 horizontal startAlign">
<div id="commandDisplay" class="box vertical flex1">
</div>
</div>
<div id="commandLineBar" class="box vertical flex0">
<div id="prompt" class="">
<span class="promptSign box">$</span>
<span class="cursor box"> </span>
<p class="command"></p>
</div>
<textarea id="commandTextField"></textarea>
</div>
</div>
</div>
<div id="mainVisSpace" class="box flex1 horizontal visBackgroundColor">
</div>
</div>
<div id="canvasHolder">
</div>
<!-- lol inline styles -->
<a href="https://github.com/pcottle/learnGitBranching" target="_blank" style="z-index: 99; position: fixed; top: 0; right: 0">
<img style="position: absolute; top: 0; right: 0; border: 0;" src="https://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png" alt="Fork me on GitHub">
</a>
<!-- Dependencies -->
<script src="lib/jquery-1.8.0.min.js"></script>
<script src="lib/jquery-ui-1.9.0.custom.min.js"></script>
<script src="lib/underscore-min.js"></script>
<script src="lib/backbone-min.js"></script>
<script src="lib/backbone.localStorage-min.js"></script>
<script src="lib/raphael-min.js"></script>
<!-- Templates from here on out. Someone seriously needs to fix template
management for node.js apps. I know there is the text plugin
for requireJS but that's lame. For now, they are all listed here... -->
<script type="text/html" id="command-template">
<p class="commandLine transitionBackground <%= status %>">
<span class="prompt">$</span>
<%= rawStr %>
<span class="icons transitionAllSlow">
<i class="icon-exclamation-sign"></i>
<i class="icon-check-empty"></i>
<i class="icon-retweet"></i>
<i class="icon-check"></i>
</span>
</p>
<div class="commandLineResult <%= resultType %>">
<%= result %>
</div>
<div class="commandLineWarnings">
<%= formattedWarnings %>
</div>
</script>
<script type="text/html" id="helper-bar-template">
<% for(var i = 0; i < items.length; i++) { %>
<% if (items[i].text) { %>
<a data-id="<%= items[i].id %>"><%= items[i].text %></a>
<% } else { %>
<a data-id="<%= items[i].id %>">
<i data-id="<%= items[i].id %>" class="icon-<%= items[i].icon %>"></i>
</a>
<% } %>
<% } %>
</script>
<script type="text/html" id="level-toolbar-template">
<div class="toolbar level-toolbar box vertical center transitionAll hidden">
<div>
<i class="icon-bolt"></i>
Level
<span class="levelToolbarSpan">
<%= name %>
</span>
</div>
</div>
</script>
<script type="text/html" id="modal-view-template">
<div class="contentHolder box vertical center flex1">
</div>
</script>
<script type="text/html" id="terminal-window-bare-template">
<div class="terminal-window-holder box flex10 vertical transitionTransform slideOut">
<div class="wrapper box vertical">
<div class="toolbar box vertical center">
<div class="controls box horizontal justify">
<div class="box flex1">
<div class="close">
</div>
</div>
<div class="box flex1">
<div class="minimize">
</div>
</div>
<div class="box flex1">
<div class="plus">
</div>
</div>
</div>
<div>
<i class="icon-cog"></i>
<%= title %>
</div>
</div>
<div class="terminal-text">
<p class="helperText">
<%= text %>
</p>
</div>
<div class="inside box flex1">
</div>
</div>
</div>
<div class="box flex3">
</div>
</script>
<script type="text/html" id="terminal-window-template">
<div class="terminal-window box horizontal flex3 transitionAll">
<div class="box flex3">
</div>
<div class="terminal-window-holder box flex10 vertical transitionTransform">
<div class="toolbar box vertical center">
<div class="controls box horizontal justify">
<div class="box flex1">
<div class="close">
</div>
</div>
<div class="box flex1">
<div class="minimize">
</div>
</div>
<div class="box flex1">
<div class="plus">
</div>
</div>
</div>
<div>
<i class="icon-cog"></i>
<%= title %>
</div>
</div>
<div class="inside">
</div>
</div>
<div class="box flex2">
</div>
</div>
</script>
<script type="text/html" id="level-dropdown-view">
</script>
<script type="text/html" id="series-view">
<div class="displayName">
<h3> <%= displayName %> </h3>
</div>
<p class="about">
<%= about %>
</p>
<div class="iconHolder box horizontal">
<% for (var i = 0; i < ids.length; i++) { %>
<div class="levelIcon box center centerAlign vertical" id="levelIcon-<%=ids[i]%>" data-id="<%=ids[i]%>">
<div class="index box" data-id="<%=ids[i]%>">
<i class="icon-ok-circle" data-id="<%=ids[i]%>"></i>
<div class="indexNum" data-id="<%=ids[i]%>">
<%= i + 1 %>
</div>
</div>
</div>
<% } %>
</div>
</script>
<script type="text/html" id="git-demonstration-view">
<div class="demonstrationText box vertical">
<div class="beforeText">
<p>
<%= beforeHTML %>
</p>
</div>
<div class="command center">
<p class="uiButton uiButtonYellow transitionOpacity">
<%= command %>
</p>
</div>
<div class="afterText transitionOpacity">
<p>
<%= afterHTML %>
</p>
</div>
</div>
<div class="visHolder box vertical flex1">
<div class="visHolderInside box flex1">
</div>
</div>
</script>
<script type="text/html" id="general-button">
<%= buttonText %>
</script>
<script type="text/html" id="demonstration-builder">
<div class="insideBuilder box vertical">
</div>
<div class="buttons box horizontal center">
<div class="uiButton testButton">
Test View
</div>
</div>
</script>
<script type="text/html" id="multi-view-builder">
<div class="viewSoFar box vertical">
<% if (!views.length) { %>
<h3> You have no views specified yet! Add some with the buttons below </h3>
<% } %>
<% for (var i = 0; i < views.length; i++) { %>
<div class="view box horizontal centerAlign justify">
<div class="box horizontal">
<div class="info">
View
#<%= i + 1 %>: <%= views[i].type %>
</div>
</div>
<div class="singleViewButtons box horizontal">
<div class="uiButton uiButtonRed box deleteButton" data-index="<%=i%>">
Delete
</div>
<div class="uiButton uiButtonWhite box editButton" data-index="<%=i%>" data-type="<%= views[i].type %>">
Edit
</div>
<div class="uiButton box testButton" data-index="<%=i%>">
Test
</div>
</div>
</div>
<% } %>
</div>
<div class="buttons box horizontal center">
<% for (var i = 0; i < supportedViews.length; i++) { %>
<div class="uiButton addView uiButtonYellow" data-type="<%=supportedViews[i]%>">
Add <%=supportedViews[i]%> View
</div>
<% } %>
</div>
<div class="controlsForView box horizontal center">
<div class="uiButton uiButtonRed cancelView">
Cancel
</div>
<% if (views.length) { %>
<div class="uiButton uiButtonWhite testEntireView">
Test Entire View
</div>
<div class="uiButton saveView">
Save Entire View
</div>
<% } %>
</div>
</script>
<script type="text/html" id="text-grabber">
<p class="helperText">
<%= helperText %>
</p>
<textarea></textarea>
</script>
<script type="text/html" id="markdown-presenter">
<p class="helperText textAlignCenter">
<%= previewText %>
</p>
<textarea><%= fillerText %></textarea>
</script>
<script type="text/html" id="markdown-grabber-view">
<div class="inputSide box vertical">
<div class="markdownGrabberInput">
<textarea><%= fillerText %></textarea>
</div>
</div>
<div class="box vertical flex1">
<p class="helperText textAlignCenter">
<%= previewText %>
</p>
<div class="markdownGrabberPreview box flex1 vertical">
<div class="insidePreview">
</div>
</div>
</div>
</script>
<script type="text/html" id="modal-alert-template">
<h2>
<%= title %>
</h2>
<p>
<%= text %>
</p>
</script>
<script type="text/html" id="interactive-rebase-template">
<div class="iRebaseDialog wrapper transitionAllSlow">
<p>
Rebasing <%= num %> Commits
</p>
<p class="helperText">
(Drag and drop to re-order. Toggle the "pick" button to omit or re-add a commit)
</p>
<div class="entryHolders">
<ul class="rebaseEntries">
</ul>
</div>
<div class="confirmCancel">
</div>
</div>
</script>
<script type="text/html" id="left-right-template">
<% if (showLeft) { %>
<div class="box left">
<i class="icon-circle-arrow-left"></i>
<% } else { %>
<div class="box exit">
<i class="icon-signout"></i>
<% } %>
</div>
<div class="box right">
<% if (!lastNav) { %>
<i class="icon-circle-arrow-right"></i>
<% } else { %>
<i class="icon-ok"></i>
<% } %>
</div>
</script>
<script type="text/html" id="confirm-cancel-template">
<a class="box cancelButton uiButton uiButtonRed">
<%= cancel %>
</a>
<a class="box confirmButton uiButton uiButtonYellow">
<%= confirm %>
</a>
</script>
<script type="text/html" id="interactive-rebase-entry-template">
<li id="<%= id %>" class="rebaseEntry transitionOpacity">
<div class="wrapper">
<i class="icon-align-justify"></i>
<span class="idwrapper">
<%= id %>
</span>
<a id="toggleButton" class="uiButton uiButtonPink">
Pick
</a>
</div>
</li>
</script>
<!-- The compiled and minified build file (that actually does everything) is below.
For a much easier time perusing the source, see the individual files at:
https://github.com/pcottle/learnGitBranching
-->
<script src="build/bundle.min.b4338512.js"></script>
<!-- The advantage of github pages: super-easy, simple, slick static hostic.
The downside? No raw logs to parse for analytics, so I have to include
Google analytics :-/ -->
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-37500646-1']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
</body>
</html>