-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
48 lines (40 loc) · 1.56 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
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
<meta name="description" content="UniMath in your browser!" />
<link rel="icon" href="../ui-images/favicon.png">
<title>UniMath in your browser</title>
<style>
/* Allow some extra scroll space at the bottom & to the right */
.CodeMirror-lines {
padding-bottom: 75% !important;
padding-right: 40px !important;
}
</style>
</head>
<body class="jscoq-main">
<div id="ide-wrapper" class="toggled" data-filename="scratchpad.v">
<!-- Editor and panel are created here by CoqManager -->
</div>
<!-- jsCoq configuration part -->
<script type="module">
import { JsCoq } from "./node_modules/jscoq/jscoq.js";
var jscoq_opts = {
file_dialog: true,
theme: 'dark',
editor: { mode: { 'company-coq': true }, theme: 'blackboard' },
all_pkgs: {'+': ['coq'], 'UniMath/_build/default/coq-pkgs': ['unimath']},
// coq: {'Universe Checking': false},
};
/* Global reference */
var coq, last_filename = localStorage['scratchpad.last_filename'];
document.getElementById('ide-wrapper').setAttribute('data-filename', last_filename);
JsCoq.start(jscoq_opts).then(res => coq = res);
window.addEventListener('beforeunload', () => {
var sp = coq.provider.snippets[0];
localStorage['scratchpad.last_filename'] = sp.filename;
});
</script>
</body>
</html>