Permalink
Browse files

digitalWrite: got basic formatting done

  • Loading branch information...
1 parent b8f9eba commit 04c33df182c517e44f40e6c8dbc21fa92858327e @jadonk jadonk committed Apr 7, 2013
Showing with 56 additions and 2 deletions.
  1. +23 −0 digitalWrite.html
  2. +4 −2 static/bonescript-demo.js
  3. +29 −0 testace.html
View
@@ -11,6 +11,29 @@
<link rel="stylesheet" type="text/css" media="screen" href="/static/login.css" />
<link rel="stylesheet" type="text/css" media="screen" href="/static/beagle.css" />
<script src="/static/bonescript-demo.js"></script>
+ <style>
+pre#code {
+ position: relative;
+ width: 500px;
+ height: 60px;
+ padding-left: 0;
+ border-radius: 4px;
+ border-bottom-right-radius: 0px;
+ border-bottom-left-radius: 0px;
+ margin-bottom: 0px;
+ margin-left: 30px;
+ margin-right: 0px;
+ align: left;
+}
+textarea#console-output {
+ margin-top: 0px;
+ margin-left: 30px;
+ width: 496px;
+ height: 80px;
+ border: 1px solid #cccccc;
+ resize: vertical;
+}
+ </style>
</head>
<body>
<div class="top">
@@ -28,7 +28,9 @@ function mylog() {
for(var i in arguments) {
str += arguments[i].toString() + '\n';
}
- $('#console-output').append(str);
+ var area = $('#console-output');
+ area.append(str);
+ area.scrollTop(area[0].scrollHeight - area.height());
oldLog.apply(console, arguments);
}
@@ -74,7 +76,7 @@ function initClient() {
editor[this.id] = {};
editor[this.id].original = this.innerHTML;
editor[this.id].editor = ace.edit(this.id);
- editor[this.id].editor.setTheme("ace/theme/monokai");
+ editor[this.id].editor.setTheme("ace/theme/textmate");
editor[this.id].editor.getSession().setMode("ace/mode/javascript");
var originalDemoRun = demoRun;
demoRun = function(myid) {
View
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+<title>ACE in Action</title>
+<style type="text/css" media="screen">
+ #editor {
+ position: absolute;
+ top: 0;
+ right: 0;
+ bottom: 0;
+ left: 0;
+ }
+</style>
+</head>
+<body>
+
+<div id="editor">function foo(items) {
+ var x = "All this is syntax highlighted";
+ return x;
+}</div>
+
+<script src="http://d1n0x3qji82z53.cloudfront.net/src-min-noconflict/ace.js" type="text/javascript" charset="utf-8"></script>
+<script>
+ var editor = ace.edit("editor");
+ editor.setTheme("ace/theme/clouds");
+ editor.getSession().setMode("ace/mode/javascript");
+</script>
+</body>
+</html>

0 comments on commit 04c33df

Please sign in to comment.