Remove old sinatra app

openid
Marcin Kulik 13 years ago
parent ff27319239
commit b7535ac913

4
.gitignore vendored

@ -1,4 +0,0 @@
*.sqlite3
*.rbc
public/system/*
.rvmrc

@ -1,13 +0,0 @@
source :rubygems
gem 'bundler'
gem 'sinatra'
gem 'dm-core'
gem 'dm-timestamps'
gem 'dm-migrations'
gem 'dm-validations'
gem 'dm-serializer'
gem 'dm-sqlite-adapter'
gem 'dm-postgres-adapter'
gem "dm-paperclip"
gem 'require_relative'

@ -1,85 +0,0 @@
GEM
remote: http://rubygems.org/
specs:
addressable (2.2.4)
data_objects (0.10.3)
addressable (~> 2.1)
datamapper (1.0.2)
dm-aggregates (= 1.0.2)
dm-constraints (= 1.0.2)
dm-core (= 1.0.2)
dm-migrations (= 1.0.2)
dm-serializer (= 1.0.2)
dm-timestamps (= 1.0.2)
dm-transactions (= 1.0.2)
dm-types (= 1.0.2)
dm-validations (= 1.0.2)
dm-aggregates (1.0.2)
dm-core (~> 1.0.2)
dm-constraints (1.0.2)
dm-core (~> 1.0.2)
dm-migrations (~> 1.0.2)
dm-core (1.0.2)
addressable (~> 2.2)
extlib (~> 0.9.15)
dm-do-adapter (1.0.2)
data_objects (~> 0.10.2)
dm-core (~> 1.0.2)
dm-migrations (1.0.2)
dm-core (~> 1.0.2)
dm-paperclip (2.4.1)
datamapper
extlib
dm-postgres-adapter (1.0.2)
dm-do-adapter (~> 1.0.2)
do_postgres (~> 0.10.2)
dm-serializer (1.0.2)
dm-core (~> 1.0.2)
fastercsv (~> 1.5.3)
json_pure (~> 1.4)
dm-sqlite-adapter (1.0.2)
dm-do-adapter (~> 1.0.2)
do_sqlite3 (~> 0.10.2)
dm-timestamps (1.0.2)
dm-core (~> 1.0.2)
dm-transactions (1.0.2)
dm-core (~> 1.0.2)
dm-types (1.0.2)
dm-core (~> 1.0.2)
fastercsv (~> 1.5.3)
json_pure (~> 1.4)
stringex (~> 1.1.0)
uuidtools (~> 2.1.1)
dm-validations (1.0.2)
dm-core (~> 1.0.2)
do_postgres (0.10.3)
data_objects (= 0.10.3)
do_sqlite3 (0.10.3)
data_objects (= 0.10.3)
extlib (0.9.15)
fastercsv (1.5.4)
json_pure (1.5.1)
rack (1.2.1)
require_relative (0.0.1)
sinatra (1.2.0)
rack (~> 1.1)
tilt (>= 1.2.2, < 2.0)
stringex (1.1.0)
tilt (1.2.2)
uuidtools (2.1.2)
PLATFORMS
ruby
DEPENDENCIES
bundler
dm-core
dm-migrations
dm-paperclip
dm-postgres-adapter
dm-serializer
dm-sqlite-adapter
dm-timestamps
dm-validations
require_relative
sinatra

@ -1,68 +0,0 @@
APP_ROOT = File.dirname(__FILE__)
require_relative 'config/init'
require_relative 'app/models'
set :root, File.dirname(__FILE__)
set :static, true
set :views, File.join(APP_ROOT, 'app', 'views')
helpers do
def player_data(movie)
data = File.read(movie.typescript.path).split("\n",2)[1]
time = File.read(movie.timing.path)
chars = "'" + data.bytes.map { |b| '\x' + format('%02x', b) }.join('') + "'";
formatted_time = '[' + time.split("\n").map { |line| delay, n = line.split; '[' + delay.to_f.to_s + ',' + n.to_i.to_s + ']'}.join(',') + ']'
out = "<script>\n"
out << "var data = #{chars};\n"
out << "var time = #{formatted_time};\n"
out << "var cols = #{movie.terminal_cols};\n"
out << "var lines = #{movie.terminal_lines};\n"
out << "</script>"
out
end
end
def make_paperclip_mash(file_hash)
mash = Mash.new
mash['tempfile'] = file_hash[:tempfile]
mash['filename'] = file_hash[:filename]
mash['content_type'] = file_hash[:type]
mash['size'] = file_hash[:tempfile].size
mash
end
get %r{/(?<id>\d+)} do
@movie = Movie.get(params[:id]) or pass
erb :show
end
get '/' do
@movies = Movie.all(:order => :created_at.desc)
erb :index
end
get '/about' do
erb :about
end
post '/scripts' do
movie = Movie.new(
:terminal_cols => params[:terminal_cols],
:terminal_lines => params[:terminal_lines],
:typescript => make_paperclip_mash(params[:typescript]),
:timing => make_paperclip_mash(params[:timing])
)
if movie.save
response.status = 201
content_type = :json
movie.to_json
else
response.status = 422
content_type = :json
movie.errors.to_json
end
end

@ -1,32 +0,0 @@
class Movie
include DataMapper::Resource
include Paperclip::Resource
property :id, Serial
property :name, String
property :typescript_file_name, String, :required => true, :length => 256
property :typescript_content_type, String, :length => 128
property :typescript_file_size, Integer
property :typescript_updated_at, DateTime
property :timing_file_name, String, :required => true, :length => 256
property :timing_content_type, String, :length => 128
property :timing_file_size, Integer
property :timing_updated_at, DateTime
property :terminal_type, String
property :terminal_cols, Integer, :required => true
property :terminal_lines, Integer, :required => true
timestamps :at
has_attached_file :typescript, :path => "#{APP_ROOT}/public/system/:attachment/:id"
has_attached_file :timing, :path => "#{APP_ROOT}/public/system/:attachment/:id"
validates_attachment_presence :typescript
validates_attachment_presence :timing
end
DataMapper.setup(:default, ENV['DATABASE_URL'] || "sqlite3://#{File.expand_path(File.join(APP_ROOT, 'db', 'db.sqlite3'))}")

@ -1,9 +0,0 @@
<h2>Ansi.tv</h2>
<ul class="movies">
<% @movies.each do |movie| %>
<li class="movie">
<a href="/<%= movie.id %>"><%= movie.id %></a>
</li>
<% end %>
</ul>

@ -1,31 +0,0 @@
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js" type="text/javascript"></script>
<script src="/javascripts/utf8.js" type="text/javascript"></script>
<script src="/javascripts/misc.js" type="text/javascript"></script>
<script src="/javascripts/player.js" type="text/javascript"></script>
<script src="/javascripts/ansi-interpreter.js" type="text/javascript"></script>
<script src="/javascripts/terminal.js" type="text/javascript"></script>
<link rel="stylesheet" href="/stylesheets/reset.css" />
<link rel="stylesheet" href="/stylesheets/main.css" />
</head>
<body>
<div id="all">
<div id="top">
<div id="logo">
<h1>t3rm.tv</h1>
</div>
<div id="menu">
<ul class="links">
<li>Sign in</li>
<li>Sign up</li>
</ul>
</div>
</div>
<div id="main">
<%= yield %>
<div class="clear"></div>
</div>
</div>
</body>
</html>

@ -1,16 +0,0 @@
<h2>Becoming more productive with Vim (<%= @movie.id %>)</h2>
<div class="movie">
<div class="player">
<pre class="term"></pre>
<div class="hud">--------------========</div>
</div>
<div class="clear"></div>
</div>
<div class="description">
<p>Ive been doing some reflecting this week on how I can work smarter (instead of harder), and one of the things I came up with was adding a few more tools to my Vim repertoire. I spend more than half of my engineering time in Vim (the other half usually being in a web browser), so I figured that a few minutes here and there would eventually add up in a big way.</p>
<p>But like anything else with Vim, there are always multiple ways of accomplishing the very same thing, so I make no guarantees that there arent simpler ways of getting this done — but I can say that this way gets the job done, and is pretty easy to get working on your own system.</p>
</div>
<%= player_data(@movie) %>

@ -1,283 +0,0 @@
#!/usr/bin/env python
import sys
import os
import pty
import signal
import tty
import array
import termios
import fcntl
import select
import time
import json
import getopt
import subprocess
class TimedFile(object):
'''File wrapper that records write times in separate file.'''
def __init__(self, filename):
mode = 'wb'
self.data_file = open(filename, mode)
self.time_file = open(filename + '.time', mode)
self.old_time = time.time()
def close(self):
self.data_file.close()
self.time_file.close()
def write(self, data):
self.data_file.write(data)
now = time.time()
delta = now - self.old_time
self.time_file.write("%f %d\n" % (delta, len(data)))
self.old_time = now
class PtyRecorder(object):
'''Pseudo-terminal recorder.
Creates new pseudo-terminal for spawned process
and saves stdin/stderr (and timing) to files.
'''
def __init__(self, base_filename, command, record_input):
self.master_fd = None
self.base_filename = base_filename
self.command = command
self.record_input = record_input
def run(self):
self.open_files()
self.write_stdout('\n~ Asciicast recording started.\n')
success = self.spawn()
self.write_stdout('\n~ Asciicast recording finished.\n')
self.close_files()
return success
def open_files(self):
self.stdout_file = TimedFile(self.base_filename + '.stdout')
if self.record_input:
self.stdin_file = TimedFile(self.base_filename + '.stdin')
def close_files(self):
self.stdout_file.close()
if self.record_input:
self.stdin_file.close()
def spawn(self):
'''Create a spawned process.
Based on pty.spawn() from standard library.
'''
assert self.master_fd is None
pid, master_fd = pty.fork()
self.master_fd = master_fd
if pid == pty.CHILD:
os.execlp(self.command[0], *self.command)
old_handler = signal.signal(signal.SIGWINCH, self._signal_winch)
try:
mode = tty.tcgetattr(pty.STDIN_FILENO)
tty.setraw(pty.STDIN_FILENO)
restore = 1
except tty.error: # This is the same as termios.error
restore = 0
self._set_pty_size()
try:
self._copy()
except (IOError, OSError):
if restore:
tty.tcsetattr(pty.STDIN_FILENO, tty.TCSAFLUSH, mode)
os.close(master_fd)
self.master_fd = None
signal.signal(signal.SIGWINCH, old_handler)
return True
def _signal_winch(self, signal, frame):
'''Signal handler for SIGWINCH - window size has changed.'''
self._set_pty_size()
def _set_pty_size(self):
'''
Sets the window size of the child pty based on the window size
of our own controlling terminal.
'''
assert self.master_fd is not None
# Get the terminal size of the real terminal, set it on the pseudoterminal.
buf = array.array('h', [0, 0, 0, 0])
fcntl.ioctl(pty.STDOUT_FILENO, termios.TIOCGWINSZ, buf, True)
fcntl.ioctl(self.master_fd, termios.TIOCSWINSZ, buf)
def _copy(self):
'''Main select loop.
Passes control to self.master_read() or self.stdin_read()
when new data arrives.
'''
assert self.master_fd is not None
master_fd = self.master_fd
while 1:
try:
rfds, wfds, xfds = select.select([master_fd, pty.STDIN_FILENO], [], [])
except select.error, e:
if e[0] == 4: # Interrupted system call.
continue
if master_fd in rfds:
data = os.read(self.master_fd, 1024)
self.handle_master_read(data)
if pty.STDIN_FILENO in rfds:
data = os.read(pty.STDIN_FILENO, 1024)
self.handle_stdin_read(data)
def handle_master_read(self, data):
'''Handles new data on child process stdout.'''
self.write_stdout(data)
self.stdout_file.write(data)
def handle_stdin_read(self, data):
'''Handles new data on child process stdin.'''
self.write_master(data)
if self.record_input:
self.stdin_file.write(data)
def write_stdout(self, data):
'''Writes to stdout as if the child process had written the data.'''
os.write(pty.STDOUT_FILENO, data)
def write_master(self, data):
'''Writes to the child process from its controlling terminal.'''
master_fd = self.master_fd
assert master_fd is not None
while data != '':
n = os.write(master_fd, data)
data = data[n:]
class AsciiCast(object):
'''Asciicast model.
Manages recording and uploading of asciicast.
'''
def __init__(self, command, title=None, record_input=False):
self.base_filename = str(int(time.time()))
self.command = command
self.title = title
self.record_input = record_input
def create(self):
ret = self.record()
if ret:
self.write_metadata()
self.upload()
def record(self):
rec = PtyRecorder(self.base_filename, self.command, self.record_input)
return rec.run()
def write_metadata(self):
info_file = open(self.base_filename + '.json', 'wb')
json_data = {
'title': self.title,
'command': ' '.join(self.command),
'term': {
'type': os.environ['TERM'],
'lines': int(self.get_output(['tput', 'lines'])),
'columns': int(self.get_output(['tput', 'cols'])),
},
'shell': os.environ['SHELL'],
'uname': self.get_output(['uname', '-osrvp'])
}
json_string = json.dumps(json_data, sort_keys=True, indent=2)
info_file.write(json_string + '\n')
info_file.close()
def get_output(self, args):
process = subprocess.Popen(args, stdout=subprocess.PIPE)
return process.communicate()[0].strip()
def upload(self):
up = Uploader(self.base_filename)
up.upload()
pass
class Uploader(object):
'''Asciicast uploader.
Uploads recorded script to website using HTTP based API.
'''
def __init__(self, base_filename):
self.base_filename = base_filename
def upload(self):
print 'uploadin'
def main():
'''Parses command-line options and creates asciicast.'''
try:
opts, args = getopt.getopt(sys.argv[1:], 'c:t:ih', ['help'])
except getopt.error as msg:
print('%s: %s' % (sys.argv[0], msg))
print('Run "%s --help" for list of available options' % sys.argv[0])
sys.exit(2)
command = os.environ['SHELL'].split()
title = None
record_input = False
for opt, arg in opts:
if opt in ('-h', '--help'):
usage()
sys.exit(0)
elif opt == '-c':
command = arg.split()
elif opt == '-t':
title = arg
elif opt == '-i':
record_input = True
ac = AsciiCast(command, title, record_input)
ac.create()
def usage():
text = '''usage: %s [-h] [-i] [-c <command>] [-t <title>]
Asciicast recorder+uploader.
optional arguments:
-h, --help show this help message and exit
-i record stdin (keystrokes will be shown during replay)
-c command run specified command instead of shell ($SHELL)
-t title specify title of recorded asciicast''' % sys.argv[0]
print text
if __name__ == '__main__':
main()

@ -1,7 +0,0 @@
SCRIPT=/tmp/test.script
TIMING=/tmp/test.time
script -q -t $SCRIPT 2>$TIMING
echo "Uploading..."
curl -F terminal_cols=`tput cols` -F terminal_lines=`tput lines` -F typescript=@$SCRIPT -F timing=@$TIMING localhost:4000/scripts

@ -1,6 +0,0 @@
require "bundler/setup"
Bundler.require
require File.expand_path(File.join(File.dirname(__FILE__), "app"))
run Sinatra::Application

@ -1,3 +0,0 @@
Paperclip.configure do |config|
config.use_dm_validations = true
end

@ -1,183 +0,0 @@
SP.AnsiInterpreter = function(terminal) {
this.terminal = terminal;
this.compilePatterns();
}
SP.AnsiInterpreter.prototype = {
PATTERNS: {
"\x07": function(data) {
// bell
},
"\x08": function(data) {
this.terminal.bs();
},
"\x0a": function(data) {
this.terminal.cursorDown();
},
"\x0d": function(data) {
this.terminal.cr();
},
"\x0e": function(data) {
},
"\x0f": function(data) {
},
"\x82": function(data) { // Reserved (?)
},
"\x94": function(data) { // Cancel Character, ignore previous character
},
// 20 - 7e
"([\x20-\x7e]|\xe2..|[\xc5\xc4].)+": function(data, match) {
this.terminal.print(match[0]);
},
"\x1b\\(B": function(data) { // SCS (Set G0 Character SET)
},
"\x1b\\[(?:[0-9]+)?(?:;[0-9]+)*([\x40-\x7e])": function(data, match) {
this.params = [];
var re = /(\d+)/g;
var m;
while (m = re.exec(match[0])) {
this.params.push(parseInt(m[1]));
}
this.n = this.params[0];
this.m = this.params[1];
this.handleCSI(match[1]);
},
"\x1b\\[\\?([\x30-\x3f]+)([hlsr])": function(data, match) { // private standards
// h = Sets DEC/xterm specific mode (http://ttssh2.sourceforge.jp/manual/en/about/ctrlseq.html#decmode)
// l = Resets mode (http://ttssh2.sourceforge.jp/manual/en/about/ctrlseq.html#mode)
// 1001 + s = ?
// 1001 + r = ?
if (match[1] == '1049') {
if (match[2] == 'h') {
// 1049 + h = Save cursor position, switch to alternate screen buffer, and clear screen.
this.terminal.saveCursor();
this.terminal.switchToAlternateBuffer();
this.terminal.clearScreen();
} else if (match[2] == 'l') {
// 1049 + l = Clear screen, switch to normal screen buffer, and restore cursor position.
this.terminal.clearScreen();
this.terminal.switchToNormalBuffer();
this.terminal.restoreCursor();
}
} else if (match[1] == '1002') {
// 2002 + h / l = mouse tracking stuff
} else if (match[1] == '1') {
// 1 + h / l = cursor keys stuff
}
},
"\x1b\x3d": function(data) { // DECKPAM - Set keypad to applications mode (ESCape instead of digits)
},
"\x1b\x3e": function(data) { // DECKPNM - Set keypad to numeric mode (digits intead of ESCape seq)
},
"\x1b\\\x5d[012]\x3b(?:.)*?\x07": function(data, match) { // OSC - Operating System Command (terminal title)
},
"\x1b\\[>c": function(data) { // Secondary Device Attribute request (?)
},
"\x1bP([^\\\\])*?\\\\": function(data) { // DCS, Device Control String
},
"\x1b\x37": function(data) { // save cursor pos and char attrs
this.terminal.saveCursor();
},
"\x1b\x38": function(data) { // restore cursor pos and char attrs
this.terminal.restoreCursor();
}
},
handleCSI: function(term) {
switch(term) {
case "@":
this.terminal.reserveCharacters(this.n);
break;
case "A":
this.terminal.cursorUp(this.n || 1);
break;
case "B":
this.terminal.cursorDown(this.n || 1);
break;
case "C":
this.terminal.cursorForward(this.n || 1);
break;
case "D":
this.terminal.cursorBack(this.n || 1);
break;
case "H":
this.terminal.setCursorPos(this.n || 1, this.m || 1);
break;
case "J":
this.terminal.eraseData(this.n || 0);
break;
case "K":
this.terminal.eraseLine(this.n || 0);
break;
case "l": // l, Reset mode
console.log("(TODO) reset: " + this.n);
break;
case "m":
this.terminal.setSGR(this.params);
break;
case "r": // Set top and bottom margins (scroll region on VT100)
break;
default:
console.log('no handler for CSI term: ' + term);
}
},
compilePatterns: function() {
this.COMPILED_PATTERNS = [];
var regexp;
for (re in this.PATTERNS) {
regexp = new RegExp('^' + re);
this.COMPILED_PATTERNS.push([regexp, this.PATTERNS[re]]);
}
},
feed: function(data) {
var match;
var handler;
while (data.length > 0) {
match = handler = null;
for (var i=0; i<this.COMPILED_PATTERNS.length; i++) {
var pattern = this.COMPILED_PATTERNS[i];
match = pattern[0].exec(data);
if (match) {
handler = pattern[1];
break;
}
}
if (handler) {
handler.call(this, data, match);
data = data.slice(match[0].length)
} else {
return data;
}
}
return '';
}
}

@ -1,10 +0,0 @@
Function.prototype.bind = function(object) {
var func = this;
return function() {
return func.apply(object, arguments);
};
};
String.prototype.times = function(n) {
return Array.prototype.join.call({length:n+1}, this);
};

@ -1,73 +0,0 @@
var SP = {};
var speed = 1.0;
var minDelay = 0.01;
SP.Player = function(cols, lines, data, time) {
this.terminal = new SP.Terminal(cols, lines);
this.interpreter = new SP.AnsiInterpreter(this.terminal);
this.data = data;
this.time = time;
this.dataIndex = 0;
this.frame = 0;
this.currentData = "";
console.log("started");
this.nextFrame();
};
SP.Player.prototype = {
nextFrame: function() {
var timing = this.time[this.frame];
if (!timing) {
console.log("finished");
return;
}
this.terminal.restartCursorBlink();
var run = function() {
var rest = this.interpreter.feed(this.currentData);
this.terminal.renderDirtyLines();
var n = timing[1];
if (rest.length > 0)
console.log('rest: ' + rest);
this.currentData = rest + this.data.slice(this.dataIndex, this.dataIndex + n);
this.dataIndex += n;
this.frame += 1;
if (rest.length > 20) {
var s = rest.slice(0, 10);
var hex = '';
for (i=0; i<s.length; i++) {
hex += '0x' + s[i].charCodeAt(0).toString(16) + ',';
}
console.log("failed matching: '" + s + "' (" + hex + ")");
return;
}
if (!window.stopped) {
this.nextFrame();
}
}.bind(this);
if (timing[0] > minDelay) {
setTimeout(run, timing[0] * 1000 * (1.0 / speed));
} else {
run();
}
}
}
$(function() {
$(window).bind('keyup', function(event) {
if (event.keyCode == 27) {
window.stopped = true;
}
});
});
$(function() { new SP.Player(cols, lines, data, time) });

@ -1,305 +0,0 @@
SP.Terminal = function(cols, lines) {
this.cols = cols;
this.lines = lines;
this.cursorLine = 0;
this.cursorCol = 0;
this.normalBuffer = [];
this.alternateBuffer = [];
this.lineData = this.normalBuffer;
this.fg = this.bg = undefined;
this.dirtyLines = [];
this.initialize();
};
SP.Terminal.prototype = {
initialize: function() {
var container = $(".player .term");
this.element = container;
this.renderLine(0); // we only need 1 line
this.element.css({ width: this.element.width(), height: this.element.height() * this.lines });
},
getLine: function(n) {
n = (typeof n != "undefined" ? n : this.cursorLine);
var line = this.lineData[n];
if (typeof line == 'undefined') {
line = this.lineData[n] = [];
this.fill(n, 0, this.cols, ' ');
}
return line;
},
clearScreen: function() {
this.lineData.length = 0;
this.cursorLine = this.cursorCol = 0;
this.element.empty();
},
switchToNormalBuffer: function() {
this.lineData = this.normalBuffer;
this.updateScreen();
},
switchToAlternateBuffer: function() {
this.lineData = this.alternateBuffer;
this.updateScreen();
},
renderLine: function(n) {
var html = this.getLine(n);
if (n == this.cursorLine) {
html = html.slice(0, this.cursorCol).concat(['<span class="cursor">' + (html[this.cursorCol] || '') + "</span>"], html.slice(this.cursorCol + 1) || []);
}
var missingLines = this.lineData.length - this.element.find('.line').length;
for (var i = 0; i < missingLines; i++) {
var row = $('<span class="line">');
this.element.append(row);
this.element.append("\n");
this.element.scrollTop(100000);//row.offset().top);
}
this.element.find(".line:eq(" + n + ")").html(html.join(''));
},
renderDirtyLines: function() {
var updated = [];
for (var i=0; i<this.dirtyLines.length; i++) {
var n = this.dirtyLines[i];
if (updated.indexOf(n) == -1) {
this.renderLine(n);
updated.push(n);
}
}
this.dirtyLines = [];
},
updateLine: function(n) {
n = (typeof n != "undefined" ? n : this.cursorLine);
this.dirtyLines.push(n);
},
updateScreen: function() {
this.dirtyLines = [];
for (var l=0; l<this.lineData.length; l++) {
this.dirtyLines.push(l);
}
},
setSGR: function(codes) {
if (codes.length == 0) {
codes = [0];
}
for (var i=0; i<codes.length; i++) {
var n = codes[i];
if (n === 0) {
this.fg = this.bg = undefined;
this.bright = false;
} else if (n == 1) {
this.bright = true;
} else if (n >= 30 && n <= 37) {
this.fg = n - 30;
} else if (n >= 40 && n <= 47) {
this.bg = n - 40;
} else if (n == 38) {
this.fg = codes[i+2];
i += 2;
} else if (n == 48) {
this.bg = codes[i+2];
i += 2;
}
}
},
setCursorPos: function(line, col) {
line -= 1;
col -= 1;
var oldLine = this.cursorLine;
this.cursorLine = line;
this.cursorCol = col;
this.updateLine(oldLine);
this.updateLine();
},
saveCursor: function() {
this.savedCol = this.cursorCol;
this.savedLine = this.cursorLine;
},
restoreCursor: function() {
var oldLine = this.cursorLine;
this.cursorLine = this.savedLine;
this.cursorCol = this.savedCol;
this.updateLine(oldLine);
this.updateLine();
},
cursorLeft: function() {
if (this.cursorCol > 0) {
this.cursorCol -= 1;
this.updateLine();
}
},
cursorRight: function() {
if (this.cursorCol < this.cols) {
this.cursorCol += 1;
this.updateLine();
}
},
cursorUp: function() {
if (this.cursorLine > 0) {
this.cursorLine -= 1;
this.updateLine(this.cursorLine);
this.updateLine(this.cursorLine+1);
}
},
cursorDown: function() {
this.cursorLine += 1;
this.updateLine(this.cursorLine);
this.updateLine(this.cursorLine-1);
},
cursorForward: function(n) {
for (var i=0; i<n; i++) this.cursorRight();
},
cursorBack: function(n) {
for (var i=0; i<n; i++) this.cursorLeft();
},
cr: function() {
this.cursorCol = 0;
this.updateLine();
},
bs: function() {
if (this.cursorCol > 0) {
this.getLine()[this.cursorCol - 1] = ' ';
this.cursorCol -= 1;
this.updateLine();
}
},
print: function(text) {
text = Utf8.decode(text);
for (var i=0; i<text.length; i++) {
if (this.cursorCol >= this.cols) {
this.cursorLine += 1;
this.cursorCol = 0;
}
this.fill(this.cursorLine, this.cursorCol, 1, text[i]);
this.cursorCol += 1;
}
this.updateLine();
},
eraseData: function(n) {
if (n == 0) {
this.eraseLine(0);
for (var l=this.cursorLine+1; l<this.lineData.length; l++) {
this.lineData[l] = [];
this.updateLine(l);
}
} else if (n == 1) {
for (var l=0; l<this.cursorLine; l++) {
this.lineData[l] = [];
this.updateLine(l);
}
this.eraseLine(n);
} else if (n == 2) {
for (var l=0; l<this.lineData.length; l++) {
this.lineData[l] = [];
this.updateLine(l);
}
}
},
eraseLine: function(n) {
if (n == 0) {
this.fill(this.cursorLine, this.cursorCol, this.cols - this.cursorCol, ' ');
// this.lineData[this.cursorLine] = this.lineData[this.cursorLine].slice(0, this.cursorCol);
// this.lineData[this.cursorLine] = this.lineData[this.cursorLine].slice(0, this.cursorCol) + " ".times(this.cols - this.cursorCol);
this.updateLine();
} else if (n == 1) {
this.fill(this.cursorLine, 0, this.cursorCol, ' ');
// this.lineData[this.cursorLine] = " ".times(this.cursorCol).split('').concat(this.lineData[this.cursorLine].slice(this.cursorCol));
// this.lineData[this.cursorLine] = " ".times(this.cursorCol) + this.lineData[this.cursorLine].slice(this.cursorCol);
this.updateLine();
} else if (n == 2) {
this.fill(this.cursorLine, 0, this.cols, ' ');
// this.lineData[this.cursorLine] = [] // " ".times(this.cols);
this.updateLine();
}
},
reserveCharacters: function(n) {
var line = this.getLine();
this.lineData[this.cursorLine] = line.slice(0, this.cursorCol).concat(" ".times(n).split(''), line.slice(this.cursorCol, this.cols - n));
this.updateLine();
},
fill: function(line, col, n, char) {
var prefix = '', postfix = '';
if (this.fg !== undefined || this.bg !== undefined || this.bright) {
prefix = '<span class="';
var brightOffset = this.bright ? 8 : 0;
if (this.fg !== undefined) {
prefix += ' fg' + (this.fg + brightOffset);
} else if (this.bright) {
prefix += ' bright';
}
if (this.bg !== undefined) {
prefix += ' bg' + this.bg;
}
prefix += '">';
postfix = '</span>';
}
var char = prefix + char + postfix;
var lineArr = this.getLine(line);
for (var i=0; i<n; i++) {
lineArr[col+i] = char;
}
},
blinkCursor: function() {
var cursor = this.element.find(".cursor");
if (cursor.hasClass("inverted")) {
cursor.removeClass("inverted");
} else {
cursor.addClass("inverted");
}
},
restartCursorBlink: function() {
if (this.cursorTimerId) {
clearInterval(this.cursorTimerId);
this.cursorTimerId = null;
}
this.cursorTimerId = setInterval(this.blinkCursor.bind(this), 500);
}
};

@ -1,68 +0,0 @@
/**
*
* UTF-8 data encode / decode
* http://www.webtoolkit.info/
*
**/
var Utf8 = {
// public method for url encoding
encode : function (string) {
string = string.replace(/\r\n/g,"\n");
var utftext = "";
for (var n = 0; n < string.length; n++) {
var c = string.charCodeAt(n);
if (c < 128) {
utftext += String.fromCharCode(c);
}
else if((c > 127) && (c < 2048)) {
utftext += String.fromCharCode((c >> 6) | 192);
utftext += String.fromCharCode((c & 63) | 128);
}
else {
utftext += String.fromCharCode((c >> 12) | 224);
utftext += String.fromCharCode(((c >> 6) & 63) | 128);
utftext += String.fromCharCode((c & 63) | 128);
}
}
return utftext;
},
// public method for url decoding
decode : function (utftext) {
var string = "";
var i = 0;
var c = c1 = c2 = 0;
while ( i < utftext.length ) {
c = utftext.charCodeAt(i);
if (c < 128) {
string += String.fromCharCode(c);
i++;
}
else if((c > 191) && (c < 224)) {
c2 = utftext.charCodeAt(i+1);
string += String.fromCharCode(((c & 31) << 6) | (c2 & 63));
i += 2;
}
else {
c2 = utftext.charCodeAt(i+1);
c3 = utftext.charCodeAt(i+2);
string += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63));
i += 3;
}
}
return string;
}
}

@ -1,631 +0,0 @@
.clear {
clear: both;
display: block;
visibility: hidden;
}
body {
background-color: #E7E7DE;
margin: 0;
padding: 0;
}
body, div, p {
font-family: arial, helvetica;
font-size: 12px;
}
/* 325A66 */
/* DEA140 */
/* A32B26 */
/* 590D0B */
h1 {
color: #3e3e3e;
font-family: 'Trebuchet MS';
font-size: 42px;
padding: 15px 0;
}
h2 {
color: #3e3e3e;
font-family: 'Trebuchet MS';
font-size: 26px;
padding: 15px 15px 40px 15px;
}
#top {
position: relative;
height: 80px;
}
#logo {
display: block;
width: 300px;
position: absolute;
top: 0;
left: 0;
}
#menu {
display: block;
width: 300px;
position: absolute;
top: 0;
right: 0;
font-size: 11px;
font-family: Verdana;
}
#menu .links {
background-color: #172322;
list-style: none;
padding: 10px;
border-bottom-left-radius: 10px;
}
#menu .links li {
color: #eee;
display: inline-block;
margin-right: 20px;
}
#all {
margin: 0 auto;
width: 980px;
text-align: left;
}
#main {
background-color: white;
width: 980px;
font-size: 11px;
border-top-left-radius: 10px;
}
.player {
/* border: 1px solid #777;*/
/* background-color: #333;*/
float: left;
display: block;
padding: 0px;
margin: 0px 0px 30px 20px;
position: relative;
}
.term {
padding: 2px;
margin: 0px;
display: block;
font-family: 'Droid Sans Mono', Monospace;
white-space: pre;
background-color: black;
line-height: 1.2em;
color: #ccc;
overflow: auto;
overflow-x: hidden;
}
.term .line {
font-size: 12px;
/* background-color: black;*/
/* padding: 0;*/
/* margin: 0;*/
}
.line span.cursor, .line .cursor > span {
background-color: #D3D7CF;
}
.line span.cursor.inverted, .line .cursor.inverted > span {
background-color: inherit;
}
.hud {
background-color: #333;
opacity: 0.85;
position: absolute;
left: 20px;
right: 20px;
bottom: 10px;
display: none;
height: 30px;
color: white;
}
.player:hover .hud {
display: block;
}
.bright { font-weight: bold }
/* Foregrounds: */
/* ansi colors */
.fg0 { color: #000000 }
.fg1 { color: #CC0000 }
.fg2 { color: #4E9A06 }
.fg3 { color: #C4A000 }
.fg4 { color: #3465A4 }
.fg5 { color: #75507B }
.fg6 { color: #06989A }
.fg7 { color: #D3D7CF }
.fg8 { color: #555753; font-weight: bold }
.fg9 { color: #EF2929; font-weight: bold }
.fg10 { color: #8AE234; font-weight: bold }
.fg11 { color: #FCE94F; font-weight: bold }
.fg12 { color: #729FCF; font-weight: bold }
.fg13 { color: #AD7FA8; font-weight: bold }
.fg14 { color: #34E2E2; font-weight: bold }
.fg15 { color: #EEEEEC; font-weight: bold }
/* rgb 256 colors */
.fg16 { color: #000000 }
.fg17 { color: #000033 }
.fg18 { color: #000066 }
.fg19 { color: #000099 }
.fg20 { color: #0000cc }
.fg21 { color: #0000ff }
.fg22 { color: #003300 }
.fg23 { color: #003333 }
.fg24 { color: #003366 }
.fg25 { color: #003399 }
.fg26 { color: #0033cc }
.fg27 { color: #0033ff }
.fg28 { color: #006600 }
.fg29 { color: #006633 }
.fg30 { color: #006666 }
.fg31 { color: #006699 }
.fg32 { color: #0066cc }
.fg33 { color: #0066ff }
.fg34 { color: #009900 }
.fg35 { color: #009933 }
.fg36 { color: #009966 }
.fg37 { color: #009999 }
.fg38 { color: #0099cc }
.fg39 { color: #0099ff }
.fg40 { color: #00cc00 }
.fg41 { color: #00cc33 }
.fg42 { color: #00cc66 }
.fg43 { color: #00cc99 }
.fg44 { color: #00cccc }
.fg45 { color: #00ccff }
.fg46 { color: #00ff00 }
.fg47 { color: #00ff33 }
.fg48 { color: #00ff66 }
.fg49 { color: #00ff99 }
.fg50 { color: #00ffcc }
.fg51 { color: #00ffff }
.fg52 { color: #330000 }
.fg53 { color: #330033 }
.fg54 { color: #330066 }
.fg55 { color: #330099 }
.fg56 { color: #3300cc }
.fg57 { color: #3300ff }
.fg58 { color: #333300 }
.fg59 { color: #333333 }
.fg60 { color: #333366 }
.fg61 { color: #333399 }
.fg62 { color: #3333cc }
.fg63 { color: #3333ff }
.fg64 { color: #336600 }
.fg65 { color: #336633 }
.fg66 { color: #336666 }
.fg67 { color: #336699 }
.fg68 { color: #3366cc }
.fg69 { color: #3366ff }
.fg70 { color: #339900 }
.fg71 { color: #339933 }
.fg72 { color: #339966 }
.fg73 { color: #339999 }
.fg74 { color: #3399cc }
.fg75 { color: #3399ff }
.fg76 { color: #33cc00 }
.fg77 { color: #33cc33 }
.fg78 { color: #33cc66 }
.fg79 { color: #33cc99 }
.fg80 { color: #33cccc }
.fg81 { color: #33ccff }
.fg82 { color: #33ff00 }
.fg83 { color: #33ff33 }
.fg84 { color: #33ff66 }
.fg85 { color: #33ff99 }
.fg86 { color: #33ffcc }
.fg87 { color: #33ffff }
.fg88 { color: #660000 }
.fg89 { color: #660033 }
.fg90 { color: #660066 }
.fg91 { color: #660099 }
.fg92 { color: #6600cc }
.fg93 { color: #6600ff }
.fg94 { color: #663300 }
.fg95 { color: #663333 }
.fg96 { color: #663366 }
.fg97 { color: #663399 }
.fg98 { color: #6633cc }
.fg99 { color: #6633ff }
.fg100 { color: #666600 }
.fg101 { color: #666633 }
.fg102 { color: #666666 }
.fg103 { color: #666699 }
.fg104 { color: #6666cc }
.fg105 { color: #6666ff }
.fg106 { color: #669900 }
.fg107 { color: #669933 }
.fg108 { color: #669966 }
.fg109 { color: #669999 }
.fg110 { color: #6699cc }
.fg111 { color: #6699ff }
.fg112 { color: #66cc00 }
.fg113 { color: #66cc33 }
.fg114 { color: #66cc66 }
.fg115 { color: #66cc99 }
.fg116 { color: #66cccc }
.fg117 { color: #66ccff }
.fg118 { color: #66ff00 }
.fg119 { color: #66ff33 }
.fg120 { color: #66ff66 }
.fg121 { color: #66ff99 }
.fg122 { color: #66ffcc }
.fg123 { color: #66ffff }
.fg124 { color: #990000 }
.fg125 { color: #990033 }
.fg126 { color: #990066 }
.fg127 { color: #990099 }
.fg128 { color: #9900cc }
.fg129 { color: #9900ff }
.fg130 { color: #993300 }
.fg131 { color: #993333 }
.fg132 { color: #993366 }
.fg133 { color: #993399 }
.fg134 { color: #9933cc }
.fg135 { color: #9933ff }
.fg136 { color: #996600 }
.fg137 { color: #996633 }
.fg138 { color: #996666 }
.fg139 { color: #996699 }
.fg140 { color: #9966cc }
.fg141 { color: #9966ff }
.fg142 { color: #999900 }
.fg143 { color: #999933 }
.fg144 { color: #999966 }
.fg145 { color: #999999 }
.fg146 { color: #9999cc }
.fg147 { color: #9999ff }
.fg148 { color: #99cc00 }
.fg149 { color: #99cc33 }
.fg150 { color: #99cc66 }
.fg151 { color: #99cc99 }
.fg152 { color: #99cccc }
.fg153 { color: #99ccff }
.fg154 { color: #99ff00 }
.fg155 { color: #99ff33 }
.fg156 { color: #99ff66 }
.fg157 { color: #99ff99 }
.fg158 { color: #99ffcc }
.fg159 { color: #99ffff }
.fg160 { color: #cc0000 }
.fg161 { color: #cc0033 }
.fg162 { color: #cc0066 }
.fg163 { color: #cc0099 }
.fg164 { color: #cc00cc }
.fg165 { color: #cc00ff }
.fg166 { color: #cc3300 }
.fg167 { color: #cc3333 }
.fg168 { color: #cc3366 }
.fg169 { color: #cc3399 }
.fg170 { color: #cc33cc }
.fg171 { color: #cc33ff }
.fg172 { color: #cc6600 }
.fg173 { color: #cc6633 }
.fg174 { color: #cc6666 }
.fg175 { color: #cc6699 }
.fg176 { color: #cc66cc }
.fg177 { color: #cc66ff }
.fg178 { color: #cc9900 }
.fg179 { color: #cc9933 }
.fg180 { color: #cc9966 }
.fg181 { color: #cc9999 }
.fg182 { color: #cc99cc }
.fg183 { color: #cc99ff }
.fg184 { color: #cccc00 }
.fg185 { color: #cccc33 }
.fg186 { color: #cccc66 }
.fg187 { color: #cccc99 }
.fg188 { color: #cccccc }
.fg189 { color: #ccccff }
.fg190 { color: #ccff00 }
.fg191 { color: #ccff33 }
.fg192 { color: #ccff66 }
.fg193 { color: #ccff99 }
.fg194 { color: #ccffcc }
.fg195 { color: #ccffff }
.fg196 { color: #ff0000 }
.fg197 { color: #ff0033 }
.fg198 { color: #ff0066 }
.fg199 { color: #ff0099 }
.fg200 { color: #ff00cc }
.fg201 { color: #ff00ff }
.fg202 { color: #ff3300 }
.fg203 { color: #ff3333 }
.fg204 { color: #ff3366 }
.fg205 { color: #ff3399 }
.fg206 { color: #ff33cc }
.fg207 { color: #ff33ff }
.fg208 { color: #ff6600 }
.fg209 { color: #ff6633 }
.fg210 { color: #ff6666 }
.fg211 { color: #ff6699 }
.fg212 { color: #ff66cc }
.fg213 { color: #ff66ff }
.fg214 { color: #ff9900 }
.fg215 { color: #ff9933 }
.fg216 { color: #ff9966 }
.fg217 { color: #ff9999 }
.fg218 { color: #ff99cc }
.fg219 { color: #ff99ff }
.fg220 { color: #ffcc00 }
.fg221 { color: #ffcc33 }
.fg222 { color: #ffcc66 }
.fg223 { color: #ffcc99 }
.fg224 { color: #ffcccc }
.fg225 { color: #ffccff }
.fg226 { color: #ffff00 }
.fg227 { color: #ffff33 }
.fg228 { color: #ffff66 }
.fg229 { color: #ffff99 }
.fg230 { color: #ffffcc }
.fg231 { color: #ffffff }
/* Backgrounds: */
/* ansi colors */
.bg0 { background-color: #000000 }
.bg1 { background-color: #CC0000 }
.bg2 { background-color: #4E9A06 }
.bg3 { background-color: #C4A000 }
.bg4 { background-color: #3465A4 }
.bg5 { background-color: #75507B }
.bg6 { background-color: #06989A }
.bg7 { background-color: #D3D7CF }
.bg8 { background-color: #555753 }
.bg9 { background-color: #EF2929 }
.bg10 { background-color: #8AE234 }
.bg11 { background-color: #FCE94F }
.bg12 { background-color: #729FCF }
.bg13 { background-color: #AD7FA8 }
.bg14 { background-color: #34E2E2 }
.bg15 { background-color: #EEEEEC }
/* rgb 256 colors */
.bg16 { background-color: #000000 }
.bg17 { background-color: #000033 }
.bg18 { background-color: #000066 }
.bg19 { background-color: #000099 }
.bg20 { background-color: #0000cc }
.bg21 { background-color: #0000ff }
.bg22 { background-color: #003300 }
.bg23 { background-color: #003333 }
.bg24 { background-color: #003366 }
.bg25 { background-color: #003399 }
.bg26 { background-color: #0033cc }
.bg27 { background-color: #0033ff }
.bg28 { background-color: #006600 }
.bg29 { background-color: #006633 }
.bg30 { background-color: #006666 }
.bg31 { background-color: #006699 }
.bg32 { background-color: #0066cc }
.bg33 { background-color: #0066ff }
.bg34 { background-color: #009900 }
.bg35 { background-color: #009933 }
.bg36 { background-color: #009966 }
.bg37 { background-color: #009999 }
.bg38 { background-color: #0099cc }
.bg39 { background-color: #0099ff }
.bg40 { background-color: #00cc00 }
.bg41 { background-color: #00cc33 }
.bg42 { background-color: #00cc66 }
.bg43 { background-color: #00cc99 }
.bg44 { background-color: #00cccc }
.bg45 { background-color: #00ccff }
.bg46 { background-color: #00ff00 }
.bg47 { background-color: #00ff33 }
.bg48 { background-color: #00ff66 }
.bg49 { background-color: #00ff99 }
.bg50 { background-color: #00ffcc }
.bg51 { background-color: #00ffff }
.bg52 { background-color: #330000 }
.bg53 { background-color: #330033 }
.bg54 { background-color: #330066 }
.bg55 { background-color: #330099 }
.bg56 { background-color: #3300cc }
.bg57 { background-color: #3300ff }
.bg58 { background-color: #333300 }
.bg59 { background-color: #333333 }
.bg60 { background-color: #333366 }
.bg61 { background-color: #333399 }
.bg62 { background-color: #3333cc }
.bg63 { background-color: #3333ff }
.bg64 { background-color: #336600 }
.bg65 { background-color: #336633 }
.bg66 { background-color: #336666 }
.bg67 { background-color: #336699 }
.bg68 { background-color: #3366cc }
.bg69 { background-color: #3366ff }
.bg70 { background-color: #339900 }
.bg71 { background-color: #339933 }
.bg72 { background-color: #339966 }
.bg73 { background-color: #339999 }
.bg74 { background-color: #3399cc }
.bg75 { background-color: #3399ff }
.bg76 { background-color: #33cc00 }
.bg77 { background-color: #33cc33 }
.bg78 { background-color: #33cc66 }
.bg79 { background-color: #33cc99 }
.bg80 { background-color: #33cccc }
.bg81 { background-color: #33ccff }
.bg82 { background-color: #33ff00 }
.bg83 { background-color: #33ff33 }
.bg84 { background-color: #33ff66 }
.bg85 { background-color: #33ff99 }
.bg86 { background-color: #33ffcc }
.bg87 { background-color: #33ffff }
.bg88 { background-color: #660000 }
.bg89 { background-color: #660033 }
.bg90 { background-color: #660066 }
.bg91 { background-color: #660099 }
.bg92 { background-color: #6600cc }
.bg93 { background-color: #6600ff }
.bg94 { background-color: #663300 }
.bg95 { background-color: #663333 }
.bg96 { background-color: #663366 }
.bg97 { background-color: #663399 }
.bg98 { background-color: #6633cc }
.bg99 { background-color: #6633ff }
.bg100 { background-color: #666600 }
.bg101 { background-color: #666633 }
.bg102 { background-color: #666666 }
.bg103 { background-color: #666699 }
.bg104 { background-color: #6666cc }
.bg105 { background-color: #6666ff }
.bg106 { background-color: #669900 }
.bg107 { background-color: #669933 }
.bg108 { background-color: #669966 }
.bg109 { background-color: #669999 }
.bg110 { background-color: #6699cc }
.bg111 { background-color: #6699ff }
.bg112 { background-color: #66cc00 }
.bg113 { background-color: #66cc33 }
.bg114 { background-color: #66cc66 }
.bg115 { background-color: #66cc99 }
.bg116 { background-color: #66cccc }
.bg117 { background-color: #66ccff }
.bg118 { background-color: #66ff00 }
.bg119 { background-color: #66ff33 }
.bg120 { background-color: #66ff66 }
.bg121 { background-color: #66ff99 }
.bg122 { background-color: #66ffcc }
.bg123 { background-color: #66ffff }
.bg124 { background-color: #990000 }
.bg125 { background-color: #990033 }
.bg126 { background-color: #990066 }
.bg127 { background-color: #990099 }
.bg128 { background-color: #9900cc }
.bg129 { background-color: #9900ff }
.bg130 { background-color: #993300 }
.bg131 { background-color: #993333 }
.bg132 { background-color: #993366 }
.bg133 { background-color: #993399 }
.bg134 { background-color: #9933cc }
.bg135 { background-color: #9933ff }
.bg136 { background-color: #996600 }
.bg137 { background-color: #996633 }
.bg138 { background-color: #996666 }
.bg139 { background-color: #996699 }
.bg140 { background-color: #9966cc }
.bg141 { background-color: #9966ff }
.bg142 { background-color: #999900 }
.bg143 { background-color: #999933 }
.bg144 { background-color: #999966 }
.bg145 { background-color: #999999 }
.bg146 { background-color: #9999cc }
.bg147 { background-color: #9999ff }
.bg148 { background-color: #99cc00 }
.bg149 { background-color: #99cc33 }
.bg150 { background-color: #99cc66 }
.bg151 { background-color: #99cc99 }
.bg152 { background-color: #99cccc }
.bg153 { background-color: #99ccff }
.bg154 { background-color: #99ff00 }
.bg155 { background-color: #99ff33 }
.bg156 { background-color: #99ff66 }
.bg157 { background-color: #99ff99 }
.bg158 { background-color: #99ffcc }
.bg159 { background-color: #99ffff }
.bg160 { background-color: #cc0000 }
.bg161 { background-color: #cc0033 }
.bg162 { background-color: #cc0066 }
.bg163 { background-color: #cc0099 }
.bg164 { background-color: #cc00cc }
.bg165 { background-color: #cc00ff }
.bg166 { background-color: #cc3300 }
.bg167 { background-color: #cc3333 }
.bg168 { background-color: #cc3366 }
.bg169 { background-color: #cc3399 }
.bg170 { background-color: #cc33cc }
.bg171 { background-color: #cc33ff }
.bg172 { background-color: #cc6600 }
.bg173 { background-color: #cc6633 }
.bg174 { background-color: #cc6666 }
.bg175 { background-color: #cc6699 }
.bg176 { background-color: #cc66cc }
.bg177 { background-color: #cc66ff }
.bg178 { background-color: #cc9900 }
.bg179 { background-color: #cc9933 }
.bg180 { background-color: #cc9966 }
.bg181 { background-color: #cc9999 }
.bg182 { background-color: #cc99cc }
.bg183 { background-color: #cc99ff }
.bg184 { background-color: #cccc00 }
.bg185 { background-color: #cccc33 }
.bg186 { background-color: #cccc66 }
.bg187 { background-color: #cccc99 }
.bg188 { background-color: #cccccc }
.bg189 { background-color: #ccccff }
.bg190 { background-color: #ccff00 }
.bg191 { background-color: #ccff33 }
.bg192 { background-color: #ccff66 }
.bg193 { background-color: #ccff99 }
.bg194 { background-color: #ccffcc }
.bg195 { background-color: #ccffff }
.bg196 { background-color: #ff0000 }
.bg197 { background-color: #ff0033 }
.bg198 { background-color: #ff0066 }
.bg199 { background-color: #ff0099 }
.bg200 { background-color: #ff00cc }
.bg201 { background-color: #ff00ff }
.bg202 { background-color: #ff3300 }
.bg203 { background-color: #ff3333 }
.bg204 { background-color: #ff3366 }
.bg205 { background-color: #ff3399 }
.bg206 { background-color: #ff33cc }
.bg207 { background-color: #ff33ff }
.bg208 { background-color: #ff6600 }
.bg209 { background-color: #ff6633 }
.bg210 { background-color: #ff6666 }
.bg211 { background-color: #ff6699 }
.bg212 { background-color: #ff66cc }
.bg213 { background-color: #ff66ff }
.bg214 { background-color: #ff9900 }
.bg215 { background-color: #ff9933 }
.bg216 { background-color: #ff9966 }
.bg217 { background-color: #ff9999 }
.bg218 { background-color: #ff99cc }
.bg219 { background-color: #ff99ff }
.bg220 { background-color: #ffcc00 }
.bg221 { background-color: #ffcc33 }
.bg222 { background-color: #ffcc66 }
.bg223 { background-color: #ffcc99 }
.bg224 { background-color: #ffcccc }
.bg225 { background-color: #ffccff }
.bg226 { background-color: #ffff00 }
.bg227 { background-color: #ffff33 }
.bg228 { background-color: #ffff66 }
.bg229 { background-color: #ffff99 }
.bg230 { background-color: #ffffcc }
.bg231 { background-color: #ffffff }
.description {
color: #666;
font-family: arial, helvetica;
font-size: 16px;
margin: 20px;
}
.description p {
margin-bottom: 20px;
}

@ -1,88 +0,0 @@
/* html5doctor.com Reset Stylesheet v1.6.1
Last Updated: 2010-09-17
Author: Richard Clark - http://richclarkdesign.com
*/
html, body, div, span, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
abbr, address, cite, code,
del, dfn, em, img, ins, kbd, q, samp,
small, strong, sub, sup, var,
b, i,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, figcaption, figure,
footer, header, hgroup, menu, nav, section, summary,
time, mark, audio, video {
margin:0;
padding:0;
border:0;
outline:0;
font-size:100%;
vertical-align:baseline;
background:transparent;
}
body {
line-height:1;
}
article,aside,details,figcaption,figure,
footer,header,hgroup,menu,nav,section {
display:block;
}
nav ul {
list-style:none;
}
blockquote, q {
quotes:none;
}
blockquote:before, blockquote:after,
q:before, q:after {
content:'';
content:none;
}
a {
margin:0;
padding:0;
font-size:100%;
vertical-align:baseline;
background:transparent;
}
/* change colours to suit your needs */
ins {
background-color:#ff9;
color:#000;
text-decoration:none;
}
/* change colours to suit your needs */
mark {
background-color:#ff9;
color:#000;
font-style:italic;
font-weight:bold;
}
del {
text-decoration: line-through;
}
abbr[title], dfn[title] {
border-bottom:1px dotted;
cursor:help;
}
table {
border-collapse:collapse;
border-spacing:0;
}
/* change border colour to suit your needs */
hr {
display:block;
height:1px;
border:0;
border-top:1px solid #cccccc;
margin:1em 0;
padding:0;
}
input, select {
vertical-align:middle;
margin-top: 0;
}
Loading…
Cancel
Save