Permalink
Browse files

A little more styling

  • Loading branch information...
1 parent 5b82ccb commit ac599c1a89f978d818a1eb1b2b668898f00ab565 @auser auser committed Jan 25, 2011
Showing with 15 additions and 9 deletions.
  1. +4 −2 public/css/master.css
  2. +3 −4 public/index.html
  3. +8 −3 public/js/app.js
View
6 public/css/master.css
@@ -16,11 +16,13 @@ body {
#output {
margin: 10px;
+ padding: 20px;
+ background: #aaaaaa;
+ height: 50%;
}
#stdout {
- background: #eee;
}
#stderr {
- color: red;
+ color: #990000;
}
View
7 public/index.html
@@ -16,18 +16,17 @@
<div id="input">
<textarea id="rubycode" rows="8" cols="40">
-#!/usr/bin/ruby
-# Go ahead, type some ruby in here
-puts "Hello"
+# This is a comment
</textarea>
<button id="run">Run</button>
</div>
<div id="output">
<div id="stdout">
+ &nbsp;
</div>
-
<div id="stderr">
+ &nbsp;
</div>
</div>
</body>
View
11 public/js/app.js
@@ -18,21 +18,26 @@ function submitRubyCode(editor) {
}
$(document).ready(function() {
+ var docWidth = $("body").width();
+
var editor = CodeMirror.fromTextArea('rubycode', {
parserfile: ["../../js/tokenizeruby.js", "../../js/parseruby.js"],
stylesheet: "css/rubycolors.css",
path: "codemirror/js/",
lineNumbers: true,
textWrapping: false,
indentUnit: 2,
- indentUnit: 4,
+ tabMode: "indent",
content: $('#rubycode').val(),
parserConfig: {},
- width: '500px',
- height: '30%',
+ width: docWidth,
+ height: '50%',
iframeClass: 'editor-window',
autoMatchParens: true
});
+
+ // Set the output width
+ $("#output").width = docWidth;
$("#input button").click(function(e) {
clearOutputs();

0 comments on commit ac599c1

Please sign in to comment.