-
Notifications
You must be signed in to change notification settings - Fork 161
/
template.html
108 lines (85 loc) · 4.68 KB
/
template.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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html>
<head>
<meta charset="UTF-8">
<link rel="stylesheet" type="text/css" href="coding-js/deps/codemirror/lib/codemirror.css" />
<link rel="stylesheet" type="text/css" href="coding-js/deps/codemirror/theme/monokai.css" />
<link rel="stylesheet" type="text/css" href="css/isicp.css" />
<link rel="stylesheet" type="text/css" href="css/footnotes.css" />
<link rel="stylesheet" type="text/css" href="css/theme.css" />
<script src="js/TOC.js"></script>
<script src="js/jquery.min.js"></script>
<script src="coding-js/deps/codemirror/lib/codemirror.js"></script>
<script src="coding-js/deps/codemirror/mode/scheme/scheme.js"></script>
<script src="coding-js/coding.js"> </script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/raphael/2.1.2/raphael-min.js"></script>
<script>
window.initialEvalIsCompleted = false;
C = new CodingJS("coding-js/", "scheme", {
onFocus: function (s) {
var ts = "";
for (var i = 0, d = C.get_all_deps(s); i < d.length; i++) { //TODO list all deps
ts += C.editor_of[d[i]].getValue() + "\n\n";
}
ts += "<b>" + C.editor_of[s].getValue() + "</b>";
if (!window.initialEvalIsCompleted) return;
ga('send', 'event', 'editor', 'focus', s, 1);
mixpanel.track('editor focus', {
'editor_name': s,
});
console.log('mixpanel editor focus');
},
onBlur: function (s, editor_value) {
if (!window.initialEvalIsCompleted) return;
mixpanel.track('editor blur', {
'editor_name': s,
'editor_value': C.editor_of[s].getValue(),
});
console.log('mixpanel editor blur', s, C.editor_of[s].getValue());
},
onInitialEvalHasCompleted: function () {
window.initialEvalIsCompleted = true;
}
});
</script>
<script src="js/footnotes.js"></script>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
tex2jax: {inlineMath: [['$','$']]}
});
</script>
<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
{{title}}
<script type="text/javascript">
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-36868476-1', 'auto');
ga('send', 'pageview');
</script>
<!-- start Mixpanel -->
<script type="text/javascript">(function(e,b){if(!b.__SV){var a,f,i,g;window.mixpanel=b;b._i=[];b.init=function(a,e,d){function f(b,h){var a=h.split(".");2==a.length&&(b=b[a[0]],h=a[1]);b[h]=function(){b.push([h].concat(Array.prototype.slice.call(arguments,0)))}}var c=b;"undefined"!==typeof d?c=b[d]=[]:d="mixpanel";c.people=c.people||[];c.toString=function(b){var a="mixpanel";"mixpanel"!==d&&(a+="."+d);b||(a+=" (stub)");return a};c.people.toString=function(){return c.toString(1)+".people (stub)"};i="disable time_event track track_pageview track_links track_forms register register_once alias unregister identify name_tag set_config people.set people.set_once people.increment people.append people.union people.track_charge people.clear_charges people.delete_user".split(" ");
for(g=0;g<i.length;g++)f(c,i[g]);b._i.push([a,e,d])};b.__SV=1.2;a=e.createElement("script");a.type="text/javascript";a.async=!0;a.src="undefined"!==typeof MIXPANEL_CUSTOM_LIB_URL?MIXPANEL_CUSTOM_LIB_URL:"file:"===e.location.protocol&&"//cdn.mxpnl.com/libs/mixpanel-2-latest.min.js".match(/^\/\//)?"https://cdn.mxpnl.com/libs/mixpanel-2-latest.min.js":"//cdn.mxpnl.com/libs/mixpanel-2-latest.min.js";f=e.getElementsByTagName("script")[0];f.parentNode.insertBefore(a,f)}})(document,window.mixpanel||[]);
mixpanel.init("272f9543615f00ee5f6a20cf7d9f689d");</script>
<!-- end Mixpanel -->
</head>
<body>
<script>
// paper = Raphael($("#raphael-target")[0]);
</script>
<div id="main">
{{main_text}}
<br>
<br>
<hr>
<div id="footnotes">
<h3 id='Notes'> Notes </h3>
{{footnotes}}
</div>
<hr>
<p> <a rel="license" href="https://creativecommons.org/licenses/by-sa/3.0/deed.en_US" target="_blank"><img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by-sa/3.0/88x31.png" /></a><br /> Based on Structure and Interpretation of Computer Programs, a work at <a xmlns:dct="http://purl.org/dc/terms/" href="https://mitpress.mit.edu/sicp/" rel="dct:source" target="_blank">https://mitpress.mit.edu/sicp/</a>.
<p> <a href="https://mixpanel.com/f/partner"><img src="//cdn.mxpnl.com/site_media/images/partner/badge_light.png" alt="Mobile Analytics" /></a>
</div>
</body>
</html>