├── README.md
├── sass
└── screen.scss
└── source
├── _includes
├── after_footer.html
├── archive_post.html
├── article.html
├── asides
│ ├── delicious.html
│ ├── github.html
│ ├── googleplus.html
│ ├── pinboard.html
│ ├── recent_posts.html
│ └── twitter.html
├── custom
│ ├── after_footer.html
│ ├── asides
│ │ └── about.html
│ ├── category_feed.xml
│ ├── footer.html
│ ├── head.html
│ ├── header.html
│ └── navigation.html
├── disqus.html
├── facebook_like.html
├── footer.html
├── google_analytics.html
├── google_plus_one.html
├── head.html
├── header.html
├── navigation.html
├── post
│ ├── author.html
│ ├── categories.html
│ ├── date.html
│ ├── disqus_thread.html
│ └── sharing.html
└── twitter_sharing.html
├── _layouts
├── category_index.html
├── default.html
├── page.html
└── post.html
├── assets
└── jwplayer
│ ├── glow
│ ├── controlbar
│ │ ├── background.png
│ │ ├── blankButton.png
│ │ ├── divider.png
│ │ ├── fullscreenButton.png
│ │ ├── fullscreenButtonOver.png
│ │ ├── muteButton.png
│ │ ├── muteButtonOver.png
│ │ ├── normalscreenButton.png
│ │ ├── normalscreenButtonOver.png
│ │ ├── pauseButton.png
│ │ ├── pauseButtonOver.png
│ │ ├── playButton.png
│ │ ├── playButtonOver.png
│ │ ├── timeSliderBuffer.png
│ │ ├── timeSliderCapLeft.png
│ │ ├── timeSliderCapRight.png
│ │ ├── timeSliderProgress.png
│ │ ├── timeSliderRail.png
│ │ ├── unmuteButton.png
│ │ └── unmuteButtonOver.png
│ ├── display
│ │ ├── background.png
│ │ ├── bufferIcon.png
│ │ ├── muteIcon.png
│ │ └── playIcon.png
│ ├── dock
│ │ └── button.png
│ ├── glow.xml
│ ├── playlist
│ │ ├── item.png
│ │ ├── itemOver.png
│ │ ├── sliderCapBottom.png
│ │ ├── sliderCapTop.png
│ │ ├── sliderRail.png
│ │ └── sliderThumb.png
│ └── sharing
│ │ ├── embedIcon.png
│ │ ├── embedScreen.png
│ │ ├── shareIcon.png
│ │ └── shareScreen.png
│ └── player.swf
├── atom.xml
├── blog
└── archives
│ └── index.html
├── favicon.png
├── images
├── bird_32_gray.png
├── bird_32_gray_fail.png
├── code_bg.png
├── dotted-border.png
├── email.png
├── line-tile.png
├── noise.png
├── rss.png
└── search.png
├── index.html
├── javascripts
├── ender.js
├── github.js
├── libs
│ ├── ender.js
│ ├── jXHR.js
│ ├── jquery.min.js
│ └── swfobject-dynamic.js
├── modernizr-2.0.js
├── octopress.js
├── pinboard.js
└── twitter.js
└── robots.txt
/README.md:
--------------------------------------------------------------------------------
1 | Mewpassant
2 | ==========
3 |
4 | An Octopress theme called 'Mewpassant'.
5 |
6 | 
7 |
8 |
9 | With the following steps you can install this theme on your Octopress:
10 |
11 | ```
12 | $ cd octopress
13 | $ git clone https://github.com/pagecho/Mewpassant.git .themes/mewpassant
14 | $ rake install['mewpassant']
15 | $ rake generate
16 | ```
17 |
18 | DO REMEMBER to back up the current template before installing.
19 |
20 |
21 | ###Maupassant on different platform:
22 |
23 | + Typecho:https://github.com/pagecho/maupassant/
24 | + Octopress:https://github.com/pagecho/mewpassant/
25 | + Farbox:https://github.com/pagecho/Maupassant-farbox/
26 | + Wordpress:https://github.com/iMuFeng/maupassant/ (by iMuFeng)
27 | + Ghost: https://github.com/LjxPrime/maupassant (by LjxPrime)
28 | + Hexo: https://github.com/tufu9441/maupassant-hexo (by tufu9441)
29 |
--------------------------------------------------------------------------------
/sass/screen.scss:
--------------------------------------------------------------------------------
1 | /*!
2 | * @package Mewpassant
3 | * @author cho
4 | * @version 1.2
5 | * @link http://pagecho.com
6 | */
7 |
8 | article, aside, details, figcaption, figure, footer, header, hgroup, main, nav, section, summary {
9 | display:block
10 | }
11 | audio, canvas, video {
12 | display:inline-block
13 | }
14 | audio:not([controls]) {
15 | display:none;
16 | height:0
17 | }
18 | [hidden], template {
19 | display:none
20 | }
21 | html {
22 | font-family:sans-serif;
23 | -ms-text-size-adjust:100%;
24 | -webkit-text-size-adjust:100%
25 | }
26 | a {
27 | background:transparent
28 | }
29 | a:focus {
30 | outline:thin dotted
31 | }
32 | a:active, a:hover {
33 | outline:0
34 | }
35 | h1 {
36 | font-size:2em;
37 | margin:.67em 0
38 | }
39 | abbr[title] {
40 | border-bottom:1px dotted
41 | }
42 | b, strong {
43 | font-weight:700
44 | }
45 | dfn {
46 | font-style:italic
47 | }
48 | hr {
49 | -moz-box-sizing:content-box;
50 | box-sizing:content-box;
51 | height:0
52 | }
53 | mark {
54 | background:#ff0;
55 | color:#000
56 | }
57 | code, kbd, pre, samp {
58 | font-family:monospace, serif;
59 | font-size:1em
60 | }
61 | pre {
62 | white-space:pre-wrap
63 | }
64 | q {
65 | quotes:\201C \201D \2018 \2019
66 | }
67 | small {
68 | font-size:80%
69 | }
70 | sub, sup {
71 | font-size:75%;
72 | line-height:0;
73 | position:relative;
74 | vertical-align:baseline
75 | }
76 | sup {
77 | top:-.5em
78 | }
79 | sub {
80 | bottom:-.25em
81 | }
82 | img {
83 | border:0
84 | }
85 | svg:not(:root) {
86 | overflow:hidden
87 | }
88 | fieldset {
89 | border:1px solid silver;
90 | margin:0 2px;
91 | padding:.35em .625em .75em
92 | }
93 | button, input, select, textarea {
94 | font-family:inherit;
95 | font-size:100%;
96 | margin:0
97 | }
98 | button, input {
99 | line-height:normal
100 | }
101 | button, select {
102 | text-transform:none
103 | }
104 | button, html input[type=button], input[type=reset], input[type=submit] {
105 | -webkit-appearance:button;
106 | cursor:pointer
107 | }
108 | button[disabled], html input[disabled] {
109 | cursor:default
110 | }
111 | input[type=checkbox], input[type=radio] {
112 | box-sizing:border-box;
113 | padding:0
114 | }
115 | input[type=search] {
116 | -webkit-appearance:textfield;
117 | -moz-box-sizing:content-box;
118 | -webkit-box-sizing:content-box;
119 | box-sizing:content-box
120 | }
121 | input[type=search]::-webkit-search-cancel-button, input[type=search]::-webkit-search-decoration {
122 | -webkit-appearance:none
123 | }
124 | textarea {
125 | overflow:auto;
126 | vertical-align:top
127 | }
128 | table {
129 | border-collapse:collapse;
130 | border-spacing:0
131 | }
132 | body, figure {
133 | margin:0
134 | }
135 | legend, button::-moz-focus-inner, input::-moz-focus-inner {
136 | border:0;
137 | padding:0
138 | }
139 | ::selection {
140 | background:#F6F6F3;
141 | color:#555
142 | }
143 | body {
144 | background-color:#FFF;
145 | color:#444;
146 | font-family:"TIBch", "Classic Grotesque W01", "Helvetica Neue", Arial, "Hiragino Sans GB", "STHeiti", "Microsoft YaHei", "WenQuanYi Micro Hei", SimSun, sans-serif;
147 | -webkit-font-smoothing:antialiased;
148 | font-size:14px
149 | }
150 | a, button.submit {
151 | color:#6E7173;
152 | text-decoration:none;
153 | -webkit-transition:all .1s ease-in;
154 | -moz-transition:all .1s ease-in;
155 | -o-transition:all .1s ease-in;
156 | transition:all .1s ease-in
157 | }
158 | a:hover, a:active {
159 | color:#6E7173
160 | }
161 | pre, code {
162 | padding:2px 4px;
163 | background:#F8F8F8;
164 | font-family:Menlo, Monaco, Consolas, "Lucida Console", "Courier New", monospace;
165 | font-size:.92857em
166 | }
167 | pre {
168 | padding:8px;
169 | overflow:auto;
170 | max-height:400px
171 | }
172 | pre code {
173 | padding:0
174 | }
175 | blockquote {
176 | margin:2em 1.5em;
177 | padding-left:1.5em;
178 | border-left:4px solid #ddd;
179 | color:#777
180 | }
181 | h1, h2, h3 {
182 | font-family:"Helvetica Neue", Helvetica, Arial, sans-serif
183 | }
184 | input[type="text"], input[type="email"], input[type="url"], input[type="password"], textarea {
185 | padding:5px;
186 | border:1px solid #ddd;
187 | width:100%;
188 | border-radius:2px;
189 | -webkit-box-sizing:border-box;
190 | -moz-box-sizing:border-box;
191 | box-sizing:border-box;
192 | outline:none
193 | }
194 | textarea {
195 | resize:vertical
196 | }
197 | .clear {
198 | clear:both
199 | }
200 | .clearfix, .col-group {
201 | zoom:1
202 | }
203 | .clearfix:before, .col-group:before, .clearfix:after, .col-group:after {
204 | content:" ";
205 | display:table
206 | }
207 | .clearfix:after, .col-group:after {
208 | clear:both
209 | }
210 | .post-content a, .comment-content a {
211 | border-bottom:1px solid #ddd
212 | }
213 | .post-meta a:hover, .post-content a:hover, .widget a:hover, .comment-content a {
214 | border-bottom-color:transparent
215 | }
216 | #header {
217 | padding:32px 0 0;
218 | text-align:left
219 | }
220 | #header .container .col-group {
221 | border-bottom:1px solid #ddd
222 | }
223 | #logo {
224 | font:bold 50px/2"ff-tisa-web-pro", Cambria, "Times New Roman", Georgia, Times, sans-serif;
225 | color:#555
226 | }
227 | #logo span {
228 | color:#777
229 | }
230 | #logo:hover {
231 | color:#777
232 | }
233 | .description {
234 | margin:-22px 0 0;
235 | color:#999;
236 | font-style:italic
237 | }
238 | #nav-menu {
239 | margin:10px 0 -1px;
240 | padding:0;
241 | float:right
242 | }
243 | #nav-menu a {
244 | display:inline-block;
245 | margin-right:-1px;
246 | padding:0 20px;
247 | height:32px;
248 | line-height:32px;
249 | color:#444
250 | }
251 | #nav-menu a:first-child {
252 | border:none
253 | }
254 | #nav-menu a.current {
255 | border:1px solid #ddd;
256 | border-bottom:1px solid #fff
257 | }
258 | .site-search {
259 | display:none
260 | }
261 | #search {
262 | position:relative;
263 | margin-top:15px
264 | }
265 | #search input {
266 | padding:15px 30px 15px 15px;
267 | line-height:1
268 | }
269 | #search .text {
270 | background:transparent url(http://x.papaapp.com/farm1/a571d2/232aa4ce/icon-search.png) no-repeat 210px center
271 | }
272 | .col-8 {
273 | width:800px
274 | }
275 | .container {
276 | width:1150px;
277 | padding:0 60px;
278 | margin:0 auto
279 | }
280 | #secondary {
281 | float:right;
282 | width:245px;
283 | border-left:1px solid #ddd;
284 | padding-left:35px;
285 | word-wrap:break-word;
286 | display:block;
287 | padding-top:25px
288 | }
289 | #main {
290 | padding:32px 0 0;
291 | float:left;
292 | width:800px
293 | }
294 | .post {
295 | padding:10px 0 30px;
296 | }
297 | .post-title {
298 | margin:0;
299 | color:#555;
300 | text-align:left;
301 | font:bold 25px/1.2"ff-tisa-web-pro", Cambria, "Times New Roman", Georgia, Times, sans-serif
302 | }
303 | .post-title a {
304 | color:#555
305 | }
306 | .post-meta {
307 | padding:0;
308 | margin:9px 0 0;
309 | color:#999;
310 | text-align:left
311 | }
312 | .post-meta li {
313 | display:inline-block
314 | }
315 | .post-footer{
316 | border-top: 1px solid #ddd;
317 | float: left;
318 | margin-top:27px;
319 | padding-top:.6em;
320 | }
321 | .post-footer .meta{
322 | line-height:1.7em;
323 | }
324 | .comment-count {
325 | float:right;
326 | margin-top:-30px
327 | }
328 | .post-content {
329 | font-size:15px;
330 | line-height:1.715;
331 | color:#444;
332 | padding-top:25px
333 | }
334 | .post-content pre, code, .comment-content pre, code {
335 | padding:11px 4px;
336 | margin-bottom:22px;
337 | display:block
338 | }
339 | .post-content p {
340 | margin:0 0 1.234em
341 | }
342 | .post-content img {
343 | padding:1em 0
344 | }
345 | .post-content ul {
346 | background-color:#f8f8f8;
347 | border:1px solid #ddd;
348 | overflow:auto;
349 | padding:.5em 2.4em;
350 | border-radius:3px;
351 | margin:1.8em 0
352 | }
353 | .archive-title {
354 | padding-top:20px;
355 | color:#999;
356 | font-size:1em
357 | }
358 | .more {
359 | padding:10px 0 0
360 | }
361 | .more a {
362 | border:none
363 | }
364 | .protected .text {
365 | width:50%
366 | }
367 | .nav-center{
368 | text-align: center;
369 | width: 100%;
370 | display: block;
371 | }
372 | .page-navigator .prev{
373 | position: absolute;
374 | left: 0;
375 | }
376 | .page-navigator .next{
377 | position: absolute;
378 | right: 0;
379 | }
380 | .page-navigator {
381 | border-top:1px solid #ddd;
382 | list-style:none;
383 | padding:22px 0 15px;
384 | font-size:16px;
385 | position:relative;
386 | }
387 | .page-navigator li {
388 | display:inline-block;
389 | margin:0 5px 5px 0
390 | }
391 | .page-navigator a {
392 | display:inline-block;
393 | padding:0 10px;
394 | height:25px;
395 | line-height:25px;
396 | padding:5px 9px;
397 | border:1px solid #DDD
398 | }
399 | .page-navigator a:hover {
400 | background:#F8F8F8;
401 | border-bottom-color:#D26911
402 | }
403 | .page-navigator .current a {
404 | background:#F8F8F8;
405 | border-bottom-color:#D26911
406 | }
407 | .widget {
408 | margin-bottom:30px
409 | }
410 | .widget-title, h3#response {
411 | color:#6E7173;
412 | line-height:2.7;
413 | margin-top:0;
414 | font-size:16px;
415 | border-bottom:1px solid #ddd
416 | }
417 | .widget-list {
418 | list-style:none;
419 | padding:0
420 | }
421 | .widget-list li {
422 | margin:5px 0;
423 | line-height:1.5
424 | }
425 | #footer {
426 | padding:1.4em 0 3.6em;
427 | line-height:1.5;
428 | color:#999
429 | }
430 | .error-page {
431 | margin-top:100px;
432 | margin-bottom:100px
433 | }
434 | .post-content h2, .comment-content h2 {
435 | font-size:1.28571em
436 | }
437 | .post-content img, .comment-content img {
438 | max-width:100%
439 | }
440 | .post-content a img {
441 | background:#FFF;
442 | position:relative;
443 | bottom:-4px
444 | }
445 | .post-content hr, .comment-content hr {
446 | margin:2em auto;
447 | width:100px;
448 | border:1px solid #ddd;
449 | border-width:2px 0 0 0
450 | }
451 | .aligncenter, div.aligncenter {
452 | display:block;
453 | margin-left:auto;
454 | margin-right:auto
455 | }
456 | .alignleft {
457 | float:left
458 | }
459 | .alignright {
460 | float:right
461 | }
462 | img.alignleft {
463 | margin:5px 15px 0 0
464 | }
465 | img.alignright {
466 | margin:5px 0 0 15px
467 | }
468 | figure.code {
469 | background:none;
470 | padding:0;
471 | border:0;
472 | margin-bottom:1.5em
473 | }
474 | .highlight {
475 | margin-bottom:1.8em;
476 | overflow-y:hidden;
477 | overflow-x:auto;
478 | background:#F8F8F8
479 | }
480 | .highlight {
481 | overflow-y:hidden;
482 | overflow-x:auto
483 | }
484 | td.code {
485 | display:block;
486 | overflow:hidden
487 | }
488 | .post-content .highlight code {
489 | margin-bottom:0;
490 | padding:0 10px 0 20px;
491 | overflow:scroll;
492 | overflow-y:hidden;
493 | display:block;
494 | overflow-x:auto;
495 | border-left:1px solid #fff
496 | }
497 | .highlight table {
498 | line-height:1.6;
499 | font-size:13px;
500 | color:#666
501 | }
502 | .highlight .td {
503 | padding:0
504 | }
505 | .line-number, .line {
506 | font-size:14px;
507 | white-space:pre
508 | }
509 | .line {
510 | display:block;
511 | overflow:hidden
512 | }
513 | .line-number {
514 | margin:0 2px 0 5px
515 | }
516 | .highlight pre {
517 | max-height:none;
518 | margin:0
519 | }
520 | .post-content code {
521 | display:inline;
522 | padding:5px 8px
523 | }
524 | #archives {
525 | padding:20px 0
526 | }
527 | #archives h2 {
528 | float:left;
529 | font-weight:normal;
530 | margin-bottom:0;
531 | }
532 | .al_year {
533 | padding:16px 0 0;
534 | font-size:23px;
535 | position:absolute
536 | }
537 | .al_meta {
538 | float:right;
539 | margin:11px 0;
540 | text-align: right;
541 | }
542 | .archives-post {
543 | margin-left:100px;
544 | border-bottom:1px solid #ddd
545 | }
546 | .left{margin-right:3em;}
547 | @media print, screen and (max-width: 1290px) {
548 | .container {
549 | width:auto
550 | }
551 | #main {
552 | width:100%;
553 | margin-right:-320px;
554 | float:left
555 | }
556 | .res-cons {
557 | width:auto;
558 | margin-right:320px
559 | }
560 | .post-content img {
561 | max-width:100%
562 | }
563 | }
564 | @media print, screen and (max-width: 1057px) {
565 | .container {
566 | width:auto
567 | }
568 | #main {
569 | width:100%;
570 | margin-right:-260px;
571 | float:left
572 | }
573 | .res-cons {
574 | width:auto;
575 | margin-right:260px
576 | }
577 | #secondary {
578 | width:180px
579 | }
580 | .post-content {
581 | font-size:14px
582 | }
583 | }
584 | @media print, screen and (max-width: 860px) {
585 | #header {
586 | text-align:center
587 | }
588 | #main {
589 | width:100%;
590 | margin-right:0
591 | }
592 | .res-cons {
593 | width:auto;
594 | margin-right:0
595 | }
596 | #secondary {
597 | display:none
598 | }
599 | }
600 | @media print, screen and (max-width: 680px) {
601 | .al_year {
602 | display:none
603 | }
604 | .archives-post{
605 | margin-left: 0;
606 | }
607 | .container {
608 | padding:0 20px
609 | }
610 | .post-title {
611 | font-size:22px
612 | }
613 | .page-navigator {
614 | padding:15px 0 10px;
615 | }
616 | #footer {
617 | padding-top:10px
618 | }
619 | .page-navigator a {
620 | padding:0 6px
621 | }
622 | .post-content img {
623 | padding:0.2em 0
624 | }
625 | .post {
626 | padding:12px 0
627 | }
628 | #nav-menu {
629 | margin:35px 0 -1px
630 | }
631 | #nav-menu a {
632 | padding:0 15px;
633 | line-height:27px;
634 | height:27px;
635 | font-size:13px
636 | }
637 | }
638 | @media print, screen and (max-width: 500px) {
639 | .post-content-pages {
640 | font-size:14px
641 | }
642 | .al_mon_list {
643 | margin-left:70px;
644 | padding-left:20px
645 | }
646 | }
647 |
--------------------------------------------------------------------------------
/source/_includes/after_footer.html:
--------------------------------------------------------------------------------
1 | {% include disqus.html %}
2 | {% include facebook_like.html %}
3 | {% include google_plus_one.html %}
4 | {% include twitter_sharing.html %}
5 | {% include custom/after_footer.html %}
6 |
--------------------------------------------------------------------------------
/source/_includes/archive_post.html:
--------------------------------------------------------------------------------
1 | {% capture category %}{{ post.categories | size }}{% endcapture %}
2 |
3 |
4 |
5 | {% if category != '0' %}
6 |
9 | {% endif %}
10 |
--------------------------------------------------------------------------------
/source/_includes/article.html:
--------------------------------------------------------------------------------
1 | {% unless page.no_header %}
2 |
17 | {% endunless %}
18 | {% if index %}
19 | {{ content | excerpt }}
20 | {% capture excerpted %}{{ content | has_excerpt }}{% endcapture %}
21 | {% if excerpted == 'true' %}
22 |
25 | {% endif %}
26 | {% else %}
27 | {{ content }}
28 | {% endif %}
29 |
--------------------------------------------------------------------------------
/source/_includes/asides/delicious.html:
--------------------------------------------------------------------------------
1 | {% if site.delicious_user %}
2 |
8 | {% endif %}
--------------------------------------------------------------------------------
/source/_includes/asides/github.html:
--------------------------------------------------------------------------------
1 | {% if site.github_user %}
2 |
3 | GitHub Repos
4 |
5 | - Status updating...
6 |
7 | {% if site.github_show_profile_link %}
8 | @{{site.github_user}} on GitHub
9 | {% endif %}
10 |
28 |
29 |
30 | {% endif %}
31 |
--------------------------------------------------------------------------------
/source/_includes/asides/googleplus.html:
--------------------------------------------------------------------------------
1 | {% if site.googleplus_user %}
2 |
10 | {% endif %}
11 |
12 |
--------------------------------------------------------------------------------
/source/_includes/asides/pinboard.html:
--------------------------------------------------------------------------------
1 | {% if site.pinboard_user %}
2 |
7 |
19 | {% endif %}
20 |
--------------------------------------------------------------------------------
/source/_includes/asides/recent_posts.html:
--------------------------------------------------------------------------------
1 |
7 |
8 |
--------------------------------------------------------------------------------
/source/_includes/asides/twitter.html:
--------------------------------------------------------------------------------
1 | {% if site.twitter_user %}
2 |
3 | Latest Tweets
4 |
7 |
12 |
13 | {% if site.twitter_follow_button %}
14 |
15 | {% else %}
16 | Follow @{{ site.twitter_user }}
17 | {% endif %}
18 |
19 | {% endif %}
20 |
--------------------------------------------------------------------------------
/source/_includes/custom/after_footer.html:
--------------------------------------------------------------------------------
1 | {% comment %}
2 | Add content to be output at the bottom of each page. (You might use this for analytics scripts, for example)
3 | {% endcomment %}
4 |
--------------------------------------------------------------------------------
/source/_includes/custom/asides/about.html:
--------------------------------------------------------------------------------
1 |
2 | About Me
3 | A little something about me.
4 |
5 |
--------------------------------------------------------------------------------
/source/_includes/custom/category_feed.xml:
--------------------------------------------------------------------------------
1 | ---
2 | layout: nil
3 | ---
4 |
5 |
6 |
7 |
8 |
9 |
10 | {{ site.time | date_to_xmlschema }}
11 | {{ site.url }}/
12 |
13 |
14 | {% if site.email %}{% endif %}
15 |
16 | Octopress
17 |
18 | {% for post in site.categories[page.category] limit: 5 %}
19 |
20 |
21 |
22 | {{ post.date | date_to_xmlschema }}
23 | {{ site.url }}{{ post.id }}
24 |
25 |
26 | {% endfor %}
27 |
28 |
--------------------------------------------------------------------------------
/source/_includes/custom/footer.html:
--------------------------------------------------------------------------------
1 | Copyright © {{ site.time | date: "%Y" }} - {{ site.author }} -
2 | Powered by Octopress on GitHubPages
3 |
4 | - Theme by Cho
5 |
6 |
--------------------------------------------------------------------------------
/source/_includes/custom/head.html:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/source/_includes/custom/header.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Cho's
6 |
7 | {% if site.subtitle %}
{{ site.subtitle }}
{% endif %}
8 |
9 |
10 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/source/_includes/custom/navigation.html:
--------------------------------------------------------------------------------
1 | Blog
2 | Archives
--------------------------------------------------------------------------------
/source/_includes/disqus.html:
--------------------------------------------------------------------------------
1 | {% comment %} Load script if disquss comments are enabled and `page.comments` is either empty (index) or set to true {% endcomment %}
2 | {% if site.disqus_short_name and page.comments != false %}
3 |
21 | {% endif %}
22 |
--------------------------------------------------------------------------------
/source/_includes/facebook_like.html:
--------------------------------------------------------------------------------
1 | {% if site.facebook_like %}
2 |
3 |
10 | {% endif %}
11 |
--------------------------------------------------------------------------------
/source/_includes/footer.html:
--------------------------------------------------------------------------------
1 |
2 | {% include custom/footer.html %}
3 |
4 |
--------------------------------------------------------------------------------
/source/_includes/google_analytics.html:
--------------------------------------------------------------------------------
1 | {% if site.google_analytics_tracking_id %}
2 |
13 | {% endif %}
14 |
--------------------------------------------------------------------------------
/source/_includes/google_plus_one.html:
--------------------------------------------------------------------------------
1 | {% if site.google_plus_one %}
2 |
9 | {% endif %}
10 |
--------------------------------------------------------------------------------
/source/_includes/head.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | {% if page.title %}{{ page.title }} - {% endif %}{{ site.title }}
9 |
10 |
13 | {% capture description %}{% if page.description %}{{ page.description }}{% else %}{{ content | raw_content }}{% endif %}{% endcapture %}
14 |
15 | {% if page.keywords %}{% endif %}
16 |
17 |
18 |
19 |
20 |
21 | {% capture canonical %}{{ site.url }}{% if site.permalink contains '.html' %}{{ page.url }}{% else %}{{ page.url | remove:'index.html' }}{% endif %}{% endcapture %}
22 |
23 |
24 |
25 |
26 |
27 |
28 | {% include custom/head.html %}
29 | {% include google_analytics.html %}
30 |
--------------------------------------------------------------------------------
/source/_includes/header.html:
--------------------------------------------------------------------------------
1 |
16 |
--------------------------------------------------------------------------------
/source/_includes/navigation.html:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/source/_includes/post/author.html:
--------------------------------------------------------------------------------
1 | {% if post.author %}
2 | {% assign author = post.author %}
3 | {% elsif page.author %}
4 | {% assign author = page.author %}
5 | {% else %}
6 | {% assign author = site.author %}
7 | {% endif %}
8 | {% if author %}Posted by {{ author }}{% endif %}
9 |
--------------------------------------------------------------------------------
/source/_includes/post/categories.html:
--------------------------------------------------------------------------------
1 | {% capture category %}{% if post %}{{ post.categories | category_links | size }}{% else %}{{ page.categories | category_links | size }}{% endif %}{% endcapture %}
2 | {% unless category == '0' %}
3 |
4 | {% if post %}
5 | {{ post.categories | category_links }}
6 | {% else %}
7 | {{ page.categories | category_links }}
8 | {% endif %}
9 |
10 | {% endunless %}
11 |
--------------------------------------------------------------------------------
/source/_includes/post/date.html:
--------------------------------------------------------------------------------
1 | {% capture date %}{{ page.date }}{{ post.date }}{% endcapture %}
2 | {% capture date_formatted %}{{ page.date_formatted }}{{ post.date_formatted }}{% endcapture %}
3 | {% capture has_date %}{{ date | size }}{% endcapture %}
4 |
5 | {% capture updated %}{{ page.updated }}{{ post.updated }}{% endcapture %}
6 | {% capture updated_formatted %}{{ page.updated_formatted }}{{ post.updated_formatted }}{% endcapture %}
7 | {% capture was_updated %}{{ updated | size }}{% endcapture %}
8 |
9 | {% if has_date != '0' %}
10 | {% capture time %}{% endcapture %}
11 | {% endif %}
12 |
13 | {% if was_updated != '0' %}
14 | {% capture updated %}{% endcapture %}
15 | {% else %}{% assign updated = false %}{% endif %}
--------------------------------------------------------------------------------
/source/_includes/post/disqus_thread.html:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/source/_includes/post/sharing.html:
--------------------------------------------------------------------------------
1 |
2 | {% if site.twitter_tweet_button %}
3 |
4 | {% endif %}
5 | {% if site.google_plus_one %}
6 |
7 | {% endif %}
8 | {% if site.facebook_like %}
9 |
10 | {% endif %}
11 |
12 |
--------------------------------------------------------------------------------
/source/_includes/twitter_sharing.html:
--------------------------------------------------------------------------------
1 | {% if site.twitter_follow_button or site.twitter_tweet_button %}
2 |
11 | {% endif %}
12 |
--------------------------------------------------------------------------------
/source/_layouts/category_index.html:
--------------------------------------------------------------------------------
1 | ---
2 | layout: page
3 | footer: false
4 | ---
5 |
11 |
12 | {% for post in site.categories[page.category] %}
13 | {% capture this_year %}{{ post.date | date: "%Y" }}{% endcapture %}
14 | {% unless year == this_year %}
15 | {% assign year = this_year %}
16 |
{{ year }}
17 | {% endunless %}
18 |
19 | {% include archive_post.html %}
20 |
21 | {% endfor %}
22 |
--------------------------------------------------------------------------------
/source/_layouts/default.html:
--------------------------------------------------------------------------------
1 | {% capture root_url %}{{ site.root | strip_slash }}{% endcapture %}
2 | {% include head.html %}
3 |
4 |
5 |
6 |
7 |
8 | {{ content | expand_urls: root_url }}
9 |
10 |
11 |
12 |
15 | {% include after_footer.html %}
16 |
17 |
18 |
--------------------------------------------------------------------------------
/source/_layouts/page.html:
--------------------------------------------------------------------------------
1 | ---
2 | layout: default
3 | ---
4 |
5 |
6 |
7 | {% if page.title %}
8 |
12 | {% endif %}
13 | {{ content }}
14 | {% unless page.footer == false %}
15 |
25 | {% endunless %}
26 |
27 | {% if site.disqus_short_name and page.comments == true %}
28 |
32 | {% endif %}
33 |
34 |
35 | {% unless page.sidebar == false %}
36 |
43 | {% endunless %}
44 |
--------------------------------------------------------------------------------
/source/_layouts/post.html:
--------------------------------------------------------------------------------
1 | ---
2 | layout: default
3 | single: true
4 | ---
5 |
6 |
7 |
8 |
9 | {% include article.html %}
10 |
27 |
28 | {% if site.disqus_short_name and page.comments == true %}
29 |
33 | {% endif %}
34 |
35 |
36 | {% unless page.sidebar == false %}
37 |
44 | {% endunless %}
45 |
--------------------------------------------------------------------------------
/source/assets/jwplayer/glow/controlbar/background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pagecho/mewpassant/1ecea3fed71588d466dafb53f35fac20e3dcb711/source/assets/jwplayer/glow/controlbar/background.png
--------------------------------------------------------------------------------
/source/assets/jwplayer/glow/controlbar/blankButton.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pagecho/mewpassant/1ecea3fed71588d466dafb53f35fac20e3dcb711/source/assets/jwplayer/glow/controlbar/blankButton.png
--------------------------------------------------------------------------------
/source/assets/jwplayer/glow/controlbar/divider.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pagecho/mewpassant/1ecea3fed71588d466dafb53f35fac20e3dcb711/source/assets/jwplayer/glow/controlbar/divider.png
--------------------------------------------------------------------------------
/source/assets/jwplayer/glow/controlbar/fullscreenButton.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pagecho/mewpassant/1ecea3fed71588d466dafb53f35fac20e3dcb711/source/assets/jwplayer/glow/controlbar/fullscreenButton.png
--------------------------------------------------------------------------------
/source/assets/jwplayer/glow/controlbar/fullscreenButtonOver.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pagecho/mewpassant/1ecea3fed71588d466dafb53f35fac20e3dcb711/source/assets/jwplayer/glow/controlbar/fullscreenButtonOver.png
--------------------------------------------------------------------------------
/source/assets/jwplayer/glow/controlbar/muteButton.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pagecho/mewpassant/1ecea3fed71588d466dafb53f35fac20e3dcb711/source/assets/jwplayer/glow/controlbar/muteButton.png
--------------------------------------------------------------------------------
/source/assets/jwplayer/glow/controlbar/muteButtonOver.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pagecho/mewpassant/1ecea3fed71588d466dafb53f35fac20e3dcb711/source/assets/jwplayer/glow/controlbar/muteButtonOver.png
--------------------------------------------------------------------------------
/source/assets/jwplayer/glow/controlbar/normalscreenButton.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pagecho/mewpassant/1ecea3fed71588d466dafb53f35fac20e3dcb711/source/assets/jwplayer/glow/controlbar/normalscreenButton.png
--------------------------------------------------------------------------------
/source/assets/jwplayer/glow/controlbar/normalscreenButtonOver.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pagecho/mewpassant/1ecea3fed71588d466dafb53f35fac20e3dcb711/source/assets/jwplayer/glow/controlbar/normalscreenButtonOver.png
--------------------------------------------------------------------------------
/source/assets/jwplayer/glow/controlbar/pauseButton.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pagecho/mewpassant/1ecea3fed71588d466dafb53f35fac20e3dcb711/source/assets/jwplayer/glow/controlbar/pauseButton.png
--------------------------------------------------------------------------------
/source/assets/jwplayer/glow/controlbar/pauseButtonOver.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pagecho/mewpassant/1ecea3fed71588d466dafb53f35fac20e3dcb711/source/assets/jwplayer/glow/controlbar/pauseButtonOver.png
--------------------------------------------------------------------------------
/source/assets/jwplayer/glow/controlbar/playButton.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pagecho/mewpassant/1ecea3fed71588d466dafb53f35fac20e3dcb711/source/assets/jwplayer/glow/controlbar/playButton.png
--------------------------------------------------------------------------------
/source/assets/jwplayer/glow/controlbar/playButtonOver.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pagecho/mewpassant/1ecea3fed71588d466dafb53f35fac20e3dcb711/source/assets/jwplayer/glow/controlbar/playButtonOver.png
--------------------------------------------------------------------------------
/source/assets/jwplayer/glow/controlbar/timeSliderBuffer.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pagecho/mewpassant/1ecea3fed71588d466dafb53f35fac20e3dcb711/source/assets/jwplayer/glow/controlbar/timeSliderBuffer.png
--------------------------------------------------------------------------------
/source/assets/jwplayer/glow/controlbar/timeSliderCapLeft.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pagecho/mewpassant/1ecea3fed71588d466dafb53f35fac20e3dcb711/source/assets/jwplayer/glow/controlbar/timeSliderCapLeft.png
--------------------------------------------------------------------------------
/source/assets/jwplayer/glow/controlbar/timeSliderCapRight.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pagecho/mewpassant/1ecea3fed71588d466dafb53f35fac20e3dcb711/source/assets/jwplayer/glow/controlbar/timeSliderCapRight.png
--------------------------------------------------------------------------------
/source/assets/jwplayer/glow/controlbar/timeSliderProgress.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pagecho/mewpassant/1ecea3fed71588d466dafb53f35fac20e3dcb711/source/assets/jwplayer/glow/controlbar/timeSliderProgress.png
--------------------------------------------------------------------------------
/source/assets/jwplayer/glow/controlbar/timeSliderRail.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pagecho/mewpassant/1ecea3fed71588d466dafb53f35fac20e3dcb711/source/assets/jwplayer/glow/controlbar/timeSliderRail.png
--------------------------------------------------------------------------------
/source/assets/jwplayer/glow/controlbar/unmuteButton.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pagecho/mewpassant/1ecea3fed71588d466dafb53f35fac20e3dcb711/source/assets/jwplayer/glow/controlbar/unmuteButton.png
--------------------------------------------------------------------------------
/source/assets/jwplayer/glow/controlbar/unmuteButtonOver.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pagecho/mewpassant/1ecea3fed71588d466dafb53f35fac20e3dcb711/source/assets/jwplayer/glow/controlbar/unmuteButtonOver.png
--------------------------------------------------------------------------------
/source/assets/jwplayer/glow/display/background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pagecho/mewpassant/1ecea3fed71588d466dafb53f35fac20e3dcb711/source/assets/jwplayer/glow/display/background.png
--------------------------------------------------------------------------------
/source/assets/jwplayer/glow/display/bufferIcon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pagecho/mewpassant/1ecea3fed71588d466dafb53f35fac20e3dcb711/source/assets/jwplayer/glow/display/bufferIcon.png
--------------------------------------------------------------------------------
/source/assets/jwplayer/glow/display/muteIcon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pagecho/mewpassant/1ecea3fed71588d466dafb53f35fac20e3dcb711/source/assets/jwplayer/glow/display/muteIcon.png
--------------------------------------------------------------------------------
/source/assets/jwplayer/glow/display/playIcon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pagecho/mewpassant/1ecea3fed71588d466dafb53f35fac20e3dcb711/source/assets/jwplayer/glow/display/playIcon.png
--------------------------------------------------------------------------------
/source/assets/jwplayer/glow/dock/button.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pagecho/mewpassant/1ecea3fed71588d466dafb53f35fac20e3dcb711/source/assets/jwplayer/glow/dock/button.png
--------------------------------------------------------------------------------
/source/assets/jwplayer/glow/glow.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
--------------------------------------------------------------------------------
/source/assets/jwplayer/glow/playlist/item.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pagecho/mewpassant/1ecea3fed71588d466dafb53f35fac20e3dcb711/source/assets/jwplayer/glow/playlist/item.png
--------------------------------------------------------------------------------
/source/assets/jwplayer/glow/playlist/itemOver.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pagecho/mewpassant/1ecea3fed71588d466dafb53f35fac20e3dcb711/source/assets/jwplayer/glow/playlist/itemOver.png
--------------------------------------------------------------------------------
/source/assets/jwplayer/glow/playlist/sliderCapBottom.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pagecho/mewpassant/1ecea3fed71588d466dafb53f35fac20e3dcb711/source/assets/jwplayer/glow/playlist/sliderCapBottom.png
--------------------------------------------------------------------------------
/source/assets/jwplayer/glow/playlist/sliderCapTop.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pagecho/mewpassant/1ecea3fed71588d466dafb53f35fac20e3dcb711/source/assets/jwplayer/glow/playlist/sliderCapTop.png
--------------------------------------------------------------------------------
/source/assets/jwplayer/glow/playlist/sliderRail.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pagecho/mewpassant/1ecea3fed71588d466dafb53f35fac20e3dcb711/source/assets/jwplayer/glow/playlist/sliderRail.png
--------------------------------------------------------------------------------
/source/assets/jwplayer/glow/playlist/sliderThumb.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pagecho/mewpassant/1ecea3fed71588d466dafb53f35fac20e3dcb711/source/assets/jwplayer/glow/playlist/sliderThumb.png
--------------------------------------------------------------------------------
/source/assets/jwplayer/glow/sharing/embedIcon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pagecho/mewpassant/1ecea3fed71588d466dafb53f35fac20e3dcb711/source/assets/jwplayer/glow/sharing/embedIcon.png
--------------------------------------------------------------------------------
/source/assets/jwplayer/glow/sharing/embedScreen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pagecho/mewpassant/1ecea3fed71588d466dafb53f35fac20e3dcb711/source/assets/jwplayer/glow/sharing/embedScreen.png
--------------------------------------------------------------------------------
/source/assets/jwplayer/glow/sharing/shareIcon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pagecho/mewpassant/1ecea3fed71588d466dafb53f35fac20e3dcb711/source/assets/jwplayer/glow/sharing/shareIcon.png
--------------------------------------------------------------------------------
/source/assets/jwplayer/glow/sharing/shareScreen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pagecho/mewpassant/1ecea3fed71588d466dafb53f35fac20e3dcb711/source/assets/jwplayer/glow/sharing/shareScreen.png
--------------------------------------------------------------------------------
/source/assets/jwplayer/player.swf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pagecho/mewpassant/1ecea3fed71588d466dafb53f35fac20e3dcb711/source/assets/jwplayer/player.swf
--------------------------------------------------------------------------------
/source/atom.xml:
--------------------------------------------------------------------------------
1 | ---
2 | layout: nil
3 | ---
4 |
5 |
6 |
7 |
8 |
9 |
10 | {{ site.time | date_to_xmlschema }}
11 | {{ site.url }}/
12 |
13 |
14 | {% if site.email %}{% endif %}
15 |
16 | Octopress
17 |
18 | {% for post in site.posts limit: 20 %}
19 |
20 |
21 |
22 | {{ post.date | date_to_xmlschema }}
23 | {{ site.url }}{{ post.id }}
24 |
25 |
26 | {% endfor %}
27 |
28 |
--------------------------------------------------------------------------------
/source/blog/archives/index.html:
--------------------------------------------------------------------------------
1 | ---
2 | layout: page
3 | title: Blog Archive
4 | footer: false
5 | ---
6 |
12 |
13 | {% for post in site.posts reverse %}
14 | {% capture this_year %}{{ post.date | date: "%Y" }}{% endcapture %}
15 | {% unless year == this_year %}
16 | {% assign year = this_year %}
17 |
{{ year }}
18 | {% endunless %}
19 |
20 | {% include archive_post.html %}
21 |
22 | {% endfor %}
23 |
24 |
--------------------------------------------------------------------------------
/source/favicon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pagecho/mewpassant/1ecea3fed71588d466dafb53f35fac20e3dcb711/source/favicon.png
--------------------------------------------------------------------------------
/source/images/bird_32_gray.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pagecho/mewpassant/1ecea3fed71588d466dafb53f35fac20e3dcb711/source/images/bird_32_gray.png
--------------------------------------------------------------------------------
/source/images/bird_32_gray_fail.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pagecho/mewpassant/1ecea3fed71588d466dafb53f35fac20e3dcb711/source/images/bird_32_gray_fail.png
--------------------------------------------------------------------------------
/source/images/code_bg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pagecho/mewpassant/1ecea3fed71588d466dafb53f35fac20e3dcb711/source/images/code_bg.png
--------------------------------------------------------------------------------
/source/images/dotted-border.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pagecho/mewpassant/1ecea3fed71588d466dafb53f35fac20e3dcb711/source/images/dotted-border.png
--------------------------------------------------------------------------------
/source/images/email.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pagecho/mewpassant/1ecea3fed71588d466dafb53f35fac20e3dcb711/source/images/email.png
--------------------------------------------------------------------------------
/source/images/line-tile.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pagecho/mewpassant/1ecea3fed71588d466dafb53f35fac20e3dcb711/source/images/line-tile.png
--------------------------------------------------------------------------------
/source/images/noise.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pagecho/mewpassant/1ecea3fed71588d466dafb53f35fac20e3dcb711/source/images/noise.png
--------------------------------------------------------------------------------
/source/images/rss.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pagecho/mewpassant/1ecea3fed71588d466dafb53f35fac20e3dcb711/source/images/rss.png
--------------------------------------------------------------------------------
/source/images/search.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pagecho/mewpassant/1ecea3fed71588d466dafb53f35fac20e3dcb711/source/images/search.png
--------------------------------------------------------------------------------
/source/index.html:
--------------------------------------------------------------------------------
1 | ---
2 | layout: default
3 | ---
4 |
5 |
6 |
7 | {% assign index = true %}
8 | {% for post in paginator.posts %}
9 | {% assign content = post.content %}
10 |
11 | {% include article.html %}
12 |
13 | {% endfor %}
14 |
15 | {% if paginator.next_page %}
16 |
← Older
17 | {% endif %}
18 |
21 | {% if paginator.previous_page %}
22 |
Newer →
23 | {% endif %}
24 |
25 |
26 |
27 |
28 |
35 |
36 |
--------------------------------------------------------------------------------
/source/javascripts/ender.js:
--------------------------------------------------------------------------------
1 | /*!
2 | * =============================================================
3 | * Ender: open module JavaScript framework (https://ender.no.de)
4 | * Build: ender build jeesh reqwest
5 | * =============================================================
6 | */
7 |
8 |
9 | /*!
10 | * Ender: open module JavaScript framework (client-lib)
11 | * copyright Dustin Diaz & Jacob Thornton 2011-2012 (@ded @fat)
12 | * http://ender.jit.su
13 | * License MIT
14 | */
15 | (function(context){function require(identifier){var module=modules["$"+identifier]||window[identifier];if(!module)throw new Error("Ender Error: Requested module '"+identifier+"' has not been defined.");return module}function provide(name,what){return modules["$"+name]=what}function aug(o,o2){for(var k in o2)k!="noConflict"&&k!="_VERSION"&&(o[k]=o2[k]);return o}function Ender(s,r){var elements,i;this.selector=s;if(typeof s=="undefined"){elements=[];this.selector=""}else typeof s=="string"||s.nodeName||s.length&&"item"in s||s==window?elements=ender._select(s,r):elements=isFinite(s.length)?s:[s];this.length=elements.length;for(i=this.length;i--;)this[i]=elements[i]}function ender(s,r){return new Ender(s,r)}context.global=context;var modules={},old=context.$,oldEnder=context.ender,oldRequire=context.require,oldProvide=context.provide;context.provide=provide;context.require=require;Ender.prototype.forEach=function(fn,opt_scope){var i,l;for(i=0,l=this.length;i0)self._completeHandlers.shift()(resp)}function success(resp){var r=resp.responseText;if(r)switch(type){case"json":try{resp=win.JSON?win.JSON.parse(r):eval("("+r+")")}catch(err){return error(resp,"Could not parse JSON in response",err)}break;case"js":resp=eval(r);break;case"html":resp=r;break;case"xml":resp=resp.responseXML}self._responseArgs.resp=resp;self._fulfilled=!0;fn(resp);while(self._fulfillmentHandlers.length>0)self._fulfillmentHandlers.shift()(resp);complete(resp)}function error(resp,msg,t){self._responseArgs.resp=resp;self._responseArgs.msg=msg;self._responseArgs.t=t;self._erred=!0;while(self._errorHandlers.length>0)self._errorHandlers.shift()(resp,msg,t);complete(resp)}this.url=typeof o=="string"?o:o.url;this.timeout=null;this._fulfilled=!1;this._fulfillmentHandlers=[];this._errorHandlers=[];this._completeHandlers=[];this._erred=!1;this._responseArgs={};var self=this,type=o.type||setType(this.url);fn=fn||function(){};o.timeout&&(this.timeout=setTimeout(function(){self.abort()},o.timeout));o.success&&this._fulfillmentHandlers.push(function(){o.success.apply(o,arguments)});o.error&&this._errorHandlers.push(function(){o.error.apply(o,arguments)});o.complete&&this._completeHandlers.push(function(){o.complete.apply(o,arguments)});this.request=getRequest(o,success,error)}function reqwest(o,fn){return new Reqwest(o,fn)}function normalize(s){return s?s.replace(/\r?\n/g,"\r\n"):""}function serial(el,cb){var n=el.name,t=el.tagName.toLowerCase(),optCb=function(o){o&&!o.disabled&&cb(n,normalize(o.attributes.value&&o.attributes.value.specified?o.value:o.text))};if(el.disabled||!n)return;switch(t){case"input":if(!/reset|button|image|file/i.test(el.type)){var ch=/checkbox/i.test(el.type),ra=/radio/i.test(el.type),val=el.value;(!ch&&!ra||el.checked)&&cb(n,normalize(ch&&val===""?"on":val))}break;case"textarea":cb(n,normalize(el.value));break;case"select":if(el.type.toLowerCase()==="select-one")optCb(el.selectedIndex>=0?el.options[el.selectedIndex]:null);else for(var i=0;el.length&&i0){typeSpec=str2arr(typeSpec);for(i=typeSpec.length;i--;)off(element,typeSpec[i],fn);return element}type=isTypeStr&&typeSpec.replace(nameRegex,"");type&&customEvents[type]&&(type=customEvents[type].base);if(!typeSpec||isTypeStr){if(namespaces=isTypeStr&&typeSpec.replace(namespaceRegex,""))namespaces=str2arr(namespaces,".");removeListener(element,type,fn,namespaces)}else if(isFunction(typeSpec))removeListener(element,null,typeSpec);else for(k in typeSpec)typeSpec.hasOwnProperty(k)&&off(element,k,typeSpec[k]);return element},on=function(element,events,selector,fn){var originalFn,type,types,i,args,entry,first;if(selector===undefined&&typeof events=="object"){for(type in events)events.hasOwnProperty(type)&&on.call(this,element,type,events[type]);return}if(!isFunction(selector)){originalFn=fn;args=slice.call(arguments,4);fn=delegate(selector,originalFn,selectorEngine)}else{args=slice.call(arguments,3);fn=originalFn=selector}types=str2arr(events);this===ONE&&(fn=once(off,element,events,fn,originalFn));for(i=types.length;i--;){first=registry.put(entry=new RegEntry(element,types[i].replace(nameRegex,""),fn,originalFn,str2arr(types[i].replace(namespaceRegex,""),"."),args,!1));entry[eventSupport]&&first&&listener(element,entry.eventType,!0,entry.customType)}return element},add=function(element,events,fn,delfn){return on.apply(null,isString(fn)?[element,fn,events,delfn].concat(arguments.length>3?slice.call(arguments,5):[]):slice.call(arguments))},one=function(){return on.apply(ONE,arguments)},fire=function(element,type,args){var types=str2arr(type),i,j,l,names,handlers;for(i=types.length;i--;){type=types[i].replace(nameRegex,"");if(names=types[i].replace(namespaceRegex,""))names=str2arr(names,".");if(!names&&!args&&element[eventSupport])fireListener(nativeEvents[type],type,element);else{handlers=registry.get(element,type,null,!1);args=[!1].concat(args);for(j=0,l=handlers.length;j0?cloneNode(self,el):el)},null,rev)},this,rev);self.length=i;each(r,function(e){self[--i]=e},null,!rev);return self}function xy(el,x,y){var $el=bonzo(el),style=$el.css("position"),offset=$el.offset(),rel="relative",isRel=style==rel,delta=[parseInt($el.css("left"),10),parseInt($el.css("top"),10)];if(style=="static"){$el.css("position",rel);style=rel}isNaN(delta[0])&&(delta[0]=isRel?0:el.offsetLeft);isNaN(delta[1])&&(delta[1]=isRel?0:el.offsetTop);x!=null&&(el.style.left=x-offset.left+delta[0]+px);y!=null&&(el.style.top=y-offset.top+delta[1]+px)}function setter(el,v){return typeof v=="function"?v(el):v}function Bonzo(elements){this.length=0;if(elements){elements=typeof elements!="string"&&!elements.nodeType&&typeof elements.length!="undefined"?elements:[elements];this.length=elements.length;for(var i=0;i/,table=["",1],td=["",3],option=["",1],noscope=["_","",0,1],tagMap={thead:table,tbody:table,tfoot:table,colgroup:table,caption:table,tr:["",2],th:td,td:td,col:["",2],fieldset:["",1],legend:["",2],option:option,optgroup:option,script:noscope,style:noscope,link:noscope,param:noscope,base:noscope},stateAttributes=/^(checked|selected|disabled)$/,ie=/msie/i.test(navigator.userAgent),hasClass,addClass,removeClass,uidMap={},uuids=0,digit=/^-?[\d\.]+$/,dattr=/^data-(.+)$/,px="px",setAttribute="setAttribute",getAttribute="getAttribute",byTag="getElementsByTagName",features=function(){var e=doc.createElement("p");e.innerHTML='x';return{hrefExtended:e[byTag]("a")[0][getAttribute]("href")!="#x",autoTbody:e[byTag]("tbody").length!==0,computedStyle:doc.defaultView&&doc.defaultView.getComputedStyle,cssFloat:e[byTag]("table")[0].style.styleFloat?"styleFloat":"cssFloat",transform:function(){var props=["transform","webkitTransform","MozTransform","OTransform","msTransform"],i;for(i=0;i]+)/),el=doc.createElement("div"),els=[],p=tag?tagMap[tag[1].toLowerCase()]:null,dep=p?p[2]+1:1,ns=p&&p[3],pn=parentNode,tb=features.autoTbody&&p&&p[0]==""&&!/~+]/,normalizr=/^\s+|\s*([,\s\+\~>]|$)\s*/g,splitters=/[\s\>\+\~]/,splittersMore=/(?![\s\w\-\/\?\&\=\:\.\(\)\!,@#%<>\{\}\$\*\^'"]*\]|[\s\w\+\-]*\))/,specialChars=/([.*+?\^=!:${}()|\[\]\/\\])/g,simple=/^(\*|[a-z0-9]+)?(?:([\.\#]+[\w\-\.#]+)?)/,attr=/\[([\w\-]+)(?:([\|\^\$\*\~]?\=)['"]?([ \w\-\/\?\&\=\:\.\(\)\!,@#%<>\{\}\$\*\^]+)["']?)?\]/,pseudo=/:([\w\-]+)(\(['"]?([^()]+)['"]?\))?/,easy=new RegExp(idOnly.source+"|"+tagOnly.source+"|"+classOnly.source),dividers=new RegExp("("+splitters.source+")"+splittersMore.source,"g"),tokenizr=new RegExp(splitters.source+splittersMore.source),chunker=new RegExp(simple.source+"("+attr.source+")?"+"("+pseudo.source+")?"),walker={" ":function(node){return node&&node!==html&&node.parentNode},">":function(node,contestant){return node&&node.parentNode==contestant.parentNode&&node.parentNode},"~":function(node){return node&&node.previousSibling},"+":function(node,contestant,p1,p2){return node?(p1=previous(node))&&(p2=previous(contestant))&&p1==p2&&p1:!1}};cache.prototype={g:function(k){return this.c[k]||undefined},s:function(k,v,r){v=r?new RegExp(v):v;return this.c[k]=v}};var classCache=new cache,cleanCache=new cache,attrCache=new cache,tokenCache=new cache,isAncestor="compareDocumentPosition"in html?function(element,container){return(container.compareDocumentPosition(element)&16)==16}:"contains"in html?function(element,container){container=container[nodeType]===9||container==window?html:container;return container!==element&&container.contains(element)}:function(element,container){while(element=element.parentNode)if(element===container)return 1;return 0},getAttr=function(){var e=doc.createElement("p");return(e.innerHTML='x')&&e.firstChild.getAttribute("href")!="#x"?function(e,a){return a==="class"?e.className:a==="href"||a==="src"?e.getAttribute(a,2):e.getAttribute(a)}:function(e,a){return e.getAttribute(a)}}(),hasByClass=!!doc[byClass],hasQSA=doc.querySelector&&doc[qSA],selectQSA=function(selector,root){var result=[],ss,e;try{if(root[nodeType]===9||!splittable.test(selector))return arrayify(root[qSA](selector));each(ss=selector.split(","),collectSelector(root,function(ctx,s){e=ctx[qSA](s);e.length==1?result[result.length]=e.item(0):e.length&&(result=result.concat(arrayify(e)))}));return ss.length>1&&result.length>1?uniq(result):result}catch(ex){}return selectNonNative(selector,root)},selectNonNative=function(selector,root){var result=[],items,m,i,l,r,ss;selector=selector.replace(normalizr,"$1");if(m=selector.match(tagAndOrClass)){r=classRegex(m[2]);items=root[byTag](m[1]||"*");for(i=0,l=items.length;i1&&result.length>1?uniq(result):result},configure=function(options){typeof options[useNativeQSA]!="undefined"&&(select=options[useNativeQSA]?hasQSA?selectQSA:selectNonNative:selectNonNative)};configure({useNativeQSA:!0});qwery.configure=configure;qwery.uniq=uniq;qwery.is=is;qwery.pseudos={};return qwery});provide("qwery",module.exports);(function($){var q=function(){var r;try{r=require("qwery")}catch(ex){r=require("qwery-mobile")}finally{return r}}();$.pseudos=q.pseudos;$._select=function(s,r){return($._select=function(){var b;if(typeof $.create=="function")return function(s,r){return/^\s*').text(str).html();
4 | }
5 | function render(target, repos){
6 | var i = 0, fragment = '', t = $(target)[0];
7 |
8 | for(i = 0; i < repos.length; i++) {
9 | fragment += ''+repos[i].name+''+escapeHtml(repos[i].description||'')+'
';
10 | }
11 | t.innerHTML = fragment;
12 | }
13 | return {
14 | showRepos: function(options){
15 | $.ajax({
16 | url: "https://api.github.com/users/"+options.user+"/repos?callback=?"
17 | , type: 'jsonp'
18 | , error: function (err) { $(options.target + ' li.loading').addClass('error').text("Error loading feed"); }
19 | , success: function(data) {
20 | var repos = [];
21 | if (!data || !data.data) { return; }
22 | for (var i = 0; i < data.data.length; i++) {
23 | if (options.skip_forks && data.data[i].fork) { continue; }
24 | repos.push(data.data[i]);
25 | }
26 | repos.sort(function(a, b) {
27 | var aDate = new Date(a.pushed_at).valueOf(),
28 | bDate = new Date(b.pushed_at).valueOf();
29 |
30 | if (aDate === bDate) { return 0; }
31 | return aDate > bDate ? -1 : 1;
32 | });
33 |
34 | if (options.count) { repos.splice(options.count); }
35 | render(options.target, repos);
36 | }
37 | });
38 | }
39 | };
40 | })();
41 |
--------------------------------------------------------------------------------
/source/javascripts/libs/jXHR.js:
--------------------------------------------------------------------------------
1 | // jXHR.js (JSON-P XHR)
2 | // v0.1 (c) Kyle Simpson
3 | // MIT License
4 |
5 | (function(global){
6 | var SETTIMEOUT = global.setTimeout, // for better compression
7 | doc = global.document,
8 | callback_counter = 0;
9 |
10 | global.jXHR = function() {
11 | var script_url,
12 | script_loaded,
13 | jsonp_callback,
14 | scriptElem,
15 | publicAPI = null;
16 |
17 | function removeScript() { try { scriptElem.parentNode.removeChild(scriptElem); } catch (err) { } }
18 |
19 | function reset() {
20 | script_loaded = false;
21 | script_url = "";
22 | removeScript();
23 | scriptElem = null;
24 | fireReadyStateChange(0);
25 | }
26 |
27 | function ThrowError(msg) {
28 | try { publicAPI.onerror.call(publicAPI,msg,script_url); } catch (err) { throw new Error(msg); }
29 | }
30 |
31 | function handleScriptLoad() {
32 | if ((this.readyState && this.readyState!=="complete" && this.readyState!=="loaded") || script_loaded) { return; }
33 | this.onload = this.onreadystatechange = null; // prevent memory leak
34 | script_loaded = true;
35 | if (publicAPI.readyState !== 4) ThrowError("Script failed to load ["+script_url+"].");
36 | removeScript();
37 | }
38 |
39 | function fireReadyStateChange(rs,args) {
40 | args = args || [];
41 | publicAPI.readyState = rs;
42 | if (typeof publicAPI.onreadystatechange === "function") publicAPI.onreadystatechange.apply(publicAPI,args);
43 | }
44 |
45 | publicAPI = {
46 | onerror:null,
47 | onreadystatechange:null,
48 | readyState:0,
49 | open:function(method,url){
50 | reset();
51 | internal_callback = "cb"+(callback_counter++);
52 | (function(icb){
53 | global.jXHR[icb] = function() {
54 | try { fireReadyStateChange.call(publicAPI,4,arguments); }
55 | catch(err) {
56 | publicAPI.readyState = -1;
57 | ThrowError("Script failed to run ["+script_url+"].");
58 | }
59 | global.jXHR[icb] = null;
60 | };
61 | })(internal_callback);
62 | script_url = url.replace(/=\?/,"=jXHR."+internal_callback);
63 | fireReadyStateChange(1);
64 | },
65 | send:function(){
66 | SETTIMEOUT(function(){
67 | scriptElem = doc.createElement("script");
68 | scriptElem.setAttribute("type","text/javascript");
69 | scriptElem.onload = scriptElem.onreadystatechange = function(){handleScriptLoad.call(scriptElem);};
70 | scriptElem.setAttribute("src",script_url);
71 | doc.getElementsByTagName("head")[0].appendChild(scriptElem);
72 | },0);
73 | fireReadyStateChange(2);
74 | },
75 | setRequestHeader:function(){}, // noop
76 | getResponseHeader:function(){return "";}, // basically noop
77 | getAllResponseHeaders:function(){return [];} // ditto
78 | };
79 |
80 | reset();
81 |
82 | return publicAPI;
83 | };
84 | })(window);
85 |
86 |
--------------------------------------------------------------------------------
/source/javascripts/libs/swfobject-dynamic.js:
--------------------------------------------------------------------------------
1 | /*! SWFObject v2.2
2 | is released under the MIT License
3 | */
4 |
5 | var swfobject = function() {
6 |
7 | var UNDEF = "undefined",
8 | OBJECT = "object",
9 | SHOCKWAVE_FLASH = "Shockwave Flash",
10 | SHOCKWAVE_FLASH_AX = "ShockwaveFlash.ShockwaveFlash",
11 | FLASH_MIME_TYPE = "application/x-shockwave-flash",
12 | EXPRESS_INSTALL_ID = "SWFObjectExprInst",
13 |
14 | win = window,
15 | doc = document,
16 | nav = navigator,
17 |
18 | plugin = false,
19 | regObjArr = [],
20 | objIdArr = [],
21 | storedAltContent,
22 | storedAltContentId,
23 | storedCallbackFn,
24 | storedCallbackObj,
25 | autoHideShow = true,
26 |
27 | /* Centralized function for browser feature detection
28 | - User agent string detection is only used when no good alternative is possible
29 | - Is executed directly for optimal performance
30 | */
31 | ua = function() {
32 | var w3cdom = typeof doc.getElementById != UNDEF && typeof doc.getElementsByTagName != UNDEF && typeof doc.createElement != UNDEF,
33 | u = nav.userAgent.toLowerCase(),
34 | p = nav.platform.toLowerCase(),
35 | windows = p ? /win/.test(p) : /win/.test(u),
36 | mac = p ? /mac/.test(p) : /mac/.test(u),
37 | webkit = /webkit/.test(u) ? parseFloat(u.replace(/^.*webkit\/(\d+(\.\d+)?).*$/, "$1")) : false, // returns either the webkit version or false if not webkit
38 | ie = !+"\v1", // feature detection based on Andrea Giammarchi's solution: http://webreflection.blogspot.com/2009/01/32-bytes-to-know-if-your-browser-is-ie.html
39 | playerVersion = [0,0,0],
40 | d = null;
41 | if (typeof nav.plugins != UNDEF && typeof nav.plugins[SHOCKWAVE_FLASH] == OBJECT) {
42 | d = nav.plugins[SHOCKWAVE_FLASH].description;
43 | if (d && !(typeof nav.mimeTypes != UNDEF && nav.mimeTypes[FLASH_MIME_TYPE] && !nav.mimeTypes[FLASH_MIME_TYPE].enabledPlugin)) { // navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin indicates whether plug-ins are enabled or disabled in Safari 3+
44 | plugin = true;
45 | ie = false; // cascaded feature detection for Internet Explorer
46 | d = d.replace(/^.*\s+(\S+\s+\S+$)/, "$1");
47 | playerVersion[0] = parseInt(d.replace(/^(.*)\..*$/, "$1"), 10);
48 | playerVersion[1] = parseInt(d.replace(/^.*\.(.*)\s.*$/, "$1"), 10);
49 | playerVersion[2] = /[a-zA-Z]/.test(d) ? parseInt(d.replace(/^.*[a-zA-Z]+(.*)$/, "$1"), 10) : 0;
50 | }
51 | }
52 | else if (typeof win.ActiveXObject != UNDEF) {
53 | try {
54 | var a = new ActiveXObject(SHOCKWAVE_FLASH_AX);
55 | if (a) { // a will return null when ActiveX is disabled
56 | d = a.GetVariable("$version");
57 | if (d) {
58 | ie = true; // cascaded feature detection for Internet Explorer
59 | d = d.split(" ")[1].split(",");
60 | playerVersion = [parseInt(d[0], 10), parseInt(d[1], 10), parseInt(d[2], 10)];
61 | }
62 | }
63 | }
64 | catch(e) {}
65 | }
66 | return { w3:w3cdom, pv:playerVersion, wk:webkit, ie:ie, win:windows, mac:mac };
67 | }()
68 |
69 |
70 | /* Main function
71 | - Will preferably execute onDomLoad, otherwise onload (as a fallback)
72 | */
73 | function main() {
74 | if (plugin) { testPlayerVersion(); }
75 | else { matchVersions(); }
76 | }
77 |
78 | /* Detect the Flash Player version for non-Internet Explorer browsers
79 | - Detecting the plug-in version via the object element is more precise than using the plugins collection item's description:
80 | a. Both release and build numbers can be detected
81 | b. Avoid wrong descriptions by corrupt installers provided by Adobe
82 | c. Avoid wrong descriptions by multiple Flash Player entries in the plugin Array, caused by incorrect browser imports
83 | - Disadvantage of this method is that it depends on the availability of the DOM, while the plugins collection is immediately available
84 | */
85 | function testPlayerVersion() {
86 | var b = doc.getElementsByTagName("body")[0];
87 | var o = createElement(OBJECT);
88 | o.setAttribute("type", FLASH_MIME_TYPE);
89 | var t = b.appendChild(o);
90 | if (t) {
91 | var counter = 0;
92 | (function(){
93 | if (typeof t.GetVariable != UNDEF) {
94 | var d = t.GetVariable("$version");
95 | if (d) {
96 | d = d.split(" ")[1].split(",");
97 | ua.pv = [parseInt(d[0], 10), parseInt(d[1], 10), parseInt(d[2], 10)];
98 | }
99 | }
100 | else if (counter < 10) {
101 | counter++;
102 | setTimeout(arguments.callee, 10);
103 | return;
104 | }
105 | b.removeChild(o);
106 | t = null;
107 | matchVersions();
108 | })();
109 | }
110 | else {
111 | matchVersions();
112 | }
113 | }
114 |
115 |
116 | /* Cross-browser dynamic SWF creation
117 | */
118 | function createSWF(attObj, parObj, id) {
119 | var r, el = getElementById(id);
120 | if (ua.wk && ua.wk < 312) { return r; }
121 | if (el) {
122 | if (typeof attObj.id == UNDEF) { // if no 'id' is defined for the object element, it will inherit the 'id' from the alternative content
123 | attObj.id = id;
124 | }
125 | if (ua.ie && ua.win) { // Internet Explorer + the HTML object element + W3C DOM methods do not combine: fall back to outerHTML
126 | var att = "";
127 | for (var i in attObj) {
128 | if (attObj[i] != Object.prototype[i]) { // filter out prototype additions from other potential libraries
129 | if (i.toLowerCase() == "data") {
130 | parObj.movie = attObj[i];
131 | }
132 | else if (i.toLowerCase() == "styleclass") { // 'class' is an ECMA4 reserved keyword
133 | att += ' class="' + attObj[i] + '"';
134 | }
135 | else if (i.toLowerCase() != "classid") {
136 | att += ' ' + i + '="' + attObj[i] + '"';
137 | }
138 | }
139 | }
140 | var par = "";
141 | for (var j in parObj) {
142 | if (parObj[j] != Object.prototype[j]) { // filter out prototype additions from other potential libraries
143 | par += '';
144 | }
145 | }
146 | el.outerHTML = '';
147 | objIdArr[objIdArr.length] = attObj.id; // stored to fix object 'leaks' on unload (dynamic publishing only)
148 | r = getElementById(attObj.id);
149 | }
150 | else { // well-behaving browsers
151 | var o = createElement(OBJECT);
152 | o.setAttribute("type", FLASH_MIME_TYPE);
153 | for (var m in attObj) {
154 | if (attObj[m] != Object.prototype[m]) { // filter out prototype additions from other potential libraries
155 | if (m.toLowerCase() == "styleclass") { // 'class' is an ECMA4 reserved keyword
156 | o.setAttribute("class", attObj[m]);
157 | }
158 | else if (m.toLowerCase() != "classid") { // filter out IE specific attribute
159 | o.setAttribute(m, attObj[m]);
160 | }
161 | }
162 | }
163 | for (var n in parObj) {
164 | if (parObj[n] != Object.prototype[n] && n.toLowerCase() != "movie") { // filter out prototype additions from other potential libraries and IE specific param element
165 | createObjParam(o, n, parObj[n]);
166 | }
167 | }
168 | el.parentNode.replaceChild(o, el);
169 | r = o;
170 | }
171 | }
172 | return r;
173 | }
174 |
175 | function createObjParam(el, pName, pValue) {
176 | var p = createElement("param");
177 | p.setAttribute("name", pName);
178 | p.setAttribute("value", pValue);
179 | el.appendChild(p);
180 | }
181 |
182 | /* Cross-browser SWF removal
183 | - Especially needed to safely and completely remove a SWF in Internet Explorer
184 | */
185 | /* Functions to optimize JavaScript compression
186 | */
187 | function getElementById(id) {
188 | var el = null;
189 | try {
190 | el = doc.getElementById(id);
191 | }
192 | catch (e) {}
193 | return el;
194 | }
195 |
196 | function createElement(el) {
197 | return doc.createElement(el);
198 | }
199 |
200 | /* Flash Player and SWF content version matching
201 | */
202 | function hasPlayerVersion(rv) {
203 | var pv = ua.pv, v = rv.split(".");
204 | v[0] = parseInt(v[0], 10);
205 | v[1] = parseInt(v[1], 10) || 0; // supports short notation, e.g. "9" instead of "9.0.0"
206 | v[2] = parseInt(v[2], 10) || 0;
207 | return (pv[0] > v[0] || (pv[0] == v[0] && pv[1] > v[1]) || (pv[0] == v[0] && pv[1] == v[1] && pv[2] >= v[2])) ? true : false;
208 | }
209 |
210 |
211 | /* Filter to avoid XSS attacks
212 | */
213 | function urlEncodeIfNecessary(s) {
214 | var regex = /[\\\"<>\.;]/;
215 | var hasBadChars = regex.exec(s) != null;
216 | return hasBadChars && typeof encodeURIComponent != UNDEF ? encodeURIComponent(s) : s;
217 | }
218 |
219 | return {
220 | /* Public API
221 | - Reference: http://code.google.com/p/swfobject/wiki/documentation
222 | */
223 |
224 | embedSWF: function(swfUrlStr, replaceElemIdStr, widthStr, heightStr, swfVersionStr, flashvarsObj, parObj, attObj, callbackFn) {
225 | var callbackObj = {success:false, id:replaceElemIdStr};
226 | if (ua.w3 && !(ua.wk && ua.wk < 312) && swfUrlStr && replaceElemIdStr && widthStr && heightStr && swfVersionStr) {
227 | widthStr += ""; // auto-convert to string
228 | heightStr += "";
229 | var att = {};
230 | if (attObj && typeof attObj === OBJECT) {
231 | for (var i in attObj) { // copy object to avoid the use of references, because web authors often reuse attObj for multiple SWFs
232 | att[i] = attObj[i];
233 | }
234 | }
235 | att.data = swfUrlStr;
236 | att.width = widthStr;
237 | att.height = heightStr;
238 | var par = {};
239 | if (parObj && typeof parObj === OBJECT) {
240 | for (var j in parObj) { // copy object to avoid the use of references, because web authors often reuse parObj for multiple SWFs
241 | par[j] = parObj[j];
242 | }
243 | }
244 | if (flashvarsObj && typeof flashvarsObj === OBJECT) {
245 | for (var k in flashvarsObj) { // copy object to avoid the use of references, because web authors often reuse flashvarsObj for multiple SWFs
246 | if (typeof par.flashvars != UNDEF) {
247 | par.flashvars += "&" + k + "=" + flashvarsObj[k];
248 | }
249 | else {
250 | par.flashvars = k + "=" + flashvarsObj[k];
251 | }
252 | }
253 | }
254 | if (hasPlayerVersion(swfVersionStr)) { // create SWF
255 | var obj = createSWF(att, par, replaceElemIdStr);
256 | callbackObj.success = true;
257 | callbackObj.ref = obj;
258 | }
259 | if (callbackFn) { callbackFn(callbackObj); }
260 | }
261 | else if (callbackFn) { callbackFn(callbackObj); }
262 | },
263 |
264 | ua: ua,
265 |
266 | getFlashPlayerVersion: function() {
267 | return { major:ua.pv[0], minor:ua.pv[1], release:ua.pv[2] };
268 | },
269 |
270 | hasFlashPlayerVersion: hasPlayerVersion,
271 |
272 | createSWF: function(attObj, parObj, replaceElemIdStr) {
273 | if (ua.w3) {
274 | return createSWF(attObj, parObj, replaceElemIdStr);
275 | }
276 | else {
277 | return undefined;
278 | }
279 | },
280 |
281 | getQueryParamValue: function(param) {
282 | var q = doc.location.search || doc.location.hash;
283 | if (q) {
284 | if (/\?/.test(q)) { q = q.split("?")[1]; } // strip question mark
285 | if (param == null) {
286 | return urlEncodeIfNecessary(q);
287 | }
288 | var pairs = q.split("&");
289 | for (var i = 0; i < pairs.length; i++) {
290 | if (pairs[i].substring(0, pairs[i].indexOf("=")) == param) {
291 | return urlEncodeIfNecessary(pairs[i].substring((pairs[i].indexOf("=") + 1)));
292 | }
293 | }
294 | }
295 | return "";
296 | }
297 | };
298 | }();
299 |
--------------------------------------------------------------------------------
/source/javascripts/modernizr-2.0.js:
--------------------------------------------------------------------------------
1 | /* Modernizr 2.0.4 (Custom Build) | MIT & BSD
2 | * Contains: video | iepp | respond | mq | cssclasses | teststyles | testprop | testallprops | prefixes | domprefixes | load
3 | * Build URL: http://j.mp/m1H1Y1
4 | */
5 | ;window.Modernizr=function(a,b,c){function D(a,b){var c=a.charAt(0).toUpperCase()+a.substr(1),d=(a+" "+o.join(c+" ")+c).split(" ");return C(d,b)}function C(a,b){for(var d in a)if(k[a[d]]!==c)return b=="pfx"?a[d]:!0;return!1}function B(a,b){return!!~(""+a).indexOf(b)}function A(a,b){return typeof a===b}function z(a,b){return y(n.join(a+";")+(b||""))}function y(a){k.cssText=a}var d="2.0.4",e={},f=!0,g=b.documentElement,h=b.head||b.getElementsByTagName("head")[0],i="modernizr",j=b.createElement(i),k=j.style,l,m=Object.prototype.toString,n=" -webkit- -moz- -o- -ms- -khtml- ".split(" "),o="Webkit Moz O ms Khtml".split(" "),p={},q={},r={},s=[],t=function(a,c,d,e){var f,h,j,k=b.createElement("div");if(parseInt(d,10))while(d--)j=b.createElement("div"),j.id=e?e[d]:i+(d+1),k.appendChild(j);f=["",""].join(""),k.id=i,k.innerHTML+=f,g.appendChild(k),h=c(k,a),k.parentNode.removeChild(k);return!!h},u=function(b){if(a.matchMedia)return matchMedia(b).matches;var c;t("@media "+b+" { #"+i+" { position: absolute; } }",function(b){c=(a.getComputedStyle?getComputedStyle(b,null):b.currentStyle).position=="absolute"});return c},v,w={}.hasOwnProperty,x;!A(w,c)&&!A(w.call,c)?x=function(a,b){return w.call(a,b)}:x=function(a,b){return b in a&&A(a.constructor.prototype[b],c)},p.video=function(){var a=b.createElement("video"),c=!1;try{if(c=!!a.canPlayType){c=new Boolean(c),c.ogg=a.canPlayType('video/ogg; codecs="theora"');var d='video/mp4; codecs="avc1.42E01E';c.h264=a.canPlayType(d+'"')||a.canPlayType(d+', mp4a.40.2"'),c.webm=a.canPlayType('video/webm; codecs="vp8, vorbis"')}}catch(e){}return c};for(var E in p)x(p,E)&&(v=E.toLowerCase(),e[v]=p[E](),s.push((e[v]?"":"no-")+v));y(""),j=l=null,a.attachEvent&&function(){var a=b.createElement("div");a.innerHTML="";return a.childNodes.length!==1}()&&function(a,b){function s(a){var b=-1;while(++b=u.minw)&&(!u.maxw||u.maxw&&l<=u.maxw))m[u.media]||(m[u.media]=[]),m[u.media].push(f[u.rules])}for(var t in g)g[t]&&g[t].parentNode===j&&j.removeChild(g[t]);for(var t in m){var v=c.createElement("style"),w=m[t].join("\n");v.type="text/css",v.media=t,v.styleSheet?v.styleSheet.cssText=w:v.appendChild(c.createTextNode(w)),n.appendChild(v),g.push(v)}j.insertBefore(n,o.nextSibling)}},s=function(a,b){var c=t();if(!!c){c.open("GET",a,!0),c.onreadystatechange=function(){c.readyState==4&&(c.status==200||c.status==304)&&b(c.responseText)};if(c.readyState==4)return;c.send()}},t=function(){var a=!1,b=[function(){return new ActiveXObject("Microsoft.XMLHTTP")},function(){return new XMLHttpRequest}],c=b.length;while(c--){try{a=b[c]()}catch(d){continue}break}return function(){return a}}();m(),respond.update=m,a.addEventListener?a.addEventListener("resize",u,!1):a.attachEvent&&a.attachEvent("onresize",u)}}(this,Modernizr.mq("only all")),function(a,b,c){function k(a){return!a||a=="loaded"||a=="complete"}function j(){var a=1,b=-1;while(p.length- ++b)if(p[b].s&&!(a=p[b].r))break;a&&g()}function i(a){var c=b.createElement("script"),d;c.src=a.s,c.onreadystatechange=c.onload=function(){!d&&k(c.readyState)&&(d=1,j(),c.onload=c.onreadystatechange=null)},m(function(){d||(d=1,j())},H.errorTimeout),a.e?c.onload():n.parentNode.insertBefore(c,n)}function h(a){var c=b.createElement("link"),d;c.href=a.s,c.rel="stylesheet",c.type="text/css",!a.e&&(w||r)?function a(b){m(function(){if(!d)try{b.sheet.cssRules.length?(d=1,j()):a(b)}catch(c){c.code==1e3||c.message=="security"||c.message=="denied"?(d=1,m(function(){j()},0)):a(b)}},0)}(c):(c.onload=function(){d||(d=1,m(function(){j()},0))},a.e&&c.onload()),m(function(){d||(d=1,j())},H.errorTimeout),!a.e&&n.parentNode.insertBefore(c,n)}function g(){var a=p.shift();q=1,a?a.t?m(function(){a.t=="c"?h(a):i(a)},0):(a(),j()):q=0}function f(a,c,d,e,f,h){function i(){!o&&k(l.readyState)&&(r.r=o=1,!q&&j(),l.onload=l.onreadystatechange=null,m(function(){u.removeChild(l)},0))}var l=b.createElement(a),o=0,r={t:d,s:c,e:h};l.src=l.data=c,!s&&(l.style.display="none"),l.width=l.height="0",a!="object"&&(l.type=d),l.onload=l.onreadystatechange=i,a=="img"?l.onerror=i:a=="script"&&(l.onerror=function(){r.e=r.r=1,g()}),p.splice(e,0,r),u.insertBefore(l,s?null:n),m(function(){o||(u.removeChild(l),r.r=r.e=o=1,j())},H.errorTimeout)}function e(a,b,c){var d=b=="c"?z:y;q=0,b=b||"j",C(a)?f(d,a,b,this.i++,l,c):(p.splice(this.i++,0,a),p.length==1&&g());return this}function d(){var a=H;a.loader={load:e,i:0};return a}var l=b.documentElement,m=a.setTimeout,n=b.getElementsByTagName("script")[0],o={}.toString,p=[],q=0,r="MozAppearance"in l.style,s=r&&!!b.createRange().compareNode,t=r&&!s,u=s?l:n.parentNode,v=a.opera&&o.call(a.opera)=="[object Opera]",w="webkitAppearance"in l.style,x=w&&"async"in b.createElement("script"),y=r?"object":v||x?"img":"script",z=w?"img":y,A=Array.isArray||function(a){return o.call(a)=="[object Array]"},B=function(a){return typeof a=="object"},C=function(a){return typeof a=="string"},D=function(a){return o.call(a)=="[object Function]"},E=[],F={},G,H;H=function(a){function f(a){var b=a.split("!"),c=E.length,d=b.pop(),e=b.length,f={url:d,origUrl:d,prefixes:b},g,h;for(h=0;h').next().append('');
3 | mobileNav.children('select').append('');
4 | $('ul[role=main-navigation]').addClass('main-navigation');
5 | $('ul.main-navigation a').each(function(link) {
6 | mobileNav.children('select').append('');
7 | });
8 | $('ul.subscription a').each(function(link) {
9 | mobileNav.children('select').append('');
10 | });
11 | mobileNav.children('select').bind('change', function(event) {
12 | if (event.target.value) { window.location.href = event.target.value; }
13 | });
14 | }
15 |
16 | function addSidebarToggler() {
17 | if(!$('body').hasClass('sidebar-footer')) {
18 | $('#content').append('');
19 | $('.toggle-sidebar').bind('click', function(e) {
20 | e.preventDefault();
21 | if ($('body').hasClass('collapse-sidebar')) {
22 | $('body').removeClass('collapse-sidebar');
23 | } else {
24 | $('body').addClass('collapse-sidebar');
25 | }
26 | });
27 | }
28 | var sections = $('aside.sidebar > section');
29 | if (sections.length > 1) {
30 | sections.each(function(section, index){
31 | if ((sections.length >= 3) && index % 3 === 0) {
32 | $(section).addClass("first");
33 | }
34 | var count = ((index +1) % 2) ? "odd" : "even";
35 | $(section).addClass(count);
36 | });
37 | }
38 | if (sections.length >= 3){ $('aside.sidebar').addClass('thirds'); }
39 | }
40 |
41 | function testFeatures() {
42 | var features = ['maskImage'];
43 | $(features).map(function(feature) {
44 | if (Modernizr.testAllProps(feature)) {
45 | $('html').addClass(feature);
46 | } else {
47 | $('html').addClass('no-'+feature);
48 | }
49 | });
50 | if ("placeholder" in document.createElement("input")) {
51 | $('html').addClass('placeholder');
52 | } else {
53 | $('html').addClass('no-placeholder');
54 | }
55 | }
56 |
57 | function addCodeLineNumbers() {
58 | if (navigator.appName === 'Microsoft Internet Explorer') { return; }
59 | $('div.gist-highlight').each(function(code) {
60 | var tableStart = '',
61 | lineNumbers = '',
62 | tableMiddle = ' | ',
63 | tableEnd = ' |
',
64 | count = $('.line', code).length;
65 | for (var i=1;i<=count; i++) {
66 | lineNumbers += ''+i+'\n';
67 | }
68 | var table = tableStart + lineNumbers + tableMiddle + ''+$('pre', code).html()+'
' + tableEnd;
69 | $(code).html(table);
70 | });
71 | }
72 |
73 | function flashVideoFallback(){
74 | var flashplayerlocation = "/assets/jwplayer/player.swf",
75 | flashplayerskin = "/assets/jwplayer/glow/glow.xml";
76 | $('video').each(function(video){
77 | video = $(video);
78 | if (!Modernizr.video.h264 && swfobject.getFlashPlayerVersion() || window.location.hash.indexOf("flash-test") !== -1){
79 | video.children('source[src$=mp4]').first().map(function(source){
80 | var src = $(source).attr('src'),
81 | id = 'video_'+Math.round(1 + Math.random()*(100000)),
82 | width = video.attr('width'),
83 | height = parseInt(video.attr('height'), 10) + 30;
84 | video.after('');
85 | swfobject.embedSWF(flashplayerlocation, id, width, height + 30, "9.0.0",
86 | { file : src, image : video.attr('poster'), skin : flashplayerskin } ,
87 | { movie : src, wmode : "opaque", allowfullscreen : "true" }
88 | );
89 | });
90 | video.remove();
91 | }
92 | });
93 | }
94 |
95 | function wrapFlashVideos() {
96 | $('object').each(function(object) {
97 | object = $(object);
98 | if ( $('param[name=movie]', object).length ) {
99 | var wrapper = object.before('
').previous();
100 | $(wrapper).children().append(object);
101 | }
102 | });
103 | $('iframe[src*=vimeo],iframe[src*=youtube]').each(function(iframe) {
104 | iframe = $(iframe);
105 | var wrapper = iframe.before('
').previous();
106 | $(wrapper).children().append(iframe);
107 | });
108 | }
109 |
110 | function renderDeliciousLinks(items) {
111 | var output = "
";
116 | $('#delicious').html(output);
117 | }
118 |
119 | $.domReady(function() {
120 | testFeatures();
121 | wrapFlashVideos();
122 | flashVideoFallback();
123 | addCodeLineNumbers();
124 | getNav();
125 | addSidebarToggler();
126 | });
127 |
128 | // iOS scaling bug fix
129 | // Rewritten version
130 | // By @mathias, @cheeaun and @jdalton
131 | // Source url: https://gist.github.com/901295
132 | (function(doc) {
133 | var addEvent = 'addEventListener',
134 | type = 'gesturestart',
135 | qsa = 'querySelectorAll',
136 | scales = [1, 1],
137 | meta = qsa in doc ? doc[qsa]('meta[name=viewport]') : [];
138 | function fix() {
139 | meta.content = 'width=device-width,minimum-scale=' + scales[0] + ',maximum-scale=' + scales[1];
140 | doc.removeEventListener(type, fix, true);
141 | }
142 | if ((meta = meta[meta.length - 1]) && addEvent in doc) {
143 | fix();
144 | scales = [0.25, 1.6];
145 | doc[addEvent](type, fix, true);
146 | }
147 | }(document));
148 |
149 | /*! SWFObject v2.2 modified by Brandon Mathis to contain only what is necessary to dynamically embed flash objects
150 | * Uncompressed source in javascripts/libs/swfobject-dynamic.js
151 | *
152 | released under the MIT License
153 | */
154 | var swfobject=function(){function s(a,b,d){var q,k=n(d);if(g.wk&&g.wk<312)return q;if(k){if(typeof a.id==l)a.id=d;if(g.ie&&g.win){var e="",c;for(c in a)if(a[c]!=Object.prototype[c])c.toLowerCase()=="data"?b.movie=a[c]:c.toLowerCase()=="styleclass"?e+=' class="'+a[c]+'"':c.toLowerCase()!="classid"&&(e+=" "+c+'="'+a[c]+'"');c="";for(var f in b)b[f]!=Object.prototype[f]&&(c+='');k.outerHTML='";q=n(a.id)}else{f=i.createElement(o);f.setAttribute("type",m);for(var h in a)a[h]!=Object.prototype[h]&&(h.toLowerCase()=="styleclass"?f.setAttribute("class",a[h]):h.toLowerCase()!="classid"&&f.setAttribute(h,a[h]));for(e in b)b[e]!=Object.prototype[e]&&e.toLowerCase()!="movie"&&(a=f,c=e,h=b[e],d=i.createElement("param"),d.setAttribute("name",c),d.setAttribute("value",h),a.appendChild(d));k.parentNode.replaceChild(f,k);q=f}}return q}function n(a){var b=null;try{b=i.getElementById(a)}catch(d){}return b}
156 | function t(a){var b=g.pv,a=a.split(".");a[0]=parseInt(a[0],10);a[1]=parseInt(a[1],10)||0;a[2]=parseInt(a[2],10)||0;return b[0]>a[0]||b[0]==a[0]&&b[1]>a[1]||b[0]==a[0]&&b[1]==a[1]&&b[2]>=a[2]?!0:!1}function u(a){return/[\\\"<>\.;]/.exec(a)!=null&&typeof encodeURIComponent!=l?encodeURIComponent(a):a}var l="undefined",o="object",m="application/x-shockwave-flash",v=window,i=document,j=navigator,g=function(){var a=typeof i.getElementById!=l&&typeof i.getElementsByTagName!=l&&typeof i.createElement!=l,
157 | b=j.userAgent.toLowerCase(),d=j.platform.toLowerCase(),g=d?/win/.test(d):/win/.test(b),d=d?/mac/.test(d):/mac/.test(b),b=/webkit/.test(b)?parseFloat(b.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):!1,k=!+"\u000b1",e=[0,0,0],c=null;if(typeof j.plugins!=l&&typeof j.plugins["Shockwave Flash"]==o){if((c=j.plugins["Shockwave Flash"].description)&&!(typeof j.mimeTypes!=l&&j.mimeTypes[m]&&!j.mimeTypes[m].enabledPlugin))k=!1,c=c.replace(/^.*\s+(\S+\s+\S+$)/,"$1"),e[0]=parseInt(c.replace(/^(.*)\..*$/,"$1"),
158 | 10),e[1]=parseInt(c.replace(/^.*\.(.*)\s.*$/,"$1"),10),e[2]=/[a-zA-Z]/.test(c)?parseInt(c.replace(/^.*[a-zA-Z]+(.*)$/,"$1"),10):0}else if(typeof v.ActiveXObject!=l)try{var f=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");if(f&&(c=f.GetVariable("$version")))k=!0,c=c.split(" ")[1].split(","),e=[parseInt(c[0],10),parseInt(c[1],10),parseInt(c[2],10)]}catch(h){}return{w3:a,pv:e,wk:b,ie:k,win:g,mac:d}}();return{embedSWF:function(a,b,d,i,k,e,c,f,h){var j={success:!1,id:b};if(g.w3&&!(g.wk&&g.wk<312)&&
159 | a&&b&&d&&i&&k){d+="";i+="";var p={};if(f&&typeof f===o)for(var m in f)p[m]=f[m];p.data=a;p.width=d;p.height=i;a={};if(c&&typeof c===o)for(var n in c)a[n]=c[n];if(e&&typeof e===o)for(var r in e)typeof a.flashvars!=l?a.flashvars+="&"+r+"="+e[r]:a.flashvars=r+"="+e[r];if(t(k))b=s(p,a,b),j.success=!0,j.ref=b}h&&h(j)},ua:g,getFlashPlayerVersion:function(){return{major:g.pv[0],minor:g.pv[1],release:g.pv[2]}},hasFlashPlayerVersion:t,createSWF:function(a,b,d){if(g.w3)return s(a,b,d)},getQueryParamValue:function(a){var b=
160 | i.location.search||i.location.hash;if(b){/\?/.test(b)&&(b=b.split("?")[1]);if(a==null)return u(b);for(var b=b.split("&"),d=0;d');
3 | (function(){
4 | var pinboardLinkroll = document.createElement('script');
5 | pinboardLinkroll.type = 'text/javascript';
6 | pinboardLinkroll.async = true;
7 | pinboardLinkroll.src = url;
8 | document.getElementsByTagName('head')[0].appendChild(pinboardLinkroll);
9 | })();
10 | }
11 |
12 | function pinboardNS_show_bmarks(r) {
13 | var lr = new Pinboard_Linkroll();
14 | lr.set_items(r);
15 | lr.show_bmarks();
16 | }
17 |
18 | function Pinboard_Linkroll() {
19 | var items;
20 |
21 | this.set_items = function(i) {
22 | this.items = i;
23 | }
24 | this.show_bmarks = function() {
25 | var lines = [];
26 | for (var i = 0; i < this.items.length; i++) {
27 | var item = this.items[i];
28 | var str = this.format_item(item);
29 | lines.push(str);
30 | }
31 | document.getElementById(linkroll).innerHTML = lines.join("\n");
32 | }
33 | this.cook = function(v) {
34 | return v.replace('<', '<').replace('>', '>>');
35 | }
36 |
37 | this.format_item = function(it) {
38 | var str = "";
39 | if (!it.d) { return; }
40 | str += "" + this.cook(it.d) + "";
41 | if (it.n) {
42 | str += "" + this.cook(it.n) + "\n";
43 | }
44 | if (it.t.length > 0) {
45 | for (var i = 0; i < it.t.length; i++) {
46 | var tag = it.t[i];
47 | str += " " + this.cook(tag).replace(/^\s+|\s+$/g, '') + " ";
48 | }
49 | }
50 | str += "
\n";
51 | return str;
52 | }
53 | }
54 | Pinboard_Linkroll.prototype = new Pinboard_Linkroll();
55 | pinboardNS_fetch_script("https://feeds.pinboard.in/json/v1/u:"+pinboard_user+"/?cb=pinboardNS_show_bmarks\&count="+pinboard_count);
56 |
57 |
--------------------------------------------------------------------------------
/source/javascripts/twitter.js:
--------------------------------------------------------------------------------
1 | // JSON-P Twitter fetcher for Octopress
2 | // (c) Brandon Mathis // MIT License
3 |
4 | /* Sky Slavin, Ludopoli. MIT license. * based on JavaScript Pretty Date * Copyright (c) 2008 John Resig (jquery.com) * Licensed under the MIT license. */
5 | function prettyDate(time) {
6 | if (navigator.appName === 'Microsoft Internet Explorer') {
7 | return "∞"; // because IE date parsing isn't fun.
8 | }
9 | var say = {
10 | just_now: " now",
11 | minute_ago: "1m",
12 | minutes_ago: "m",
13 | hour_ago: "1h",
14 | hours_ago: "h",
15 | yesterday: "1d",
16 | days_ago: "d",
17 | last_week: "1w",
18 | weeks_ago: "w"
19 | };
20 |
21 | var current_date = new Date(),
22 | current_date_time = current_date.getTime(),
23 | current_date_full = current_date_time + (1 * 60000),
24 | date = new Date(time),
25 | diff = ((current_date_full - date.getTime()) / 1000),
26 | day_diff = Math.floor(diff / 86400);
27 |
28 | if (isNaN(day_diff) || day_diff < 0) { return "∞"; }
29 |
30 | return day_diff === 0 && (
31 | diff < 60 && say.just_now ||
32 | diff < 120 && say.minute_ago ||
33 | diff < 3600 && Math.floor(diff / 60) + say.minutes_ago ||
34 | diff < 7200 && say.hour_ago ||
35 | diff < 86400 && Math.floor(diff / 3600) + say.hours_ago) ||
36 | day_diff === 1 && say.yesterday ||
37 | day_diff < 7 && day_diff + say.days_ago ||
38 | day_diff === 7 && say.last_week ||
39 | day_diff > 7 && Math.ceil(day_diff / 7) + say.weeks_ago;
40 | }
41 |
42 | function linkifyTweet(text, url) {
43 | // Linkify urls, usernames, hashtags
44 | text = text.replace(/(https?:\/\/)([\w\-:;?&=+.%#\/]+)/gi, '$2')
45 | .replace(/(^|\W)@(\w+)/g, '$1@$2')
46 | .replace(/(^|\W)#(\w+)/g, '$1#$2');
47 |
48 | // Use twitter's api to replace t.co shortened urls with expanded ones.
49 | for (var u in url) {
50 | if(url[u].expanded_url != null){
51 | var shortUrl = new RegExp(url[u].url, 'g');
52 | text = text.replace(shortUrl, url[u].expanded_url);
53 | var shortUrl = new RegExp(">"+(url[u].url.replace(/https?:\/\//, '')), 'g');
54 | text = text.replace(shortUrl, ">"+url[u].display_url);
55 | }
56 | }
57 | return text
58 | }
59 |
60 | function showTwitterFeed(tweets, twitter_user) {
61 | var timeline = document.getElementById('tweets'),
62 | content = '';
63 |
64 | for (var t in tweets) {
65 | content += ''+''+''+prettyDate(tweets[t].created_at)+''+linkifyTweet(tweets[t].text.replace(/\n/g, '
'), tweets[t].entities.urls)+'
'+'';
66 | }
67 | timeline.innerHTML = content;
68 | }
69 |
70 | function getTwitterFeed(user, count, replies) {
71 | count = parseInt(count, 10);
72 | $.ajax({
73 | url: "https://api.twitter.com/1/statuses/user_timeline/" + user + ".json?trim_user=true&count=" + (count + 20) + "&include_entities=1&exclude_replies=" + (replies ? "0" : "1") + "&callback=?"
74 | , type: 'jsonp'
75 | , error: function (err) { $('#tweets li.loading').addClass('error').text("Twitter's busted"); }
76 | , success: function(data) { showTwitterFeed(data.slice(0, count), user); }
77 | })
78 | }
79 |
--------------------------------------------------------------------------------
/source/robots.txt:
--------------------------------------------------------------------------------
1 | ---
2 | layout: nil
3 | ---
4 | User-agent: *
5 | Disallow:
6 |
7 | Sitemap: {{ site.url }}/sitemap.xml
--------------------------------------------------------------------------------