Skip to content
Browse files

[docs] v0.1.0

  • Loading branch information...
1 parent 445d448 commit d5c447d417eb60bd1205c98c9099ba33cb49def4 @logicalparadox committed
Showing with 1,296 additions and 429 deletions.
  1. +367 −0 code/index.html
  2. +194 −1 index.html
  3. +0 −125 pages/lib-oath.js.html
  4. +630 −0 public/css/main.css
  5. +77 −0 public/js/main.js
  6. +28 −0 public/js/prettify.js
  7. +0 −279 public/main.css
  8. +0 −24 public/main.js
View
367 code/index.html
@@ -0,0 +1,367 @@
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <title>API Documentation for lib/oath.js - Oath
+ </title>
+ <script type="text/javascript">var ghuser = 'logicalparadox'
+ , ghproject = 'oath';
+
+</script>
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js"></script>
+ <script src="/oath/public/js/prettify.js"></script>
+ <script src="/oath/public/js/main.js"></script>
+ <link rel="stylesheet" href="/oath/public/css/main.css" type="text/css" media="all">
+ <link href="http://fonts.googleapis.com/css?family=Lato:100,300" rel="stylesheet" type="text/css">
+ <script type="text/javascript">var mpq = [];
+mpq.push(["init", "268c122423c94bf806c254a27a491302"]);
+(function(){var b,a,e,d,c;b=document.createElement("script");b.type="text/javascript";
+b.async=true;b.src=(document.location.protocol==="https:"?"https:":"http:")+
+"//api.mixpanel.com/site_media/js/api/mixpanel.js";a=document.getElementsByTagName("script")[0];
+a.parentNode.insertBefore(b,a);e=function(f){return function(){mpq.push(
+[f].concat(Array.prototype.slice.call(arguments,0)))}};d=["init","track","track_links",
+"track_forms","register","register_once","identify","name_tag","set_config"];for(c=0;c<
+d.length;c++){mpq[d[c]]=e(d[c])}})();
+</script>
+ <script type="text/javascript">var _gaq = _gaq || [];
+_gaq.push(['_setAccount', 'UA-26183904-4']);
+_gaq.push(['_trackPageview']);
+(function() {
+ var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+ ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+ var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+})();
+</script>
+ </head>
+ <body>
+ <nav>
+ <ul class="sections">
+ <li class="keepcase"><a href="#constructor" class="scroll">constructor</a>
+ </li>
+ <li class="keepcase"><a href="#Oath.resolve" class="scroll">Oath.resolve</a>
+ </li>
+ <li class="keepcase"><a href="#Oath.reject" class="scroll">Oath.reject</a>
+ </li>
+ <li class="keepcase"><a href="#then" class="scroll">then</a>
+ </li>
+ <li class="keepcase"><a href="#get" class="scroll">get</a>
+ </li>
+ <li class="keepcase"><a href="#pop" class="scroll">pop</a>
+ </li>
+ <li class="keepcase"><a href="#call" class="scroll">call</a>
+ </li>
+ </ul>
+ <ul class="pages">
+ <li><a href="/oath">Home</a>
+ </li>
+ </ul>
+ <ul class="code">
+ <li><a href="/oath/code/index.html">lib/oath.js</a>
+ </li>
+ </ul>
+ </nav>
+ <header>
+ <h1><a href="/oath">Oath</a>
+ </h1>
+ <div class="description"><p>Oath is a tiny javascript library for <a href="http://nodejs.org">node</a> and the browser that makes it easy to build and interact with promise/future based APIs.</p>
+ </div>
+ <div class="gh">
+ <h4>Latest Update to Github
+ </h4>
+ <div id="commit"><span id="latestCommitTime">Loading...</span><a id="latestCommitURL"></a>
+ </div>
+ <div id="latestCommitMessage">Loading...
+ </div>
+ <div id="clone"><a href="https://github.com/logicalparadox/oath" class="button fork">Fork me on GitHub</a>
+ <div class="clone">git clone https://github.com/logicalparadox/oath.git
+ </div>
+ </div>
+ <div id="links"><a id="repoIssues" href="https://github.com/logicalparadox/oath/issues">GitHub Issues</a><a id="repoDownload" href="https://github.com/downloads/logicalparadox/oath/oath-0.1.0.zip">Download v0.1.0
+</a>
+ </div>
+ </div>
+ </header>
+ <section id="content">
+ <div id="code">
+ <article id="constructor-section" class="codeblock">
+ <div class="header"><h1>Oath constructor</h1>
+ </div>
+ <div class="ctx">
+ <h3>Oath()
+ </h3>
+ </div>
+ <div class="tags">
+ <!-- ignroing this-->
+ <div class="tag"><span class="type">&#64;param</span><span class="types">&#123; Object &#125;</span><span class="name">options</span><span class="desc"></span>
+ </div>
+ <div class="tag"><span class="type">&#64;api</span><span class="visibility">public</span>
+ </div>
+ </div>
+ <div class="description"><p>Create a new promise.</p>
+
+<h4>Options</h4>
+
+<ul>
+<li>parent - used internally for chaining</li>
+<li>context - object to set as <code>this</code> in callbacks</li>
+</ul>
+
+<p>You can use <code>Oath</code> within single functions</p>
+
+<pre><code> // assignment style
+ var promise = new oath();
+ promise.then(successFn, errorFn);
+ myAsycFunction(function(err, result) {
+ if (err) promise.reject(err);
+ promise.resolve(result);
+ });
+</code></pre>
+
+<p>Or return them to ease chaining of callbacks</p>
+
+<pre><code> // return style
+ function doSomething(data) {
+ var promise = new oath();
+ // async stuff here
+ // promise should be returned immediately
+ return promise;
+ }
+
+ doSomething(data).then(successFn, errorFn);
+</code></pre>
+ </div>
+ <div class="view-source">View Source
+ </div>
+ <div class="code-wrap">
+ <pre class="source prettyprint"><code>function Oath (options) {
+ var self = this;
+ options = options || {};
+
+ this.pending = [];
+ this._options = {
+ parent: options.parent || null,
+ context: options.context || this
+ };</code>
+ </pre>
+ </div>
+ </article>
+ <article id="Oath.resolve-section" class="codeblock">
+ <div class="header"><h2>Oath.resolve(result)</h2>
+ </div>
+ <div class="ctx">
+ <h3>this.resolve()
+ </h3>
+ </div>
+ <div class="tags">
+ <!-- ignroing this-->
+ <div class="tag"><span class="type">&#64;param</span><span class="types">&#123; Object &#125;</span><span class="name">result</span><span class="desc"></span>
+ </div>
+ <div class="tag"><span class="type">&#64;api</span><span class="visibility">public</span>
+ </div>
+ </div>
+ <div class="description"><p>Emits completion event to execute <code>success</code> chain of functions.</p>
+
+<pre><code> // When async work is complete
+ promise.resolve(my_data_obj);
+</code></pre>
+ </div>
+ <div class="view-source">View Source
+ </div>
+ <div class="code-wrap">
+ <pre class="source prettyprint"><code>this.resolve = function (result) {
+ self._complete('resolve', result);
+ };</code>
+ </pre>
+ </div>
+ </article>
+ <article id="Oath.reject-section" class="codeblock">
+ <div class="header"><h2>Oath.reject(result)</h2>
+ </div>
+ <div class="ctx">
+ <h3>this.reject()
+ </h3>
+ </div>
+ <div class="tags">
+ <!-- ignroing this-->
+ <div class="tag"><span class="type">&#64;param</span><span class="types">&#123; Object &#125;</span><span class="name">result</span><span class="desc"></span>
+ </div>
+ <div class="tag"><span class="type">&#64;api</span><span class="visibility">public</span>
+ </div>
+ </div>
+ <div class="description"><p>Emit completion event to execute <code>failure</code> chain of functions.</p>
+
+<pre><code> // When async work errors
+ promise.reject(my_error_obj);
+</code></pre>
+ </div>
+ <div class="view-source">View Source
+ </div>
+ <div class="code-wrap">
+ <pre class="source prettyprint"><code>this.reject = function (result) {
+ self._complete('reject', result);
+ };
+}</code>
+ </pre>
+ </div>
+ </article>
+ <article id="then-section" class="codeblock">
+ <div class="header"><h1>.then([success], [failure])</h1>
+ </div>
+ <div class="ctx">
+ <h3>Oath.prototype.then()
+ </h3>
+ </div>
+ <div class="tags">
+ <!-- ignroing this-->
+ <div class="tag"><span class="type">&#64;param</span><span class="types">&#123; Function &#125;</span><span class="name">success</span><span class="desc">will execute on `resolve`</span>
+ </div>
+ <div class="tag"><span class="type">&#64;param</span><span class="types">&#123; Function &#125;</span><span class="name">failure</span><span class="desc">will execute on `reject` (optional)</span>
+ </div>
+ <div class="tag"><span class="type">&#64;api</span><span class="visibility">public</span>
+ </div>
+ </div>
+ <div class="description"><p>Chainable function for promise observers to queue result functions.</p>
+
+<pre><code> doSomething(my_data)
+ .then(successFn1, failureFn1)
+ .then(successFn2, failureFn2)
+</code></pre>
+ </div>
+ <div class="view-source">View Source
+ </div>
+ <div class="code-wrap">
+ <pre class="source prettyprint"><code>Oath.prototype.then = function (success, failure) {
+ var context = this._options.context,
+ pending = { resolve: null, reject: null };
+
+ if (success)
+ pending.resolve = function () { success.apply(context, arguments); };
+
+ if (failure)
+ pending.reject = function () { failure.apply(context, arguments); };
+
+ this.pending.push(pending);
+
+ return this;
+};</code>
+ </pre>
+ </div>
+ </article>
+ <article id="get-section" class="codeblock">
+ <div class="header"><h1>.get(property)</h1>
+ </div>
+ <div class="ctx">
+ <h3>Oath.prototype.get()
+ </h3>
+ </div>
+ <div class="tags">
+ <!-- ignroing this-->
+ <div class="tag"><span class="type">&#64;param</span><span class="types">&#123; String &#125;</span><span class="name">property</span><span class="desc"></span>
+ </div>
+ <div class="tag"><span class="type">&#64;api</span><span class="visibility">public</span>
+ </div>
+ </div>
+ <div class="description"><p>On <code>resolve</code>, will return <code>property</code> value from data<br />passed by oath. Subsequent <code>then</code> calls will have the<br />value of the <code>get</code> passed to them.</p>
+
+<pre><code> doSomething(my_data)
+ .get('doctor')
+ .then(function(doctor) { ... })
+ .then(function(doctor) { ... });
+</code></pre>
+ </div>
+ <div class="view-source">View Source
+ </div>
+ <div class="code-wrap">
+ <pre class="source prettyprint"><code>Oath.prototype.get = function (property) {
+ var o = new Oath({ parent: this });
+ this.then(
+ function(value) { o.resolve(value[property]); },
+ function(value) { o.reject(value); }
+ );
+ return o;
+};</code>
+ </pre>
+ </div>
+ </article>
+ <article id="pop-section" class="codeblock">
+ <div class="header"><h1>.pop()</h1>
+ </div>
+ <div class="ctx">
+ <h3>Oath.prototype.pop()
+ </h3>
+ </div>
+ <div class="tags">
+ <!-- ignroing this-->
+ <div class="tag"><span class="type">&#64;api</span><span class="visibility">public</span>
+ </div>
+ </div>
+ <div class="description"><p>Return you to a parent oath if you have chained down.</p>
+
+<pre><code> doSomething(my_data)
+ .get('doctor')
+ .then(function(doctor) { ... })
+ .pop()
+ .then(function(my_data) { ... });
+</code></pre>
+ </div>
+ <div class="view-source">View Source
+ </div>
+ <div class="code-wrap">
+ <pre class="source prettyprint"><code>Oath.prototype.pop = function () {
+ if (this._options.parent) {
+ return this._options.parent;
+ } else {
+ return this;
+ }
+};</code>
+ </pre>
+ </div>
+ </article>
+ <article id="call-section" class="codeblock">
+ <div class="header"><h1>.call(functionName)</h1>
+ </div>
+ <div class="ctx">
+ <h3>Oath.prototype.call()
+ </h3>
+ </div>
+ <div class="tags">
+ <!-- ignroing this-->
+ <div class="tag"><span class="type">&#64;param</span><span class="types">&#123; String &#125;</span><span class="name">function</span><span class="desc">name</span>
+ </div>
+ <div class="tag"><span class="type">&#64;api</span><span class="visibility">public</span>
+ </div>
+ </div>
+ <div class="description"><p>On <code>resolve</code>, will execute a function of <code>name</code> in the<br />result object. The function that is called will be passed<br />all subseqents parameters of <code>oath.call</code>. The context of<br /><code>this</code> in the function that is called will be equal to the<br /><code>result</code> object passed on <code>oath.resolve</code>.</p>
+
+<pre><code> // queue up call on complete
+ oath.call('validate', '1234');
+
+ oath.resolve({ some: 'data'
+ , validate: function (apiKey) {
+ this.some == 'data';
+ apiKey == '1234';
+ ...
+ }
+ });
+</code></pre>
+ </div>
+ <div class="view-source">View Source
+ </div>
+ <div class="code-wrap">
+ <pre class="source prettyprint"><code>Oath.prototype.call = function (fn) {
+ var args = arguments;
+ return this.then(function(value) {
+ return value[fn].apply(value, Array.prototype.slice.call(args, 1));
+ });
+};</code>
+ </pre>
+ </div>
+ </article>
+ </div>
+ </section>
+ <footer>
+ <div class="branding">Oath is&nbsp;<a href="http://alogicalparadox.com">a logical paradox</a>. site generated by
+<a href="http://codexjs.com">codex.</a>
+ </div>
+ </footer>
+ </body>
+</html>
View
195 index.html
@@ -1 +1,194 @@
-<!DOCTYPE html><html><head><title>Oath documentation</title><link rel="stylesheet" href="public/main.css"><script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"></script><script src="public/main.js"></script></head><body><div id="header"><h1>Oath</h1><div class="description"><p>Tiny promises for node.js and browser (using browserify). Independant distribution coming soon.</p></div><a href="https://github.com/logicalparadox/oath" class="button github">Fork me on GitHub</a><div class="clone">git clone https://github.com/logicalparadox/oath</div></div><div id="content"></div><ul id="files"><li><a href="/" class="nojax">home</a></li><li><a href="pages/lib-oath.js.html">lib/oath.js</a></li></ul></body></html>
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <title>Home - Oath
+ </title>
+ <script type="text/javascript">var ghuser = 'logicalparadox'
+ , ghproject = 'oath';
+
+</script>
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js"></script>
+ <script src="/oath/public/js/prettify.js"></script>
+ <script src="/oath/public/js/main.js"></script>
+ <link rel="stylesheet" href="/oath/public/css/main.css" type="text/css" media="all">
+ <link href="http://fonts.googleapis.com/css?family=Lato:100,300" rel="stylesheet" type="text/css">
+ <script type="text/javascript">var mpq = [];
+mpq.push(["init", "268c122423c94bf806c254a27a491302"]);
+(function(){var b,a,e,d,c;b=document.createElement("script");b.type="text/javascript";
+b.async=true;b.src=(document.location.protocol==="https:"?"https:":"http:")+
+"//api.mixpanel.com/site_media/js/api/mixpanel.js";a=document.getElementsByTagName("script")[0];
+a.parentNode.insertBefore(b,a);e=function(f){return function(){mpq.push(
+[f].concat(Array.prototype.slice.call(arguments,0)))}};d=["init","track","track_links",
+"track_forms","register","register_once","identify","name_tag","set_config"];for(c=0;c<
+d.length;c++){mpq[d[c]]=e(d[c])}})();
+</script>
+ <script type="text/javascript">var _gaq = _gaq || [];
+_gaq.push(['_setAccount', 'UA-26183904-4']);
+_gaq.push(['_trackPageview']);
+(function() {
+ var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+ ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+ var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+})();
+</script>
+ </head>
+ <body>
+ <nav>
+ <ul class="sections">
+ <li><a href="#installation" class="scroll">Installation</a>
+ </li>
+ <li><a href="#usage" class="scroll">Usage Scenarios</a>
+ </li>
+ <li><a href="#help" class="scroll">Getting Help</a>
+ </li>
+ <li><a href="#contributor" class="scroll">For Contributors</a>
+ </li>
+ </ul>
+ <ul class="code">
+ <li><a href="/oath/code/index.html">lib/oath.js</a>
+ </li>
+ </ul>
+ </nav>
+ <header>
+ <h1><a href="/oath">Oath</a>
+ </h1>
+ <div class="description"><p>Oath is a tiny javascript library for <a href="http://nodejs.org">node</a> and the browser that makes it easy to build and interact with promise/future based APIs.</p>
+ </div>
+ <div class="gh">
+ <h4>Latest Update to Github
+ </h4>
+ <div id="commit"><span id="latestCommitTime">Loading...</span><a id="latestCommitURL"></a>
+ </div>
+ <div id="latestCommitMessage">Loading...
+ </div>
+ <div id="clone"><a href="https://github.com/logicalparadox/oath" class="button fork">Fork me on GitHub</a>
+ <div class="clone">git clone https://github.com/logicalparadox/oath.git
+ </div>
+ </div>
+ <div id="links"><a id="repoIssues" href="https://github.com/logicalparadox/oath/issues">GitHub Issues</a><a id="repoDownload" href="https://github.com/downloads/logicalparadox/oath/oath-0.1.0.zip">Download v0.1.0
+</a>
+ </div>
+ </div>
+ </header>
+ <section id="content">
+ <article>
+ <h1 id="installation-section"><a name="installation">Installation</a>
+ </h1>
+ <section><p>Oath is available for both server-side and the browser.</p>
+
+<h3>Node.js</h3>
+
+<p>Package is available through <a href="http://npmjs.org">npm</a>:</p>
+
+<pre><code>npm install oath</code></pre>
+
+<h3>Browser</h3>
+
+<p>Download the package above.</p>
+
+<p>And include either the normal or minimized build in your HTML header.</p>
+
+<pre><code>&lt;script src=&quot;/public/js/oath.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;/public/js/oath.min.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;</code></pre>
+ </section>
+ <h1 id="usage-section"><a name="usage">Usage Scenarios</a>
+ </h1>
+ <section><h3>Using Oath in Async Functions</h3>
+
+<p>Our async function will returne a new <code>oath</code> and to allow queue of success or failure callbacks be
+registered by the recieving function. Here is a look at the internals of <code>asyncFunc</code>. In this
+scenario, let&#39;s say we are querying a database,doing some minupulation to the dataset, then
+returned an object that represents its data.</p>
+
+<pre><code>function asyncFunc(id) {
+ var promise = new oath();
+
+ // db.get is async function with callback
+ db.get({_id: id}, function(err, result) {
+ if (err) {
+ promise.reject(err); // we had an error, execute failure stack
+ return; // we are done here
+ }
+ // ...
+ promise.resolve(result); // execute success stack sending it the result
+ });
+
+ // promise will be returned immediately
+ return promise;
+}</code></pre>
+
+<p>Since <code>db.get</code> is asyncronous, the promise will be returned immediately. Our callbacks will be queued.</p>
+
+<p>When <code>db.get</code> is done, the callback is executed. If there was an error, we call <code>reject</code> on our promise
+to execute the falure stack. If there was no error, we continue, do our work, then <code>resolve</code> our promise
+to execute the success stack, returning the result to each function in that stack.</p>
+
+<h3>Code Sample of a Futures Style API</h3>
+
+<p>In the following scenario, an async function will return an oath and then begin doing its
+work. Upon completion of the async work it will either execute the <code>success</code> stack or the <code>failure</code>
+stack, passing the result or the error object, respectively.</p>
+
+<pre><code>var success = function (data) {
+ console.log(&#39;We were a success: &#39; + data);
+}
+
+var failure = function (err) {
+ console.log(&#39;We had an error: &#39; + err);
+}
+
+var doAsync = asyncFunc(123);
+
+doAsync.then(success, failure);</code></pre>
+
+<p>And primary advantage being that a queue is built. You can later queue more callbacks onto
+the <code>doAsync</code> as needed.</p>
+
+<pre><code>doAsync.then(success2, failure2);
+// other code stuff here
+doAsync.then(success3);
+// more stff
+doAsync.then(null, failure3);</code></pre>
+ </section>
+ <h1 id="help-section"><a name="help">Getting Help</a>
+ </h1>
+ <section><p>If you have questions or issues, please use this projects <a href="https://github.com/logicalparadox/oath/issues">Github Issues</a>.</p>
+ </section>
+ <h1 id="contributor-section"><a name="contributor">For Contributors</a>
+ </h1>
+ <section><h3>Developing</h3>
+
+<p>Please avoid making changes to the <code>dist</code> versions of oath if you are developing in the browser. All
+changes to the library are to be made to <code>lib/oath.js</code> and then packaged for the browser using the <code>make</code>
+command.</p>
+
+<pre><code> $ make</code></pre>
+
+<h3>Testing</h3>
+
+<p>Tests are written in BDD style on <a href="http://visionmedia.github.com/mocha/">mocha test framework</a> using
+the <a href="https://github.com/logicalparadox/chai">chai assert library</a>. Tests are written to pass in both
+a node.js environment and in the browser.</p>
+
+<p>Browsers tests are currently known to pass in Chrome 16 and Firefox 8. Please let me know if you can test
+in other browsers or other version.</p>
+
+<h4>Server Side Testing</h4>
+
+<p>It&#39;s quite simple...</p>
+
+<pre><code> make test</code></pre>
+
+<h4>Browser Side Testing</h4>
+
+<p>It&#39;s also quite simple. Open up <code>test/browser/index.html</code> in your nearest browser.</p>
+ </section>
+ </article>
+ </section>
+ <footer>
+ <div class="branding">Oath is&nbsp;<a href="http://alogicalparadox.com">a logical paradox</a>. site generated by
+<a href="http://codexjs.com">codex.</a>
+ </div>
+ </footer>
+ </body>
+</html>
View
125 pages/lib-oath.js.html
@@ -1,125 +0,0 @@
-<h2>lib/oath.js</h2><div id="comments"><div class="comment"><div class="summary"><h1>Oath constructor</h1></div><ul class="tags"><li><span class="type">param:</span>{
-<span class="types">Object</span>}
-<span class="name">options</span><span class="description"></span></li></ul><div class="body"><p>Create a new promise.</p>
-
-<h4>Options</h4>
-
-<ul>
-<li>parent - used internally for chaining</li>
-<li>context - object to set as <code>this</code> in callbacks</li>
-</ul>
-
-<h4>You can use <code>Oath</code> within single functions</h4>
-
-<pre><code> var promise = new oath();
- promise.then(successFn, errorFn);
- myAsycFunction(function(err, result) {
- if (err) promise.reject(err);
- promise.resolve(result);
- });
-</code></pre>
-
-<h4>Or return them to ease chaining of callbacks</h4>
-
-<pre><code> function doSomething(data) {
- var promise = new oath();
- // async stuff here
- // promise should be returned immediately
- return promise;
- }
-
- doSomething(data).then(successFn, errorFn);
-</code></pre></div><a href="#" class="button view-source">view source</a><pre class="source"><code>function Oath (options) {
- var self = this;
- options = options || {};
-
- this.pending = [];
- this._options = {
- parent: options.parent || null,
- context: options.context || this
- };</code></pre></div><div class="comment"><h3>this.resolve()</h3><div class="summary"><h2>Oath#resolve</h2></div><ul class="tags"><li><span class="type">param:</span>{
-<span class="types">Object</span>}
-<span class="name">result</span><span class="description"></span></li></ul><div class="body"><p>Emits completion event to execute <code>success</code> chain of functions.</p>
-
-<pre><code> // When async work is complete
- promise.resolve(my_data_obj);
-</code></pre></div><a href="#" class="button view-source">view source</a><pre class="source"><code>this.resolve = function (result) {
- self.complete('resolve', result);
- };</code></pre></div><div class="comment"><h3>this.reject()</h3><div class="summary"><h2>Oath#reject</h2></div><ul class="tags"><li><span class="type">param:</span>{
-<span class="types">Object</span>}
-<span class="name">result</span><span class="description"></span></li></ul><div class="body"><p>Emit completion event to execute <code>failure</code> chain of functions.</p>
-
-<pre><code> // When async work errors
- promise.reject(my_error_obj);
-</code></pre></div><a href="#" class="button view-source">view source</a><pre class="source"><code>this.reject = function (result) {
- self.complete('reject', result);
- };
-}</code></pre></div><div class="comment"><h3>Oath.prototype.then()</h3><div class="summary"><h1>.then()</h1></div><ul class="tags"><li><span class="type">param:</span>{
-<span class="types">Function</span>}
-<span class="name">success</span><span class="description">will execute on `resolve` </span></li><li><span class="type">param:</span>{
-<span class="types">Function</span>}
-<span class="name">failure</span><span class="description">will execute on `reject` (optional)</span></li></ul><div class="body"><p>Chainable function for promise observers to queue result functions.</p>
-
-<pre><code> doSomething(my_data)
- .then(successFn1, failureFn1)
- .then(successFn2, failureFn2)
-</code></pre></div><a href="#" class="button view-source">view source</a><pre class="source"><code>Oath.prototype.then = function (success, failure) {
- var context = this._options.context,
- pending = { resolve: null, reject: null };
-
- if (success)
- pending.resolve = function () { success.apply(context, arguments); };
-
- if (failure)
- pending.reject = function () { failure.apply(context, arguments); };
-
- this.pending.push(pending);
-
- return this;
-};</code></pre></div><div class="comment"><h3>Oath.prototype.get()</h3><div class="summary"><h1>.get()</h1></div><ul class="tags"><li><span class="type">param:</span>{
-<span class="types">String</span>}
-<span class="name">property</span><span class="description"></span></li></ul><div class="body"><p>On <code>resolve</code>, will return <code>property</code> value from data <br />passed by oath. Subsequent <code>then</code> calls will have the <br />value of the <code>get</code> passed to them.</p>
-
-<pre><code> doSomething(my_data).get('doctor')
- .then(function(doctor) { ... })
- .then(function(doctor) { ... });
-</code></pre></div><a href="#" class="button view-source">view source</a><pre class="source"><code>Oath.prototype.get = function (property) {
- var o = new Oath({ parent: this });
- this.then(
- function(value) { o.resolve(value[property]); },
- function(value) { o.reject(value); }
- );
- return o;
-};</code></pre></div><div class="comment"><h3>Oath.prototype.pop()</h3><div class="summary"><h1>.pop()</h1></div><ul class="tags"></ul><div class="body"><p>Return you to a parent oath if you have chained down.</p>
-
-<pre><code> doSomething(my_data)
- .get('doctor')
- .then(function(doctor) { ... })
- .pop()
- .then(function(my_data) { ... });
-</code></pre></div><a href="#" class="button view-source">view source</a><pre class="source"><code>Oath.prototype.pop = function () {
- if (this._options.parent) {
- return this._options.parent;
- } else {
- return this;
- }
-};</code></pre></div><div class="comment"><h3>Oath.prototype.call()</h3><div class="summary"><h1>.call()</h1></div><ul class="tags"><li><span class="type">param:</span>{
-<span class="types">String</span>}
-<span class="name">function</span><span class="description">name</span></li></ul><div class="body"><p>On <code>resolve</code>, will execute a function of <code>name</code> in the <br />result object. The function that is called will be passed <br />all subseqents parameters of <code>oath.call</code>. The context of <br /><code>this</code> in the function that is called will be equal to the <br /><code>result</code> object passed on <code>oath.resolve</code>.</p>
-
-<pre><code> // queue up call on complete
- oath.call('validate', '1234');
-
- oath.resolve({ some: 'data'
- , validate: function (apiKey) {
- this.some == 'data';
- apiKey == '1234';
- ...
- }
- });
-</code></pre></div><a href="#" class="button view-source">view source</a><pre class="source"><code>Oath.prototype.call = function (fn) {
- var args = arguments;
- return this.then(function(value) {
- return value[fn].apply(value, Array.prototype.slice.call(args, 1));
- });
-};</code></pre></div></div>
View
630 public/css/main.css
@@ -0,0 +1,630 @@
+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,
+font,
+img,
+ins,
+kbd,
+q,
+s,
+samp,
+small,
+strike,
+strong,
+sub,
+sup,
+tt,
+var,
+dl,
+dt,
+dd,
+ol,
+ul,
+li,
+fieldset,
+form,
+label,
+legend,
+table,
+caption,
+tbody,
+tfoot,
+thead,
+tr,
+th,
+td {
+ margin: 0;
+ padding: 0;
+ border: 0;
+ outline: 0;
+ font-weight: inherit;
+ font-style: inherit;
+ font-family: inherit;
+ font-size: 100%;
+ vertical-align: baseline;
+}
+body {
+ line-height: 1;
+ color: #000;
+ background: #fff;
+}
+ol,
+ul {
+ list-style: none;
+}
+table {
+ border-collapse: separate;
+ border-spacing: 0;
+ vertical-align: middle;
+}
+caption,
+th,
+td {
+ text-align: left;
+ font-weight: normal;
+ vertical-align: middle;
+}
+a img {
+ border: none;
+}
+h1 {
+ font-size: 2em;
+ margin-bottom: 0.75em;
+ line-height: 1.5;
+}
+h2 {
+ font-size: 1.5em;
+ margin-bottom: 0.75em;
+ line-height: 1;
+}
+h3 {
+ font-size: 1.25em;
+ margin-bottom: 1em;
+ line-height: 1.2;
+}
+h4 {
+ font-size: 1.125em;
+ margin-bottom: 1.33em;
+ line-height: 1.33;
+}
+h5 {
+ font-weight: bold;
+}
+h5,
+h6 {
+ font-size: 1em;
+ margin-bottom: 1.5em;
+ line-height: 1.5;
+}
+p,
+address {
+ margin-bottom: 1.5em;
+}
+article ul {
+ list-style: disc;
+ margin-bottom: 1.5em;
+}
+article ul li {
+ margin-left: 1.5em;
+}
+code {
+ font-family: "Bitstream Vera Sans Mono", "Courier", monospace;
+}
+body {
+ font: 13px/1.4 "Helvetica Neue", Helvetica, Arial, sans-serif;
+}
+h1,
+h2,
+h3 {
+ font-family: "Lato", "Helvetica Neue", Helvetica, Arial, sans-serif;
+}
+a {
+ color: #c30;
+ text-decoration: none;
+}
+h1,
+h3 {
+ color: #4183c4;
+}
+h1 a,
+h3 a {
+ color: #4183c4;
+}
+h3 {
+ font-size: 1.5em;
+}
+em {
+ font-style: italic;
+ font-weight: bold;
+}
+header,
+section#content,
+footer {
+ width: 740px;
+ margin-left: 220px;
+}
+header {
+ zoom: 1;
+ margin-top: 50px;
+}
+header:before,
+header:after {
+ content: "";
+ display: table;
+}
+header:after {
+ clear: both;
+}
+header h1 {
+ font-size: 45px;
+}
+header h1 a {
+ color: #4183c4;
+}
+header p {
+ color: #666;
+ font-size: 22px;
+ font-family: "Lato", "Helvetica Neue", Helvetica, Arial, sans-serif;
+}
+header .gh {
+ zoom: 1;
+ background: #f7f7f7;
+ -webkit-box-shadow: 2px 2px 3px #ededed, inset 1px 1px 2px #fff;
+ -moz-box-shadow: 2px 2px 3px #ededed, inset 1px 1px 2px #fff;
+ box-shadow: 2px 2px 3px #ededed, inset 1px 1px 2px #fff;
+ border: 1px solid #d9d9d9;
+ padding: 10px;
+ position: relative;
+ min-height: 100px;
+}
+header .gh:before,
+header .gh:after {
+ content: "";
+ display: table;
+}
+header .gh:after {
+ clear: both;
+}
+header .gh h4 {
+ text-shadow: 1px 1px 0px #fff;
+ margin-bottom: 10px;
+ color: #666;
+}
+header .gh h4 #latestCommitURL {
+ font-size: 11px;
+ margin-left: 10px;
+}
+header .gh #commit {
+ font-size: 10px;
+ margin-right: 10px;
+ line-height: 18px;
+ padding: 0px 5px;
+ background: #b3b3b3;
+ -webkit-box-shadow: inset 1px 1px 1px #999, 1px 1px 0px #fff;
+ -moz-box-shadow: inset 1px 1px 1px #999, 1px 1px 0px #fff;
+ box-shadow: inset 1px 1px 1px #999, 1px 1px 0px #fff;
+ -webkit-border-radius: 3px;
+ -moz-border-radius: 3px;
+ border-radius: 3px;
+ float: left;
+ color: #fff;
+}
+header .gh #commit a {
+ color: #fff;
+ font-style: italic;
+}
+header .gh #latestCommitMessage {
+ line-height: 20px;
+ text-shadow: 1px 1px 0px #fff;
+}
+header .gh #clone {
+ position: absolute;
+ bottom: 10px;
+ right: 10px;
+ left: 10px;
+}
+header .gh #clone .fork {
+ display: inline-block;
+ padding: 0.5em 1em;
+ background: -webkit-gradient(linear, left top, left bottom, color-stop(0, #3d80c3), color-stop(1, #3876b3));
+ background: -webkit-linear-gradient(top, #3d80c3 0%, #3876b3 100%);
+ background: -moz-linear-gradient(top, #3d80c3 0%, #3876b3 100%);
+ background: linear-gradient(top, #3d80c3 0%, #3876b3 100%);
+ border: 1px solid #2e6295;
+ font: 11px/normal helvetica, arial, freesans, clean, sans-serif;
+ color: #fff;
+ text-decoration: none;
+ text-shadow: 1px 1px 0px #548fca;
+ font-weight: bold;
+ -webkit-border-radius: 3px;
+ -moz-border-radius: 3px;
+ border-radius: 3px;
+ cursor: pointer;
+ float: left;
+ display: inline-block;
+}
+header .gh #clone .fork:hover {
+ background: -webkit-gradient(linear, left top, left bottom, color-stop(0, #eb3b00), color-stop(1, #c30));
+ background: -webkit-linear-gradient(top, #eb3b00 0%, #c30 100%);
+ background: -moz-linear-gradient(top, #eb3b00 0%, #c30 100%);
+ background: linear-gradient(top, #eb3b00 0%, #c30 100%);
+ color: #fff;
+ text-shadow: -1px -1px 0px #992600;
+ border: 1px solid #ad2b00;
+}
+header .gh #clone .clone {
+ color: #666;
+ float: left;
+ display: inline-block;
+ margin-left: 15px;
+ background: #fff;
+ -webkit-border-radius: 5px;
+ -moz-border-radius: 5px;
+ border-radius: 5px;
+ border: 1px solid #d9d9d9;
+ padding: 0px 15px;
+ -webkit-box-shadow: inset 1px 1px 2px #ededed, 1px 1px 0px #fff;
+ -moz-box-shadow: inset 1px 1px 2px #ededed, 1px 1px 0px #fff;
+ box-shadow: inset 1px 1px 2px #ededed, 1px 1px 0px #fff;
+ font: 11px "Bitstream Vera Sans Mono", "Courier", monospace;
+ line-height: 23px;
+ max-width: 545px;
+ overflow: hidden;
+}
+header .gh #links {
+ position: absolute;
+ top: 10px;
+ right: 10px;
+ font-size: 11px;
+ line-height: 18px;
+}
+header .gh #links a {
+ color: #4183c4;
+ padding: 0px 10px;
+}
+header .gh #links a:hover {
+ text-decoration: underline;
+}
+section#content {
+ margin-top: 50px;
+ margin-bottom: 50px;
+ min-height: 350px;
+}
+section#content h1 {
+ border-top: 1px solid #d9d9d9;
+ padding-top: 10px;
+ margin-top: 85px;
+}
+section#content h2 {
+ border-top: 1px solid #d9d9d9;
+ padding-top: 15px;
+ margin-top: 25px;
+}
+section#content p code {
+ padding: 3px 5px;
+ background: #e6e6e6;
+}
+nav {
+ position: fixed;
+ top: 65px;
+ left: 30px;
+ width: 140px;
+}
+nav ul {
+ list-style: none;
+ margin-bottom: 50px;
+}
+nav ul li {
+ margin-left: 0px;
+ text-align: right;
+}
+nav ul li.keepcase a {
+ text-transform: none !important;
+}
+nav ul li.header {
+ font-weight: bold;
+}
+nav ul li a {
+ color: #666;
+ font-family: "Lato", "Helvetica Neue", Helvetica, Arial, sans-serif;
+ font-size: 14px;
+ text-transform: lowercase;
+}
+nav ul li a:hover {
+ text-decoration: underline;
+}
+footer {
+ margin-top: 100px;
+ padding-top: 25px;
+ margin-bottom: 50px;
+ border-top: 1px solid #d9d9d9;
+ color: #808080;
+ text-transform: lowercase;
+}
+pre {
+ padding: 15px;
+ margin: 15px;
+ border: 1px solid #e6e6e6;
+ -webkit-border-radius: 3px;
+ -moz-border-radius: 3px;
+ border-radius: 3px;
+ font-size: 12px;
+}
+.code-wrap {
+ zoom: 1;
+}
+.code-wrap ::-webkit-scrollbar {
+ width: 8px;
+ height: 8px;
+}
+.code-wrap ::-webkit-scrollbar-button:vertical {
+ border-width: 0px;
+}
+.code-wrap ::-webkit-scrollbar-button:start:decrement,
+.code-wrap ::-webkit-scrollbar-button:end:increment {
+ display: none;
+}
+.code-wrap ::-webkit-scrollbar-button:vertical:start:increment,
+.code-wrap ::-webkit-scrollbar-button:vertical:end:decrement {
+ display: none;
+}
+.code-wrap ::-webkit-scrollbar-button:vertical:increment {
+ border-width: 0px;
+}
+.code-wrap ::-webkit-scrollbar-button:vertical:decrement {
+ border-width: 0px;
+}
+.code-wrap ::-webkit-scrollbar-track:vertical {
+ border-width: 0px;
+}
+.code-wrap ::-webkit-scrollbar-track-piece:vertical:start {
+ border-width: 0px;
+}
+.code-wrap ::-webkit-scrollbar-track-piece:vertical:end {
+ border-width: 0px;
+}
+.code-wrap ::-webkit-scrollbar-track-piece {
+ display: none;
+}
+.code-wrap ::-webkit-scrollbar-thumb:vertical {
+ height: 50px;
+ background-color: #e6e6e6;
+ -webkit-border-radius: 8px;
+ -moz-border-radius: 8px;
+ -webkit-border-radius: 8px;
+ -moz-border-radius: 8px;
+ border-radius: 8px;
+}
+.code-wrap ::-webkit-scrollbar-corner:vertical {
+ display: none;
+}
+.code-wrap ::-webkit-scrollbar-resizer:vertical {
+ display: none;
+}
+.code-wrap:before,
+.code-wrap:after {
+ content: "";
+ display: table;
+}
+.code-wrap:after {
+ clear: both;
+}
+pre.source {
+ max-height: 350px;
+ overflow-y: auto;
+ font-size: 11px;
+ border: 1px solid #d9d9d9;
+}
+.codeblock {
+ position: relative;
+}
+.codeblock h1 {
+ color: #4183c4;
+}
+.codeblock code {
+ padding: 3px 5px;
+ background: #e6e6e6;
+}
+.ctx h3 {
+ color: #d9d9d9;
+}
+.tags {
+ padding: 15px;
+ font-size: 12px;
+}
+.tags span {
+ margin-right: 3px;
+}
+.tags span.type {
+ font-weight: bold;
+}
+.tags span.types {
+ font-style: italic;
+}
+.view-source {
+ display: inline-block;
+ padding: 0.5em 1em;
+ background: -webkit-gradient(linear, left top, left bottom, color-stop(0, #7cbe49), color-stop(1, #72b140));
+ background: -webkit-linear-gradient(top, #7cbe49 0%, #72b140 100%);
+ background: -moz-linear-gradient(top, #7cbe49 0%, #72b140 100%);
+ background: linear-gradient(top, #7cbe49 0%, #72b140 100%);
+ border: 1px solid #5f9435;
+ font: 11px/normal helvetica, arial, freesans, clean, sans-serif;
+ color: #fff;
+ text-decoration: none;
+ text-shadow: 1px 1px 0px #8cc55f;
+ font-weight: bold;
+ -webkit-border-radius: 3px;
+ -moz-border-radius: 3px;
+ border-radius: 3px;
+ cursor: pointer;
+ position: absolute;
+ top: 15px;
+ right: 0px;
+}
+.view-source:hover {
+ background: -webkit-gradient(linear, left top, left bottom, color-stop(0, #3c7ec0), color-stop(1, #3570aa));
+ background: -webkit-linear-gradient(top, #3c7ec0 0%, #3570aa 100%);
+ background: -moz-linear-gradient(top, #3c7ec0 0%, #3570aa 100%);
+ background: linear-gradient(top, #3c7ec0 0%, #3570aa 100%);
+ color: #fff;
+ text-shadow: -1px -1px 0px #285480;
+ border: 1px solid #2d5f91;
+}
+pre .str,
+code .str {
+ color: #65b042;
+/* string - green */
+}
+pre .kwd,
+code .kwd {
+ color: #e28964;
+/* keyword - dark pink */
+}
+pre .com,
+code .com {
+ color: #aeaeae;
+ font-style: italic;
+/* comment - gray */
+}
+pre .typ,
+code .typ {
+ color: #89bdff;
+/* type - light blue */
+}
+pre .lit,
+code .lit {
+ color: #3387cc;
+/* literal - blue */
+}
+pre .pun,
+code .pun {
+ color: #000;
+/* punctuation - white */
+}
+pre .pln,
+code .pln {
+ color: #000;
+/* plaintext - white */
+}
+pre .tag,
+code .tag {
+ color: #89bdff;
+/* html/xml tag - light blue */
+}
+pre .atn,
+code .atn {
+ color: #bdb76b;
+/* html/xml attribute name - khaki */
+}
+pre .atv,
+code .atv {
+ color: #65b042;
+/* html/xml attribute value - green */
+}
+pre .dec,
+code .dec {
+ color: #3387cc;
+/* decimal - blue */
+}
+pre.prettyprint,
+code.prettyprint {
+ background-color: #fff;
+}
+pre.prettyprint {
+ white-space: pre-wrap;
+}
+ol.linenums {
+ margin-top: 0;
+ margin-bottom: 0;
+ color: #aeaeae;
+/* IE indents via margin-left */
+}
+li.L0,
+li.L1,
+li.L2,
+li.L3,
+li.L4,
+li.L5,
+li.L6,
+li.L7,
+li.L8,
+li.L9 {
+ list-style-type: none;
+}
+li.L1,
+li.L3,
+li.L5,
+li.L7,
+li.L9 {
+ background-color: #fff;
+}
+@media print {
+ pre .str,
+ code .str {
+ color: #060;
+ }
+ pre .kwd,
+ code .kwd {
+ color: #006;
+ font-weight: bold;
+ }
+ pre .com,
+ code .com {
+ color: #600;
+ font-style: italic;
+ }
+ pre .typ,
+ code .typ {
+ color: #404;
+ font-weight: bold;
+ }
+ pre .lit,
+ code .lit {
+ color: #044;
+ }
+ pre .pun,
+ code .pun {
+ color: #440;
+ }
+ pre .pln,
+ code .pln {
+ color: #000;
+ }
+ pre .tag,
+ code .tag {
+ color: #006;
+ font-weight: bold;
+ }
+ pre .atn,
+ code .atn {
+ color: #404;
+ }
+ pre .atv,
+ code .atv {
+ color: #060;
+ }
+}
View
77 public/js/main.js
@@ -0,0 +1,77 @@
+$(function () {
+
+ $.ajax({
+ url: "http://github.com/api/v2/json/commits/list/" + ghuser + "/" + ghproject + "/master",
+ dataType: 'jsonp',
+ success: function(json) {
+ var latest = json.commits[0],
+ stamp = new Date(latest.committed_date),
+ stampString = month[stamp.getMonth()] + ' ' + stamp.getDate() + ', ' + stamp.getFullYear();
+
+ $('#latestCommitMessage').text(latest.message);
+ $('#latestCommitTime').text(stampString);
+ $('#latestCommitURL').html(' - commit ' + latest.id.substring(0, 6));
+ $('#latestCommitURL').attr('href', "https://github.com" + latest.url);
+ }
+ });
+
+ var month = new Array(12);
+ month[0] = "Jan";
+ month[1] = "Feb";
+ month[2] = "Mar";
+ month[3] = "Apr";
+ month[4] = "May";
+ month[5] = "Jun";
+ month[6] = "Jul";
+ month[7] = "Aug";
+ month[8] = "Sep";
+ month[9] = "Oct";
+ month[10] = "Nov";
+ month[11] = "Dec";
+
+
+ $('pre code').addClass('prettyprint');
+ prettyPrint();
+
+ $('a.scroll').click(function (e) {
+ e.preventDefault();
+
+ var section = $(this).attr('href')
+ , $scrollto = $(section + '-section');
+
+ $('html,body').animate({
+ scrollTop: $scrollto.offset().top
+ });
+ });
+
+ $('.view-source').click(function(){
+ var $obj = $(this).next('.code-wrap')
+ , will = ($obj.css('display') == 'none') ? true : false;
+
+ $obj.toggle(200);
+
+ if (will) {
+ $('html,body').animate({
+ scrollTop: $obj.offset().top
+ });
+ }
+
+ var tag = $(this).siblings('.header').find('h1').text()
+ , action = (will) ? 'opened' : 'closed'
+ , note = 'User ' + action + ' ' + tag + '.';
+
+ mpq.track('View Source clicked', {
+ 'tag': tag,
+ 'action': action,
+ 'mp_note': note
+ });
+
+ return false;
+ });
+
+ $('a.button.github').click(function () {
+ mpq.track('Github Fork clicked');
+ });
+
+ $('.code-wrap').hide();
+});
View
28 public/js/prettify.js
@@ -0,0 +1,28 @@
+var q=null;window.PR_SHOULD_USE_CONTINUATION=!0;
+(function(){function L(a){function m(a){var f=a.charCodeAt(0);if(f!==92)return f;var b=a.charAt(1);return(f=r[b])?f:"0"<=b&&b<="7"?parseInt(a.substring(1),8):b==="u"||b==="x"?parseInt(a.substring(2),16):a.charCodeAt(1)}function e(a){if(a<32)return(a<16?"\\x0":"\\x")+a.toString(16);a=String.fromCharCode(a);if(a==="\\"||a==="-"||a==="["||a==="]")a="\\"+a;return a}function h(a){for(var f=a.substring(1,a.length-1).match(/\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\[0-3][0-7]{0,2}|\\[0-7]{1,2}|\\[\S\s]|[^\\]/g),a=
+[],b=[],o=f[0]==="^",c=o?1:0,i=f.length;c<i;++c){var j=f[c];if(/\\[bdsw]/i.test(j))a.push(j);else{var j=m(j),d;c+2<i&&"-"===f[c+1]?(d=m(f[c+2]),c+=2):d=j;b.push([j,d]);d<65||j>122||(d<65||j>90||b.push([Math.max(65,j)|32,Math.min(d,90)|32]),d<97||j>122||b.push([Math.max(97,j)&-33,Math.min(d,122)&-33]))}}b.sort(function(a,f){return a[0]-f[0]||f[1]-a[1]});f=[];j=[NaN,NaN];for(c=0;c<b.length;++c)i=b[c],i[0]<=j[1]+1?j[1]=Math.max(j[1],i[1]):f.push(j=i);b=["["];o&&b.push("^");b.push.apply(b,a);for(c=0;c<
+f.length;++c)i=f[c],b.push(e(i[0])),i[1]>i[0]&&(i[1]+1>i[0]&&b.push("-"),b.push(e(i[1])));b.push("]");return b.join("")}function y(a){for(var f=a.source.match(/\[(?:[^\\\]]|\\[\S\s])*]|\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\\d+|\\[^\dux]|\(\?[!:=]|[()^]|[^()[\\^]+/g),b=f.length,d=[],c=0,i=0;c<b;++c){var j=f[c];j==="("?++i:"\\"===j.charAt(0)&&(j=+j.substring(1))&&j<=i&&(d[j]=-1)}for(c=1;c<d.length;++c)-1===d[c]&&(d[c]=++t);for(i=c=0;c<b;++c)j=f[c],j==="("?(++i,d[i]===void 0&&(f[c]="(?:")):"\\"===j.charAt(0)&&
+(j=+j.substring(1))&&j<=i&&(f[c]="\\"+d[i]);for(i=c=0;c<b;++c)"^"===f[c]&&"^"!==f[c+1]&&(f[c]="");if(a.ignoreCase&&s)for(c=0;c<b;++c)j=f[c],a=j.charAt(0),j.length>=2&&a==="["?f[c]=h(j):a!=="\\"&&(f[c]=j.replace(/[A-Za-z]/g,function(a){a=a.charCodeAt(0);return"["+String.fromCharCode(a&-33,a|32)+"]"}));return f.join("")}for(var t=0,s=!1,l=!1,p=0,d=a.length;p<d;++p){var g=a[p];if(g.ignoreCase)l=!0;else if(/[a-z]/i.test(g.source.replace(/\\u[\da-f]{4}|\\x[\da-f]{2}|\\[^UXux]/gi,""))){s=!0;l=!1;break}}for(var r=
+{b:8,t:9,n:10,v:11,f:12,r:13},n=[],p=0,d=a.length;p<d;++p){g=a[p];if(g.global||g.multiline)throw Error(""+g);n.push("(?:"+y(g)+")")}return RegExp(n.join("|"),l?"gi":"g")}function M(a){function m(a){switch(a.nodeType){case 1:if(e.test(a.className))break;for(var g=a.firstChild;g;g=g.nextSibling)m(g);g=a.nodeName;if("BR"===g||"LI"===g)h[s]="\n",t[s<<1]=y++,t[s++<<1|1]=a;break;case 3:case 4:g=a.nodeValue,g.length&&(g=p?g.replace(/\r\n?/g,"\n"):g.replace(/[\t\n\r ]+/g," "),h[s]=g,t[s<<1]=y,y+=g.length,
+t[s++<<1|1]=a)}}var e=/(?:^|\s)nocode(?:\s|$)/,h=[],y=0,t=[],s=0,l;a.currentStyle?l=a.currentStyle.whiteSpace:window.getComputedStyle&&(l=document.defaultView.getComputedStyle(a,q).getPropertyValue("white-space"));var p=l&&"pre"===l.substring(0,3);m(a);return{a:h.join("").replace(/\n$/,""),c:t}}function B(a,m,e,h){m&&(a={a:m,d:a},e(a),h.push.apply(h,a.e))}function x(a,m){function e(a){for(var l=a.d,p=[l,"pln"],d=0,g=a.a.match(y)||[],r={},n=0,z=g.length;n<z;++n){var f=g[n],b=r[f],o=void 0,c;if(typeof b===
+"string")c=!1;else{var i=h[f.charAt(0)];if(i)o=f.match(i[1]),b=i[0];else{for(c=0;c<t;++c)if(i=m[c],o=f.match(i[1])){b=i[0];break}o||(b="pln")}if((c=b.length>=5&&"lang-"===b.substring(0,5))&&!(o&&typeof o[1]==="string"))c=!1,b="src";c||(r[f]=b)}i=d;d+=f.length;if(c){c=o[1];var j=f.indexOf(c),k=j+c.length;o[2]&&(k=f.length-o[2].length,j=k-c.length);b=b.substring(5);B(l+i,f.substring(0,j),e,p);B(l+i+j,c,C(b,c),p);B(l+i+k,f.substring(k),e,p)}else p.push(l+i,b)}a.e=p}var h={},y;(function(){for(var e=a.concat(m),
+l=[],p={},d=0,g=e.length;d<g;++d){var r=e[d],n=r[3];if(n)for(var k=n.length;--k>=0;)h[n.charAt(k)]=r;r=r[1];n=""+r;p.hasOwnProperty(n)||(l.push(r),p[n]=q)}l.push(/[\S\s]/);y=L(l)})();var t=m.length;return e}function u(a){var m=[],e=[];a.tripleQuotedStrings?m.push(["str",/^(?:'''(?:[^'\\]|\\[\S\s]|''?(?=[^']))*(?:'''|$)|"""(?:[^"\\]|\\[\S\s]|""?(?=[^"]))*(?:"""|$)|'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$))/,q,"'\""]):a.multiLineStrings?m.push(["str",/^(?:'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$)|`(?:[^\\`]|\\[\S\s])*(?:`|$))/,
+q,"'\"`"]):m.push(["str",/^(?:'(?:[^\n\r'\\]|\\.)*(?:'|$)|"(?:[^\n\r"\\]|\\.)*(?:"|$))/,q,"\"'"]);a.verbatimStrings&&e.push(["str",/^@"(?:[^"]|"")*(?:"|$)/,q]);var h=a.hashComments;h&&(a.cStyleComments?(h>1?m.push(["com",/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,q,"#"]):m.push(["com",/^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\n\r]*)/,q,"#"]),e.push(["str",/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/,q])):m.push(["com",/^#[^\n\r]*/,
+q,"#"]));a.cStyleComments&&(e.push(["com",/^\/\/[^\n\r]*/,q]),e.push(["com",/^\/\*[\S\s]*?(?:\*\/|$)/,q]));a.regexLiterals&&e.push(["lang-regex",/^(?:^^\.?|[!+-]|!=|!==|#|%|%=|&|&&|&&=|&=|\(|\*|\*=|\+=|,|-=|->|\/|\/=|:|::|;|<|<<|<<=|<=|=|==|===|>|>=|>>|>>=|>>>|>>>=|[?@[^]|\^=|\^\^|\^\^=|{|\||\|=|\|\||\|\|=|~|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\s*(\/(?=[^*/])(?:[^/[\\]|\\[\S\s]|\[(?:[^\\\]]|\\[\S\s])*(?:]|$))+\/)/]);(h=a.types)&&e.push(["typ",h]);a=(""+a.keywords).replace(/^ | $/g,
+"");a.length&&e.push(["kwd",RegExp("^(?:"+a.replace(/[\s,]+/g,"|")+")\\b"),q]);m.push(["pln",/^\s+/,q," \r\n\t\xa0"]);e.push(["lit",/^@[$_a-z][\w$@]*/i,q],["typ",/^(?:[@_]?[A-Z]+[a-z][\w$@]*|\w+_t\b)/,q],["pln",/^[$_a-z][\w$@]*/i,q],["lit",/^(?:0x[\da-f]+|(?:\d(?:_\d+)*\d*(?:\.\d*)?|\.\d\+)(?:e[+-]?\d+)?)[a-z]*/i,q,"0123456789"],["pln",/^\\[\S\s]?/,q],["pun",/^.[^\s\w"-$'./@\\`]*/,q]);return x(m,e)}function D(a,m){function e(a){switch(a.nodeType){case 1:if(k.test(a.className))break;if("BR"===a.nodeName)h(a),
+a.parentNode&&a.parentNode.removeChild(a);else for(a=a.firstChild;a;a=a.nextSibling)e(a);break;case 3:case 4:if(p){var b=a.nodeValue,d=b.match(t);if(d){var c=b.substring(0,d.index);a.nodeValue=c;(b=b.substring(d.index+d[0].length))&&a.parentNode.insertBefore(s.createTextNode(b),a.nextSibling);h(a);c||a.parentNode.removeChild(a)}}}}function h(a){function b(a,d){var e=d?a.cloneNode(!1):a,f=a.parentNode;if(f){var f=b(f,1),g=a.nextSibling;f.appendChild(e);for(var h=g;h;h=g)g=h.nextSibling,f.appendChild(h)}return e}
+for(;!a.nextSibling;)if(a=a.parentNode,!a)return;for(var a=b(a.nextSibling,0),e;(e=a.parentNode)&&e.nodeType===1;)a=e;d.push(a)}var k=/(?:^|\s)nocode(?:\s|$)/,t=/\r\n?|\n/,s=a.ownerDocument,l;a.currentStyle?l=a.currentStyle.whiteSpace:window.getComputedStyle&&(l=s.defaultView.getComputedStyle(a,q).getPropertyValue("white-space"));var p=l&&"pre"===l.substring(0,3);for(l=s.createElement("LI");a.firstChild;)l.appendChild(a.firstChild);for(var d=[l],g=0;g<d.length;++g)e(d[g]);m===(m|0)&&d[0].setAttribute("value",
+m);var r=s.createElement("OL");r.className="linenums";for(var n=Math.max(0,m-1|0)||0,g=0,z=d.length;g<z;++g)l=d[g],l.className="L"+(g+n)%10,l.firstChild||l.appendChild(s.createTextNode("\xa0")),r.appendChild(l);a.appendChild(r)}function k(a,m){for(var e=m.length;--e>=0;){var h=m[e];A.hasOwnProperty(h)?window.console&&console.warn("cannot override language handler %s",h):A[h]=a}}function C(a,m){if(!a||!A.hasOwnProperty(a))a=/^\s*</.test(m)?"default-markup":"default-code";return A[a]}function E(a){var m=
+a.g;try{var e=M(a.h),h=e.a;a.a=h;a.c=e.c;a.d=0;C(m,h)(a);var k=/\bMSIE\b/.test(navigator.userAgent),m=/\n/g,t=a.a,s=t.length,e=0,l=a.c,p=l.length,h=0,d=a.e,g=d.length,a=0;d[g]=s;var r,n;for(n=r=0;n<g;)d[n]!==d[n+2]?(d[r++]=d[n++],d[r++]=d[n++]):n+=2;g=r;for(n=r=0;n<g;){for(var z=d[n],f=d[n+1],b=n+2;b+2<=g&&d[b+1]===f;)b+=2;d[r++]=z;d[r++]=f;n=b}for(d.length=r;h<p;){var o=l[h+2]||s,c=d[a+2]||s,b=Math.min(o,c),i=l[h+1],j;if(i.nodeType!==1&&(j=t.substring(e,b))){k&&(j=j.replace(m,"\r"));i.nodeValue=
+j;var u=i.ownerDocument,v=u.createElement("SPAN");v.className=d[a+1];var x=i.parentNode;x.replaceChild(v,i);v.appendChild(i);e<o&&(l[h+1]=i=u.createTextNode(t.substring(b,o)),x.insertBefore(i,v.nextSibling))}e=b;e>=o&&(h+=2);e>=c&&(a+=2)}}catch(w){"console"in window&&console.log(w&&w.stack?w.stack:w)}}var v=["break,continue,do,else,for,if,return,while"],w=[[v,"auto,case,char,const,default,double,enum,extern,float,goto,int,long,register,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"],
+"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],F=[w,"alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,dynamic_cast,explicit,export,friend,inline,late_check,mutable,namespace,nullptr,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"],G=[w,"abstract,boolean,byte,extends,final,finally,implements,import,instanceof,null,native,package,strictfp,super,synchronized,throws,transient"],
+H=[G,"as,base,by,checked,decimal,delegate,descending,dynamic,event,fixed,foreach,from,group,implicit,in,interface,internal,into,is,lock,object,out,override,orderby,params,partial,readonly,ref,sbyte,sealed,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,var"],w=[w,"debugger,eval,export,function,get,null,set,undefined,var,with,Infinity,NaN"],I=[v,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"],
+J=[v,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],v=[v,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],K=/^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)/,N=/\S/,O=u({keywords:[F,H,w,"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END"+
+I,J,v],hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0}),A={};k(O,["default-code"]);k(x([],[["pln",/^[^<?]+/],["dec",/^<!\w[^>]*(?:>|$)/],["com",/^<\!--[\S\s]*?(?:--\>|$)/],["lang-",/^<\?([\S\s]+?)(?:\?>|$)/],["lang-",/^<%([\S\s]+?)(?:%>|$)/],["pun",/^(?:<[%?]|[%?]>)/],["lang-",/^<xmp\b[^>]*>([\S\s]+?)<\/xmp\b[^>]*>/i],["lang-js",/^<script\b[^>]*>([\S\s]*?)(<\/script\b[^>]*>)/i],["lang-css",/^<style\b[^>]*>([\S\s]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),
+["default-markup","htm","html","mxml","xhtml","xml","xsl"]);k(x([["pln",/^\s+/,q," \t\r\n"],["atv",/^(?:"[^"]*"?|'[^']*'?)/,q,"\"'"]],[["tag",/^^<\/?[a-z](?:[\w-.:]*\w)?|\/?>$/i],["atn",/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^\s"'>]*(?:[^\s"'/>]|\/(?=\s)))/],["pun",/^[/<->]+/],["lang-js",/^on\w+\s*=\s*"([^"]+)"/i],["lang-js",/^on\w+\s*=\s*'([^']+)'/i],["lang-js",/^on\w+\s*=\s*([^\s"'>]+)/i],["lang-css",/^style\s*=\s*"([^"]+)"/i],["lang-css",/^style\s*=\s*'([^']+)'/i],["lang-css",
+/^style\s*=\s*([^\s"'>]+)/i]]),["in.tag"]);k(x([],[["atv",/^[\S\s]+/]]),["uq.val"]);k(u({keywords:F,hashComments:!0,cStyleComments:!0,types:K}),["c","cc","cpp","cxx","cyc","m"]);k(u({keywords:"null,true,false"}),["json"]);k(u({keywords:H,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:K}),["cs"]);k(u({keywords:G,cStyleComments:!0}),["java"]);k(u({keywords:v,hashComments:!0,multiLineStrings:!0}),["bsh","csh","sh"]);k(u({keywords:I,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),
+["cv","py"]);k(u({keywords:"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["perl","pl","pm"]);k(u({keywords:J,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb"]);k(u({keywords:w,cStyleComments:!0,regexLiterals:!0}),["js"]);k(u({keywords:"all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,true,try,unless,until,when,while,yes",
+hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]);k(x([],[["str",/^[\S\s]+/]]),["regex"]);window.prettyPrintOne=function(a,m,e){var h=document.createElement("PRE");h.innerHTML=a;e&&D(h,e);E({g:m,i:e,h:h});return h.innerHTML};window.prettyPrint=function(a){function m(){for(var e=window.PR_SHOULD_USE_CONTINUATION?l.now()+250:Infinity;p<h.length&&l.now()<e;p++){var n=h[p],k=n.className;if(k.indexOf("prettyprint")>=0){var k=k.match(g),f,b;if(b=
+!k){b=n;for(var o=void 0,c=b.firstChild;c;c=c.nextSibling)var i=c.nodeType,o=i===1?o?b:c:i===3?N.test(c.nodeValue)?b:o:o;b=(f=o===b?void 0:o)&&"CODE"===f.tagName}b&&(k=f.className.match(g));k&&(k=k[1]);b=!1;for(o=n.parentNode;o;o=o.parentNode)if((o.tagName==="pre"||o.tagName==="code"||o.tagName==="xmp")&&o.className&&o.className.indexOf("prettyprint")>=0){b=!0;break}b||((b=(b=n.className.match(/\blinenums\b(?::(\d+))?/))?b[1]&&b[1].length?+b[1]:!0:!1)&&D(n,b),d={g:k,h:n,i:b},E(d))}}p<h.length?setTimeout(m,
+250):a&&a()}for(var e=[document.getElementsByTagName("pre"),document.getElementsByTagName("code"),document.getElementsByTagName("xmp")],h=[],k=0;k<e.length;++k)for(var t=0,s=e[k].length;t<s;++t)h.push(e[k][t]);var e=q,l=Date;l.now||(l={now:function(){return+new Date}});var p=0,d,g=/\blang(?:uage)?-([\w.]+)(?!\S)/;m()};window.PR={createSimpleLexer:x,registerLangHandler:k,sourceDecorator:u,PR_ATTRIB_NAME:"atn",PR_ATTRIB_VALUE:"atv",PR_COMMENT:"com",PR_DECLARATION:"dec",PR_KEYWORD:"kwd",PR_LITERAL:"lit",
+PR_NOCODE:"nocode",PR_PLAIN:"pln",PR_PUNCTUATION:"pun",PR_SOURCE:"src",PR_STRING:"str",PR_TAG:"tag",PR_TYPE:"typ"}})();
View
279 public/main.css
@@ -1,279 +0,0 @@
-body {
- margin: 0;
- font: 13px/1.4 "helvetica neue", helvetica, arial, sans-serif;
- padding: 50px 0px;
- -webkit-font-smoothing: antialiased;
-}
-a {
- color: #252525;
- text-decoration: none;
-}
-h1 {
- margin: 15px 0;
- font-size: 45px;
-}
-.description {
- margin-bottom: 30px;
-}
-pre {
- margin: 15px;
- padding: 10px;
-}
-button,
-a.button,
-input[type=button] {
- margin: 0;
- -webkit-user-select: none;
- -moz-user-select: none;
- user-select: none;
- display: inline-block;
- text-decoration: none;
- background: #7fbf4d;
- background: -webkit-gradient(linear, left top, left bottom, color-stop(0, #7fbf4d), color-stop(1, #72b140));
- background: -webkit-linear-gradient(top, #7fbf4d 0%, #72b140 100%);
- background: -moz-linear-gradient(top, #7fbf4d 0%, #72b140 100%);
- background: linear-gradient(top, #7fbf4d 0%, #72b140 100%);
- border: 1px solid #6ca83d;
- border-bottom: 1px solid #72b140;
- -webkit-border-radius: 3px;
- -moz-border-radius: 3px;
- border-radius: 3px;
- -webkit-box-shadow: inset 0 1px 0 0 #8cc55f;
- -moz-box-shadow: inset 0 1px 0 0 #8cc55f;
- box-shadow: inset 0 1px 0 0 #8cc55f;
- font-family: "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Geneva, Verdana, sans-serif;
- font-size: 11px;
- font-weight: bold;
- line-height: 1;
- padding: 7px 15px 8px 15px;
- text-align: center;
- text-shadow: 0 -1px 0 #6ba83c;
- color: #fff;
-}
-button:hover,
-a.button:hover,
-input[type=button]:hover,
-button.hover,
-a.button.hover,
-input[type=button].hover {
-#6ca83d
- background: #6ca83d;
- background: -webkit-gradient(linear, left top, left bottom, color-stop(0, #7fbf4d), color-stop(1, #6ca83d));
- background: -webkit-linear-gradient(top, #7fbf4d 0%, #6ca83d 100%);
- background: -moz-linear-gradient(top, #7fbf4d 0%, #6ca83d 100%);
- background: linear-gradient(top, #7fbf4d 0%, #6ca83d 100%);
- cursor: pointer;
-}
-button:active,
-a.button:active,
-input[type=button]:active,
-button.active,
-a.button.active,
-input[type=button].active {
-#6ca83d
- border: 1px solid #6ca83d;
- border-bottom: 1px solid #6ca83d;
- background: -webkit-gradient(linear, left bottom, left top, color-stop(0, #7fbf4d), color-stop(1, #6ca83d));
- background: -webkit-linear-gradient(bottom, #7fbf4d 0%, #6ca83d 100%);
- background: -moz-linear-gradient(bottom, #7fbf4d 0%, #6ca83d 100%);
- background: linear-gradient(bottom, #7fbf4d 0%, #6ca83d 100%);
- -webkit-box-shadow: inset 0 0 8px 4px rgba(0,0,0,0.15), 0 1px 0 0 #eee;
- -moz-box-shadow: inset 0 0 8px 4px rgba(0,0,0,0.15), 0 1px 0 0 #eee;
- box-shadow: inset 0 0 8px 4px rgba(0,0,0,0.15), 0 1px 0 0 #eee;
-}
-button.github,
-a.button.github,
-input[type=button].github {
- margin: 0;
- -webkit-user-select: none;
- -moz-user-select: none;
- user-select: none;
- display: inline-block;
- text-decoration: none;
- background: #4183c4;
- background: -webkit-gradient(linear, left top, left bottom, color-stop(0, #4183c4), color-stop(1, #3876b3));
- background: -webkit-linear-gradient(top, #4183c4 0%, #3876b3 100%);
- background: -moz-linear-gradient(top, #4183c4 0%, #3876b3 100%);
- background: linear-gradient(top, #4183c4 0%, #3876b3 100%);
- border: 1px solid #3570aa;
- border-bottom: 1px solid #3876b3;
- -webkit-border-radius: 3px;
- -moz-border-radius: 3px;
- border-radius: 3px;
- -webkit-box-shadow: inset 0 1px 0 0 #548fca;
- -moz-box-shadow: inset 0 1px 0 0 #548fca;
- box-shadow: inset 0 1px 0 0 #548fca;
- font-family: "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Geneva, Verdana, sans-serif;
- font-size: 11px;
- font-weight: bold;
- line-height: 1;
- padding: 7px 15px 8px 15px;
- text-align: center;
- text-shadow: 0 -1px 0 #356fa9;
- color: #fff;
-}
-button.github:hover,
-a.button.github:hover,
-input[type=button].github:hover,
-button.github.hover,
-a.button.github.hover,
-input[type=button].github.hover {
-#3570aa
- background: #3570aa;
- background: -webkit-gradient(linear, left top, left bottom, color-stop(0, #4183c4), color-stop(1, #3570aa));
- background: -webkit-linear-gradient(top, #4183c4 0%, #3570aa 100%);
- background: -moz-linear-gradient(top, #4183c4 0%, #3570aa 100%);
- background: linear-gradient(top, #4183c4 0%, #3570aa 100%);
- cursor: pointer;
-}
-button.github:active,
-a.button.github:active,
-input[type=button].github:active,
-button.github.active,
-a.button.github.active,
-input[type=button].github.active {
-#3570aa
- border: 1px solid #3570aa;
- border-bottom: 1px solid #3570aa;
- background: -webkit-gradient(linear, left bottom, left top, color-stop(0, #4183c4), color-stop(1, #3570aa));
- background: -webkit-linear-gradient(bottom, #4183c4 0%, #3570aa 100%);
- background: -moz-linear-gradient(bottom, #4183c4 0%, #3570aa 100%);
- background: linear-gradient(bottom, #4183c4 0%, #3570aa 100%);
- -webkit-box-shadow: inset 0 0 8px 4px rgba(0,0,0,0.15), 0 1px 0 0 #eee;
- -moz-box-shadow: inset 0 0 8px 4px rgba(0,0,0,0.15), 0 1px 0 0 #eee;
- box-shadow: inset 0 0 8px 4px rgba(0,0,0,0.15), 0 1px 0 0 #eee;
-}
-#content,
-#header {
- margin: 0 0 0 200px;
- width: 740px;
-}
-#header {
- margin-bottom: 100px;
-}
-#header .github {
- float: left;
-}
-#header .clone {
- float: left;
- margin-left: 15px;
- background: #e6e6e6;
- padding: 7px 15px;
- -webkit-border-radius: 5px;
- -moz-border-radius: 5px;
- border-radius: 5px;
- font: 12px "Bitstream Vera Sans Mono", "Courier", monospace;
-}
-.comment {
- position: relative;
- padding-bottom: 35px;
- border-top: 2px solid #e6e6e6;
-}
-.comment h1 {
- font-size: 2em;
- color: #4183c4;
-}
-.comment .view-source {
- position: absolute;
- top: 5px;
- right: 5px;
- padding: 3px 8px 5px 8px;
-}
-.comment pre {
- max-height: 300px;
- overflow-y: auto;
-/* Turn on a 13x13 scrollbar */
-/* Turn on single button up on top, and down on bottom */
-/* Turn off the down area up on top, and up area on bottom */
-/* Place The scroll down button at the bottom */
-/* Place The scroll up button at the up */
-/* Top area above thumb and below up button */
-/* Bottom area below thumb and down button */
-/* Track below and above */
-/* The thumb itself */
-/* Corner */
-/* Resizer */
-}
-.comment pre::-webkit-scrollbar {
- width: 8px;
- height: 8px;
-}
-.comment pre::-webkit-scrollbar-button:vertical {
- border-width: 0px;
-}
-.comment pre::-webkit-scrollbar-button:start:decrement,
-.comment pre::-webkit-scrollbar-button:end:increment {
- display: none;
-}
-.comment pre::-webkit-scrollbar-button:vertical:start:increment,
-.comment pre::-webkit-scrollbar-button:vertical:end:decrement {
- display: none;
-}
-.comment pre::-webkit-scrollbar-button:vertical:increment {
- border-width: 0px;
-}
-.comment pre::-webkit-scrollbar-button:vertical:decrement {
- border-width: 0px;
-}
-.comment pre::-webkit-scrollbar-track:vertical {
- border-width: 0px;
-}
-.comment pre::-webkit-scrollbar-track-piece:vertical:start {
- border-width: 0px;
-}
-.comment pre::-webkit-scrollbar-track-piece:vertical:end {
- border-width: 0px;
-}
-.comment pre::-webkit-scrollbar-track-piece {
- display: none;
-}
-.comment pre::-webkit-scrollbar-thumb:vertical {
- height: 50px;
- background-color: #e6e6e6;
- -webkit-border-radius: 8px;
- -moz-border-radius: 8px;
- border-radius: 8px;
-}
-.comment pre::-webkit-scrollbar-corner:vertical {
- display: none;
-}
-.comment pre::-webkit-scrollbar-resizer:vertical {
- display: none;
-}
-.comment pre.source {
- border: 1px solid #6ca83d;
-}
-.comment ul.tags li span {
- margin-right: 3px;
-}
-.comment ul.tags li span.type {
- font-weight: bold;
-}
-.comment ul.tags li span.types {
- font-style: italic;
-}
-.comment ul.tags li span.description {
- font-size: 85%;
-}
-#files {
- margin: 0;
- position: fixed;
- top: 85px;
- left: 20px;
- padding: 10px 20px;
-}
-#files li {
- list-style: none;
- padding: 2px 0;
-}
-pre {
- padding: 15px;
- border: 1px solid #e6e6e6;
- -webkit-border-radius: 3px;
- -moz-border-radius: 3px;
- border-radius: 3px;
-}
-p code {
- padding: 3px 5px;
- background: #e6e6e6;
-}
View
24 public/main.js
@@ -1,24 +0,0 @@
-
-$(function(){
- $('#files a').click(function(){
- if ($(this).hasClass('nojax')) {
- window.location.hash = ''
- $('#content').html('');
- } else {
- display($(this).attr('href'), '/' + $(this).text());
- }
- return false;
- });
-});
-
-function display(path, name) {
- $.get(path, function(res){
- $('#content').html(res);
- if (name != 'home') window.location.hash = name;
- $('.view-source').click(function(){
- $(this).next('.source').toggle(200);
- return false;
- });
- $('.source').hide();
- });
-}

0 comments on commit d5c447d

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