xonecas.io
1361
Xc

xonecas.com / commit bdf2499

alpha

Sean Caetano Martin2012-01-24 bdf2499dbc13d58b14e72d305b68dcb358e5411a parent 712198a

12 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/css/normalize.css+437−0
@@ -0,0 +1,437 @@
1+/*! normalize.css 2012-01-22T23:30 UTC - http://github.com/necolas/normalize.css */
2+
3+/* =============================================================================
4+ HTML5 display definitions
5+ ========================================================================== */
6+
7+/*
8+ * Corrects block display not defined in IE6/7/8/9 & FF3
9+ */
10+
11+article,
12+aside,
13+details,
14+figcaption,
15+figure,
16+footer,
17+header,
18+hgroup,
19+nav,
20+section {
21+ display: block;
22+}
23+
24+/*
25+ * Corrects inline-block display not defined in IE6/7/8/9 & FF3
26+ */
27+
28+audio,
29+canvas,
30+video {
31+ display: inline-block;
32+ *display: inline;
33+ *zoom: 1;
34+}
35+
36+/*
37+ * Prevents modern browsers from displaying 'audio' without controls
38+ */
39+
40+audio:not([controls]) {
41+ display: none;
42+}
43+
44+/*
45+ * Addresses styling for 'hidden' attribute not present in IE7/8/9, FF3, S4
46+ * Known issue: no IE6 support
47+ */
48+
49+[hidden] {
50+ display: none;
51+}
52+
53+
54+/* =============================================================================
55+ Base
56+ ========================================================================== */
57+
58+/*
59+ * 1. Corrects text resizing oddly in IE6/7 when body font-size is set using em units
60+ * http://clagnut.com/blog/348/#c790
61+ * 2. Prevents iOS text size adjust after orientation change, without disabling user zoom
62+ * www.456bereastreet.com/archive/201012/controlling_text_size_in_safari_for_ios_without_disabling_user_zoom/
63+ */
64+
65+html {
66+ font-size: 100%; /* 1 */
67+ -webkit-text-size-adjust: 100%; /* 2 */
68+ -ms-text-size-adjust: 100%; /* 2 */
69+}
70+
71+/*
72+ * Addresses font-family inconsistency between 'textarea' and other form elements.
73+ */
74+
75+html,
76+button,
77+input,
78+select,
79+textarea {
80+ font-family: sans-serif;
81+}
82+
83+/*
84+ * Addresses margins handled incorrectly in IE6/7
85+ */
86+
87+body {
88+ margin: 0;
89+}
90+
91+
92+/* =============================================================================
93+ Links
94+ ========================================================================== */
95+
96+/*
97+ * Addresses outline displayed oddly in Chrome
98+ */
99+
100+a:focus {
101+ outline: thin dotted;
102+}
103+
104+/*
105+ * Improves readability when focused and also mouse hovered in all browsers
106+ * people.opera.com/patrickl/experiments/keyboard/test
107+ */
108+
109+a:hover,
110+a:active {
111+ outline: 0;
112+}
113+
114+
115+/* =============================================================================
116+ Typography
117+ ========================================================================== */
118+
119+/*
120+ * Neutralise smaller font-size in 'section' and 'article' in FF4+, Chrome, S5
121+ */
122+
123+h1 {
124+ font-size: 2em;
125+}
126+
127+/*
128+ * Addresses styling not present in IE7/8/9, S5, Chrome
129+ */
130+
131+abbr[title] {
132+ border-bottom: 1px dotted;
133+}
134+
135+/*
136+ * Addresses style set to 'bolder' in FF3+, S4/5, Chrome
137+*/
138+
139+b,
140+strong {
141+ font-weight: bold;
142+}
143+
144+blockquote {
145+ margin: 1em 40px;
146+}
147+
148+/*
149+ * Addresses styling not present in S5, Chrome
150+ */
151+
152+dfn {
153+ font-style: italic;
154+}
155+
156+/*
157+ * Addresses styling not present in IE6/7/8/9
158+ */
159+
160+mark {
161+ background: #ff0;
162+ color: #000;
163+}
164+
165+/*
166+ * Corrects font family set oddly in IE6, S4/5, Chrome
167+ * en.wikipedia.org/wiki/User:Davidgothberg/Test59
168+ */
169+
170+pre,
171+code,
172+kbd,
173+samp {
174+ font-family: monospace, serif;
175+ _font-family: 'courier new', monospace;
176+ font-size: 1em;
177+}
178+
179+/*
180+ * Improves readability of pre-formatted text in all browsers
181+ */
182+
183+pre {
184+ white-space: pre;
185+ white-space: pre-wrap;
186+ word-wrap: break-word;
187+}
188+
189+/*
190+ * 1. Addresses CSS quotes not supported in IE6/7
191+ * 2. Addresses quote property not supported in S4
192+ */
193+
194+/* 1 */
195+
196+q {
197+ quotes: none;
198+}
199+
200+/* 2 */
201+
202+q:before,
203+q:after {
204+ content: '';
205+ content: none;
206+}
207+
208+small {
209+ font-size: 75%;
210+}
211+
212+/*
213+ * Prevents sub and sup affecting line-height in all browsers
214+ * gist.github.com/413930
215+ */
216+
217+sub,
218+sup {
219+ font-size: 75%;
220+ line-height: 0;
221+ position: relative;
222+ vertical-align: baseline;
223+}
224+
225+sup {
226+ top: -0.5em;
227+}
228+
229+sub {
230+ bottom: -0.25em;
231+}
232+
233+
234+/* =============================================================================
235+ Lists
236+ ========================================================================== */
237+
238+ul,
239+ol {
240+ margin-left: 0;
241+ padding: 0 0 0 40px;
242+}
243+
244+dd {
245+ margin: 0 0 0 40px;
246+}
247+
248+nav ul,
249+nav ol {
250+ list-style: none;
251+ list-style-image: none;
252+}
253+
254+
255+/* =============================================================================
256+ Embedded content
257+ ========================================================================== */
258+
259+/*
260+ * 1. Removes border when inside 'a' element in IE6/7/8/9, FF3
261+ * 2. Improves image quality when scaled in IE7
262+ * code.flickr.com/blog/2008/11/12/on-ui-quality-the-little-things-client-side-image-resizing/
263+ */
264+
265+img {
266+ border: 0; /* 1 */
267+ -ms-interpolation-mode: bicubic; /* 2 */
268+}
269+
270+/*
271+ * Corrects overflow displayed oddly in IE9
272+ */
273+
274+svg:not(:root) {
275+ overflow: hidden;
276+}
277+
278+
279+/* =============================================================================
280+ Figures
281+ ========================================================================== */
282+
283+/*
284+ * Addresses margin not present in IE6/7/8/9, S5, O11
285+ */
286+
287+figure {
288+ margin: 0;
289+}
290+
291+
292+/* =============================================================================
293+ Forms
294+ ========================================================================== */
295+
296+/*
297+ * Corrects margin displayed oddly in IE6/7
298+ */
299+
300+form {
301+ margin: 0;
302+}
303+
304+/*
305+ * Define consistent border, margin, and padding
306+ */
307+
308+fieldset {
309+ border: 1px solid #c0c0c0;
310+ margin: 0 2px;
311+ padding: 0.35em 0.625em 0.75em;
312+}
313+
314+/*
315+ * 1. Corrects color not being inherited in IE6/7/8/9
316+ * 2. Corrects text not wrapping in FF3
317+ * 3. Corrects alignment displayed oddly in IE6/7
318+ */
319+
320+legend {
321+ border: 0; /* 1 */
322+ padding: 0;
323+ white-space: normal; /* 2 */
324+ *margin-left: -7px; /* 3 */
325+}
326+
327+/*
328+ * 1. Corrects font size not being inherited in all browsers
329+ * 2. Addresses margins set differently in IE6/7, FF3+, S5, Chrome
330+ * 3. Improves appearance and consistency in all browsers
331+ */
332+
333+button,
334+input,
335+select,
336+textarea {
337+ font-size: 100%; /* 1 */
338+ margin: 0; /* 2 */
339+ vertical-align: baseline; /* 3 */
340+ *vertical-align: middle; /* 3 */
341+}
342+
343+/*
344+ * Addresses FF3/4 setting line-height on 'input' using !important in the UA stylesheet
345+ */
346+
347+button,
348+input {
349+ line-height: normal; /* 1 */
350+}
351+
352+/*
353+ * 1. Improves usability and consistency of cursor style between image-type 'input' and others
354+ * 2. Corrects inability to style clickable 'input' types in iOS
355+ * 3. Removes inner spacing in IE7 without affecting normal text inputs
356+ * Known issue: inner spacing remains in IE6
357+ */
358+
359+button,
360+input[type="button"],
361+input[type="reset"],
362+input[type="submit"] {
363+ cursor: pointer; /* 1 */
364+ -webkit-appearance: button; /* 2 */
365+ *overflow: visible; /* 3 */
366+}
367+
368+/*
369+ * 1. Addresses box sizing set to content-box in IE8/9
370+ * 2. Removes excess padding in IE8/9
371+ * 3. Removes excess padding in IE7
372+ Known issue: excess padding remains in IE6
373+ */
374+
375+input[type="checkbox"],
376+input[type="radio"] {
377+ box-sizing: border-box; /* 1 */
378+ padding: 0; /* 2 */
379+ *height: 13px; /* 3 */
380+ *width: 13px; /* 3 */
381+}
382+
383+/*
384+ * 1. Addresses appearance set to searchfield in S5, Chrome
385+ * 2. Addresses box-sizing set to border-box in S5, Chrome (include -moz to future-proof)
386+ */
387+
388+input[type="search"] {
389+ -webkit-appearance: textfield; /* 1 */
390+ -moz-box-sizing: content-box;
391+ -webkit-box-sizing: content-box; /* 2 */
392+ box-sizing: content-box;
393+}
394+
395+/*
396+ * Removes inner padding and search cancel button in S5, Chrome on OS X
397+ */
398+
399+input[type="search"]::-webkit-search-decoration,
400+input[type="search"]::-webkit-search-cancel-button {
401+ -webkit-appearance: none;
402+}
403+
404+/*
405+ * Removes inner padding and border in FF3+
406+ * www.sitepen.com/blog/2008/05/14/the-devils-in-the-details-fixing-dojos-toolbar-buttons/
407+ */
408+
409+button::-moz-focus-inner,
410+input::-moz-focus-inner {
411+ border: 0;
412+ padding: 0;
413+}
414+
415+/*
416+ * 1. Removes default vertical scrollbar in IE6/7/8/9
417+ * 2. Improves readability and alignment in all browsers
418+ */
419+
420+textarea {
421+ overflow: auto; /* 1 */
422+ vertical-align: top; /* 2 */
423+}
424+
425+
426+/* =============================================================================
427+ Tables
428+ ========================================================================== */
429+
430+/*
431+ * Remove most spacing between table cells
432+ */
433+
434+table {
435+ border-collapse: collapse;
436+ border-spacing: 0;
437+}
htdocs/css/style.css+239−0
@@ -0,0 +1,239 @@
1+/* grid from twitter bootstrap */
2+.container {
3+ width: 940px;
4+ margin-left: auto;
5+ margin-right: auto;
6+ zoom: 1;
7+}
8+.container:before, .container:after {
9+ display: table;
10+ content: "";
11+ zoom: 1;
12+}
13+.container:after {
14+ clear: both;
15+}
16+.row {
17+ zoom: 1;
18+ margin-left: -20px;
19+}
20+.row:before, .row:after {
21+ display: table;
22+ content: "";
23+ zoom: 1;
24+}
25+.row:after {
26+ clear: both;
27+}
28+.row > [class*="span"] {
29+ display: inline;
30+ float: left;
31+ margin-left: 20px;
32+}
33+.span1 {
34+ width: 40px;
35+}
36+.span2 {
37+ width: 100px;
38+}
39+.span3 {
40+ width: 160px;
41+}
42+.span4 {
43+ width: 220px;
44+}
45+.span5 {
46+ width: 280px;
47+}
48+.span6 {
49+ width: 340px;
50+}
51+.span7 {
52+ width: 400px;
53+}
54+.span8 {
55+ width: 460px;
56+}
57+.span9 {
58+ width: 520px;
59+}
60+.span10 {
61+ width: 580px;
62+}
63+.span11 {
64+ width: 640px;
65+}
66+.span12 {
67+ width: 700px;
68+}
69+.span13 {
70+ width: 760px;
71+}
72+.span14 {
73+ width: 820px;
74+}
75+.span15 {
76+ width: 880px;
77+}
78+.span16 {
79+ width: 940px;
80+}
81+.span17 {
82+ width: 1000px;
83+}
84+.span18 {
85+ width: 1060px;
86+}
87+.span19 {
88+ width: 1120px;
89+}
90+.span20 {
91+ width: 1180px;
92+}
93+.span21 {
94+ width: 1240px;
95+}
96+.span22 {
97+ width: 1300px;
98+}
99+.span23 {
100+ width: 1360px;
101+}
102+.span24 {
103+ width: 1420px;
104+}
105+.row > .offset1 {
106+ margin-left: 80px;
107+}
108+.row > .offset2 {
109+ margin-left: 140px;
110+}
111+.row > .offset3 {
112+ margin-left: 200px;
113+}
114+.row > .offset4 {
115+ margin-left: 260px;
116+}
117+.row > .offset5 {
118+ margin-left: 320px;
119+}
120+.row > .offset6 {
121+ margin-left: 380px;
122+}
123+.row > .offset7 {
124+ margin-left: 440px;
125+}
126+.row > .offset8 {
127+ margin-left: 500px;
128+}
129+.row > .offset9 {
130+ margin-left: 560px;
131+}
132+.row > .offset10 {
133+ margin-left: 620px;
134+}
135+.row > .offset11 {
136+ margin-left: 680px;
137+}
138+.row > .offset12 {
139+ margin-left: 740px;
140+}
141+.span-one-third {
142+ width: 300px;
143+}
144+.span-two-thirds {
145+ width: 620px;
146+}
147+.row > .offset-one-third {
148+ margin-left: 340px;
149+}
150+.row > .offset-two-thirds {
151+ margin-left: 660px;
152+}
153+
154+.push-right {
155+ float: right;
156+}
157+
158+/* my styles */
159+html, body {
160+ min-height: 100%;
161+ font-family: Helvetica, "Helvetica Neue", Arial, "DejaVu Sans", sans-serif;
162+}
163+
164+small {
165+ color: #666;
166+}
167+
168+pre, code {
169+ font-size: smaller;
170+ padding: 4px;
171+ background: #efefef;
172+ -webkit-border-radius: 6px; /* Saf3-4, iOS 1-3.2, Android ≤1.6 */
173+ -moz-border-radius: 6px; /* FF1-3.6 */
174+ border-radius: 6px; /* Opera 10.5, IE9, Saf5, Chrome, FF4, iOS 4, Android 2.1+ */
175+}
176+
177+a {
178+ color: #323230;
179+ background: #f0db4e;
180+ padding: 2px;
181+ -webkit-border-radius: 4px; /* Saf3-4, iOS 1-3.2, Android ≤1.6 */
182+ -moz-border-radius: 4px; /* FF1-3.6 */
183+ border-radius: 4px; /* Opera 10.5, IE9, Saf5, Chrome, FF4, iOS 4, Android 2.1+ */
184+ text-decoration: none;
185+}
186+a:active, a:visited {
187+ color: #666;
188+}
189+a:hover {
190+ color: #000;
191+}
192+
193+.name {
194+ color: #fff;
195+ margin: 0;
196+ padding: 20px;
197+}
198+
199+.header-background {
200+ height: 60px;
201+ margin-bottom: 20px;
202+
203+ background-color: #333333;
204+ background-image: -webkit-gradient(linear, left top, left bottom, from(#333333), to()); /* Saf4+, Chrome */
205+ background-image: -webkit-linear-gradient(top, #333333, #000000); /* Chrome 10+, Saf5.1+, iOS 5+ */
206+ background-image: -moz-linear-gradient(top, #333333, #000000); /* FF3.6 */
207+ background-image: -ms-linear-gradient(top, #333333, #000000); /* IE10 */
208+ background-image: -o-linear-gradient(top, #333333, #000000); /* Opera 11.10+ */
209+ background-image: linear-gradient(to bottom, #333333, #000000);
210+
211+ -webkit-box-shadow: 0 4px 2px #ccc; /* Saf3-4, iOS 4.0.2 - 4.2, Android 2.3+ */
212+ -moz-box-shadow: 0 4px 2px #ccc; /* FF3.5 - 3.6 */
213+ box-shadow: 0 4px 2px #ccc; /* Opera 10.5, IE9, FF4+, Chrome 6+, iOS 5 */
214+}
215+
216+.title {
217+ text-transform: uppercase;
218+ margin-top: 0;
219+ margin-bottom: 20px;
220+}
221+
222+.banner {
223+ padding: 20px;
224+ margin: 40px 0;
225+ background: #efefef;
226+
227+ -webkit-border-radius: 12px; /* Saf3-4, iOS 1-3.2, Android ≤1.6 */
228+ -moz-border-radius: 12px; /* FF1-3.6 */
229+ border-radius: 12px; /* Opera 10.5, IE9, Saf5, Chrome, FF4, iOS 4, Android 2.1+ */
230+}
231+
232+.preview > div {
233+ margin-bottom: 20px;
234+}
235+
236+.timestamp {
237+ color: #666;
238+ font-size: smaller;
239+}
htdocs/favicon.ico+0−0
htdocs/index.html+54−0
@@ -0,0 +1,54 @@
1+<!doctype html>
2+<!--[if lt IE 9]> <html class="oldie no-js" lang="en"> <![endif]-->
3+<!--[if gt IE 8]><!--> <html class="no-js" lang="en"> <!--<![endif]-->
4+<head>
5+ <meta charset="utf-8">
6+ <title>Sean Caetano Martin -- @xonecas</title>
7+ <meta name="viewport" content="width=device-width,initial-scale=1">
8+
9+ <link rel="stylesheet" href="css/normalize.css">
10+ <link rel="stylesheet" href="css/style.css">
11+</head>
12+<body>
13+
14+ <header class="header-background">
15+ <h3 class="name">Sean Caetano Martin <small>xonecas</small></h3>
16+ </header>
17+
18+ <section id="main" class="container">
19+ <div class="banner">
20+ </div>
21+
22+ <div class="previews row">
23+ </div>
24+ </section>
25+
26+ <!--[if lt IE 9]> <script src="js/html5shiv.js"></script> <![endif]-->
27+ <script src="js/underscore.js"></script>
28+ <script src="js/jquery.js"></script>
29+ <script src="js/tumblr-api.js"></script>
30+ <script src="js/view.js"></script>
31+ <script src="js/index.js"></script>
32+
33+ <script id="banner-tmpl" type="text/template">
34+ <h1 class="title"><%= title %></h1>
35+ <h2><%= description %></h2>
36+ </script>
37+
38+ <script id="preview-tmpl" type="text/template">
39+ <h3><a href="#" class="preview-title" data-id="<%= id %>"><%= title %></a></h3>
40+ <div><%= body %></div>
41+ <time class="timestamp"><%= date %></time>
42+ </script>
43+
44+ <script id="post-tmpl" type="text/template">
45+ <a href="#" class="back push-right">Back</a>
46+ <h2><%= title %></h2>
47+ <div><%= body %></div>
48+ <time class="timestamp"><%= date %></time>
49+
50+ <p><a href="#" class="back">Back</a></p>
51+ </script>
52+
53+</body>
54+</html>
htdocs/js/html5shiv.js+82−0
@@ -0,0 +1,82 @@
1+/*! HTML5 Shiv v3 | @jon_neal @afarkas @rem | MIT/GPL2 Licensed */
2+(function (win, doc) {
3+ // feature detection: whether the browser supports unknown elements
4+ var supportsUnknownElements = (function (a) {
5+ a.innerHTML = '<x-element></x-element>';
6+ return a.childNodes.length === 1;
7+ })(doc.createElement('a'));
8+
9+ // feature detection: whether the browser supports default html5 styles
10+ var supportsHtml5Styles = (function (nav, docEl, compStyle) {
11+ docEl.appendChild(nav);
12+ return (compStyle = (compStyle ? compStyle(nav) : nav.currentStyle).display) && docEl.removeChild(nav) && compStyle === 'block';
13+ })(doc.createElement('nav'), doc.documentElement, win.getComputedStyle);
14+
15+ // html5 global so that more elements can be shived and also so that existing shiving can be detected on iframes
16+ // more elements can be added and shived with the following code: html5.elements.push('element-name'); shivDocument(document);
17+ var html5 = {
18+ // a list of html5 elements
19+ elements: 'abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video'.split(' '),
20+
21+ // the shiv function
22+ shivDocument: function (scopeDocument) {
23+ scopeDocument = scopeDocument || doc;
24+
25+ // test if the document has already been shived
26+ if (scopeDocument.documentShived) {
27+ return;
28+ }
29+ scopeDocument.documentShived = true;
30+
31+ // set local variables
32+ var
33+ documentCreateElement = scopeDocument.createElement,
34+ documentCreateDocumentFragment = scopeDocument.createDocumentFragment,
35+ documentHead = scopeDocument.getElementsByTagName('head')[0],
36+ documentCreateElementReplaceFunction = function (m) {
37+ documentCreateElement(m);
38+ };
39+
40+ // shiv for unknown elements
41+ if (!supportsUnknownElements) {
42+ // shiv the document
43+ html5.elements.join(' ').replace(/\w+/g, documentCreateElementReplaceFunction);
44+
45+ // shiv document create element function
46+ scopeDocument.createElement = function (nodeName) {
47+ var element = documentCreateElement(nodeName);
48+ if (element.canHaveChildren){
49+ html5.shivDocument(element.document);
50+ }
51+ return element;
52+ };
53+
54+ // shiv document create element function
55+ scopeDocument.createDocumentFragment = function () {
56+ return html5.shivDocument(documentCreateDocumentFragment());
57+ };
58+ }
59+
60+ // shiv for default html5 styles
61+ if (!supportsHtml5Styles && documentHead) {
62+ var div = documentCreateElement('div');
63+ div.innerHTML = ['x<style>',
64+ 'article,aside,details,figcaption,figure,footer,header,hgroup,nav,section{display:block}', // Corrects block display not defined in IE6/7/8/9
65+ 'audio{display:none}', // Corrects audio display not defined in IE6/7/8/9
66+ 'canvas,video{display:inline-block;*display:inline;*zoom:1}', // Corrects canvas and video display not defined in IE6/7/8/9 (audio[controls] in IE7)
67+ '[hidden]{display:none}audio[controls]{display:inline-block;*display:inline;*zoom:1}', // Corrects 'hidden' attribute and audio[controls] display not present in IE7/8/9
68+ 'mark{background:#FF0;color:#000}', // Addresses styling not present in IE6/7/8/9
69+ '</style>'].join('');
70+ documentHead.insertBefore(div.lastChild, documentHead.firstChild);
71+ }
72+
73+ // return document (for potential chaining)
74+ return scopeDocument;
75+ }
76+ };
77+
78+ // shiv the document
79+ html5.shivDocument(doc);
80+
81+ win.html5 = html5;
82+})(this, document);
htdocs/js/index.js+87−0
@@ -0,0 +1,87 @@
1+/*global Tumblr:true, _:true, $:true, View:true */
2+$(function () {
3+ 'use strict';
4+
5+ var
6+ // data source
7+ tumblr,
8+ // views
9+ body,
10+ banner,
11+ previews,
12+ post;
13+
14+
15+ // init
16+ tumblr = new Tumblr('xonecas', 'IM11cPEsi3jxTeSNwF8BB9Z08UItXcYKiEDLTLvl5RYn6MBcMD');
17+
18+ body = new View({ el: $('body') });
19+ banner = new View({
20+ el: $('.banner').first(),
21+ template: _.template($('#banner-tmpl').html())
22+ });
23+ previews = new View({ el: $('.previews').first() });
24+ post = new View({
25+ el: $('<section id="secondary" class="container"></div>').appendTo('body'),
26+ template: _.template($('#post-tmpl').html())
27+ });
28+
29+ // events
30+ body.on('.back', 'click', function (ev) {
31+ $('#secondary').fadeOut('fast', function () {
32+ $('#main').fadeIn('fast');
33+ });
34+
35+ ev.preventDefault();
36+ return false;
37+ });
38+
39+ previews.on('.preview-title', 'click', function (ev) {
40+ tumblr.getpost(""+ $(ev.target).data('id'), { success: function (data) {
41+ post.el.hide();
42+ post.toHTML(data.response.posts[0]);
43+ $('#main').fadeOut('fast', function () {
44+ post.el.fadeIn('fast');
45+ });
46+ }});
47+
48+ ev.preventDefault();
49+ return false;
50+ });
51+
52+ // xhr init
53+ tumblr.getinfo({
54+ success: function (data) {
55+ banner.toHTML(data.response.blog);
56+ tumblr.getavatar({
57+ size: 96,
58+ success: function (avatarurl) {
59+ banner.el.prepend('<img class="push-right" src="'+ avatarurl +'">');
60+ }
61+ });
62+ }
63+ });
64+
65+ tumblr.getpost(12, {
66+ type: 'text',
67+ success: function (data) {
68+ var posts = data.response.posts.reverse(),
69+ len = posts.length,
70+ post, prev;
71+
72+ previews.items = [];
73+
74+ while (len--) {
75+ post = posts[len];
76+
77+ prev = $('<div></div>').html(post.body);
78+ post.body = prev.children().slice(0, 3).html() +' ... ';
79+
80+ previews.items.push(new View({
81+ el: $('<div class="preview span-one-third"></div>').appendTo('.previews'),
82+ template: _.template($('#preview-tmpl').html())
83+ }).toHTML(post));
84+ }
85+ }
86+ });
87+});
htdocs/js/jquery.js+9266−0
@@ -0,0 +1,9266 @@
1+/*!
2+ * jQuery JavaScript Library v1.7.1
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 Nov 21 21:11:03 2011 -0500
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+ // Prioritize #id over <tag> to avoid XSS via location.hash (#9521)
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+ // Match a standalone tag
51+ rsingleTag = /^<(\w+)\s*\/?>(?:<\/\1>)?$/,
52+
53+ // JSON RegExp
54+ rvalidchars = /^[\],:{}\s]*$/,
55+ rvalidescape = /\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,
56+ rvalidtokens = /"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,
57+ rvalidbraces = /(?:^|:|,)(?:\s*\[)+/g,
58+
59+ // Useragent RegExp
60+ rwebkit = /(webkit)[ \/]([\w.]+)/,
61+ ropera = /(opera)(?:.*version)?[ \/]([\w.]+)/,
62+ rmsie = /(msie) ([\w.]+)/,
63+ rmozilla = /(mozilla)(?:.*? rv:([\w.]+))?/,
64+
65+ // Matches dashed string for camelizing
66+ rdashAlpha = /-([a-z]|[0-9])/ig,
67+ rmsPrefix = /^-ms-/,
68+
69+ // Used by jQuery.camelCase as callback to replace()
70+ fcamelCase = function( all, letter ) {
71+ return ( letter + "" ).toUpperCase();
72+ },
73+
74+ // Keep a UserAgent string for use with jQuery.browser
75+ userAgent = navigator.userAgent,
76+
77+ // For matching the engine and version of the browser
78+ browserMatch,
79+
80+ // The deferred used on DOM ready
81+ readyList,
82+
83+ // The ready event handler
84+ DOMContentLoaded,
85+
86+ // Save a reference to some core methods
87+ toString = Object.prototype.toString,
88+ hasOwn = Object.prototype.hasOwnProperty,
89+ push = Array.prototype.push,
90+ slice = Array.prototype.slice,
91+ trim = String.prototype.trim,
92+ indexOf = Array.prototype.indexOf,
93+
94+ // [[Class]] -> type pairs
95+ class2type = {};
Cut short: this commit's diff is over 1000 lines.
htdocs/js/tumblr-api.js+110−0
Cut short: this commit's diff is over 1000 lines.
htdocs/js/underscore.js+990−0
Cut short: this commit's diff is over 1000 lines.
htdocs/js/view.js+29−0
Cut short: this commit's diff is over 1000 lines.
public/bootstrap+0−1
Cut short: this commit's diff is over 1000 lines.
server.js+2−1
Cut short: this commit's diff is over 1000 lines.