/
exercise.html
149 lines (148 loc) · 6.59 KB
/
exercise.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
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1">
<title>Learn OCaml by OCamlPro - Exercise</title>
<link rel="stylesheet" href="/css/learnocaml_common.css">
<link rel="stylesheet" href="/css/learnocaml_exercise.css">
<link rel="stylesheet" href="/css/learnocaml_report.css">
<link rel="stylesheet" href="/css/learnocaml_tryocaml.css">
<script src="/js/ace/ace.js" type="text/javascript" charset="utf-8" defer></script>
<!-- var editor = ace.edit("learnocaml-exo-editor-pane"); -->
<!-- editor.setOptions({ fontFamily: 'Inconsolata', fontSize: "18px" }); -->
<script language="JavaScript" src="/js/learnocaml-config.js"></script>
<script language="JavaScript" src="/js/learnocaml-exercise.js" defer></script>
</head>
<body>
<!-- Should be kept untouched. -->
<div style="display:none">
<!-- (Weakly) preload images. -->
<img src="/icons/tryocaml_loading_1.gif"><img src="/icons/tryocaml_loading_2.gif">
<img src="/icons/tryocaml_loading_3.gif"><img src="/icons/tryocaml_loading_4.gif">
<img src="/icons/tryocaml_loading_5.gif"><img src="/icons/tryocaml_loading_6.gif">
<img src="/icons/tryocaml_loading_7.gif"><img src="/icons/tryocaml_loading_8.gif">
<img src="/icons/tryocaml_loading_9.gif">
</div>
<!-- Three states: .initial, .loading and .loaded.
Set to .loaded when initial loading finished.
Set to .loading while loading, then to .loaded. -->
<div id="learnocaml-exo-loading" class="loading-layer initial">
<div id="chamo"><img id="chamo-img" src="/icons/tryocaml_loading_5.gif"></div>
<div class="messages"><ul><li id="txt_preparing">Preparing the environment</li></ul></div>
</div>
<script language="JavaScript">
var n = Math.floor (Math.random () * 8.99) + 1;
document.getElementById('chamo-img').src = learnocaml_config.baseUrl + '/icons/tryocaml_loading_' + n + '.gif';
</script>
<!-- Anything below could be recreated dynamically, but IDs must be kept. -->
<div id="learnocaml-exo-toolbar">
<a href="/">
<div class ="logo">
<img src="/icons/logo_ocaml.svg">
<span>Learn OCaml</span>
<img src="/icons/logo_ocsf.svg">
</div>
</a>
<!--
<button id="learnocaml-exo-button-grade">
<img src="/icons/icon_reload_light.svg">
<span class="label">Grade!</span>
</button>
-->
<div id="learnocaml-nickname">
</div>
<div id="learnocaml-countdown">
</div>
</div>
<div id="learnocaml-exo-tab-buttons">
<button id="learnocaml-exo-button-editor">Editor</button>
<!-- To select a tab, make it the only one whose
button and tab have the class .front-tab.
Don't set the editor to .front-tab initially. -->
<button id="learnocaml-exo-button-text">Exercise</button>
<button id="learnocaml-exo-button-toplevel" class="front-tab">Toplevel</button>
<!-- When graded, apply one of .partial, .success or .failure.
The score must be put in a span.score. -->
<button id="learnocaml-exo-button-report">Report</button>
<button id="learnocaml-exo-button-meta">Details</button>
<!-- Any other button can be added. -->
</div>
<div id="learnocaml-exo-tabs">
<!-- Same comment as above for the first two tabs. -->
<div id="learnocaml-exo-tab-editor">
<div id="learnocaml-exo-prelude"></div>
<div id="learnocaml-exo-editor-pane" class="pane">Editor</div>
<div id="learnocaml-exo-editor-toolbar" class="buttons">
<!-- Any button can be added.
Structure: button>img, button>span.label. -->
<!-- <button> -->
<!-- <img src="/icons/icon_typecheck_light.svg"> -->
<!-- <span class="label">Typecheck</span> -->
<!-- </button> -->
<!-- <button> -->
<!-- <img src="/icons/icon_cleanup_light.svg"> -->
<!-- <span class="label">Reset</span> -->
<!-- </button> -->
<!-- <button> -->
<!-- <img src="/icons/icon_download_light.svg"> -->
<!-- <span class="label">Download</span> -->
<!-- </button> -->
<!-- <button> -->
<!-- <img src="/icons/icon_save_light.svg"> -->
<!-- <span class="label">Save</span> -->
<!-- </button> -->
</div>
</div>
<div id="learnocaml-exo-tab-text">
<!-- <h1>title</h1> -->
<!-- <iframe src="/standalone-descr.html"></iframe> -->
</div>
<div id="learnocaml-exo-tab-toplevel" class="front-tab">
<div id="learnocaml-exo-toplevel-toolbar" class="buttons">
<!-- Any button can be added.
Structure: button>img, button>span.label. -->
<!-- <button> -->
<!-- <img src="/icons/icon_run_dark.svg"> -->
<!-- <span class="label">Reset & Run</span> -->
<!-- </button> -->
<!-- <button> -->
<!-- <img src="/icons/icon_cleanup_dark.svg"> -->
<!-- <span class="label">Reset</span> -->
<!-- </button> -->
<!-- <button> -->
<!-- <img src="/icons/icon_download_dark.svg"> -->
<!-- <span class="label">Download</span> -->
<!-- </button> -->
</div>
<div id="learnocaml-exo-toplevel-pane" class="toplevel-pane">
<!-- <pre class="output"></pre> -->
<!-- <pre class="input"> -->
<!-- <code id="sharp" class="sharp"></code> -->
<!-- <textarea class="console" style="height: 28px">saucisse</textarea> -->
<!-- </pre> -->
</div>
</div>
<div id="learnocaml-exo-tab-report">
<!-- Using an iframe is the easiest way to isolate the CSSs. -->
<!-- <iframe src="/mockup_report.html"></iframe> -->
<img src="/icons/icon_reload_dark.svg"
style="position: absolute; top: 50%; left: 50%;
margin: -100px 0 0 -100px; width: 200px;
opacity: 0.2">
<span id="txt_grade_report"
style="position: absolute; top: 50%; margin: -12px 0 0 0;
line-height: 24px; font-size: 24px; text-shadow: 0 0 5px #888;
width: 100%; text-align: center;">
<!--Click the Grade button to get your report-->
</span>
</div>
<div id="learnocaml-exo-tab-meta">
<div id="learnocaml-exo-content-meta">
Please wait...
</div>
</div>
<!-- Any tab can be added. -->
</div>
</body>
</html>