xonecas.io
818
Du

dustymarkdown / commit c305c6a

Added js processing, css too

xonecas2011-06-02 c305c6af0d2876a2f24cb4b0f06566ea1e82fd67 parent 2c2dbfd

11 files changed

This diff is too big to show in full. The first 1000 lines are below, and every file is listed with its counts.

htdocs/about.html+31−9
@@ -1,27 +1,49 @@
1+
12 <!doctype html>
2-<!--[if lt IE 7]> <html class="no-js ie6" lang="en"> <![endif]-->
3-<!--[if IE 7]> <html class="no-js ie7" lang="en"> <![endif]-->
4-<!--[if IE 8]> <html class="no-js ie8" lang="en"> <![endif]-->
5-<!--[if gt IE 8]><!--> <html class="no-js" lang="en"> <!--<![endif]-->
3+<!--[if lt IE 9 ]> <html class="no-js oldie" lang="en"> <![endif]-->
4+<!--[if (gte IE 9)|!(IE)]><!--> <html class="no-js" lang="en"> <!--<![endif]-->
65 <head>
7- <meta charset="utf-8">
6+ <meta charset="utf-8">
87
98 <title>Dusty Markdown</title>
10-
119 <meta name="description" content="simple command line content manager">
1210 <meta name="author" content="@xonecas">
11+
1312 <meta name="viewport" content="width=device-width, initial-scale=1.0">
13+ <link rel="shortcut icon" href="/favicon.ico">
14+ <link rel="apple-touch-icon" href="/apple-touch-icon.png">
1415
15- <link rel="stylesheet" href="css/style.css">
16+ <link rel="stylesheet" href="css/style.css?v=2">
1617 <link href='http://fonts.googleapis.com/css?family=Oswald' rel='stylesheet' type='text/css'>
18+ <script src="js/libs/modernizr-1.7.min.js"></script>
1719
1820 </head>
1921
2022 <body>
21- <header>{header|s}</header>
23+
24+ <header>
25+ {header|s}
26+ </header>
2227 <section id="main">
2328 {example|s}
2429 </section>
30+
31+
32+ <script src="//ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.js"></script>
33+ <script>window.jQuery || document.write("<script src='js/libs/jquery-1.5.1.min.js'>\x3C/script>")</script>
34+
35+
36+ <!-- scripts concatenated and minified via ant build script-->
37+ <script src="js/plugins.js"></script>
38+ <script src="js/script.js"></script>
39+ <!-- end scripts-->
40+
41+
42+ <!--[if lt IE 7 ]>
43+ <script src="js/libs/dd_belatedpng.js"></script>
44+ <script>DD_belatedPNG.fix("img, .png_bg");</script>
45+ <![endif]-->
46+
47+
2548 </body>
2649 </html>
27-
htdocs/css/style.css+26−154
@@ -1,21 +1,4 @@
1-/**
2- * HTML5 ✰ Boilerplate
3- *
4- * style.css contains a reset, font normalization and some base styles.
5- *
6- * Credit is left where credit is due.
7- * Much inspiration was taken from these projects:
8- * - yui.yahooapis.com/2.8.1/build/base/base.css
9- * - camendesign.com/design/
10- * - praegnanz.de/weblog/htmlcssjs-kickstart
11- */
12-
13-
14-/**
15- * html5doctor.com Reset Stylesheet (Eric Meyer's Reset Reloaded + HTML5 baseline)
16- * v1.6.1 2010-09-17 | Authors: Eric Meyer & Richard Clark
17- * html5doctor.com/html-5-reset-stylesheet/
18- */
1+/* HTML5 ✰ Boilerplate */
192
203 html, body, div, span, object, iframe,
214 h1, h2, h3, h4, h5, h6, p, blockquote, pre,
@@ -40,128 +23,57 @@ footer, header, hgroup, menu, nav, section {
4023 }
4124
4225 blockquote, q { quotes: none; }
43-
4426 blockquote:before, blockquote:after,
4527 q:before, q:after { content: ""; content: none; }
46-
4728 ins { background-color: #ff9; color: #000; text-decoration: none; }
48-
4929 mark { background-color: #ff9; color: #000; font-style: italic; font-weight: bold; }
50-
5130 del { text-decoration: line-through; }
52-
5331 abbr[title], dfn[title] { border-bottom: 1px dotted; cursor: help; }
54-
5532 table { border-collapse: collapse; border-spacing: 0; }
56-
5733 hr { display: block; height: 1px; border: 0; border-top: 1px solid #ccc; margin: 1em 0; padding: 0; }
58-
5934 input, select { vertical-align: middle; }
6035
61-
62-/**
63- * Font normalization inspired by YUI Library's fonts.css: developer.yahoo.com/yui/
64- */
65-
66-body { font:13px/1.231 sans-serif; *font-size:small; } /* Hack retained to preserve specificity */
36+body { font:13px/1.231 sans-serif; }
37+.oldie body { font-size:small; }
6738 select, input, textarea, button { font:99% sans-serif; }
68-
69-/* Normalize monospace sizing:
70- en.wikipedia.org/wiki/MediaWiki_talk:Common.css/Archive_11#Teletype_style_fix_for_Chrome */
7139 pre, code, kbd, samp { font-family: monospace, sans-serif; }
7240
73-
74-/**
75- * Minimal base styles.
76- */
77-
78-/* Always force a scrollbar in non-IE */
7941 html { overflow-y: scroll; }
80-
81-/* j.mp/webkit-tap-highlight-color */
82-a:link { -webkit-tap-highlight-color: #FF5E99; }
83-
84-/* Accessible focus treatment: people.opera.com/patrickl/experiments/keyboard/test */
8542 a:hover, a:active { outline: none; }
86-
87-a, a:active, a:visited { color: #607890; }
88-a:hover { color: #036; }
89-
9043 ul, ol { margin-left: 2em; }
9144 ol { list-style-type: decimal; }
92-
93-/* Remove margins for navigation lists */
9445 nav ul, nav li { margin: 0; list-style:none; list-style-image: none; }
95-
9646 small { font-size: 85%; }
9747 strong, th { font-weight: bold; }
98-
9948 td { vertical-align: top; }
100-
101-/* Set sub, sup without affecting line-height: gist.github.com/413930 */
10249 sub, sup { font-size: 75%; line-height: 0; position: relative; }
10350 sup { top: -0.5em; }
10451 sub { bottom: -0.25em; }
10552
106-pre {
107- /* www.pathf.com/blogs/2008/05/formatting-quoted-code-in-blog-posts-css21-white-space-pre-wrap/ */
108- white-space: pre; white-space: pre-wrap; word-wrap: break-word;
109- padding: 15px;
110-}
111-
53+pre { white-space: pre; white-space: pre-wrap; word-wrap: break-word; padding: 15px; }
54+textarea { overflow: auto; }
11255 .ie6 legend, .ie7 legend { margin-left: -7px; }
113-
114-/* Align checkboxes, radios, text inputs with their label by: Thierry Koblentz tjkdesign.com/ez-css/css/base.css */
11556 input[type="radio"] { vertical-align: text-bottom; }
11657 input[type="checkbox"] { vertical-align: bottom; }
11758 .ie7 input[type="checkbox"] { vertical-align: baseline; }
11859 .ie6 input { vertical-align: text-bottom; }
119-
120-/* Hand cursor on clickable input elements */
12160 label, input[type="button"], input[type="submit"], input[type="image"], button { cursor: pointer; }
122-
123-/* 1) Make inputs and buttons play nice in IE: www.viget.com/inspire/styling-the-button-element-in-internet-explorer/
124- 2) WebKit browsers add a 2px margin outside the chrome of form elements.
125- Firefox adds a 1px margin above and below textareas */
126-button, input, select, textarea { width: auto; overflow: visible; margin: 0; }
127-
128-textarea { overflow: auto; } /* www.sitepoint.com/blogs/2010/08/20/ie-remove-textarea-scrollbars/ */
129-
130-/* Remove extra padding and inner border in Firefox */
131-input::-moz-focus-inner,
132-button::-moz-focus-inner { border: 0; padding: 0; }
133-
134-/* Colors for form validity */
61+button, input, select, textarea { margin: 0; }
13562 input:valid, textarea:valid { }
136-input:invalid, textarea:invalid {
137- border-radius: 1px; -moz-box-shadow: 0px 0px 5px red; -webkit-box-shadow: 0px 0px 5px red; box-shadow: 0px 0px 5px red;
138-}
63+input:invalid, textarea:invalid { border-radius: 1px; -moz-box-shadow: 0px 0px 5px red; -webkit-box-shadow: 0px 0px 5px red; box-shadow: 0px 0px 5px red; }
13964 .no-boxshadow input:invalid, .no-boxshadow textarea:invalid { background-color: #f0dddd; }
14065
141-/* These selection declarations have to be separate
142- No text-shadow: twitter.com/miketaylr/status/12228805301
143- Also: hot pink! */
144-::-moz-selection{ background: #333; color:#fff; text-shadow: none; }
145-::selection { background:#333; color:#fff; text-shadow: none; }
14666
147-/* Bicubic resizing for non-native sized IMG:
148- code.flickr.com/blog/2008/11/12/on-ui-quality-the-little-things-client-side-image-resizing/ */
67+::-moz-selection{ background: #FF5E99; color:#fff; text-shadow: none; }
68+::selection { background:#FF5E99; color:#fff; text-shadow: none; }
69+a:link { -webkit-tap-highlight-color: #FF5E99; }
70+button { width: auto; overflow: visible; }
14971 .ie7 img { -ms-interpolation-mode: bicubic; }
15072
151-
152-/**
153- * You might tweak these..
154- */
155-
156-body, select, input, textarea {
157- /* #444 looks better than black: twitter.com/H_FJ/statuses/11800719859 */
158- color: #444;
159- /* Set your base font here, to apply evenly */
160- font-family: 'Oswald', Helvetica, arial, serif;
161-}
162-
163-/* Headers (h1, h2, etc) have no default font-size or margin; define those yourself */
164-h1, h2, h3, h4, h5, h6 { font-weight: bold; margin: 1em 0; }
73+body, select, input, textarea { color: #444; }
74+h1, h2, h3, h4, h5, h6 { font-weight: bold; }
75+a, a:active, a:visited { color: #607890; }
76+a:hover { color: #036; }
16577
16678
16779 /**
@@ -169,6 +81,11 @@ h1, h2, h3, h4, h5, h6 { font-weight: bold; margin: 1em 0; }
16981 *
17082 * Author: @xonecas
17183 */
84+h1, h2, h3, h4, h5, h6 { margin: 1em 0; }
85+body, select, input, textarea {
86+ font-family: 'Oswald', Helvetica, arial, serif;
87+}
88+
17289 body {
17390 font-size: 1.230769230769231em;
17491 text-shadow: 0 1px 2px #ccc;
@@ -190,88 +107,43 @@ footer { font-size: 0.875em; }
190107
191108
192109
193-
194-
195-
196-
197-
198-
199-
200-
201-
202-
203-/**
204- * Non-semantic helper classes: please define your styles before this section.
205- */
206-
207-/* For image replacement */
208110 .ir { display: block; text-indent: -999em; overflow: hidden; background-repeat: no-repeat; text-align: left; direction: ltr; }
209-
210-/* Hide for both screenreaders and browsers:
211- css-discuss.incutio.com/wiki/Screenreader_Visibility */
212111 .hidden { display: none; visibility: hidden; }
213-
214-/* Hide only visually, but have it available for screenreaders: by Jon Neal.
215- www.webaim.org/techniques/css/invisiblecontent/ & j.mp/visuallyhidden */
216112 .visuallyhidden { border: 0; clip: rect(0 0 0 0); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; }
217-/* Extends the .visuallyhidden class to allow the element to be focusable when navigated to via the keyboard: drupal.org/node/897638 */
218113 .visuallyhidden.focusable:active,
219114 .visuallyhidden.focusable:focus { clip: auto; height: auto; margin: 0; overflow: visible; position: static; width: auto; }
220-
221-/* Hide visually and from screenreaders, but maintain layout */
222115 .invisible { visibility: hidden; }
223-
224-/* The Magnificent Clearfix: Updated to prevent margin-collapsing on child elements in most situations.
225- nicolasgallagher.com/micro-clearfix-hack/ */
226-.clearfix:before, .clearfix:after { content: ""; display: table; }
116+.clearfix:before, .clearfix:after { content: "\0020"; display: block; height: 0; overflow: hidden; }
227117 .clearfix:after { clear: both; }
228118 .clearfix { zoom: 1; }
229119
230120
231-
232-/**
233- * Media queries for responsive design.
234- *
235- * These follow after primary styles so they will successfully override.
236- */
237-
238121 @media all and (orientation:portrait) {
239- /* Style adjustments for portrait mode goes here */
240122
241123 }
242124
243125 @media all and (orientation:landscape) {
244- /* Style adjustments for landscape mode goes here */
245126
246127 }
247128
248-/* Grade-A Mobile Browsers (Opera Mobile, Mobile Safari, Android Chrome)
249- consider this: www.cloudfour.com/css-media-query-for-mobile-is-fools-gold/ */
250129 @media screen and (max-device-width: 480px) {
251-
252-
253- /* Uncomment if you don't want iOS and WinMobile to mobile-optimize the text for you: j.mp/textsizeadjust */
130+
254131 /* html { -webkit-text-size-adjust:none; -ms-text-size-adjust:none; } */
255132 }
256133
257134
258-/**
259- * Print styles.
260- *
261- * Inlined to avoid required HTTP connection: www.phpied.com/delay-loading-your-print-css/
262- */
263135 @media print {
264136 * { background: transparent !important; color: black !important; text-shadow: none !important; filter:none !important;
265- -ms-filter: none !important; } /* Black prints faster: sanbeiji.com/archives/953 */
137+ -ms-filter: none !important; }
266138 a, a:visited { color: #444 !important; text-decoration: underline; }
267139 a[href]:after { content: " (" attr(href) ")"; }
268140 abbr[title]:after { content: " (" attr(title) ")"; }
269- .ir a:after, a[href^="javascript:"]:after, a[href^="#"]:after { content: ""; } /* Don't show links for images, or javascript/internal links */
141+ .ir a:after, a[href^="javascript:"]:after, a[href^="#"]:after { content: ""; }
270142 pre, blockquote { border: 1px solid #999; page-break-inside: avoid; }
271- thead { display: table-header-group; } /* css-discuss.incutio.com/wiki/Printing_Tables */
143+ thead { display: table-header-group; }
272144 tr, img { page-break-inside: avoid; }
273- img { max-width: 100% !important; }
274145 @page { margin: 0.5cm; }
275146 p, h2, h3 { orphans: 3; widows: 3; }
276147 h2, h3{ page-break-after: avoid; }
277148 }
149+
htdocs/index.html+22−20
@@ -1,46 +1,48 @@
11 <!doctype html>
2-<!--[if lt IE 7]> <html class="no-js ie6" lang="en"> <![endif]-->
3-<!--[if IE 7]> <html class="no-js ie7" lang="en"> <![endif]-->
4-<!--[if IE 8]> <html class="no-js ie8" lang="en"> <![endif]-->
5-<!--[if gt IE 8]><!--> <html class="no-js" lang="en"> <!--<![endif]-->
2+<!--[if lt IE 9 ]> <html class="no-js oldie" lang="en"> <![endif]-->
3+<!--[if (gte IE 9)|!(IE)]><!--> <html class="no-js" lang="en"> <!--<![endif]-->
64 <head>
7- <meta charset="utf-8">
5+ <meta charset="utf-8">
86
97 <title>Dusty Markdown</title>
10-
118 <meta name="description" content="simple command line content manager">
129 <meta name="author" content="@xonecas">
10+
1311 <meta name="viewport" content="width=device-width, initial-scale=1.0">
12+ <link rel="shortcut icon" href="/favicon.ico">
13+ <link rel="apple-touch-icon" href="/apple-touch-icon.png">
1414
15- <link rel="stylesheet" href="css/style.css">
15+ <link rel="stylesheet" href="css/style.css?v=2">
1616 <link href='http://fonts.googleapis.com/css?family=Oswald' rel='stylesheet' type='text/css'>
17-
18-
19- <script src="js/libs/modernizr.js"></script>
17+ <script src="js/libs/modernizr-1.7.min.js"></script>
2018
2119 </head>
2220
2321 <body>
22+
2423 <header>
2524 {header|s}
2625 </header>
2726 <section id="main" class="center">
2827 {about|s}
2928 </section>
30- <footer class="center">
31- </footer>
3229
3330
34- <script src="js/libs/jquery.js"></script>
31+ <script src="//ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.js"></script>
32+ <script>window.jQuery || document.write("<script src='js/libs/jquery-1.5.1.min.js'>\x3C/script>")</script>
33+
34+
35+ <!-- scripts concatenated and minified via ant build script-->
36+ <script src="js/plugins.js"></script>
3537 <script src="js/script.js"></script>
38+ <!-- end scripts-->
39+
40+
41+ <!--[if lt IE 7 ]>
42+ <script src="js/libs/dd_belatedpng.js"></script>
43+ <script>DD_belatedPNG.fix("img, .png_bg");</script>
44+ <![endif]-->
3645
37- <!-- simple uniques and page requests tracker, see server.js -->
38- <script>Modernizr.localstorage || document.write('<script src="js/libs/storage.js">\x3C/script>')</script>
39- <script>
40- var s = localStorage, key = s.getItem('key');
41- if (key === null) { key = +new Date(); s.setItem('key', key); };
42- $.get('/track?key='+key);
43- </script>
4446
4547 </body>
4648 </html>
htdocs/js/libs/jquery.js+0−8866
@@ -1,8866 +0,0 @@
1-/*!
2- * jQuery JavaScript Library v1.6
3- * http://jquery.com/
4- *
5- * Copyright 2011, John Resig
6- * Dual licensed under the MIT or GPL Version 2 licenses.
7- * http://jquery.org/license
8- *
9- * Includes Sizzle.js
10- * http://sizzlejs.com/
11- * Copyright 2011, The Dojo Foundation
12- * Released under the MIT, BSD, and GPL Licenses.
13- *
14- * Date: Mon May 2 13:50:00 2011 -0400
15- */
16-(function( window, undefined ) {
17-
18-// Use the correct document accordingly with window argument (sandbox)
19-var document = window.document,
20- navigator = window.navigator,
21- location = window.location;
22-var jQuery = (function() {
23-
24-// Define a local copy of jQuery
25-var jQuery = function( selector, context ) {
26- // The jQuery object is actually just the init constructor 'enhanced'
27- return new jQuery.fn.init( selector, context, rootjQuery );
28- },
29-
30- // Map over jQuery in case of overwrite
31- _jQuery = window.jQuery,
32-
33- // Map over the $ in case of overwrite
34- _$ = window.$,
35-
36- // A central reference to the root jQuery(document)
37- rootjQuery,
38-
39- // A simple way to check for HTML strings or ID strings
40- // (both of which we optimize for)
41- quickExpr = /^(?:[^<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,
42-
43- // Check if a string has a non-whitespace character in it
44- rnotwhite = /\S/,
45-
46- // Used for trimming whitespace
47- trimLeft = /^\s+/,
48- trimRight = /\s+$/,
49-
50- // Check for digits
51- rdigit = /\d/,
52-
53- // Match a standalone tag
54- rsingleTag = /^<(\w+)\s*\/?>(?:<\/\1>)?$/,
55-
56- // JSON RegExp
57- rvalidchars = /^[\],:{}\s]*$/,
58- rvalidescape = /\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,
59- rvalidtokens = /"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,
60- rvalidbraces = /(?:^|:|,)(?:\s*\[)+/g,
61-
62- // Useragent RegExp
63- rwebkit = /(webkit)[ \/]([\w.]+)/,
64- ropera = /(opera)(?:.*version)?[ \/]([\w.]+)/,
65- rmsie = /(msie) ([\w.]+)/,
66- rmozilla = /(mozilla)(?:.*? rv:([\w.]+))?/,
67-
68- // Keep a UserAgent string for use with jQuery.browser
69- userAgent = navigator.userAgent,
70-
71- // For matching the engine and version of the browser
72- browserMatch,
73-
74- // The deferred used on DOM ready
75- readyList,
76-
77- // The ready event handler
78- DOMContentLoaded,
79-
80- // Save a reference to some core methods
81- toString = Object.prototype.toString,
82- hasOwn = Object.prototype.hasOwnProperty,
83- push = Array.prototype.push,
84- slice = Array.prototype.slice,
85- trim = String.prototype.trim,
86- indexOf = Array.prototype.indexOf,
87-
88- // [[Class]] -> type pairs
89- class2type = {};
90-
91-jQuery.fn = jQuery.prototype = {
92- constructor: jQuery,
93- init: function( selector, context, rootjQuery ) {
94- var match, elem, ret, doc;
95-
96- // Handle $(""), $(null), or $(undefined)
97- if ( !selector ) {
98- return this;
99- }
100-
101- // Handle $(DOMElement)
102- if ( selector.nodeType ) {
103- this.context = this[0] = selector;
104- this.length = 1;
105- return this;
106- }
107-
108- // The body element only exists once, optimize finding it
109- if ( selector === "body" && !context && document.body ) {
110- this.context = document;
111- this[0] = document.body;
112- this.selector = selector;
113- this.length = 1;
114- return this;
115- }
116-
117- // Handle HTML strings
118- if ( typeof selector === "string" ) {
119- // Are we dealing with HTML string or an ID?
120- if ( selector.charAt(0) === "<" && selector.charAt( selector.length - 1 ) === ">" && selector.length >= 3 ) {
121- // Assume that strings that start and end with <> are HTML and skip the regex check
122- match = [ null, selector, null ];
123-
124- } else {
125- match = quickExpr.exec( selector );
126- }
127-
128- // Verify a match, and that no context was specified for #id
129- if ( match && (match[1] || !context) ) {
130-
131- // HANDLE: $(html) -> $(array)
132- if ( match[1] ) {
133- context = context instanceof jQuery ? context[0] : context;
134- doc = (context ? context.ownerDocument || context : document);
135-
136- // If a single string is passed in and it's a single tag
137- // just do a createElement and skip the rest
138- ret = rsingleTag.exec( selector );
139-
140- if ( ret ) {
141- if ( jQuery.isPlainObject( context ) ) {
142- selector = [ document.createElement( ret[1] ) ];
143- jQuery.fn.attr.call( selector, context, true );
144-
145- } else {
146- selector = [ doc.createElement( ret[1] ) ];
147- }
148-
149- } else {
150- ret = jQuery.buildFragment( [ match[1] ], [ doc ] );
151- selector = (ret.cacheable ? jQuery.clone(ret.fragment) : ret.fragment).childNodes;
152- }
153-
154- return jQuery.merge( this, selector );
155-
156- // HANDLE: $("#id")
157- } else {
158- elem = document.getElementById( match[2] );
159-
160- // Check parentNode to catch when Blackberry 4.6 returns
161- // nodes that are no longer in the document #6963
162- if ( elem && elem.parentNode ) {
163- // Handle the case where IE and Opera return items
164- // by name instead of ID
165- if ( elem.id !== match[2] ) {
166- return rootjQuery.find( selector );
167- }
168-
169- // Otherwise, we inject the element directly into the jQuery object
170- this.length = 1;
171- this[0] = elem;
172- }
173-
174- this.context = document;
175- this.selector = selector;
176- return this;
177- }
178-
179- // HANDLE: $(expr, $(...))
180- } else if ( !context || context.jquery ) {
181- return (context || rootjQuery).find( selector );
182-
183- // HANDLE: $(expr, context)
184- // (which is just equivalent to: $(context).find(expr)
185- } else {
186- return this.constructor( context ).find( selector );
187- }
188-
189- // HANDLE: $(function)
190- // Shortcut for document ready
191- } else if ( jQuery.isFunction( selector ) ) {
192- return rootjQuery.ready( selector );
193- }
194-
195- if (selector.selector !== undefined) {
196- this.selector = selector.selector;
197- this.context = selector.context;
198- }
199-
200- return jQuery.makeArray( selector, this );
201- },
202-
203- // Start with an empty selector
204- selector: "",
205-
206- // The current version of jQuery being used
207- jquery: "1.6",
208-
209- // The default length of a jQuery object is 0
210- length: 0,
211-
212- // The number of elements contained in the matched element set
213- size: function() {
214- return this.length;
215- },
216-
217- toArray: function() {
218- return slice.call( this, 0 );
219- },
220-
221- // Get the Nth element in the matched element set OR
222- // Get the whole matched element set as a clean array
223- get: function( num ) {
224- return num == null ?
225-
226- // Return a 'clean' array
227- this.toArray() :
228-
229- // Return just the object
230- ( num < 0 ? this[ this.length + num ] : this[ num ] );
231- },
232-
233- // Take an array of elements and push it onto the stack
234- // (returning the new matched element set)
235- pushStack: function( elems, name, selector ) {
236- // Build a new jQuery matched element set
237- var ret = this.constructor();
238-
239- if ( jQuery.isArray( elems ) ) {
240- push.apply( ret, elems );
241-
242- } else {
243- jQuery.merge( ret, elems );
244- }
245-
246- // Add the old object onto the stack (as a reference)
247- ret.prevObject = this;
248-
249- ret.context = this.context;
250-
251- if ( name === "find" ) {
252- ret.selector = this.selector + (this.selector ? " " : "") + selector;
253- } else if ( name ) {
254- ret.selector = this.selector + "." + name + "(" + selector + ")";
255- }
256-
257- // Return the newly-formed element set
258- return ret;
259- },
260-
261- // Execute a callback for every element in the matched set.
262- // (You can seed the arguments with an array of args, but this is
263- // only used internally.)
264- each: function( callback, args ) {
265- return jQuery.each( this, callback, args );
266- },
267-
268- ready: function( fn ) {
269- // Attach the listeners
270- jQuery.bindReady();
271-
272- // Add the callback
273- readyList.done( fn );
274-
275- return this;
276- },
277-
278- eq: function( i ) {
279- return i === -1 ?
280- this.slice( i ) :
281- this.slice( i, +i + 1 );
282- },
283-
284- first: function() {
285- return this.eq( 0 );
286- },
287-
288- last: function() {
289- return this.eq( -1 );
290- },
291-
292- slice: function() {
293- return this.pushStack( slice.apply( this, arguments ),
294- "slice", slice.call(arguments).join(",") );
295- },
296-
297- map: function( callback ) {
298- return this.pushStack( jQuery.map(this, function( elem, i ) {
299- return callback.call( elem, i, elem );
300- }));
301- },
302-
303- end: function() {
304- return this.prevObject || this.constructor(null);
305- },
306-
307- // For internal use only.
308- // Behaves like an Array's method, not like a jQuery method.
309- push: push,
310- sort: [].sort,
311- splice: [].splice
312-};
313-
314-// Give the init function the jQuery prototype for later instantiation
315-jQuery.fn.init.prototype = jQuery.fn;
316-
317-jQuery.extend = jQuery.fn.extend = function() {
318- var options, name, src, copy, copyIsArray, clone,
319- target = arguments[0] || {},
320- i = 1,
321- length = arguments.length,
322- deep = false;
323-
324- // Handle a deep copy situation
325- if ( typeof target === "boolean" ) {
326- deep = target;
327- target = arguments[1] || {};
328- // skip the boolean and the target
329- i = 2;
330- }
331-
332- // Handle case when target is a string or something (possible in deep copy)
333- if ( typeof target !== "object" && !jQuery.isFunction(target) ) {
334- target = {};
335- }
336-
337- // extend jQuery itself if only one argument is passed
338- if ( length === i ) {
339- target = this;
340- --i;
341- }
342-
343- for ( ; i < length; i++ ) {
344- // Only deal with non-null/undefined values
345- if ( (options = arguments[ i ]) != null ) {
346- // Extend the base object
347- for ( name in options ) {
348- src = target[ name ];
349- copy = options[ name ];
350-
351- // Prevent never-ending loop
352- if ( target === copy ) {
353- continue;
354- }
355-
356- // Recurse if we're merging plain objects or arrays
357- if ( deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) ) ) {
358- if ( copyIsArray ) {
359- copyIsArray = false;
360- clone = src && jQuery.isArray(src) ? src : [];
361-
362- } else {
363- clone = src && jQuery.isPlainObject(src) ? src : {};
364- }
365-
366- // Never move original objects, clone them
367- target[ name ] = jQuery.extend( deep, clone, copy );
368-
369- // Don't bring in undefined values
370- } else if ( copy !== undefined ) {
371- target[ name ] = copy;
372- }
373- }
374- }
375- }
376-
377- // Return the modified object
378- return target;
379-};
380-
381-jQuery.extend({
382- noConflict: function( deep ) {
383- if ( window.$ === jQuery ) {
384- window.$ = _$;
385- }
386-
387- if ( deep && window.jQuery === jQuery ) {
388- window.jQuery = _jQuery;
389- }
390-
391- return jQuery;
392- },
393-
394- // Is the DOM ready to be used? Set to true once it occurs.
395- isReady: false,
396-
397- // A counter to track how many items to wait for before
398- // the ready event fires. See #6781
399- readyWait: 1,
400-
401- // Hold (or release) the ready event
402- holdReady: function( hold ) {
403- if ( hold ) {
404- jQuery.readyWait++;
405- } else {
406- jQuery.ready( true );
407- }
408- },
409-
410- // Handle when the DOM is ready
411- ready: function( wait ) {
412- // Either a released hold or an DOMready/load event and not yet ready
413- if ( (wait === true && !--jQuery.readyWait) || (wait !== true && !jQuery.isReady) ) {
414- // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443).
415- if ( !document.body ) {
416- return setTimeout( jQuery.ready, 1 );
417- }
418-
419- // Remember that the DOM is ready
420- jQuery.isReady = true;
421-
422- // If a normal DOM Ready event fired, decrement, and wait if need be
423- if ( wait !== true && --jQuery.readyWait > 0 ) {
424- return;
425- }
426-
427- // If there are functions bound, to execute
428- readyList.resolveWith( document, [ jQuery ] );
429-
430- // Trigger any bound ready events
431- if ( jQuery.fn.trigger ) {
432- jQuery( document ).trigger( "ready" ).unbind( "ready" );
433- }
434- }
435- },
436-
437- bindReady: function() {
438- if ( readyList ) {
439- return;
440- }
441-
442- readyList = jQuery._Deferred();
443-
444- // Catch cases where $(document).ready() is called after the
445- // browser event has already occurred.
446- if ( document.readyState === "complete" ) {
447- // Handle it asynchronously to allow scripts the opportunity to delay ready
448- return setTimeout( jQuery.ready, 1 );
449- }
450-
451- // Mozilla, Opera and webkit nightlies currently support this event
452- if ( document.addEventListener ) {
453- // Use the handy event callback
454- document.addEventListener( "DOMContentLoaded", DOMContentLoaded, false );
455-
456- // A fallback to window.onload, that will always work
457- window.addEventListener( "load", jQuery.ready, false );
458-
459- // If IE event model is used
460- } else if ( document.attachEvent ) {
461- // ensure firing before onload,
462- // maybe late but safe also for iframes
463- document.attachEvent( "onreadystatechange", DOMContentLoaded );
464-
465- // A fallback to window.onload, that will always work
466- window.attachEvent( "onload", jQuery.ready );
467-
468- // If IE and not a frame
469- // continually check to see if the document is ready
470- var toplevel = false;
471-
472- try {
473- toplevel = window.frameElement == null;
474- } catch(e) {}
475-
476- if ( document.documentElement.doScroll && toplevel ) {
477- doScrollCheck();
478- }
479- }
480- },
481-
482- // See test/unit/core.js for details concerning isFunction.
483- // Since version 1.3, DOM methods and functions like alert
484- // aren't supported. They return false on IE (#2968).
485- isFunction: function( obj ) {
486- return jQuery.type(obj) === "function";
487- },
488-
489- isArray: Array.isArray || function( obj ) {
490- return jQuery.type(obj) === "array";
491- },
492-
493- // A crude way of determining if an object is a window
494- isWindow: function( obj ) {
495- return obj && typeof obj === "object" && "setInterval" in obj;
496- },
497-
498- isNaN: function( obj ) {
499- return obj == null || !rdigit.test( obj ) || isNaN( obj );
500- },
501-
502- type: function( obj ) {
503- return obj == null ?
504- String( obj ) :
505- class2type[ toString.call(obj) ] || "object";
506- },
507-
508- isPlainObject: function( obj ) {
509- // Must be an Object.
510- // Because of IE, we also have to check the presence of the constructor property.
511- // Make sure that DOM nodes and window objects don't pass through, as well
512- if ( !obj || jQuery.type(obj) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) {
513- return false;
514- }
515-
516- // Not own constructor property must be Object
517- if ( obj.constructor &&
518- !hasOwn.call(obj, "constructor") &&
519- !hasOwn.call(obj.constructor.prototype, "isPrototypeOf") ) {
520- return false;
521- }
522-
523- // Own properties are enumerated firstly, so to speed up,
524- // if last one is own, then all properties are own.
525-
526- var key;
527- for ( key in obj ) {}
528-
529- return key === undefined || hasOwn.call( obj, key );
530- },
531-
532- isEmptyObject: function( obj ) {
533- for ( var name in obj ) {
534- return false;
535- }
536- return true;
537- },
538-
539- error: function( msg ) {
540- throw msg;
541- },
542-
543- parseJSON: function( data ) {
544- if ( typeof data !== "string" || !data ) {
545- return null;
546- }
547-
548- // Make sure leading/trailing whitespace is removed (IE can't handle it)
549- data = jQuery.trim( data );
550-
551- // Attempt to parse using the native JSON parser first
552- if ( window.JSON && window.JSON.parse ) {
553- return window.JSON.parse( data );
554- }
555-
556- // Make sure the incoming data is actual JSON
557- // Logic borrowed from http://json.org/json2.js
558- if ( rvalidchars.test( data.replace( rvalidescape, "@" )
559- .replace( rvalidtokens, "]" )
560- .replace( rvalidbraces, "")) ) {
561-
562- return (new Function( "return " + data ))();
563-
564- }
565- jQuery.error( "Invalid JSON: " + data );
566- },
567-
568- // Cross-browser xml parsing
569- // (xml & tmp used internally)
570- parseXML: function( data , xml , tmp ) {
571-
572- if ( window.DOMParser ) { // Standard
573- tmp = new DOMParser();
574- xml = tmp.parseFromString( data , "text/xml" );
575- } else { // IE
576- xml = new ActiveXObject( "Microsoft.XMLDOM" );
577- xml.async = "false";
578- xml.loadXML( data );
579- }
580-
581- tmp = xml.documentElement;
582-
583- if ( ! tmp || ! tmp.nodeName || tmp.nodeName === "parsererror" ) {
584- jQuery.error( "Invalid XML: " + data );
585- }
586-
587- return xml;
588- },
589-
590- noop: function() {},
591-
592- // Evaluates a script in a global context
593- // Workarounds based on findings by Jim Driscoll
594- // http://weblogs.java.net/blog/driscoll/archive/2009/09/08/eval-javascript-global-context
595- globalEval: function( data ) {
596- if ( data && rnotwhite.test( data ) ) {
597- // We use execScript on Internet Explorer
598- // We use an anonymous function so that context is window
Cut short: this commit's diff is over 1000 lines.
htdocs/js/libs/modernizr.js+0−1048
Cut short: this commit's diff is over 1000 lines.
htdocs/js/libs/storage.js+0−99
Cut short: this commit's diff is over 1000 lines.
htdocs/js/script.js+9−0
Cut short: this commit's diff is over 1000 lines.
lib/build.js+88−16
Cut short: this commit's diff is over 1000 lines.
server.js+3−3
Cut short: this commit's diff is over 1000 lines.
static/about.html+2−2
Cut short: this commit's diff is over 1000 lines.
static/index.html+2−2
Cut short: this commit's diff is over 1000 lines.