Skip to content
Browse files

Cleans directories and makes compiler work

  • Loading branch information...
1 parent 96c7233 commit 0760b3b75d66c5e876a8d63a01b57caa623a5647 @nhunzaker committed Feb 10, 2012
Showing with 2,406 additions and 1,247 deletions.
  1. +6 −3 actions/compile/index.js
  2. +10 −11 actions/compile/javascript.js
  3. +2 −2 actions/compile/test/cat.min.js
  4. +2 −0 actions/compile/test/eyes.js
  5. +9 −4 actions/what.js
  6. +25 −3 brain/analyze.js
  7. +6 −3 brain/interaction.js
  8. +30 −31 brain/language/index.js
  9. +0 −125 brain/language/newtrainer.js
  10. +0 −365 brain/language/tagger.js
  11. +0 −1 brain/pos-js
  12. +11 −6 nodebot.js
  13. 0 nodebot.min.js
  14. +28 −30 package.json
  15. +44 −0 server/index.html
  16. +27 −0 server/index.js
  17. +47 −0 server/public/404.html
  18. +24 −0 server/public/config.rb
  19. BIN server/public/images/apple-touch-icon-114x114.png
  20. BIN server/public/images/apple-touch-icon-72x72.png
  21. BIN server/public/images/apple-touch-icon.png
  22. BIN server/public/images/favicon.ico
  23. +15 −0 server/public/javascripts/nodebot.js
  24. +29 −0 server/public/javascripts/tabs.js
  25. +5 −0 server/public/robots.txt
  26. +63 −0 server/public/sass/_layout.scss
  27. +54 −0 server/public/sass/base.scss
  28. +66 −0 server/public/sass/layout.scss
  29. +70 −0 server/public/sass/partials/_base_type.scss
  30. +56 −0 server/public/sass/partials/_buttons.scss
  31. +58 −0 server/public/sass/partials/_forms.scss
  32. +237 −0 server/public/sass/partials/_grid.scss
  33. +7 −0 server/public/sass/partials/_images.scss
  34. +52 −0 server/public/sass/partials/_lists.scss
  35. +6 −0 server/public/sass/partials/_misc.scss
  36. +40 −0 server/public/sass/partials/_mixins.scss
  37. +25 −0 server/public/sass/partials/_reset.scss
  38. +89 −0 server/public/sass/partials/_tabs.scss
  39. +33 −0 server/public/sass/partials/_variables.scss
  40. +1,155 −0 server/public/stylesheets/base.css
  41. +46 −0 server/public/stylesheets/layout.css
  42. +28 −0 server/routes.js
  43. +0 −67 test/action tests/compiler-test.js
  44. +0 −85 test/action tests/how-test.js
  45. +0 −31 test/action tests/repeat-test.js
  46. +0 −110 test/action tests/validate-test.js
  47. +0 −189 test/action tests/what-test.js
  48. +0 −49 test/action tests/who-test.js
  49. +1 −1 test/lexicon-test.js
  50. +0 −52 test/pos-test.js
  51. +0 −52 test/tagger-test.js
  52. +0 −27 test/time-test.js
View
9 actions/compile/index.js
@@ -17,7 +17,7 @@ var lex = Nodebot.lexicon,
// -------------------------------------------------- //
function compressor (directory, filetype, filename) {
-
+
var filter = Nodebot.lexicon[filetype]["regular expression"],
newFile = filename || filetype + ".min" + lex[filetype].mime,
compress = require("./" + filetype);
@@ -27,12 +27,15 @@ function compressor (directory, filetype, filename) {
if (err) return false;
files = files.map(function(f) {
- return directory + "/" + f;
+ if (filename && f === filename) {
+ } else {
+ return directory + "/" + f;
+ }
});
var compressed = compress.all(directory, files, filename);
- return fs.writeFile(directory + "/" + newFile, compressed);
+ return fs.writeFile(directory + "/" + newFile.trim(), compressed);
});
View
21 actions/compile/javascript.js
@@ -7,7 +7,6 @@ var jsp = require("uglify-js").parser,
fs = require('fs')
;
-
// Given an array, move the "from" to "to"
// -------------------------------------------------- //
@@ -48,20 +47,20 @@ function sortRequirements (files, directory) {
// For each file we output
output.forEach(function(a, indexParent) {
-
+
// Check each file for possible requirements
output.forEach(function(b, indexChild) {
// Yes? move the required child before the parent
if (a.requirements.indexOf(b.filename) > -1) {
- move(output, indexChild, indexParent);
+ move(output, indexChild, indexParent - 1);
}
});
});
- return output.reverse();
+ return output;
}
@@ -94,25 +93,25 @@ function compressAll (directory, files, filename) {
// Filter down to only the non-hidden files of the type
// And not the filtered file we'll create
- files.filter(function(filename) {
- return filter.test(filename) && filename !== newFile;
- }).forEach(function(filename) {
+ files.filter(function(f) {
+ return f !== filename && filter.test(f);
+ }).forEach(function(f) {
try {
- stack.push([filename, fs.readFileSync(filename).toString()]);
+ stack.push([f, fs.readFileSync(f).toString()]);
} catch (x) {
- console.log("Could not read file %s", filename);
+ console.log("Could not read file %s", f);
}
});
files = sortRequirements(stack, directory);
var output = "// Uglified by Nodebot \n//\n// " + new Date().toString()
+ "\n\/\/" + Array(60).join("-")
- + "\n\n"
+ + "\n\n;"
;
files.forEach(function(f) {
- output += compress(f.filename, f.content);
+ output += compress(f.filename, f.content) + ";";
});
return output;
View
4 actions/compile/test/cat.min.js
@@ -1,7 +1,7 @@
// Uglified by Nodebot
//
-// Sat Jan 28 2012 08:54:21 GMT-0500 (EST)
-//-------------------------------------------------------------------------------
+// Sun Jan 29 2012 21:56:00 GMT-0500 (EST)
+//-----------------------------------------------------------
// /Users/nate/Sites/nodebot/actions/compile/test/cat.js
function cat(){}
View
2 actions/compile/test/eyes.js
@@ -1,4 +1,6 @@
// do something
+//
+//= require cat.js
//= require head.js
function eyes () {
View
13 actions/what.js
@@ -98,23 +98,28 @@ module.exports = function what (a) {
console.log(format.align(result[0], 80).bold.red);
format.drawLine();
- console.log("");
+ console.log("");
+
+ var message = "";
result = result.filter(function(i) { return i.trim() !== ""; });
result.slice(1, 4).forEach(function(i) {
if (i.split("|").length > 1) {
- console.log(format.clump(i.split("|").join(": ")));
+ message += "\n" + format.clump(i.split("|").join(": "));
} else {
- var message = i.split("\n").join(". ").trim();
- console.log("\n" + format.clump(message, 76));
+ var tmp = i.split("\n").join(". ").trim();
+ message += "\n\n" + format.clump(tmp, 76);
}
});
var credit = "Courtesy of " + "WolframAlpha" + " (http://www.wolframalpha.com)";
+
+ nodebot.io && nodebot.io.sockets.emit('output', message);
+ nodebot.io && nodebot.io.sockets.emit('output', credit);
console.log("");
View
28 brain/analyze.js
@@ -1,12 +1,34 @@
// The A Module
// -------------------------------------------------- //
-var lang = require("./language")
-, n = Nodebot;
+var lang = require("./language"),
+ n = Nodebot;
module.exports = function (data) {
- var a = lang.classify.apply(n, [data]);
+ var a = lang.classify(data);
+
+ // let's filter the ownership
+ switch(a.owner) {
+
+ // Reverse user possession
+ case "speaker":
+ a.owner = "user";
+ break;
+
+ // Reverse nodebot possession
+ case "listener":
+ a.owner = "nodebot";
+ break;
+
+ // Tweak other non-specific possession cases to the last
+ // recorded context
+ case "it": case "its": case "they": case "their":
+ case "he": case "she": case "his": case "hers":
+ a.owner = Nodebot.memory.context;
+ break;
+ }
+
// If there is no action, but the owner is the user or the robot, it
// is a relabeling
View
9 brain/interaction.js
@@ -1,7 +1,8 @@
// The Analysis Module
// -------------------------------------------------- //
-var growl = require('growl');
+var growl = require('growl'),
+ util = require("util");
module.exports = function add_interaction_module(context) {
@@ -33,8 +34,10 @@ module.exports = function add_interaction_module(context) {
};
nodebot.say = function() {
- arguments[0] = "\n" + nodebot.lexicon.nodebot.name.magenta.bold + ": " + arguments[0];
- console.log.apply(nodebot, arguments);
+
+ var message = util.format.apply(null, arguments);
+ console.log(nodebot.lexicon.nodebot.name.magenta.bold + ": " + message);
+ nodebot.io && nodebot.io.sockets.emit('output', message);
return this;
};
View
61 brain/language/index.js
@@ -1,49 +1,48 @@
// The Language Module
// -------------------------------------------------- //
-function language () {
+var speak = require("speakeasy-nlp");
+var lang = {};
- this.classify = require("./tagger").classify;
+lang.classify = speak.classify;
+lang.closest = speak.closest;
- this.possessify = function (str) {
+lang.possessify = function (str) {
- if (!this.isPossessive(str) && str !== "") {
- str = str + (str.slice(-1).toLowerCase() === "s" ? "'" : "'s");
- }
+ if (!lang.isPossessive(str) && str !== "") {
+ str = str + (str.slice(-1).toLowerCase() === "s" ? "'" : "'s");
+ }
- return str;
+ return str;
- };
+};
- this.depossessify = function (string) {
+lang.depossessify = function (string) {
- var str = string;
+ var str = string;
- if (this.isPossessive(str)) {
-
- if (str.match("'s")) {
- str = str.slice(0, -2);
- } else {
- str = str.slice(0, -1);
- }
-
- }
+ if (lang.isPossessive(str)) {
- return str;
- };
-
- this.isPossessive = function (str) {
- str = str.slice(-2);
+ if (str.match("'s")) {
+ str = str.slice(0, -2);
+ } else {
+ str = str.slice(0, -1);
+ }
- return (str === "'s" || str === "s'");
- },
-
- this.capitalize = function (string) {
- if (typeof string !== 'string') return string;
- return string[0].toUpperCase() + string.slice(1);
}
+ return str;
+};
+
+lang.isPossessive = function (str) {
+ str = str.slice(-2);
+ return (str === "'s" || str === "s'");
+};
+
+lang.capitalize = function (string) {
+ if (typeof string !== 'string') return string;
+ return string[0].toUpperCase() + string.slice(1);
};
-module.exports = new language;
+module.exports = lang;
View
125 brain/language/newtrainer.js
@@ -1,125 +0,0 @@
-require('colors');
-
-var brain = require('brain')
-, ntwitter = require("ntwitter");
-
-
-// The Twitter API
-// -------------------------------------------------- //
-
-var twitter = new ntwitter({
- consumer_key: 'rPkzBTS2tnvUaxV8h5pMVA',
- consumer_secret: '5B16t4voJKZ0WcU1dS1fr8fT6cRnzWoxHMnWDZp6cc',
- access_token_key: '48188274-PsxLGhh7SJVzz3catdgmfNGLGa6qHYsq7464koFrJ',
- access_token_secret: 'pR7CpeEtC3yBIof1c8lmVCoGDKMjLy1bTboIOIXVCKM'
-})
-, tweets;
-
-
-// Machine Learning
-// -------------------------------------------------- //
-
-var bayes = new brain.BayesianClassifier({
- backend : {
- type: 'Redis',
- options: {
- hostname: 'localhost', // this is the default
- port: 6379,
- name: 'sentiment' // namespace so you can persist training
- }
- }
-});
-
-bayes.train("", "neutral");
-
-// Let's roll
-// -------------------------------------------------- //
-
-say("Scanning Twitter...");
-
-twitter.search("class inequality", {
- rpp : "100",
- include_entities : "true",
- result_type : "mixed",
- lang : "en"
-}, function(err, data) {
- tweets = data.results;
- say("\nI found " + tweets.length + " search results\n");
- classify();
-});
-
-
-function ask(question, callback) {
-
- var stdin = process.stdin
- , stdout = process.stdout;
-
- stdout.write("\nNodebot: ".magenta.bold + question + "\n" + "Response: ".blue);
- stdin.resume();
-
- stdin.once('data', function(data) {
- data = data.toString().trim();
- callback(data);
- });
-
-}
-
-
-function say (string) {
- console.log("Nodebot:".magenta.bold, string);
-}
-
-function classify() {
-
- // Keep track of placement
- this.slot = this.slot || 0;
-
- // The tweet under consideration
- var tweet = tweets[slot].text;
-
- // Okay, now let's increment it for next time
- this.slot++;
-
- // Classify this sucker
- bayes.classify(tweet, function(classification) {
-
- color = (classification === "for") ? "green" : (classification === "against") ? "red" : "black";
-
- // Log a reference point to the tweet
- console.log("\nTweet: "[color].bold + tweet);
-
- // Generate the question
- var statement = "Is the classifier " + classification.cyan + "?";
-
- ask(statement + " (y/n)? \n ", function(decision) {
-
- // Handle accidently enter presses without a value
-
- if (decision === null || decision === undefined) {
- say("Great!");
- bayes.train(tweet, classification, classify);
- }
-
- // Is the classification correct?
- if (decision[0].toLowerCase() === "y") {
-
- // yes : positively reinforce it and move on
-
- say("Great!");
- bayes.train(tweet, classification, classify);
-
- } else {
-
- // no : make sure it is correctly classified
-
- ask("Okay, then how should I have classified this?", function(classifier) {
- var cleaned = classifier.toLowerCase();
- bayes.train(tweet, cleaned, classify);
- });
- }
-
-
- });
-
- });
-}
View
365 brain/language/tagger.js
@@ -1,365 +0,0 @@
-// Tagger.js
-//
-// Breaks up speech into components and assists with
-// classifying things such as the subject, ownership,
-// and action for a statement
-//
-// Note: I am not a linguist, this is the result of
-// writing whatever logic it takes to get the tests
-// to work.
-//
-// Please help me make this better:
-// https://github.com/nhunzaker/nodebot
-// -------------------------------------------------- //
-
-var lev = require("levenshtein")
-, pos = require('../pos-js')
-, lexer = new pos.Lexer()
-, tagger = new pos.Tagger()
-, fileEx = Nodebot.lexicon.file["regular expression"]
-, dirEx = /((\.|)\/(.+|))+$/ig
-;
-
-
-// Finds the closest match between a statement
-// and a body of words
-var closest = module.exports.closest = function(string, words) {
-
- var shortest = words.toString().length
- , bestFit = "";
-
- if (typeof words === 'string') {
- words = lexer.lex(words);
- }
-
- words.forEach(function(word) {
-
- var distance = lev(string, word);
-
- if (distance < shortest) {
- bestFit = word;
- shortest = distance;
- }
-
- });
-
- return bestFit;
-}
-
-// Checks if a string is fileish
-var isFile = module.exports.isFile = function(string) {
- string = string || "";
- return (string.replace(/\s/g, "").match(fileEx) !== null);
-};
-
-
-// Returns the part of speech for a particular word
-var getType = module.exports.getType = function (string) {
-
- if (string) {
- return tagger.tag(lexer.lex(string))[0][1];
- } else {
- return undefined;
- }
-
-};
-
-// Strips all words of specific type(s) from an array of words
-var stripTypes = module.exports.stripTypes = function(words, types) {
-
- types = (typeof types === "string") ? [types] : types;
-
- words = words.filter(function(w) {
- return types.indexOf(getType(w)) < 0;
- });
-
- return words;
-}
-
-
-// Finds all words between the last of the first and last
-// of two types
-var getBetween = module.exports.getBetween = function(lex, type1, type2, form) {
-
- var tagged = tagger.tag(lex)
- , filter1 = filter2 = start = end = [];
-
- form = form || "outside";
-
- type1 = (typeof type1 === 'string') ? [type1] : type1;
- type2 = (typeof type2 === 'string') ? [type2] : type2;
-
- filter1 = tagged.filter(function(i) { return type1.indexOf(i[1]) !== -1; }) || [];
- filter2 = tagged.filter(function(i) { return type2.indexOf(i[1]) !== -1; }) || [];
-
- if (form === "outside") {
- start = (filter1[0]) ? filter1[0][0] : undefined;
- } else {
- start = (filter1.slice(-1)[0]) ? filter1.slice(-1)[0][0] : undefined;
- }
-
- end = (filter2.slice(-1)[0]) ? filter2.slice(-1)[0][0] : undefined;
-
-
- return (start || end) ? lex.slice(lex.indexOf(start) + 1, lex.indexOf(end) + 1) : [];
-
-};
-
-// Classifies all words in an array
-var getTypes = module.exports.getTypes = function (array, string, strict) {
-
- // Is the array lexical?
- if (typeof array[0] !== 'object') {
- array = tagger.tag(array);
- }
-
- var type = array.filter(function(word) {
-
- if (strict) {
- return (word[1] === string);
- } else {
- return (word[1].slice(0,string.length) === string);
- }
-
- }).map(function(w) { return w[0] });
-
-
- return type;
-};
-
-
-var classify = module.exports.classify = function(speech, debug) {
-
- var text = speech || process.argv.slice(2).join(" ")
- , words = lexer.lex(text)
- , tagged = []
- , action, subject, owner;
-
-
- // PREPROCESSING
- // -------------------------------------------------- //
-
- // Auto correct for missing punctuation
- if (getType(words.slice(-1)[0]) !== ".") {
- words.push(".");
- }
-
-
- // Classify!
- // -------------------------------------------------- //
-
- tagged = tagger.tag(words);
-
- if (debug) console.log(words);
- if (debug) console.log(tagged);
-
- var verbs = getTypes(tagged, "VB")
- , nouns = getTypes(tagged, "NN")
- , pronouns = getTypes(tagged, "PRP") // finds all posessive pronouns
- , actions = getTypes(tagged, "W")
- , adverbs = getTypes(tagged, "R")
- , adjectives = getTypes(tagged, "JJ")
- , preps = getTypes(tagged, "IN")
- , determiners = getTypes(tagged, "DT")
- , to = getTypes(tagged, "TO")
- ;
-
-
- // ACTION
- // Answers : "What should the nodebot do after given a
- // command"
- // -------------------------------------------------- //
-
- // Are there known action words present?
- if (actions.length > 0) {
- action = actions[0];
- }
-
- // Are there base verbs present? Then it's probably
- // the first verb
- else if (getTypes(tagged, "VB", true).length > 0) {
- action = getTypes(tagged, "VB", true)[0];
- }
-
- // If there are nouns and prepositions then the action
- // is the first noun
- // ex: Repeat that last action
- else if (nouns.length > 0 && preps.length > 0) {
- action = nouns[0];
- }
-
- // Are there at least any adjectives that might work?
- else if (adjectives.length > 0) {
- action = adjectives[0];
- }
-
- // Lowercase the action if we find one
- action = (action) ? action.toLowerCase() : action;
-
-
-
- // OWNERSHIP
- // Answers : "Who is associated with the target of the
- // action?"
- // -------------------------------------------------- //
-
- // If there is posessive pronouns and we have an action, then
- // the owner is the last posessive word
-
- if (pronouns.length > 0 && action) {
-
- // The answer must begin where the action starts
- // ex: "Do you know [What time it is?]
- var answer = words.slice(words.indexOf(action))
- , last_pro = pronouns.slice(-1)[0];
-
- if (answer.indexOf(last_pro) > 0 || getTypes(answer, "VB").length === 0) {
- owner = last_pro;
- } else {
- owner = getBetween(answer, ["DT", "TO"], ".");
- owner = stripTypes(owner, [".", "VB", "VBZ"]).join(" ");
- }
-
- }
-
- // No ? Let's try between a preposition and
- // determiners/nouns
- else if (determiners.length > 0 && preps.length > 0) {
-
- var prepIndex = words.indexOf(preps[0]),
- detIndex = words.indexOf(determiners[0]);
-
- owner = words.slice(prepIndex + 1, -1, detIndex).join(" ");
- }
-
- // Hmm, now let's try between the action and the word "to"
- else if (to.length > 0) {
- owner = getBetween(words, "VB", "TO").slice(0, -1).join(" ");
- }
-
- // At this point, we can really only guess that
- // the owner is between the verb and the end of the
- // statement
- else if (verbs.length > 0) {
-
- owner = getBetween(words, ["VBZ", "VBP"], ["."]).slice(0, -1);
-
- // Do we have the word "I" in here?
- if (owner.indexOf("I") === 0) owner = owner.slice(0,1);
-
- // Strip accidental determinates and punctuation
- owner = stripTypes(owner, ["DT", "."]).join(" ");
-
- }
-
-
- // SUBJECT
- // Answers : "What is this statement about?"
- // -------------------------------------------------- //
-
- if (getType(words[0]) === "VBZ" && words.indexOf(action) === words.length - 2) {
- subject = words.slice(1, -2).join(" ").trim();
- }
-
- else if (determiners.length === 0 && preps.length === 0 && getType(action) === "VB") {
- subject = words.slice(1, -1).join(" ");
- }
-
- // If ownership and there are prepositions, scan for words bteween
- // determinates and posessive words, and prepositions
- else if (preps.length > 0) {
-
- if (preps.length > 1 || determiners.length > 0) {
- subject = getBetween(words, ["DT", "PRP$"], ["IN"]);
- } else {
- subject = getBetween(words, ["IN"], ["."]);
- }
-
- // Strip punctuaction, prepositions, and owners
- subject = stripTypes(subject, [".", "IN"]).join(" ");
- }
-
- // Is the owner "I" and the verb after the owner is present tense?
- // Helps with "How much memory do I have?"
- else if (owner === "I" && getType(words[words.indexOf(owner) + 1]) === "VBP") {
-
- answer = words.slice(0, words.indexOf(owner));
-
- subject = getBetween(answer, ["JJ"], ["VBP"]).slice(0, -1).join(" ");
-
- }
-
- // If there *is* ownership, and there are no prepositions
- // then the subject is inside the owner/determinate/verb and the last noun
- // (*phew...*)
-
- else if (owner && preps.length === 0) {
-
- subject = getBetween(words, ["TO", "DT", "VBP", "PRP$"], ["NN", "RB", "CD"], "inside");
-
- subject = subject.filter(function(s) {
- s = s.toLowerCase();
- return s !== action && getType(s) !== "VBZ" && s !== owner;
- });
-
- subject = subject.join(" ");
- }
-
-
- // POST PROCESSING
- // -------------------------------------------------- //
-
- // Now let's account for things like keys
- subject = subject ? subject.split("- ").join("-") : undefined;
- owner = owner ? owner.split("- ").join("-") : undefined;
-
- // Clean directory subjects/owners
- subject = (subject && subject.replace(/\s/ig, "").match(dirEx)) ? subject.replace(/\s/ig, "") : subject;
- owner = (owner && owner.replace(/\s/ig, "").match(dirEx)) ? owner.replace(/\s/ig, "") : owner;
-
-
- // Now that everything is properly classified,
- // let's filter the ownership
- switch(owner) {
-
- // Reverse user possession
- case "me": case "my": case "i": case "I":
- owner = "user";
- break;
-
- // Reverse nodebot possession
- case "your": case "you":
- owner = "nodebot";
- break;
-
- // Tweak other non-specific possession cases to the last
- // recorded context
- case "it": case "its": case "they": case "their":
- case "he": case "she": case "his": case "hers":
- owner = Nodebot.memory.context;
- break;
- }
-
- // If we somehow got an owner and not a subject,
- // swap them
- if (owner && !subject) {
- subject = owner;
- owner = undefined;
- }
-
-
-
- // Return what we find
- // -------------------------------------------------- //
-
- var ret = {
- action : action,
- owner : owner,
- subject : subject,
- tokens : words
- };
-
- debug && console.log(ret);
-
- return ret;
-}
1 brain/pos-js
@@ -1 +0,0 @@
-Subproject commit 2f5fb8e44de1a70a4b7f8240e0a2456f9b4d5845
View
17 nodebot.js
@@ -17,13 +17,13 @@ var command = process.argv.slice(2).join(" ").trim();
// -------------------------------------------------- //
Nodebot = new(require("events").EventEmitter)();
-
+
// short term memory
Nodebot.memory = {
tasks : [],
context : "nodebot"
};
-
+
// long term memory
Nodebot.lexicon = require("./brain/lexicon");
@@ -41,8 +41,14 @@ require("./brain/interaction")(Nodebot);
// -------------------------------------------------- //
-Nodebot.boot = function() {
- (command !== "") ? Nodebot.analyze(command) : Nodebot.request();
+Nodebot.boot = function(server) {
+
+ if (server) {
+ var app = require("./server");
+ } else {
+ (command !== "") ? Nodebot.analyze(command) : Nodebot.request();
+ }
+
};
// Take the proper initial action
@@ -53,6 +59,5 @@ if (!module.parent) {
console.log("");
});
- Nodebot.boot();
-
+ Nodebot.boot(command === "-s");
}
View
0 nodebot.min.js
No changes.
View
58 package.json
@@ -1,32 +1,30 @@
{
- "name": "nodebot",
- "description": "An artificial intelligence written for NodeJS",
- "version": "0.1.61",
-
- "homepage": "",
-
- "engines": {
- "node": ">=0.6.4"
- },
-
- "dependencies": {
-
- "colors" : "*",
- "growl" : "*",
-
- "request" : "*",
- "jquery" : "*",
-
- "jshint" : "*",
- "csslint" : "*",
-
- "levenshtein" : "1.0.0",
- "pos" : "0.1.1"
-
- },
-
- "author": "Nate Hunzaker",
-
- "main": "./nodebot.js",
- "bin" : { "nodebot": "./bin/nodebot" }
+ "name": "nodebot",
+ "description": "An artificial intelligence written for NodeJS",
+ "version": "0.1.63",
+
+ "homepage": "",
+
+ "engines": {
+ "node": ">=0.6.4"
+ },
+
+ "dependencies": {
+
+ "csslint" : "*",
+ "colors" : "*",
+ "growl" : "*",
+ "jquery" : "*",
+ "jshint" : "*",
+ "request" : "*",
+ "speakeasy-nlp" : "*",
+ "flatiron" : "*",
+ "connect" : "*",
+ "socket.io" : "*"
+ },
+
+ "author": "Nate Hunzaker",
+
+ "main": "./nodebot.js",
+ "bin" : { "nodebot": "./bin/nodebot" }
}
View
44 server/index.html
@@ -0,0 +1,44 @@
+<!DOCTYPE html>
+<head>
+
+ <meta charset="utf-8">
+
+ <title>Nodebot</title>
+
+ <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
+
+ <link rel="stylesheet" href="/stylesheets/base.css" />
+ <style>
+ input[type="text"] {
+ display: block;
+ margin: 0 auto;
+ }
+
+ p {
+ margin: 1em 0;
+ }
+ </style>
+ <link rel="shortcut icon" href="/images/favicon.ico" />
+
+ <script src="/socket.io/socket.io.js"></script>
+ <script src="http://code.jquery.com/jquery-1.7.1.min.js"></script>
+
+</head>
+
+<body>
+ <div class="container">
+
+ <div class="sixteen columns alpha omega">
+ <h1 class="remove-bottom">Nodebot</h1>
+ <h5>A nodejs robot</h5>
+ <hr/>
+ <form>
+ <input type="text" id="question" placeholder="Ask me something" />
+ </form>
+ <hr/.
+ <div id="feed"></div>
+ </div>
+ <script src="/javascripts/nodebot.js"></script>
+ </div>
+</body>
+</html>
View
27 server/index.js
@@ -0,0 +1,27 @@
+var flatiron = require('flatiron'),
+ connect = require("connect"),
+ port = process.env.port || 8080,
+ app = Nodebot.server = flatiron.app;
+
+// Plugins
+app.use(flatiron.plugins.log);
+app.use(flatiron.plugins.http, {
+ before: [connect.static(__dirname + '/public')]
+});
+
+// Routes
+require("./routes")(app);
+
+// Set the server to listen on port `8080`.
+app.start(port);
+app.log.info("Nodebot is listening on port", port);
+
+// Install socket.io
+Nodebot.io = require('socket.io').listen(app.server);
+
+Nodebot.io.sockets.on('connection', function(socket) {
+ socket.emit('output', "Hello, master");
+ socket.on("input", function(d) {
+ Nodebot.analyze(d);
+ });
+});
View
47 server/public/404.html
@@ -0,0 +1,47 @@
+<!DOCTYPE html>
+<!--[if lt IE 7 ]><html class="ie ie6" lang="en"> <![endif]-->
+<!--[if IE 7 ]><html class="ie ie7" lang="en"> <![endif]-->
+<!--[if IE 8 ]><html class="ie ie8" lang="en"> <![endif]-->
+<!--[if (gte IE 9)|!(IE)]><!--><html lang="en"> <!--<![endif]-->
+<head>
+
+ <!-- Basic Page Needs
+ ================================================== -->
+ <meta charset="utf-8">
+ <title>Your Page Title Here :)</title>
+ <meta name="description" content="">
+ <meta name="author" content="">
+ <!--[if lt IE 9]>
+ <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
+ <![endif]-->
+
+ <!-- Mobile Specific Metas
+ ================================================== -->
+ <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
+
+ <!-- CSS
+ ================================================== -->
+ <link rel="stylesheet" href="stylesheets/base.css">
+ <link rel="stylesheet" href="stylesheets/skeleton.css">
+ <link rel="stylesheet" href="stylesheets/layout.css">
+
+ <!-- Favicons
+ ================================================== -->
+ <link rel="shortcut icon" href="images/favicon.ico">
+ <link rel="apple-touch-icon" href="images/apple-touch-icon.png">
+ <link rel="apple-touch-icon" sizes="72x72" href="images/apple-touch-icon-72x72.png">
+ <link rel="apple-touch-icon" sizes="114x114" href="images/apple-touch-icon-114x114.png">
+
+</head>
+<body>
+
+ <!-- Primary Page Layout
+ ================================================== -->
+ <div class="container">
+ <h1 style="margin-top: 100px; text-align:center">Sorry. Couldn't Find That Page!</h1>
+ </div>
+
+<!-- End Document
+================================================== -->
+</body>
+</html>
View
24 server/public/config.rb
@@ -0,0 +1,24 @@
+# Require any additional compass plugins here.
+
+# Set this to the root of your project when deployed:
+http_path = "/"
+css_dir = "stylesheets"
+sass_dir = "sass"
+images_dir = "images"
+javascripts_dir = "javascripts"
+
+# You can select your preferred output style here (can be overridden via the command line):
+# output_style = :expanded or :nested or :compact or :compressed
+
+# To enable relative paths to assets via compass helper functions. Uncomment:
+# relative_assets = true
+
+# To disable debugging comments that display the original location of your selectors. Uncomment:
+# line_comments = false
+
+
+# If you prefer the indented syntax, you might want to regenerate this
+# project again passing --syntax sass, or you can uncomment this:
+# preferred_syntax = :sass
+# and then run:
+# sass-convert -R --from scss --to sass sass scss && rm -rf sass && mv scss sass
View
BIN server/public/images/apple-touch-icon-114x114.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN server/public/images/apple-touch-icon-72x72.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN server/public/images/apple-touch-icon.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN server/public/images/favicon.ico
Binary file not shown.
View
15 server/public/javascripts/nodebot.js
@@ -0,0 +1,15 @@
+$(document).ready(function() {
+
+ var socket = io.connect('http://localhost');
+
+ socket.on("output", function (data) {
+ $("<p/>").html("<strong>Nodebot:</strong> " + data).prependTo("#feed");
+ });
+
+
+ $("form").submit(function(e) {
+ e.preventDefault();
+ socket.emit("input", $("#question").val());
+ });
+
+});
View
29 server/public/javascripts/tabs.js
@@ -0,0 +1,29 @@
+/*
+* Skeleton V1.1
+* Copyright 2011, Dave Gamache
+* www.getskeleton.com
+* Free to use under the MIT license.
+* http://www.opensource.org/licenses/mit-license.php
+* 8/17/2011
+*/
+
+
+$('body').on('click', 'ul.tabs > li > a', function(e) {
+
+ //Get Location of tab's content
+ var contentLocation = $(this).attr('href');
+
+ //Let go if not a hashed one
+ if(contentLocation.charAt(0)=="#") {
+
+ e.preventDefault();
+
+ //Make Tab Active
+ $(this).parent().siblings().children('a').removeClass('active');
+ $(this).addClass('active');
+
+ //Show Tab Content & add active class
+ $(contentLocation).show().addClass('active').siblings().hide().removeClass('active');
+
+ }
+});
View
5 server/public/robots.txt
@@ -0,0 +1,5 @@
+# www.robotstxt.org/
+# www.google.com/support/webmasters/bin/answer.py?hl=en&answer=156449
+
+User-agent: *
+
View
63 server/public/sass/_layout.scss
@@ -0,0 +1,63 @@
+/*
+* Skeleton V1.1
+* Copyright 2011, Dave Gamache
+* www.getskeleton.com
+* Free to use under the MIT license.
+* http://www.opensource.org/licenses/mit-license.php
+* 8/17/2011
+*/
+
+/* Table of Content
+==================================================
+ #Site Styles
+ #Page Styles
+ #Media Queries
+ #Font-Face */
+
+/* #Site Styles
+================================================== */
+
+/* #Page Styles
+================================================== */
+
+.container {
+ padding-top: 1.5em;
+// @include grid-background();
+}
+
+/* #Media Queries
+================================================== */
+
+ /* Smaller than standard 960 (devices and browsers) */
+ @media only screen and (max-width: 959px) {}
+
+ /* Tablet Portrait size to standard 960 (devices and browsers) */
+ @media only screen and (min-width: 768px) and (max-width: 959px) {}
+
+ /* All Mobile Sizes (devices and browser) */
+ @media only screen and (max-width: 767px) {}
+
+ /* Mobile Landscape Size to Tablet Portrait (devices and browsers) */
+ @media only screen and (min-width: 480px) and (max-width: 767px) {}
+
+ /* Mobile Portrait Size to Mobile Landscape Size (devices and browsers) */
+ @media only screen and (max-width: 479px) {}
+
+
+/* #Font-Face
+================================================== */
+/* This is the proper syntax for an @font-face file
+ Just create a "fonts" folder at the root,
+ copy your FontName into code below and remove
+ comment brackets */
+
+/* @font-face {
+ font-family: 'FontName';
+ src: url('../fonts/FontName.eot');
+ src: url('../fonts/FontName.eot?iefix') format('eot'),
+ url('../fonts/FontName.woff') format('woff'),
+ url('../fonts/FontName.ttf') format('truetype'),
+ url('../fonts/FontName.svg#webfontZam02nTh') format('svg');
+ font-weight: normal;
+ font-style: normal; }
+*/
View
54 server/public/sass/base.scss
@@ -0,0 +1,54 @@
+/*
+ * Skeleton V1.1
+ * Copyright 2011, Dave Gamache
+ *
+ * Compass-sass edition by Nate Hunzaker
+ *
+ * www.getskeleton.com
+ * Free to use under the MIT license.
+ * http://www.opensource.org/licenses/mit-license.php
+ * 8/17/2011
+ */
+
+@import "compass/css3";
+@import "compass/layout";
+
+// Table of Content
+// ================================================== //
+
+// Variables and Mixins
+@import "partials/variables";
+@import "partials/mixins";
+
+// Reset & Basics
+@import "partials/reset";
+
+// Basics and Typography Styles
+@import "partials/_base_type";
+
+// Lists
+@import "partials/_lists";
+
+//Images
+@import "partials/_images";
+
+//Buttons
+@import "partials/buttons";
+
+//Tabs
+@import "partials/tabs";
+
+//Forms
+@import "partials/forms";
+
+//Misc
+@import "partials/misc";
+
+// Grid
+@import "partials/grid";
+
+
+// User Styles
+// ================================================== //
+
+@import "layout";
View
66 server/public/sass/layout.scss
@@ -0,0 +1,66 @@
+/*
+* Skeleton V1.1
+* Copyright 2011, Dave Gamache
+* www.getskeleton.com
+* Free to use under the MIT license.
+* http://www.opensource.org/licenses/mit-license.php
+* 8/17/2011
+*/
+
+/* Table of Content
+==================================================
+ #Site Styles
+ #Page Styles
+ #Media Queries
+ #Font-Face */
+
+/* #Site Styles
+================================================== */
+
+/* #Page Styles
+================================================== */
+
+body {
+ padding-top: 60px;
+}
+
+.container {
+// @include grid-background();
+}
+
+/* #Media Queries
+================================================== */
+
+ /* Smaller than standard 960 (devices and browsers) */
+ @media only screen and (max-width: 959px) {}
+
+ /* Tablet Portrait size to standard 960 (devices and browsers) */
+ @media only screen and (min-width: 768px) and (max-width: 959px) {}
+
+ /* All Mobile Sizes (devices and browser) */
+ @media only screen and (max-width: 767px) {}
+
+ /* Mobile Landscape Size to Tablet Portrait (devices and browsers) */
+ @media only screen and (min-width: 480px) and (max-width: 767px) {}
+
+ /* Mobile Portrait Size to Mobile Landscape Size (devices and browsers) */
+ @media only screen and (max-width: 479px) {}
+
+
+/* #Font-Face
+================================================== */
+/* This is the proper syntax for an @font-face file
+ Just create a "fonts" folder at the root,
+ copy your FontName into code below and remove
+ comment brackets */
+
+/* @font-face {
+ font-family: 'FontName';
+ src: url('../fonts/FontName.eot');
+ src: url('../fonts/FontName.eot?iefix') format('eot'),
+ url('../fonts/FontName.woff') format('woff'),
+ url('../fonts/FontName.ttf') format('truetype'),
+ url('../fonts/FontName.svg#webfontZam02nTh') format('svg');
+ font-weight: normal;
+ font-style: normal; }
+*/
View
70 server/public/sass/partials/_base_type.scss
@@ -0,0 +1,70 @@
+// Basic Styles
+// ================================================== //
+
+body {
+ background: #fff;
+ font: 14px/21px $sans-serif;
+ color: #444;
+ -webkit-font-smoothing: antialiased; /* Fix for webkit rendering */
+ -webkit-text-size-adjust: 100%;
+}
+
+
+// Typography
+// ================================================== //
+
+h1, h2, h3, h4, h5, h6 {
+ color: #181818;
+ font-family: $serif;
+ font-weight: normal;
+
+ a {
+ font-weight: inherit;
+ }
+}
+
+h1 { font-size: 46px; line-height: 50px; margin-bottom: 14px;}
+h2 { font-size: 35px; line-height: 40px; margin-bottom: 10px; }
+h3 { font-size: 28px; line-height: 34px; margin-bottom: 8px; }
+h4 { font-size: 21px; line-height: 30px; margin-bottom: 4px; }
+h5 { font-size: 17px; line-height: 24px; }
+h6 { font-size: 14px; line-height: 21px; }
+
+.subheader { color: #777; }
+
+p {
+ margin: 0 0 20px 0;
+
+ img {
+ margin: 0;
+ }
+
+ &.lead {
+ font-size: 21px;
+ line-height: 27px;
+ color: #777;
+ }
+
+}
+
+
+em { font-style: italic; }
+strong { font-weight: bold; color: #333; }
+small { font-size: 80%; }
+
+/* Blockquotes */
+blockquote, blockquote p { font-size: 17px; line-height: 24px; color: #777; font-style: italic; }
+blockquote { margin: 0 0 20px; padding: 9px 20px 0 19px; border-left: 1px solid #ddd; }
+blockquote cite { display: block; font-size: 12px; color: #555; }
+blockquote cite:before { content: "\2014 \0020"; }
+blockquote cite a, blockquote cite a:visited, blockquote cite a:visited { color: #555; }
+
+hr { border: solid #ddd; border-width: 1px 0 0; clear: both; margin: 10px 0 30px; height: 0; }
+
+
+// Links
+// ================================================== //
+
+a, a:visited { color: #333; text-decoration: underline; outline: 0; }
+a:hover, a:focus { color: #000; }
+p a, p a:visited { line-height: inherit; }
View
56 server/public/sass/partials/_buttons.scss
@@ -0,0 +1,56 @@
+
+// #Buttons
+// ================================================== //
+
+$color-stops: color-stops( rgba(255,255,255,.2), rgba(0,0,0, 0.2));
+$hover-stops: color-stops( rgba(255,255,255,.3), rgba(0,0,0, 0.3));
+$active-stops: color-stops( rgba(255,255,255, 0.35), rgba(10,10,10, 0.4));
+
+// ================================================== //
+
+
+.button, button, input[type="submit"], input[type="reset"], input[type="button"] {
+
+ background: #eee; /* Old browsers */
+ border: 1px solid #aaa;
+ border-color: #ccc #ccc #aaa #ccc;
+ color: #444;
+ cursor: pointer;
+ font: bold 11px/normal $sans-serif;
+ margin-bottom: 20px;
+ text-decoration: none;
+ text-shadow: 0 1px rgba(255, 255, 255, .75);
+ padding: 8px 10px;
+
+ @include inline-block;
+ @include background( linear-gradient( $color-stops ), #eee );
+ @include border-radius(3px);
+
+ &:hover {
+ color: #222;
+ background: #ddd; /* Old browsers */
+ @include background( linear-gradient( $hover-stops ), #222 );
+ border: 1px solid #888;
+ border-color: #aaa #888 #888 #aaa;
+ }
+
+ &:active {
+ background: #ccc; /* Old browsers */
+ border: 1px solid #666;
+ @include background( linear-gradient( $active-stops ), #ccc );
+ }
+
+ &.full-width {
+ padding-left: 0 !important;
+ padding-right: 0 !important;
+ text-align: center;
+ width: 100%;
+ }
+}
+
+/* Fix for odd Mozilla border & padding issues */
+button::-moz-focus-inner,
+input::-moz-focus-inner {
+ border: 0;
+ padding: 0;
+}
View
58 server/public/sass/partials/_forms.scss
@@ -0,0 +1,58 @@
+// #Forms
+// ================================================== //
+
+form, fieldset {
+ margin-bottom: 20px;
+}
+
+input[type="number"] {
+ -webkit-apperance: none;
+}
+
+input[type="text"], input[type="password"], input[type="email"], input[type="number"], textarea, select {
+
+ background: #fff;
+ border: 1px solid #ccc;
+ color: #777;
+ display: block;
+ font: 13px $sans-serif;
+ margin: 0 0 20px;
+ max-width: 100%;
+ outline: none;
+ padding: 6px 4px;
+ width: 210px;
+
+ @include border-radius(2px);
+
+ &:focus {
+ border: 1px solid #aaa;
+ color: #444;
+
+ @include box-shadow( 0 0 3px rgba(0,0,0, 0.2));
+ }
+}
+
+select {
+ padding: 0;
+ width: 220px;
+}
+
+textarea {
+ min-height: 60px;
+}
+
+label, legend {
+ display: block;
+ font-weight: bold;
+ font-size: 13px;
+}
+
+input[type="checkbox"] {
+ display: inline;
+}
+
+label span, legend span {
+ font-weight: normal;
+ font-size: 13px;
+ color: #444;
+}
View
237 server/public/sass/partials/_grid.scss
@@ -0,0 +1,237 @@
+// Grid
+// ================================================== //
+
+// Table of Contents
+// -------------------------------------------------- //
+//
+// Base 960 Grid
+// Tablet (Portrait)
+// Mobile (Portrait)
+// Mobile (Landscape)
+// Clearing
+
+// -------------------------------------------------- //
+
+// #Base 960 Grid
+// ================================================== //
+
+.container { position: relative; width: $grid-width; margin: 0 auto; padding: 0; }
+.row { margin-bottom: 20px; }
+
+// Base Grid
+.container {
+
+ .one.column,
+ .one.columns { @include grid(1); }
+ .two.columns { @include grid(2); }
+ .three.columns { @include grid(3); }
+ .four.columns { @include grid(4); }
+ .five.columns { @include grid(5); }
+ .six.columns { @include grid(6); }
+ .seven.columns { @include grid(7); }
+ .eight.columns { @include grid(8); }
+ .nine.columns { @include grid(9); }
+ .ten.columns { @include grid(10); }
+ .eleven.columns { @include grid(11); }
+ .twelve.columns { @include grid(12); }
+ .thirteen.columns { @include grid(13); }
+ .fourteen.columns { @include grid(14); }
+ .fifteen.columns { @include grid(15); }
+ .sixteen.columns { @include grid(16); }
+
+ .one-third.column { @extend .one.column; width: (($grid-width - $grid-offset) / 3); }
+ .two-thirds.column { @extend .one.column; width: (($grid-width - $grid-offset) / 3) * 2; }
+
+ // Offsets
+ .offset-by-one { @include offset(1); }
+ .offset-by-two { @include offset(2); }
+ .offset-by-three { @include offset(3); }
+ .offset-by-four { @include offset(4); }
+ .offset-by-five { @include offset(5); }
+ .offset-by-six { @include offset(6); }
+ .offset-by-seven { @include offset(7); }
+ .offset-by-eight { @include offset(8); }
+ .offset-by-nine { @include offset(9); }
+ .offset-by-ten { @include offset(10); }
+ .offset-by-eleven { @include offset(11); }
+ .offset-by-twelve { @include offset(12); }
+ .offset-by-thirteen { @include offset(13); }
+ .offset-by-fourteen { @include offset(14); }
+ .offset-by-fifteen { @include offset(15); }
+
+ /* Nested Column Classes */
+ .column.alpha, .columns.alpha { margin-left: 0; }
+ .column.omega, .columns.omega { margin-right: 0; }
+
+}
+
+
+/* #Tablet (Portrait)
+ ================================================== */
+
+/* Note: Design for a width of 768px */
+
+@media only screen and (min-width: 768px) and (max-width: 959px) {
+ .container { width: 768px; }
+ .container .column,
+ .container .columns { margin-left: 10px; margin-right: 10px; }
+ .column.alpha, .columns.alpha { margin-left: 0; margin-right: 10px; }
+ .column.omega, .columns.omega { margin-right: 0; margin-left: 10px; }
+ .alpha.omega { margin-left: 0; margin-right: 0; }
+
+ .container .one.column,
+ .container .one.columns { width: 28px; }
+ .container .two.columns { width: 76px; }
+ .container .three.columns { width: 124px; }
+ .container .four.columns { width: 172px; }
+ .container .five.columns { width: 220px; }
+ .container .six.columns { width: 268px; }
+ .container .seven.columns { width: 316px; }
+ .container .eight.columns { width: 364px; }
+ .container .nine.columns { width: 412px; }
+ .container .ten.columns { width: 460px; }
+ .container .eleven.columns { width: 508px; }
+ .container .twelve.columns { width: 556px; }
+ .container .thirteen.columns { width: 604px; }
+ .container .fourteen.columns { width: 652px; }
+ .container .fifteen.columns { width: 700px; }
+ .container .sixteen.columns { width: 748px; }
+
+ .container .one-third.column { width: 236px; }
+ .container .two-thirds.column { width: 492px; }
+
+ /* Offsets */
+ .container .offset-by-one { padding-left: 48px; }
+ .container .offset-by-two { padding-left: 96px; }
+ .container .offset-by-three { padding-left: 144px; }
+ .container .offset-by-four { padding-left: 192px; }
+ .container .offset-by-five { padding-left: 240px; }
+ .container .offset-by-six { padding-left: 288px; }
+ .container .offset-by-seven { padding-left: 336px; }
+ .container .offset-by-eight { padding-left: 348px; }
+ .container .offset-by-nine { padding-left: 432px; }
+ .container .offset-by-ten { padding-left: 480px; }
+ .container .offset-by-eleven { padding-left: 528px; }
+ .container .offset-by-twelve { padding-left: 576px; }
+ .container .offset-by-thirteen { padding-left: 624px; }
+ .container .offset-by-fourteen { padding-left: 672px; }
+ .container .offset-by-fifteen { padding-left: 720px; }
+}
+
+
+/* #Mobile (Portrait)
+ ================================================== */
+
+/* Note: Design for a width of 320px */
+
+@media only screen and (max-width: 767px) {
+ .container { width: 300px; }
+ .container .columns,
+ .container .column { margin: 0; }
+
+ .container .one.column,
+ .container .one.columns,
+ .container .two.columns,
+ .container .three.columns,
+ .container .four.columns,
+ .container .five.columns,
+ .container .six.columns,
+ .container .seven.columns,
+ .container .eight.columns,
+ .container .nine.columns,
+ .container .ten.columns,
+ .container .eleven.columns,
+ .container .twelve.columns,
+ .container .thirteen.columns,
+ .container .fourteen.columns,
+ .container .fifteen.columns,
+ .container .sixteen.columns,
+ .container .one-third.column,
+ .container .two-thirds.column { width: 300px; }
+
+ /* Offsets */
+ .container .offset-by-one,
+ .container .offset-by-two,
+ .container .offset-by-three,
+ .container .offset-by-four,
+ .container .offset-by-five,
+ .container .offset-by-six,
+ .container .offset-by-seven,
+ .container .offset-by-eight,
+ .container .offset-by-nine,
+ .container .offset-by-ten,
+ .container .offset-by-eleven,
+ .container .offset-by-twelve,
+ .container .offset-by-thirteen,
+ .container .offset-by-fourteen,
+ .container .offset-by-fifteen { padding-left: 0; }
+
+}
+
+
+/* #Mobile (Landscape)
+ ================================================== */
+
+/* Note: Design for a width of 480px */
+
+@media only screen and (min-width: 480px) and (max-width: 767px) {
+ .container { width: 420px; }
+ .container .columns,
+ .container .column { margin: 0; }
+
+ .container .one.column,
+ .container .one.columns,
+ .container .two.columns,
+ .container .three.columns,
+ .container .four.columns,
+ .container .five.columns,
+ .container .six.columns,
+ .container .seven.columns,
+ .container .eight.columns,
+ .container .nine.columns,
+ .container .ten.columns,
+ .container .eleven.columns,
+ .container .twelve.columns,
+ .container .thirteen.columns,
+ .container .fourteen.columns,
+ .container .fifteen.columns,
+ .container .sixteen.columns,
+ .container .one-third.column,
+ .container .two-thirds.column { width: 420px; }
+}
+
+
+/* #Clearing
+ ================================================== */
+
+/* Self Clearing Goodness */
+.container:after { content: "\0020"; display: block; height: 0; clear: both; visibility: hidden; }
+
+/* Use clearfix class on parent to clear nested columns,
+ or wrap each row of columns in a <div class="row"> */
+.clearfix:before,
+.clearfix:after,
+.row:before,
+.row:after {
+ content: '\0020';
+ display: block;
+ overflow: hidden;
+ visibility: hidden;
+ width: 0;
+ height: 0; }
+.row:after,
+.clearfix:after {
+ clear: both; }
+.row,
+.clearfix {
+ zoom: 1; }
+
+/* You can also use a <br class="clear" /> to clear columns */
+.clear {
+ clear: both;
+ display: block;
+ overflow: hidden;
+ visibility: hidden;
+ width: 0;
+ height: 0;
+}
View
7 server/public/sass/partials/_images.scss
@@ -0,0 +1,7 @@
+// Images
+// ================================================== //
+
+img {
+ max-width: 100%;
+ height: auto;
+}
View
52 server/public/sass/partials/_lists.scss
@@ -0,0 +1,52 @@
+// Lists
+// ================================================== //
+
+ul, ol {
+ margin-bottom: 20px;
+}
+
+ul {
+ list-style: none outside;
+}
+
+ol {
+ list-style: decimal;
+}
+
+ol, ul.square, ul.circle, ul.disc {
+ margin-left: 30px;
+}
+
+ul.square {
+ list-style: square outside;
+}
+
+ul.circle {
+ list-style: circle outside;
+}
+
+ul.disc {
+ list-style: disc outside;
+}
+
+ul ul, ul ol, ol ol, ol ul {
+ margin: 4px 0 5px 30px;
+ font-size: 90%;
+}
+
+ul ul li, ul ol li, ol ol li, ol ul li {
+ margin-bottom: 6px;
+}
+
+li {
+ line-height: 18px;
+ margin-bottom: 12px;
+}
+
+ul.large li {
+ line-height: 21px;
+}
+
+li p {
+ line-height: 21px;
+}
View
6 server/public/sass/partials/_misc.scss
@@ -0,0 +1,6 @@
+// #Misc
+// ================================================== //
+
+.remove-bottom { margin-bottom: 0 !important; }
+.half-bottom { margin-bottom: 10px !important; }
+.add-bottom { margin-bottom: 20px !important; }
View
40 server/public/sass/partials/_mixins.scss
@@ -0,0 +1,40 @@
+// Mixins
+// ================================================== //
+
+
+// Grid Mixins
+// -------------------------------------------------- //
+
+@mixin alpha {
+ margin-left: 0;
+}
+
+@mixin omega {
+ margin-right: 0;
+}
+
+@mixin grid ($count:1, $pos:"") {
+
+ $gutter : $grid-gutter-width;
+ $base : $grid-column-width * $count;
+
+ width: $base + (($count - 1) * $gutter);
+
+ float: left;
+ display: inline;
+
+ margin: 0 ($gutter / 2) $grid-baseline-height ($gutter / 2);
+
+ @if ($pos == "alpha") {
+ @include alpha();
+ }
+
+ @if ($pos == "omega") {
+ @include omega();
+ }
+
+}
+
+@mixin offset ($cols:1) {
+ padding-left: ($cols * $grid-offset) + 0px;
+}
View
25 server/public/sass/partials/_reset.scss
@@ -0,0 +1,25 @@
+// Reset & Basics (Inspired by E. Meyers)
+// ================================================== //
+
+html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, embed, figure, figcaption, footer, header, hgroup, menu, nav, output, ruby, section, summary, time, mark, audio, video {
+ margin: 0;
+ padding: 0;
+ border: 0;
+ font-size: 100%;
+ font: inherit;
+ vertical-align: baseline; }
+article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section {
+ display: block; }
+body {
+ line-height: 1; }
+ol, ul {
+ list-style: none; }
+blockquote, q {
+ quotes: none; }
+blockquote:before, blockquote:after,
+q:before, q:after {
+ content: '';
+ content: none; }
+table {
+ border-collapse: collapse;
+ border-spacing: 0; }
View
89 server/public/sass/partials/_tabs.scss
@@ -0,0 +1,89 @@
+// #Tabs (activate in tabs.js)
+// ================================================== //
+
+ul.tabs {
+
+ display: block;
+ margin: 0 0 20px 0;
+ padding: 0;
+ border-bottom: solid 1px #ddd;
+ zoom: 1;
+
+ li {
+ display: block;
+ width: auto;
+ height: 30px;
+ padding: 0;
+ float: left;
+ margin-bottom: 0;
+
+ a {
+ display: block;
+ text-decoration: none;
+ width: auto;
+ height: 29px;
+ padding: 0px 20px;
+ line-height: 30px;
+ border: solid 1px #ddd;
+ border-width: 1px 1px 0 0;
+ margin: 0;
+ background: #f5f5f5;
+
+ &.active {
+ background: #fff;
+ height: 30px;
+ position: relative;
+ top: -4px;
+ padding-top: 4px;
+ border-left-width: 1px;
+ margin: 0 0 0 -1px;
+ color: #111;
+
+ @include border-top-radius(2px);
+ }
+
+ &:first-child {
+
+ @include border-top-radius(2px);
+
+ a {
+ border-width: 1px 1px 0 1px;
+ @include border-top-radius(2px);
+
+ &.active {
+ margin-left: 0;
+ }
+ }
+
+ }
+ }
+ }
+
+
+ // Clearfix for beautiful stacking
+ &:before, &:after {
+ content: '\0020';
+ display: block;
+ overflow: hidden;
+ visibility: hidden;
+ width: 0;
+ height: 0;
+ }
+
+ &:after {
+ clear: both;
+ }
+
+}
+
+ul.tabs-content {
+ margin: 0; display: block;
+
+ > li {
+ display:none;
+
+ &.active {
+ display: block;
+ }
+ }
+}
View
33 server/public/sass/partials/_variables.scss
@@ -0,0 +1,33 @@
+// Variables
+// ================================================== //
+
+
+// Grid
+// -------------------------------------------------- //
+
+$grid-column-width : 40px;
+$grid-gutter-width : 20px;
+$grid-total-columns : 16;
+$grid-baseline-height : 20px;
+
+$grid-offset : ($grid-column-width + $grid-gutter-width);
+$grid-width : ($grid-offset * $grid-total-columns);
+
+
+// Grid Utility
+// -------------------------------------------------- //
+
+$grid-background-column-width : $grid-column-width;
+$grid-background-gutter-width : $grid-gutter-width;
+$grid-background-total-columns : $grid-total-columns;
+$grid-background-baseline-height: $grid-baseline-height;
+
+$grid-background-baseline-color : rgba(0,0,0,0.15);
+$grid-background-column-color : rgba(100, 100, 100, 0.05);
+
+
+// Typography
+// -------------------------------------------------- //
+
+$sans-serif : "HelveticaNeue", "Helvetica Neue", Helvetica, Arial, sans-serif;
+$serif : "Georgia", "Times New Roman", Helvetica, Arial, sans-serif;
View
1,155 server/public/stylesheets/base.css
@@ -0,0 +1,1155 @@
+/*
+ * Skeleton V1.1
+ * Copyright 2011, Dave Gamache
+ *
+ * Compass-sass edition by Nate Hunzaker
+ *
+ * www.getskeleton.com
+ * Free to use under the MIT license.
+ * http://www.opensource.org/licenses/mit-license.php
+ * 8/17/2011
+ */
+/* line 4, ../sass/partials/_reset.scss */
+html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, embed, figure, figcaption, footer, header, hgroup, menu, nav, output, ruby, section, summary, time, mark, audio, video {
+ margin: 0;
+ padding: 0;
+ border: 0;
+ font-size: 100%;
+ font: inherit;
+ vertical-align: baseline;
+}
+
+/* line 11, ../sass/partials/_reset.scss */
+article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section {
+ display: block;
+}
+
+/* line 13, ../sass/partials/_reset.scss */
+body {
+ line-height: 1;
+}
+
+/* line 15, ../sass/partials/_reset.scss */
+ol, ul {
+ list-style: none;
+}
+
+/* line 17, ../sass/partials/_reset.scss */
+blockquote, q {
+ quotes: none;
+}
+
+/* line 20, ../sass/partials/_reset.scss */
+blockquote:before, blockquote:after,
+q:before, q:after {
+ content: '';
+ content: none;
+}
+
+/* line 23, ../sass/partials/_reset.scss */
+table {
+ border-collapse: collapse;
+ border-spacing: 0;
+}
+
+/* line 4, ../sass/partials/_base_type.scss */
+body {
+ background: #fff;
+ font: 14px/21px "HelveticaNeue", "Helvetica Neue", Helvetica, Arial, sans-serif;
+ color: #444;
+ -webkit-font-smoothing: antialiased;
+ /* Fix for webkit rendering */
+ -webkit-text-size-adjust: 100%;
+}
+
+/* line 16, ../sass/partials/_base_type.scss */
+h1, h2, h3, h4, h5, h6 {
+ color: #181818;
+ font-family: "Georgia", "Times New Roman", Helvetica, Arial, sans-serif;
+ font-weight: normal;
+}
+/* line 21, ../sass/partials/_base_type.scss */
+h1 a, h2 a, h3 a, h4 a, h5 a, h6 a {
+ font-weight: inherit;
+}
+
+/* line 26, ../sass/partials/_base_type.scss */
+h1 {
+ font-size: 46px;
+ line-height: 50px;
+ margin-bottom: 14px;
+}
+
+/* line 27, ../sass/partials/_base_type.scss */
+h2 {
+ font-size: 35px;
+ line-height: 40px;
+ margin-bottom: 10px;
+}
+
+/* line 28, ../sass/partials/_base_type.scss */
+h3 {
+ font-size: 28px;