Skip to content
Browse files

Changes for semantic pedantry

  • Loading branch information...
1 parent 7f460da commit 9b4cf43c3bb9f4c253e3286bdffbe7f7d29b760d @fengb committed
Showing with 22 additions and 22 deletions.
  1. +12 −12 app/assets/javascripts/tilde.js
  2. +9 −9 app/assets/stylesheets/tilde.css
  3. +1 −1 app/views/tilde/_console.html.erb
View
24 app/assets/javascripts/tilde.js
@@ -3,11 +3,11 @@
//= require jquery_ujs
$(function () {
- var jqconsole = $('#console').jqconsole('', '>> ');
+ var tildeconsole = $('tilde').jqconsole('', '>> ');
var startPrompt = function () {
- jqconsole.Prompt(true, function (input) {
+ tildeconsole.Prompt(true, function (input) {
if (input == "clear") {
- jqconsole.Reset();
+ tildeconsole.Reset();
startPrompt();
} else {
$.ajax({
@@ -20,29 +20,29 @@ $(function () {
type: 'post',
dataType: 'json',
success: function(e) {
- jqconsole.Write(e.response + '\n', 'jqconsole-output');
+ tildeconsole.Write(e.response + '\n', 'jqconsole-output');
startPrompt();
},
failure: function(e) {
- jqconsole.Write('There was an error with your request' + '\n', 'jqconsole-output');
+ tildeconsole.Write('There was an error with your request' + '\n', 'jqconsole-output');
}
- });
+ });
}
});
};
startPrompt();
-
+
var open = false;
$(document).keydown(function(e){
- if (e.keyCode == 192) {
+ if (e.keyCode == 192) {
open = !open
- $('#console').animate({
+ $('tilde').animate({
top: open ? "0" : "-505"
});
- jqconsole.Focus();
+ tildeconsole.Focus();
return false;
}
});
-
-});
+
+});
View
18 app/assets/stylesheets/tilde.css
@@ -1,7 +1,7 @@
/*
*/
-#console {
+#tilde {
position: absolute;
font-family: monospace;
font-size: 14px;
@@ -11,11 +11,11 @@
border-bottom: 5px solid red;
top: -505px;
}
-.jqconsole { padding: 10px; }
-.jqconsole-cursor { background-color: gray; }
-.jqconsole-blurred .jqconsole-cursor { background-color: #666; }
-.jqconsole-prompt { color: #0d0; }
-.jqconsole-old-prompt { color: #0b0; font-weight: normal; }
-.jqconsole-input { color: #dd0; }
-.jqconsole-old-input { color: #bb0; font-weight: normal; }
-.jqconsole-output { white-space: pre-wrap; color: white; }
+#tilde .jqconsole { padding: 10px; }
+#tilde .jqconsole-cursor { background-color: gray; }
+#tilde .jqconsole-blurred .jqconsole-cursor { background-color: #666; }
+#tilde .jqconsole-prompt { color: #0d0; }
+#tilde .jqconsole-old-prompt { color: #0b0; font-weight: normal; }
+#tilde .jqconsole-input { color: #dd0; }
+#tilde .jqconsole-old-input { color: #bb0; font-weight: normal; }
+#tilde .jqconsole-output { white-space: pre-wrap; color: white; }
View
2 app/views/tilde/_console.html.erb
@@ -1 +1 @@
-<div id="console"></div>
+<div id="tilde"></div>

0 comments on commit 9b4cf43

Please sign in to comment.
Something went wrong with that request. Please try again.