-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
112 lines (112 loc) · 6.02 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
<html>
<head>
<!--
- Every page built on the Lurch Web Platform must import
- the TinyMCE and jQuery libraries.
-->
<script src='https://cdn.tinymce.com/4/tinymce.min.js'></script>
<script src='https://code.jquery.com/jquery-2.1.1.min.js'></script>
<!--
- The Lurch Web Platform uses a Storage Plugin built on the
- following cloud storage module. Here we import that module
- and its various storage back-ends. This suports the Open
- and Save items on the File menu.
-->
<script src='https://cdn.jsdelivr.net/gh/lurchmath/[email protected]/release/cloud-storage.js'></script>
<script src='https://unpkg.com/dropbox/dist/Dropbox-sdk.min.js'></script>
<script src='https://cdn.jsdelivr.net/gh/lurchmath/cloud-storage@v2/release/dropbox-backend.js'></script>
<script src='https://cdn.jsdelivr.net/gh/lurchmath/cloud-storage@v2/release/localstorage-backend.js'></script>
<!--
- *************************
- *
- * Here begins the section of scripts that were not included in
- * simpler example applications of the Lurch Web Platform.
- * These files are specific to this application, and to others
- * that utilize similar features.
- *
-
- First, we have copied into this repository the eqed folder
- from the main Lurch repository, which in turn was taken from
- yet another repository (see README in that folder).
- https://github.com/lurchmath/lurch/tree/master/source/assets/eqed
- We thus import its relevant scripts here, to add an equation
- editor plugin to TinyMCE.
-->
<script src='eqed/mathquill.min.js'></script>
<script src='eqed/plugins/equationeditor/plugin.min.js'></script>
<!--
- The following two files import syntax highlighting styles and
- scripts from the CloudFlare CDN. We use them to highlight code
- in the right-hand pane in the application.
-
- It is unfortunately important that we import them before we
- import the MathQuill parser, below, because it modifies the
- global namespace by introducing an "exports" object, which fools
- Highlight.js into using that instead of "window."
-->
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/default.min.css">
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js"></script>
<!--
- Part of this application also uses OpenMath. The Lurch project
- publishes an OpenMath JavaScript library in npm, which we can
- import from a CDN as follows.
-->
<script src='https://cdn.jsdelivr.net/npm/[email protected]/openmath.js'></script>
<!--
- Part of this application also parses mathematical formulas.
- The Lurch project publishes two files useful for parsing.
- First, it publishes an npm package implementing an Earley parser.
- Second, it includes in its main repository a particular instance
- of that parser suitable for parsing the contents of the MathQuill
- equation editor imported above.
- We import both files from CDNs here:
-->
<script src='https://cdn.jsdelivr.net/npm/[email protected]/earley-parser.js'></script>
<script src='https://cdn.jsdelivr.net/gh/lurchmath/lurch@latest/release/mathquill-parser.js'></script>
<!--
- This particular example application includes a sidebar. That is,
- the UI is split into two side-by-side panes, the left being the
- TinyMCE editor (with all the features added to it by this
- application) and the right being an additional mode of displaying
- data to the user and receiving input. To implement this, we bring
- in a jQuery plugin that can insert a drag-to-resize splitter.
-->
<script src="https://cdn.jsdelivr.net/gh/jcubic/[email protected]/js/jquery.splitter.min.js"></script>
<link href="https://cdn.jsdelivr.net/gh/jcubic/[email protected]/css/jquery.splitter.min.css" rel="stylesheet"/>
<!-- *
- *
- * Thus ends the section of scripts that were not included in
- * simpler example applications of the Lurch Web Platform.
- * After this point in the file, we're back to code that is
- * more boilerplate, common to most of the example applications.
- * That is, with the exception of the document body; see below.
- *
- ************************
-->
<script src='https://cdn.jsdelivr.net/gh/lurchmath/lurch@latest/release/lurch-web-platform.js'></script>
<!--
- The code defining this demo app, built on that platform,
- is in the following files, which wwere compiled from
- Literate CoffeeScript files in this same folder, using the
- gulp build process defined in the gulpfile in this
- repository.
-->
<script src='lwp-example-sidebar.js'></script>
<script src='definitions.js'></script>
</head>
<!--
- Most applications built on the Lurch Web Platform have an empty
- document body, because the LWP scripts fill the body with a TinyMCE
- instance. In this case, however, we need to create the structure
- needed for the sidebar. Code initializing the application will
- tell it to fill the "editorContainer" div instead of the entire
- body. We also set the margin to 0, because in this configuration
- the editor initialization won't do it for us.
-->
<body style='margin: 0;'>
<div style='height: 100%;'>
<div id='editorContainer'></div>
<div id='sidebar'></div>
</div>
</body>
</html>