-
Notifications
You must be signed in to change notification settings - Fork 188
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 2644850
Showing
2 changed files
with
31,621 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,150 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" | ||
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> | ||
<html xmlns="http://www.w3.org/1999/xhtml"> | ||
<head> | ||
<title>OCaml toplevel</title> | ||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | ||
<link rel="stylesheet" href="http://netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css" /> | ||
<style> | ||
|
||
body,html { | ||
height: 100%; | ||
background-color:#eee; | ||
} | ||
|
||
#toplevel-container { | ||
width: 50%; | ||
background-color: black; | ||
color: #ccc; | ||
overflow: auto; | ||
overflow-x: hidden; | ||
height: 100%; | ||
float:left; | ||
padding:10px; | ||
padding-top: 20px; | ||
} | ||
|
||
#toplevel-container pre#output { | ||
padding: 0px; | ||
} | ||
|
||
#toplevel-container #output { | ||
background-color:transparent; | ||
color: #ccc; | ||
border: none; | ||
line-height:18px; | ||
font-size: 12px; | ||
margin-bottom: 0px; | ||
} | ||
|
||
#toplevel-container textarea { | ||
width:90%; | ||
line-height:18px; | ||
font-size: 12px; | ||
background-color: transparent; | ||
color: #fff; | ||
border: 0; | ||
resize: none; | ||
outline: none; | ||
font-family: Menlo,Monaco,Consolas,"Courier New",monospace; | ||
font-weight: bold; | ||
float:left; | ||
margin: 0px; | ||
padding:0px; | ||
} | ||
#toplevel-container #sharp { | ||
float: left; | ||
line-height:18px; | ||
font-size: 12px; | ||
font-family: Menlo,Monaco,Consolas,"Courier New",monospace; | ||
white-space: pre; | ||
} | ||
.sharp:before{ | ||
content:"# "; | ||
line-height:18px; | ||
font-size: 12px; | ||
font-family: Menlo,Monaco,Consolas,"Courier New",monospace; | ||
} | ||
#toplevel-side{ | ||
width:45%; | ||
height: 100%; | ||
overflow: auto; | ||
text-align:justify; | ||
float:left; | ||
margin-left:30px; | ||
} | ||
#toplevel-side ul{ | ||
padding: 0px; | ||
list-style-type: none; | ||
} | ||
|
||
.stderr { | ||
color: #d9534f; | ||
} | ||
.stdout { | ||
|
||
} | ||
</style> | ||
<script type="text/javascript" src="toplevel.js"></script> | ||
</head> | ||
<body> | ||
<div id="toplevel-container"> | ||
<pre id="output"></pre> | ||
<div> | ||
<div id="sharp" class="sharp"></div> | ||
<textarea id="userinput"></textarea> | ||
<!-- <button type="button" class="btn btn-default" --> | ||
<!-- id="btn-execute">Execute</button> --> | ||
<!-- <button type="button" class="btn btn-default" --> | ||
<!-- id="btn-clear">Clear</button> --> | ||
<!-- <button type="button" class="btn btn-default" --> | ||
<!-- id="btn-reset">Reset</button> --> | ||
</div> | ||
</div> | ||
<div id="toplevel-side"> | ||
<h3>Js_of_ocaml</h3> | ||
<h4>A compiler from OCaml bytecode to Javascript.</h4> | ||
<p>It allow to write OCaml programs that run on Web browsers. It is | ||
easy to install as it works with an existing installation of OCaml, | ||
with no need to recompile any library. It comes with bindings for a | ||
large part of the browser APIs.</p> | ||
<p>This web-based OCaml toplevel is compiled using Js_of_ocaml.</p> | ||
<h4>Command</h4> | ||
<table class="table table-striped table-condensed"> | ||
<tbody class> | ||
<tr> | ||
<td>Enter/Return</td> | ||
<td>Submit code</td> | ||
</tr> | ||
<tr> | ||
<td>Ctrl + Enter</td> | ||
<td>Newline</td> | ||
</tr> | ||
<tr> | ||
<td>Up / Down</td> | ||
<td>Browse history</td> | ||
</tr> | ||
<tr> | ||
<td>Ctrl + l</td> | ||
<td>Clear display</td> | ||
</tr> | ||
<tr> | ||
<td>Ctrl + k</td> | ||
<td>Reset toplevel</td> | ||
</tr> | ||
<tr> | ||
<td>Tab</td> | ||
<td>Indent code</td> | ||
</tr> | ||
|
||
</tbody> | ||
</table> | ||
<h4>Try to execute samples</h4> | ||
<div id="toplevel-examples" class="list-group"></div> | ||
<h4>See the generated javascript code</h4> | ||
<pre id="last-js"> | ||
</pre> | ||
</div> | ||
</body> | ||
</html> |
Oops, something went wrong.