-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
195 lines (170 loc) · 8.67 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
<!DOCTYPE html >
<html class="bg-dark">
<head>
<meta charset="UTF-8">
<title>Course Maker</title>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css" integrity="sha384-9aIt2nRpC12Uk9gS9baDl411NQApFmC26EwAOH8WgZl5MYYxFfc+NcPb1dKGj7Sk" crossorigin="anonymous">
<!-- Font Awesome -->
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.8.2/css/all.css">
<!-- Bootstrap core CSS -->
<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.5.0/css/bootstrap.min.css" rel="stylesheet">
<!-- Material Design Bootstrap -->
<link href="https://cdnjs.cloudflare.com/ajax/libs/mdbootstrap/4.19.1/css/mdb.min.css" rel="stylesheet">
<script src="https://code.jquery.com/jquery-2.2.4.js" integrity="sha256-iT6Q9iMJYuQiMWNd9lDyBUStIq/8PuOW33aOqmvFpqI=" crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/umd/popper.min.js" integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/FileSaver.min.js"></script>
<link rel="stylesheet" href="prism.css"/>
<link rel="stylesheet" href="fonts.css">
<link rel="stylesheet" href="style.css">
<link rel="icon" href="/favicon.png">
<script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.5.0/jszip.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/clipboard.min.js"></script>
<link rel="stylesheet" href="mathquill-0.10.1/mathquill.css"/>
<script src="mathquill-0.10.1/mathquill.js"></script>
<script src="mousetrap.min.js"></script>
<script>
var MQ = MathQuill.getInterface(2);
</script>
<!--mathjax-->
<script>
MathJax = {
tex: {
inlineMath: [['$', '$']]
}
};
</script>
<script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script>
<script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script>
<!-- https://electronjs.org/docs/tutorial/security#csp-meta-tag -->
<script src="check.js"></script>
</head>
<body class="bg-dark text-light">
<style>
hr {
position: relative;
}
</style>
<!-- Modal -->
<div class="modal fade" id="importm" tabindex="-1" role="dialog"
aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title text-dark">Import a file</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<div class="input-group">
<div class="custom-file">
<input type="file" class="custom-file-input" id="importfinp" accept=".json">
<label class="custom-file-label" for="inputGroupFile01">Choose file</label>
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Cancel</button>
<button type="button" class="btn btn-primary disabled" id="importfbtn">Import</button>
</div>
</div>
</div>
</div>
<!--/.Modal-->
<div class="sticky-top blue-gradient text-light">
<!--Navbar-->
<nav class="navbar navbar-dark transparent">
<!-- Navbar brand -->
<!-- Collapse button -->
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent1" aria-controls="navbarSupportedContent1" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon text-white"></span>
</button>
<h1 class="px-1">Course Maker</h1>
<div class="btn-group d-flex flex" role="group">
<button type="button" id="eq" class="btn rgba-indigo-strong py-2" onclick="addEquation();">Math</button>
<button type="button" id="deq" class="btn darken-3 cyan py-2" onclick="addDisplayEquation();">Display Math</button>
<button type="button" id="pp" class="btn blue-grey py-2" onclick="addProblem();" >Practice Problem</button>
<button type="button" id="txt" class="btn rgba-green-strong py-2" onclick="addText();">Text</button>
<button type="button" id="lb" class="btn rgba-lime-strong py-2" onclick="addBreak();">Line break</button>
</div>
<!-- Collapsible content -->
<div class="collapse navbar-collapse" id="navbarSupportedContent1">
<!-- Links -->
<div class="container ">
<ul class="navbar-nav col">
<li class="nav-item row">
<a class="nav-link" data-toggle="modal" data-modal="#importm" data-target="#importm">Import...</a>
</li>
<li class="nav-item row">
<a class="nav-link" onclick="clearAll()">Clear</a>
</li>
</ul>
<ul class="col navbar-nav ">
<li class="nav-item row">
<a class="nav-link" onclick="pack()">Save...</a>
</li>
<li class="nav-item row"><a class="nav-link" onclick="release()">Export HTML...</a></li>
</ul>
</div>
<!-- Links -->
</div>
<!-- Collapsible content -->
</nav>
<!--/.Navbar--></div>
<div class="mx-5 " id="" style="margin-top:30px">
<div class="row">
<div class="col-sm-12">
<input type="text" class="form-control form-control-lg bg-dark text-light border-dark" id="ctitle" style="font-size:30px;outline:none" placeholder="Title">
<div id="root" class="py-5 text-dark">
<p id="e0"></p>
</div>
</div>
<button type="button" id="final" class="btn btn-primary" onclick="makeCourse(info);">Make Course</button>
</div>
<div class="btn-group d-flex pt-5" role="group">
<a type="button" id="eq" class="btn btn-outline-primary py-2" onclick="document.getElementById('code').style.display=null;document.getElementById('code2').style.display=null;document.getElementById('preview').style.display='none';this.className='btn btn-primary py-2 disabled';this.nextElementSibling.className='btn btn-outline-primary py-2 ';">Code</a>
<a type="button" id="eq" class="btn btn-primary py-2" onclick="document.getElementById('preview').style.display=null;this.className='btn btn-primary py-2 disabled';this.previousElementSibling.className='btn btn-outline-primary py-2 ';document.getElementById('code').style.display='none';document.getElementById('code2').style.display='none'">Preview</a>
</div>
<div id="preview" >
<h4 class="pt-5">Preview</h4>
<div class="row pb-5 mx-1" >
<div class="col text-dark bg-light" id="out"></div>
</div></div>
<div class="row pt-5" id="code" style="display:none">
<div class="col">
<h4>HTML</h4>
<pre style="white-space: pre-line;"><code style="white-space: pre-line;" class="language-html" id="out2"><!--Nothing here yet!--></code></pre>
</div>
<div class="col">
<h4>Inline Javascript</h4>
<pre class="row" ><code class="language-js" id="out3">//No Javascript is needed unless you use practice problems.</code></pre>
</div>
</div>
<div class="" id="code2" style="display:none">
<h4 class="pt-3">check.js <small>(separate file)</small> </h4><br>
<pre data-src="check.js" class="row language-js" ></pre></div>
</div>
<script src="prism.js"></script>
<!-- JQuery -->
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<!-- Bootstrap tooltips -->
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.4/umd/popper.min.js"></script>
<!-- Bootstrap core JavaScript -->
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.5.0/js/bootstrap.min.js"></script>
<!-- MDB core JavaScript -->
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mdbootstrap/4.19.1/js/mdb.min.js"></script>
</body>
<script src="make.js"></script>
<script src="import.js"></script>
<script src="save.js"></script>
<script src="export.js"></script>
<script>
Mousetrap.bind('enter', function(){makeCourse(info)});
Mousetrap.bind('alt+t', function(){addText()});
Mousetrap.bind('alt+d', function(){addDisplayEquation()});
Mousetrap.bind(['alt+e','mod+e'], function(){addEquation()});
Mousetrap.bind('alt+l', function(){addBreak()});
Mousetrap.bind('alt+i', function(){addItem()});
</script>
</html>