make the demo nicer

This commit is contained in:
Fabian Jakobs 2010-04-20 17:08:00 +02:00
commit 592e94cff0
3 changed files with 15 additions and 7 deletions

View file

@ -38,6 +38,7 @@
z-index: 2; z-index: 2;
font-family: Monaco, "Courier New", monospace; font-family: Monaco, "Courier New", monospace;
cursor: text; cursor: text;
color: black;
} }
.cursor-layer { .cursor-layer {

View file

@ -19,17 +19,21 @@
font: sans-serif; font: sans-serif;
height: 100%; height: 100%;
width: 100%; width: 100%;
font-family: Arial, Helvetica, sans-serif, Tahoma, Verdana;
font-size: 12px;
background: rgb(14, 98, 165);
color: white;
} }
#container { #editor {
top: 30px; top: 55px;
left: 0px; left: 0px;
background: white;
} }
#controls { #controls {
width: 100%; width: 100%;
height: 30px; height: 55px;
border: 1px solid black;
margin: 0; margin: 0;
} }
@ -92,10 +96,13 @@
<label for="highlight_active">Highlight active line</label> <label for="highlight_active">Highlight active line</label>
<input type="checkbox" name="highlight_active" id="highlight_active" checked> <input type="checkbox" name="highlight_active" id="highlight_active" checked>
</td> </td>
<td align="right">
<img src="logo.png"></img>
</td>
</tr> </tr>
</table> </table>
<div id="container"> <div id="editor">
</div> </div>
<script type="text/editor" id="jstext">function foo(items) { <script type="text/editor" id="jstext">function foo(items) {
@ -202,13 +209,13 @@ activeEl.onchange = function() {
editor.setHighlightActiveLine(!!activeEl.checked); editor.setHighlightActiveLine(!!activeEl.checked);
}; };
var container = document.getElementById("container"); var container = document.getElementById("editor");
var editor = new ace.Editor(new ace.VirtualRenderer(container)); var editor = new ace.Editor(new ace.VirtualRenderer(container));
onDocChange(); onDocChange();
function onResize() { function onResize() {
container.style.width = (document.documentElement.clientWidth - 4) + "px"; container.style.width = (document.documentElement.clientWidth - 4) + "px";
container.style.height = (document.documentElement.clientHeight - 30 - 4) + "px"; container.style.height = (document.documentElement.clientHeight - 55 - 4) + "px";
editor.resize(); editor.resize();
}; };

BIN
demo/logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB