├── .gitignore
├── 404.html
├── CNAME
├── README.md
├── _config.yml
├── _includes
├── about.html
├── disqus.html
└── style.css
├── _layouts
├── default.html
├── page.html
└── post.html
├── _posts
├── 2011-12-18-why-blog.md
├── 2012-02-22-github-pages.md
└── 2016-05-18-carriage-return-line-feed-new-line-end-file.md
├── favicon.ico
├── images
├── external_link.gif
├── external_link_on.gif
├── githubpages
│ ├── bootcamp_1_ssh.jpg
│ ├── bootcamp_1_token.jpg
│ ├── bootcamp_1_win_gitbash.jpg
│ ├── disqus-site.jpg
│ ├── github-account-setting.png
│ ├── other-pages.png
│ ├── ssh-key-set.png
│ └── user-pages.png
├── icons.gif
└── other
│ ├── Tabby-440.png
│ ├── Tabby-pro1.png
│ ├── Tabby-pro2.png
│ ├── auto-edit-bar.jpg
│ └── side-slide.jpg
├── index.md
└── js
├── css3-ani.js
├── jquery-1.7.1.min.js
├── post.js
└── prettify
├── lang-apollo.js
├── lang-clj.js
├── lang-css.js
├── lang-go.js
├── lang-hs.js
├── lang-lisp.js
├── lang-lua.js
├── lang-ml.js
├── lang-n.js
├── lang-proto.js
├── lang-scala.js
├── lang-sql.js
├── lang-tex.js
├── lang-vb.js
├── lang-vhdl.js
├── lang-wiki.js
├── lang-xq.js
├── lang-yaml.js
├── prettify.css
└── prettify.js
/.gitignore:
--------------------------------------------------------------------------------
1 | _site
2 |
--------------------------------------------------------------------------------
/404.html:
--------------------------------------------------------------------------------
1 | ---
2 | layout: default
3 | title: 出错啦!
4 | ---
5 |
6 |
7 |
8 |
9 |
10 | {% for post in site.categories.blog %}
11 | -
12 | {{ post.title }}
13 |
14 | {% endfor %}
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/CNAME:
--------------------------------------------------------------------------------
1 | example.com
2 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | #一点点说明
2 |
3 | 这是[BeiYuu.com](http://beiyuu.com)的示例代码,如果你看了[使用Github Pages建独立博客](http://beiyuu.com/github-pages),希望看下去哦:
4 |
5 | * 马上动手,很赞
6 | * 感谢认可
7 | * 推荐阅读:[我为什么写博客?](http://beiyuu.com/why-blog)
8 | * 想复用我的设计,没问题,标个出处就好啦
9 | * 转载也没问题,标个出处呗少年
10 | * 恩,认真的童鞋最可爱啦~
11 |
--------------------------------------------------------------------------------
/_config.yml:
--------------------------------------------------------------------------------
1 | permalink: /:title
2 |
3 | title: BeiYuu.com
4 | url: http://beiyuu.com
5 | feed: /atom.xml
6 | author_info: BeiYuu
7 |
--------------------------------------------------------------------------------
/_includes/about.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | {% for post in site.categories.blog %}
8 | -
9 | {{ post.title }}
10 |
11 | {% endfor %}
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/_includes/disqus.html:
--------------------------------------------------------------------------------
1 |
24 |
--------------------------------------------------------------------------------
/_includes/style.css:
--------------------------------------------------------------------------------
1 | html,
2 | body,
3 | div,
4 | span,
5 | applet,
6 | object,
7 | iframe,
8 | h1,
9 | h2,
10 | h3,
11 | h4,
12 | h5,
13 | h6,
14 | p,
15 | blockquote,
16 | pre,
17 | a,
18 | abbr,
19 | acronym,
20 | address,
21 | big,
22 | cite,
23 | code,
24 | del,
25 | dfn,
26 | em,
27 | img,
28 | ins,
29 | kbd,
30 | q,
31 | s,
32 | samp,
33 | small,
34 | strike,
35 | strong,
36 | sub,
37 | sup,
38 | tt,
39 | var,
40 | dl,
41 | dt,
42 | dd,
43 | ol,
44 | ul,
45 | li,
46 | fieldset,
47 | form,
48 | label,
49 | legend,
50 | table,
51 | caption,
52 | tbody,
53 | tfoot,
54 | thead,
55 | tr,
56 | th,
57 | td {
58 | margin: 0;
59 | padding: 0;
60 | border: 0;
61 | outline: 0;
62 | font-weight: inherit;
63 | font-style: inherit;
64 | font-family: inherit;
65 | font-size: 100%;
66 | vertical-align: baseline;
67 | }
68 | body {
69 | line-height: 1;
70 | color: #000;
71 | background: #fff;
72 | }
73 | ol,
74 | ul {
75 | list-style: none;
76 | }
77 | table {
78 | border-collapse: separate;
79 | border-spacing: 0;
80 | vertical-align: middle;
81 | }
82 | caption,
83 | th,
84 | td {
85 | text-align: left;
86 | font-weight: normal;
87 | vertical-align: middle;
88 | }
89 | a img {
90 | border: none;
91 | }
92 | article,
93 | aside,
94 | canvas,
95 | details,
96 | figcaption,
97 | figure,
98 | footer,
99 | header,
100 | hgroup,
101 | menu,
102 | nav,
103 | section,
104 | summary,
105 | main {
106 | margin: 0;
107 | padding: 0;
108 | border: 0;
109 | outline: 0;
110 | display: block;
111 | }
112 | audio,
113 | canvas,
114 | video {
115 | display: inline-block;
116 | *display: inline;
117 | *zoom: 1;
118 | }
119 | audio:not([controls]),
120 | [hidden] {
121 | display: none;
122 | }
123 | * {
124 | -webkit-box-sizing: border-box;
125 | -moz-box-sizing: border-box;
126 | box-sizing: border-box;
127 | }
128 | *:before,
129 | *:after {
130 | -webkit-box-sizing: border-box;
131 | -moz-box-sizing: border-box;
132 | box-sizing: border-box;
133 | }
134 | * {
135 | -webkit-tap-highlight-color: rgba(0,0,0,0);
136 | }
137 | body {
138 | font-family: Helvetica, Tahoma, Arial, 'Hiragino Sans GB', '\51AC\9752\9ED1\4F53', 'Microsoft YaHei', '\5FAE\8F6F\96C5\9ED1', STXihei, '\534E\6587\7EC6\9ED1', SimSun, '\5B8B\4F53', Heiti, '\9ED1\4F53', sans-serif;
139 | font-size: 16px;
140 | }
141 | @media screen and (max-width: 767px) {
142 | body {
143 | font-size: 14px;
144 | }
145 | }
146 | a {
147 | color: #4a75b5;
148 | text-decoration: none;
149 | outline: none;
150 | }
151 | a:hover {
152 | text-decoration: underline;
153 | }
154 | a.external {
155 | padding-right: 13px;
156 | background: url("/images/icons.gif") no-repeat right 1px;
157 | }
158 | a.external:hover {
159 | background-position: right -15px;
160 | }
161 | .index-wrapper .aside {
162 | position: fixed;
163 | top: 0;
164 | left: 0;
165 | width: 30%;
166 | height: 100%;
167 | max-width: 500px;
168 | background: #59a0b0;
169 | }
170 | @media screen and (max-width: 767px) {
171 | .index-wrapper .aside {
172 | position: relative;
173 | width: 100%;
174 | height: 200px;
175 | max-width: none;
176 | }
177 | }
178 | .index-wrapper .info-card {
179 | position: absolute;
180 | margin-top: 70%;
181 | text-align: center;
182 | width: 100%;
183 | }
184 | @media screen and (max-width: 767px) {
185 | .index-wrapper .info-card {
186 | margin-top: 70px;
187 | }
188 | }
189 | .index-wrapper .info-card h1 {
190 | font-size: 40px;
191 | color: #fff;
192 | margin-bottom: 20px;
193 | text-shadow: 0 0 80px rgba(255,255,255,0.5);
194 | letter-spacing: 0.15em;
195 | text-shadow: rgba(255,255,255,0.5) 0 0 15px, rgba(255,255,255,0.5) 0 0 10px;
196 | }
197 | .index-wrapper .info-card a {
198 | margin: 0 15px;
199 | }
200 | .index-wrapper .index-content {
201 | margin-left: 30%;
202 | padding-top: 80px;
203 | padding-right: 15%;
204 | }
205 | @media screen and (max-width: 767px) {
206 | .index-wrapper .index-content {
207 | margin-left: 0;
208 | padding-right: 0;
209 | }
210 | }
211 | .index-wrapper .artical-list {
212 | width: 70%;
213 | margin: 0 auto;
214 | }
215 | @media screen and (max-width: 767px) {
216 | .index-wrapper .artical-list {
217 | width: 85%;
218 | }
219 | }
220 | .index-wrapper .artical-list li {
221 | margin-bottom: 70px;
222 | }
223 | .index-wrapper .title {
224 | display: block;
225 | font-size: 22px;
226 | margin-bottom: 15px;
227 | word-break: break-all;
228 | font-weight: bold;
229 | margin-bottom: 25px;
230 | padding-bottom: 10px;
231 | border-bottom: 2px solid #eee;
232 | color: #444;
233 | }
234 | @media screen and (max-width: 767px) {
235 | .index-wrapper .title {
236 | font-size: 20px;
237 | margin-bottom: 10px;
238 | }
239 | }
240 | .index-wrapper .title:hover {
241 | color: #e50053;
242 | text-decoration: none;
243 | }
244 | .index-wrapper .title-desc {
245 | color: #999;
246 | font-size: 14px;
247 | line-height: 1.6;
248 | }
249 | .body-post {
250 | background: #f5f5f5;
251 | }
252 | @media screen and (max-width: 767px) {
253 | .body-post {
254 | background: #fff;
255 | }
256 | }
257 | .post-wrapper {
258 | width: 900px;
259 | margin: 0 auto;
260 | background: #fff;
261 | padding: 80px 60px;
262 | }
263 | @media screen and (max-width: 767px) {
264 | .post-wrapper {
265 | width: 85%;
266 | margin: 100px auto 50px;
267 | padding: 0;
268 | }
269 | }
270 | .post-wrapper .post-title,
271 | .post-wrapper .post-title a {
272 | font-size: 30px;
273 | font-weight: bold;
274 | margin-bottom: 6px;
275 | color: #000;
276 | text-align: center;
277 | word-wrap: break-word;
278 | }
279 | @media screen and (max-width: 767px) {
280 | .post-wrapper .post-title,
281 | .post-wrapper .post-title a {
282 | font-size: 24px;
283 | }
284 | }
285 | .post-wrapper .post-title:hover,
286 | .post-wrapper .post-title a:hover {
287 | text-decoration: none;
288 | }
289 | .post-wrapper .post-date {
290 | text-align: center;
291 | color: #999;
292 | margin-bottom: 60px;
293 | font-size: 14px;
294 | }
295 | @media screen and (max-width: 767px) {
296 | .post-wrapper .post-date {
297 | margin-bottom: 40px;
298 | }
299 | }
300 | .post-wrapper h2 {
301 | font-size: 22px;
302 | font-weight: bold;
303 | margin-bottom: 25px;
304 | border-bottom: 2px solid #eee;
305 | padding-bottom: 10px;
306 | }
307 | @media $mobiel {
308 | .post-wrapper h2 {
309 | font-size: 20px;
310 | }
311 | }
312 | .post-wrapper h3 {
313 | font-size: 18px;
314 | font-weight: bold;
315 | margin-bottom: 25px;
316 | color: #222;
317 | }
318 | @media screen and (max-width: 767px) {
319 | .post-wrapper h3 {
320 | font-size: 16px;
321 | }
322 | }
323 | .post-wrapper h4,
324 | .post-wrapper h5,
325 | .post-wrapper h6 {
326 | color: #333;
327 | font-weight: bold;
328 | margin-bottom: 15px;
329 | }
330 | .post-wrapper p {
331 | margin-bottom: 40px;
332 | line-height: 1.8em;
333 | }
334 | .post-wrapper code {
335 | background: #eee;
336 | border: 1px solid #ccc;
337 | padding: 0 5px;
338 | font-family: "Courier";
339 | line-height: 14px;
340 | font-size: 14px;
341 | word-wrap: break-word;
342 | }
343 | .post-wrapper pre {
344 | background: #f7f3f7;
345 | padding: 20px 30px 15px;
346 | overflow: auto;
347 | margin-bottom: 40px;
348 | font-size: 14px;
349 | border: 1px solid #eee;
350 | color: #b9bdb6;
351 | margin-top: -20px;
352 | }
353 | .post-wrapper pre code {
354 | background-color: transparent;
355 | border: none;
356 | padding: 0;
357 | word-wrap: normal;
358 | }
359 | @media screen and (max-width: 767px) {
360 | .post-wrapper pre code {
361 | line-height: 1em;
362 | font-size: 12px;
363 | }
364 | }
365 | .post-wrapper h4+pre,
366 | .post-wrapper h3+pre {
367 | margin-top: 20px;
368 | }
369 | .post-wrapper ul {
370 | margin-bottom: 25px;
371 | margin-left: 25px;
372 | }
373 | .post-wrapper ul li {
374 | margin-bottom: 5px;
375 | list-style: disc;
376 | line-height: 1.8em;
377 | }
378 | .post-wrapper p + ul {
379 | margin-top: -20px;
380 | }
381 | .post-wrapper ol {
382 | margin-bottom: 25px;
383 | margin-left: 25px;
384 | }
385 | .post-wrapper ol li {
386 | margin-bottom: 5px;
387 | list-style: decimal;
388 | line-height: 1.1em;
389 | }
390 | @media screen and (max-width: 767px) {
391 | .post-wrapper ol li {
392 | margin-bottom: 0;
393 | line-height: 1em;
394 | }
395 | }
396 | .post-wrapper blockquote {
397 | margin-left: 25px;
398 | font-size: 14px;
399 | font-style: italic;
400 | }
401 | .post-wrapper img {
402 | max-width: 670px;
403 | display: block;
404 | margin: 10px auto;
405 | }
406 | @media screen and (max-width: 767px) {
407 | .post-wrapper img {
408 | max-width: 90%;
409 | }
410 | }
411 | .post-wrapper table {
412 | margin: 0 auto;
413 | }
414 | .about-wrapper {
415 | background: #7e96a9;
416 | width: 900px;
417 | margin: 0 auto;
418 | padding: 30px 60px;
419 | }
420 | @media screen and (max-width: 767px) {
421 | .about-wrapper {
422 | width: 100%;
423 | padding: 0 7.5% 30px;
424 | }
425 | }
426 | .about-wrapper .aboutme {
427 | zoom: 1;
428 | }
429 | .about-wrapper .aboutme:before,
430 | .about-wrapper .aboutme:after {
431 | content: "";
432 | display: table;
433 | }
434 | .about-wrapper .aboutme:after {
435 | clear: both;
436 | }
437 | .about-wrapper .aboutme h2 {
438 | margin-bottom: 20px;
439 | }
440 | .about-wrapper .aboutme h2 a {
441 | font-size: 18px;
442 | }
443 | .about-wrapper .aboutme li {
444 | line-height: 1.4;
445 | margin-bottom: 10px;
446 | float: left;
447 | width: 50%;
448 | }
449 | @media screen and (max-width: 767px) {
450 | .about-wrapper .aboutme li {
451 | float: none;
452 | width: 80%;
453 | }
454 | }
455 | .about-wrapper .aboutme a {
456 | color: #fff;
457 | font-size: 14px;
458 | }
459 | #particles-js {
460 | width: 100%;
461 | height: 100%;
462 | background-repeat: no-repeat;
463 | -webkit-background-size: 20%;
464 | -moz-background-size: 20%;
465 | background-size: 20%;
466 | background-position: 50% 50%;
467 | background: #38658c;
468 | background: -webkit-radial-gradient(top left, #5d3571, #38658c);
469 | background: -moz-radial-gradient(top left, #5d3571, #38658c);
470 | background: -o-radial-gradient(top left, #5d3571, #38658c);
471 | background: -ms-radial-gradient(top left, #5d3571, #38658c);
472 | background: radial-gradient(to bottom right, #5d3571, #38658c);
473 | }
474 | #disqus_container {
475 | font-size: 12px;
476 | }
477 | #disqus_container .share-con {
478 | float: right;
479 | margin-bottom: 20px;
480 | }
481 | #disqus_container a.comment {
482 | font-size: 14px;
483 | }
484 | .prettyprint {
485 | background: #f7f3f7;
486 | border: 0 !important;
487 | }
488 | .pln {
489 | color: #1b181b;
490 | }
491 | ol.linenums {
492 | margin-top: 0;
493 | margin-bottom: 0;
494 | color: #5a7b8c;
495 | }
496 | li.L0,
497 | li.L1,
498 | li.L2,
499 | li.L3,
500 | li.L4,
501 | li.L5,
502 | li.L6,
503 | li.L7,
504 | li.L8,
505 | li.L9 {
506 | padding-left: 0.4em;
507 | background-color: #f7f3f7;
508 | list-style-type: decimal;
509 | }
510 | @media screen {
511 | .str {
512 | color: #918b3b;
513 | }
514 | .kwd {
515 | color: #7b59c0;
516 | }
517 | .com {
518 | color: #5a7b8c;
519 | }
520 | .typ {
521 | color: #516aec;
522 | }
523 | .lit {
524 | color: #a65926;
525 | }
526 | .pun {
527 | color: #1b181b;
528 | }
529 | .opn {
530 | color: #1b181b;
531 | }
532 | .clo {
533 | color: #1b181b;
534 | }
535 | .tag {
536 | color: #ca402b;
537 | }
538 | .atn {
539 | color: #a65926;
540 | }
541 | .atv {
542 | color: #159393;
543 | }
544 | .dec {
545 | color: #a65926;
546 | }
547 | .var {
548 | color: #ca402b;
549 | }
550 | .fun {
551 | color: #516aec;
552 | }
553 | }
554 | .wiki h2 {
555 | cursor: pointer;
556 | }
557 | .wiki ul {
558 | margin-left: 30px;
559 | margin-bottom: 20px;
560 | list-style: disc;
561 | }
562 | .wiki ul li {
563 | margin-bottom: 5px;
564 | }
565 | .wiki ul ul {
566 | list-style: circle;
567 | margin-top: 10px;
568 | margin-bottom: 10px;
569 | }
570 |
--------------------------------------------------------------------------------
/_layouts/default.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {% if page.title %}{{ page.title }} | {% endif %}{{ site.title }}
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 | {{ content }}
16 |
17 |
--------------------------------------------------------------------------------
/_layouts/page.html:
--------------------------------------------------------------------------------
1 | ---
2 | layout: default
3 | ---
4 |
5 |
6 | {{ content }}
7 |
8 |
--------------------------------------------------------------------------------
/_layouts/post.html:
--------------------------------------------------------------------------------
1 | ---
2 | layout: default
3 | ---
4 |
5 |
6 |
7 |
8 |
{{ page.date|date:"%Y-%m-%d" }}
9 | {{ content }}
10 | {% include disqus.html %}
11 |
12 |
13 | {% include about.html %}
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/_posts/2011-12-18-why-blog.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: 我为什么写博客?
4 | category: blog
5 | description: 写博客这个这么古老的行为,还有必要拿出来说吗,我看有。
6 | ---
7 |
8 | ## 世界这么乱,装纯给谁看
9 |
10 | 写博客这个不知道几个“互联网世纪”前的东西,现在还有必要拿出来说吗?不想用太多的理论去说这个命题,先看看两个最近对我影响比较大的两个博客:
11 |
12 | * [Steve Losh][]
13 | * [Derek Sivers][]
14 |
15 | 第一个是[Steve Losh][]的博客,我在搜索了[VIM][2]相关的关键字之后被带到了这里。简洁的风格和关屏的利落就已经吸引了我,顺手点开其他的文章看了看,博主非常的谨慎认真,每一篇都是高质量的作品,看得出他的用心,整个网站也是异常的简洁舒适,深深的被这种淡然的心态打动,躲进小楼成一统,哪管他春夏与秋冬。再看看他的介绍:
16 |
17 | > "I’m a programmer, photographer, dancer & bassist from Rochester, New York."
18 |
19 | 呵呵,他完全就过着我期望的生活。
20 |
21 | 第二位博主的['Co-op Business Model'][3]文章也是让我茅厕顿开,这种分享的精神,用博主自己活生生的例子讲述出来之后,读者自然会被感动的,我也在团队内分享过这篇文章,下面我简要介绍一下他的事迹吧:
22 |
23 | * 1994年,他把需要邮寄才能得到的版权申请表单扫描上传到网上,为大家申请提供方便的下载服务,直到版权机构将表单上网之前,他的网站是全美唯一一个可以下载到表单的地方,他也并没有盈利。
24 | * 1995年,他为自己的乐队注册了一个名字,并且把注册过程详细的写在自己的博客上,很长一段时间内,他的这篇文章几乎成了注册乐队名称的标准教程。
25 | * 1996年,他有了一个[小唱片公司][4],也就有了一个条形码账户,他需要支付$750给条码协会,这样他就拥有了十万个条码,一开始他免费把这些条码给朋友们要出售的CD用,后来,越来越多人知道了他有条码,又懒得去自己申请账户,就给他付一定的费用,方便的使用,他每个收费$20,在过去的12年里,他靠出售这个条码就赚到了二百万美元。
26 | * 1997年,他花费$1000申请了一个信用卡商户账户,用来销售自己的CD,一开始也免费给他的做音乐的朋友们帮忙卖,后来有越来越多的陌生人希望能使用他的账号,省的自己去申请,因为他有一些劳动量,所以也收取一定费用,每张专辑收取$35的制作费,然后每卖一张收$4,在过去的12年中,他赚到了二千万美元。
27 | * 1999年,他学会了制作网站,一开始是为了展示自己的CD,后来他的朋友们抱怨自己的网站服务商很糟糕,希望能使用[Derek Sivers][]的系统,因为也有一些劳动量,所以会一开始收取$300,然后每个月收取$20,在过去的9年中,他赚到了五百万美元。
28 | * 2000年以后,他会无偿的分享所有他学到的东西,或许“[他不是最聪明的人][5]”,但是分享没有什么成本,而且这是正确的事,所以在后来的11年里,他收获了很多的好运与快乐,遇见了很多有趣的人。
29 |
30 | 找到了一个神交的外国博主,又有这么励志“好人好报”的故事,我想大道理不用讲太多也都明白了。
31 |
32 | 还有一篇理论性很强的文章做参考,[我为什么写博客][9]。
33 |
34 | ## 那些虚的没用,说点实际的
35 |
36 | 或许这些看起来很美好的东西,你会觉得离自己很远,那就说点直接的收益,看看是否够诱人。
37 |
38 | 我还是先推荐一篇文章:[怎样花两年时间去面试一个人][6],招聘永远是公司和个人的难题,双方的信息不对称,导致这个矛盾无法调和,这篇文章就是告诉你,如何自己去推销自己,让公司得到你的全部优质信息,尤其在现在的网络环境下,将自己工作有用的能力搬上网,那么就是最好的能力证明,就是最好的面试答案。无论你是程序员,还是设计师。
39 |
40 | 或许你会想,好吧好吧,那我找个博客站开一个博客好了,我不太会同意这个做法,有一个个人的品牌,对于自己的发展只有好处,行走网络江湖,有同一个ID标识,无论在哪里都会让人看到你,这样长期的潜移默化,个人的品牌效力也就展现出来了。然后有一个自己独立的域名,并且用心去经营,肯定会有人欣赏的。而且经过我的一番研究,成本并不是很高。
41 |
42 | 我期望的博客内容,并不是贴一段代码,或者胡言乱语两句,具体的质量可以参考[Steve Losh],这样的高质量,更能展现自己的态度,或许你说有一些小心得小点滴也想和大家分享,那也可以在自己的空间下开一个Wiki频道,专门存放琐碎的知识点。
43 |
44 | 高质量的博文,肯定需要自己缜密的思考,并且需要一定的文笔才能将自己的想法完整清晰的表达出来,我在这两个方面都还差了很多,还需要大量的练习才好,给自己这样的机会。
45 |
46 | 在快知识、微段子横行的今天,能对一个个问题深入的去思考,一方面得到的是心灵的平静,更多的则是深入思考之后的收获的喜悦感,会有不一样的体会的。
47 |
48 | ## 技术很简单,不用担心
49 |
50 | 或者你很幸运不是一个程序员,或者你是一个不用搞这些乱七八糟东西的程序员,那么相信我,你一样可以搭起来一个跟我的一模一样的个人站点的。
51 |
52 | 我要特别鸣谢以下几个站点、技术:
53 |
54 | * [GoDaddy][]
55 | * [DNSPod][]
56 | * [GitHub][]
57 | * [Jekyll][]
58 | * [Disqus][]
59 |
60 | 下面我来做一个简要说明,完整的搭建方法,我后面会专门写一篇博客分享给大家,等不及的可以自己去找资料哈。
61 |
62 | ### GoDaddy & DNSPod
63 |
64 | [GoDaddy][]是一家非常不错的域名注册商,良好的用户体验,飞快的生效速度,给力的优惠码,也支持支付宝,永远不用担心国内那些流氓厂商的流氓行为,注册了域名,就可以放心不会被别人抢走。在Godaddy注册域名是一件很简单的事情,按照提示走就完全没有问题,唯一需要动脑筋的可能是,你要想一个既有个人标识,又没有被别人注册的域名了,我觉得我的[BeiYuu][]还是不错的,呵呵。
65 |
66 | Godaddy一切都很完美,直到遇到了GFW,原因你肯定懂。前段时间推上风传Godaddy的DNS服务器被墙,导致域名不能解析,看起来好像自己的站被墙了一样,这个确实是个闹心的事情,还好国内有DNS服务的替代产品,而且做得还非常的不错,也是免费的,功能强大,速度快,不用担心被和谐,所以隆重推荐[DNSPod][]给大家,可以试用一下,把DNS服务迁移到DNSPod来,解决后顾之忧,配置比较简单,不懂的可以等我后面的博客啦,哈。
67 |
68 | ### GitHub & Jekyll
69 |
70 | [GitHub][]是一个非常优秀的产品,爆发式的增长,各大优质开源软件的蜂涌而至,只能说明人们太需要他了。**Social Coding**是他的Slogan,产品的设计确实解决了很多代码交流的难题,让世界更平,让交流更畅,关于Git的学习,大家可以移步这里[Pro Git中文版][7],这也是一个本身就在Github维护的一个项目,高质量的翻译了Git入门书,讲解详细,是学习Git的好资料。
71 |
72 | GitHub是一个伟大的产品,[GitHub Pages][]是他伟大的一部分,GitHub Pages基于[Jekyll][]博客引擎,当我深入的研究了他之后,我深深的想给Jekyll的作者一个拥抱,列举一下Jekyll的优点:
73 |
74 | - 可以单独放在自己的服务器上,他也是GitHub Pages的基础,质量可靠
75 | - 将博客最重要的功能抽取出来,去除了[WordPress][]的复杂、烦躁的东西,一切都是清晰可控的
76 | - 可以方便的使用[Markdown][8]等其他标记语言
77 | 清晰、简洁的文件组织,完美的永久链接方案,既漂亮、又可定制
78 | 博客静态化,速度快
79 | - [Jekyll][]是完美的
80 |
81 | ### Disqus
82 |
83 | [Jekyll][]都很不错,但是可能有些童鞋会不满意于他不提供评论功能,这个时候,[Disqus][]的出现就显得是雪中送炭了。
84 |
85 | Disqus是一个社会化的评论解决方案,请允许我使用这个烂透了的词,调用它的接口非常简单,在自己的页面加载他的一段JS代码即可,如果别人注册了Disqus,那么就可以方便的留言,交流,一处登录,处处方便,而且Disqus也提供了一些spam等策略,不用自己操心了,并且可以和一些现有的博客系统很好的转换对接。越来越多的网站开始使用Disqus的服务了,这是一个非常不错的趋势,Jekyll配合[Disqus][]实在是完美了。我别无所求了。
86 |
87 | ## TL;DR
88 |
89 | 写到这里,基本的点已经介绍完毕,看看Jekyll生成的博客页面,我心满意足,虽然文笔很烂,语句多不通顺,但是这是一个新的开始了,我觉得心灵都纯洁了不少,这不是发一条微博什么能带来的快乐。
90 |
91 | 对于那些对上述技术不是很熟悉的童鞋来说,搭建起来可能还是需要花费些功夫的,我会在后面写一篇专门的教程,给有需要的人,等不及了的,可以自己研究下,**生命在于折腾**。
92 |
93 | [BeiYuu]: http://beiyuu.com "BeiYuu"
94 | [Steve Losh]: http://stevelosh.com/ "Steve Losh"
95 | [Derek Sivers]: http://sivers.org/ "Derek Sivers"
96 | [GoDaddy]: http://godaddy.com "Godaddy"
97 | [GitHub]: http://github.com "Github:social coding"
98 | [Jekyll]: https://github.com/mojombo/jekyll
99 | [Disqus]: http://disqus.com "Disqus"
100 | [DNSPod]: http://dnspod.cn "DNSPod"
101 | [GitHub Pages]: http://pages.github.com "GitHub Pages"
102 | [WordPress]: http://wordpress.org "WordPress"
103 | [1]: {{ page.url}} ({{ page.title }})
104 | [2]: http://stevelosh.com/blog/2011/09/writing-vim-plugins/ "Write Vim Plugins"
105 | [3]: http://sivers.org/sharing "The co-op business model: share whatever you've got"
106 | [4]: http://artificialrecords.com
107 | [5]: http://sivers.org/below-average "probably below average"
108 | [6]: http://mindhacks.cn/2011/11/04/how-to-interview-a-person-for-two-years/ "怎样花两年时间去面试一个人"
109 | [7]: http://progit.org/book/zh/ "Pro Git"
110 | [8]: http://markdown.tw/ "Markdown语法"
111 | [9]: http://www.cnblogs.com/bangerlee/archive/2011/09/11/2173632.html "Why I Blog翻译版"
112 |
--------------------------------------------------------------------------------
/_posts/2012-02-22-github-pages.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: 使用Github Pages建独立博客
4 | description: Github本身就是不错的代码社区,他也提供了一些其他的服务,比如Github Pages,使用它可以很方便的建立自己的独立博客,并且免费。
5 | category: blog
6 | ---
7 |
8 | [Github][]很好的将代码和社区联系在了一起,于是发生了很多有趣的事情,世界也因为他美好了一点点。Github作为现在最流行的代码仓库,已经得到很多大公司和项目的青睐,比如[jQuery][]、[Twitter][]等。为使项目更方便的被人理解,介绍页面少不了,甚至会需要完整的文档站,Github替你想到了这一点,他提供了[Github Pages][]的服务,不仅可以方便的为项目建立介绍站点,也可以用来建立个人博客。
9 |
10 | Github Pages有以下几个优点:
11 |
12 |
13 | - 轻量级的博客系统,没有麻烦的配置
14 | - 使用标记语言,比如Markdown
15 | - 无需自己搭建服务器
16 | - 根据Github的限制,对应的每个站有300MB空间
17 | - 可以绑定自己的域名
18 |
19 |
20 | 当然他也有缺点:
21 |
22 | * 使用[Jekyll][]模板系统,相当于静态页发布,适合博客,文档介绍等。
23 | * 动态程序的部分相当局限,比如没有评论,不过还好我们有解决方案。
24 | * 基于Git,很多东西需要动手,不像Wordpress有强大的后台
25 |
26 | 大致介绍到此,作为个人博客来说,简洁清爽的表达自己的工作、心得,就已达目标,所以Github Pages是我认为此需求最完美的解决方案了。
27 |
28 | ## 购买、绑定独立域名
29 | 虽说[Godaddy][]曾支持过SOPA,并且首页放着极其不专业的大胸美女,但是作为域名服务商他做的还不赖,选择它最重要的原因是他支持支付宝,没有信用卡有时真的很难过。
30 |
31 | 域名的购买不用多讲,注册、选域名、支付,有网购经验的都毫无压力,优惠码也遍地皆是。域名的配置需要提醒一下,因为伟大英明的GFW的存在,我们必须多做些事情。
32 |
33 | 流传Godaddy的域名解析服务器被墙掉,导致域名无法访问,后来这个事情在[BeiYuu][]也发生了,不得已需要把域名解析服务迁移到国内比较稳定的服务商处,这个迁移对于域名来说没有什么风险,最终的控制权还是在Godaddy那里,你随时都可以改回去。
34 |
35 | 我们选择[DNSPod][]的服务,他们的产品做得不错,易用、免费,收费版有更高端的功能,暂不需要。注册登录之后,按照DNSPod的说法,只需三步(我们插入一步):
36 |
37 |
38 | - 首先添加域名记录,可参考DNSPod的帮助文档:https://www.dnspod.cn/Support
39 | - 在DNSPod自己的域名下添加一条A记录,地址就是Github Pages的服务IP地址:207.97.227.245
40 | - 在域名注册商处修改DNS服务:去Godaddy修改Nameservers为这两个地址:f1g1ns1.dnspod.net、f1g1ns2.dnspod.net。如果你不明白在哪里修改,可以参考这里:Godaddy注册的域名如何使用DNSPod
41 | - 等待域名解析生效
42 |
43 |
44 | 域名的配置部分完成,跪谢方校长。
45 |
46 | ## 配置和使用Github
47 | Git是版本管理的未来,他的优点我不再赘述,相关资料很多。推荐这本[Git中文教程][4]。
48 |
49 | 要使用Git,需要安装它的客户端,推荐在Linux下使用Git,会比较方便。Windows版的下载地址在这里:[http://code.google.com/p/msysgit/downloads/list](http://code.google.com/p/msysgit/downloads/list "Windows版Git客户端")。其他系统的安装也可以参考官方的[安装教程][5]。
50 |
51 | 下载安装客户端之后,各个系统的配置就类似了,我们使用windows作为例子,Linux和Mac与此类似。
52 |
53 | 在Windows下,打开Git Bash,其他系统下面则打开终端(Terminal):
54 | 
55 |
56 | ### 1、检查SSH keys的设置
57 | 首先我们需要检查你电脑上现有的ssh key:
58 |
59 | $ cd ~/.ssh
60 |
61 | 如果显示“No such file or directory”,跳到第三步,否则继续。
62 |
63 | ### 2、备份和移除原来的ssh key设置:
64 | 因为已经存在key文件,所以需要备份旧的数据并删除:
65 |
66 | $ ls
67 | config id_rsa id_rsa.pub known_hosts
68 | $ mkdir key_backup
69 | $ cp id_rsa* key_backup
70 | $ rm id_rsa*
71 |
72 | ### 3、生成新的SSH Key:
73 | 输入下面的代码,就可以生成新的key文件,我们只需要默认设置就好,所以当需要输入文件名的时候,回车就好。
74 |
75 | $ ssh-keygen -t rsa -C "邮件地址@youremail.com"
76 | Generating public/private rsa key pair.
77 | Enter file in which to save the key (/Users/your_user_directory/.ssh/id_rsa):<回车就好>
78 |
79 | 然后系统会要你输入加密串([Passphrase][6]):
80 |
81 | Enter passphrase (empty for no passphrase):<输入加密串>
82 | Enter same passphrase again:<再次输入加密串>
83 |
84 | 最后看到这样的界面,就成功设置ssh key了:
85 | 
86 |
87 | ### 4、添加SSH Key到GitHub:
88 | 在本机设置SSH Key之后,需要添加到GitHub上,以完成SSH链接的设置。
89 |
90 | 用文本编辑工具打开id_rsa.pub文件,如果看不到这个文件,你需要设置显示隐藏文件。准确的复制这个文件的内容,才能保证设置的成功。
91 |
92 | 在GitHub的主页上点击设置按钮:
93 | 
94 |
95 | 选择SSH Keys项,把复制的内容粘贴进去,然后点击Add Key按钮即可:
96 | 
97 |
98 | PS:如果需要配置多个GitHub账号,可以参看这个[多个github帐号的SSH key切换](http://omiga.org/blog/archives/2269),不过需要提醒一下的是,如果你只是通过这篇文章中所述配置了Host,那么你多个账号下面的提交用户会是一个人,所以需要通过命令`git config --global --unset user.email`删除用户账户设置,在每一个repo下面使用`git config --local user.email '你的github邮箱@mail.com'` 命令单独设置用户账户信息
99 |
100 | ### 5、测试一下
101 | 可以输入下面的命令,看看设置是否成功,`git@github.com`的部分不要修改:
102 |
103 | $ ssh -T git@github.com
104 |
105 |
106 | 如果是下面的反应:
107 |
108 | The authenticity of host 'github.com (207.97.227.239)' can't be established.
109 | RSA key fingerprint is 16:27:ac:a5:76:28:2d:36:63:1b:56:4d:eb:df:a6:48.
110 | Are you sure you want to continue connecting (yes/no)?
111 |
112 |
113 | 不要紧张,输入`yes`就好,然后会看到:
114 |
115 | Hi username! You've successfully authenticated, but GitHub does not provide shell access.
116 |
117 | ### 6、设置你的账号信息
118 | 现在你已经可以通过SSH链接到GitHub了,还有一些个人信息需要完善的。
119 |
120 | Git会根据用户的名字和邮箱来记录提交。GitHub也是用这些信息来做权限的处理,输入下面的代码进行个人信息的设置,把名称和邮箱替换成你自己的,名字必须是你的真名,而不是GitHub的昵称。
121 |
122 | $ git config --global user.name "你的名字"
123 | $ git config --global user.email "your_email@youremail.com"
124 |
125 | #### 设置GitHub的token
126 |
127 | 2012-4-28补充:新版的接口已经不需要配置token了,所以下面这段可以跳过了
128 |
129 | 有些工具没有通过SSH来链接GitHub。如果要使用这类工具,你需要找到然后设置你的API Token。
130 |
131 | 在GitHub上,你可以点击*Account Setting > Account Admin*:
132 | 
133 |
134 | 然后在你的命令行中,输入下面的命令,把token添加进去:
135 |
136 | $ git config --global user.name "你的名字"
137 | $ git config --global user.token 0123456789your123456789token
138 |
139 | 如果你改了GitHub的密码,需要重新设置token。
140 |
141 | ### 成功了
142 | 好了,你已经可以成功连接GitHub了。
143 |
144 | ## 使用GitHub Pages建立博客
145 | 与GitHub建立好链接之后,就可以方便的使用它提供的Pages服务,GitHub Pages分两种,一种是你的GitHub用户名建立的`username.github.io`这样的用户&组织页(站),另一种是依附项目的pages。
146 |
147 | ### User & Organization Pages
148 | 想建立个人博客是用的第一种,形如`beiyuu.github.io`这样的可访问的站,每个用户名下面只能建立一个,创建之后点击`Admin`进入项目管理,可以看到是这样的:
149 | 
150 | 而普通的项目是这样的,即使你也是用的`othername.github.io`:
151 | 
152 |
153 | 创建好`username.github.io`项目之后,提交一个`index.html`文件,然后`push`到GitHub的`master`分支(也就是普通意义上的主干)。第一次页面生效需要一些时间,大概10分钟左右。
154 |
155 | 生效之后,访问`username.github.io`就可以看到你上传的页面了,[beiyuu.github.io][7]就是一个例子。
156 |
157 | 关于第二种项目`pages`,简单提一下,他和用户pages使用的后台程序是同一套,只不过它的目的是项目的帮助文档等跟项目绑定的内容,所以需要在项目的`gh-pages`分支上去提交相应的文件,GitHub会自动帮你生成项目pages。具体的使用帮助可以参考[Github Pages][]的官方文档:
158 |
159 | ### 绑定域名
160 | 我们在第一部分就提到了在DNS部分的设置,再来看在GitHub的配置,要想让`username.github.io`能通过你自己的域名来访问,需要在项目的根目录下新建一个名为`CNAME`的文件,文件内容形如:
161 |
162 | beiyuu.com
163 |
164 | 你也可以绑定在二级域名上:
165 |
166 | blog.beiyuu.com
167 |
168 | 需要提醒的一点是,如果你使用形如`beiyuu.com`这样的一级域名的话,需要在DNS处设置A记录到`207.97.227.245`(**这个地址会有变动,[这里][a-record]查看**),而不是在DNS处设置为CNAME的形式,否则可能会对其他服务(比如email)造成影响。
169 |
170 | 设置成功后,根据DNS的情况,最长可能需要一天才能生效,耐心等待吧。
171 |
172 | ## Jekyll模板系统
173 | GitHub Pages为了提供对HTML内容的支持,选择了[Jekyll][]作为模板系统,Jekyll是一个强大的静态模板系统,作为个人博客使用,基本上可以满足要求,也能保持管理的方便,你可以查看[Jekyll官方文档][8]。
174 |
175 | 你可以直接fork[我的项目][11],然后改名,就有了你自己的满足Jekyll要求的文档了,当然你也可以按照下面的介绍自己创建。
176 |
177 | ### Jekyll基本结构
178 | Jekyll的核心其实就是一个文本的转换引擎,用你最喜欢的标记语言写文档,可以是Markdown、Textile或者HTML等等,再通过`layout`将文档拼装起来,根据你设置的URL规则来展现,这些都是通过严格的配置文件来定义,最终的产出就是web页面。
179 |
180 | 基本的Jekyll结构如下:
181 |
182 | |-- _config.yml
183 | |-- _includes
184 | |-- _layouts
185 | | |-- default.html
186 | | `-- post.html
187 | |-- _posts
188 | | |-- 2007-10-29-why-every-programmer-should-play-nethack.textile
189 | | `-- 2009-04-26-barcamp-boston-4-roundup.textile
190 | |-- _site
191 | `-- index.html
192 |
193 |
194 | 简单介绍一下他们的作用:
195 |
196 | #### _config.yml
197 |
198 | 配置文件,用来定义你想要的效果,设置之后就不用关心了。
199 |
200 | #### _includes
201 | 可以用来存放一些小的可复用的模块,方便通过`{ % include file.ext %}`(去掉前两个{中或者{与%中的空格,下同)灵活的调用。这条命令会调用_includes/file.ext文件。
202 |
203 | #### _layouts
204 | 这是模板文件存放的位置。模板需要通过[YAML front matter][9]来定义,后面会讲到,`{ { content }}`标记用来将数据插入到这些模板中来。
205 |
206 | #### _posts
207 | 你的动态内容,一般来说就是你的博客正文存放的文件夹。他的命名有严格的规定,必须是`2012-02-22-artical-title.MARKUP`这样的形式,MARKUP是你所使用标记语言的文件后缀名,根据_config.yml中设定的链接规则,可以根据你的文件名灵活调整,文章的日期和标记语言后缀与文章的标题的独立的。
208 |
209 | #### _site
210 | 这个是Jekyll生成的最终的文档,不用去关心。最好把他放在你的`.gitignore`文件中忽略它。
211 |
212 | #### 其他文件夹
213 | 你可以创建任何的文件夹,在根目录下面也可以创建任何文件,假设你创建了`project`文件夹,下面有一个`github-pages.md`的文件,那么你就可以通过`yoursite.com/project/github-pages`访问的到,如果你是使用一级域名的话。文件后缀可以是`.html`或者`markdown`或者`textile`。这里还有很多的例子:[https://github.com/mojombo/jekyll/wiki/Sites](https://github.com/mojombo/jekyll/wiki/Sites)
214 |
215 | ### Jekyll的配置
216 | Jekyll的配置写在_config.yml文件中,可配置项有很多,我们不去一一追究了,很多配置虽有用但是一般不需要去关心,[官方配置文档][10]有很详细的说明,确实需要了可以去这里查,我们主要说两个比较重要的东西,一个是`Permalink`,还有就是自定义项。
217 |
218 | `Permalink`项用来定义你最终的文章链接是什么形式,他有下面几个变量:
219 |
220 | * `year` 文件名中的年份
221 | * `month` 文件名中的月份
222 | * `day` 文件名中的日期
223 | * `title` 文件名中的文章标题
224 | * `categories` 文章的分类,如果文章没有分类,会忽略
225 | * `i-month` 文件名中的除去前缀0的月份
226 | * `i-day` 文件名中的除去前缀0的日期
227 |
228 | 看看最终的配置效果:
229 |
230 | * `permalink: pretty` /2009/04/29/slap-chop/index.html
231 | * `permalink: /:month-:day-:year/:title.html` /04-29-2009/slap-chop.html
232 | * `permalink: /blog/:year/:month/:day/:title` /blog/2009/04/29/slap-chop/index.html
233 |
234 | 我使用的是:
235 |
236 | * `permalink: /:title` /github-pages
237 |
238 | 自定义项的内容,例如我们定义了`title:BeiYuu的博客`这样一项,那么你就可以在文章中使用`{ { site.title }}`来引用这个变量了,非常方便定义些全局变量。
239 |
240 | ### YAML Front Matter和模板变量
241 | 对于使用YAML定义格式的文章,Jekyll会特别对待,他的格式要求比较严格,必须是这样的形式:
242 |
243 | ---
244 | layout: post
245 | title: Blogging Like a Hacker
246 | ---
247 |
248 | 前后的`---`不能省略,在这之间,你可以定一些你需要的变量,layout就是调用`_layouts`下面的某一个模板,他还有一些其他的变量可以使用:
249 |
250 | * `permalink` 你可以对某一篇文章使用通用设置之外的永久链接
251 | * `published` 可以单独设置某一篇文章是否需要发布
252 | * `category` 设置文章的分类
253 | * `tags` 设置文章的tag
254 |
255 | 上面的`title`就是自定义的内容,你也可以设置其他的内容,在文章中可以通过`{ { page.title }}`这样的形式调用。
256 |
257 | 模板变量,我们之前也涉及了不少了,还有其他需要的变量,可以参考官方的文档:[https://github.com/mojombo/jekyll/wiki/template-data](https://github.com/mojombo/jekyll/wiki/template-data "Jekyll Template Data")
258 |
259 | ## 使用Disqus管理评论
260 | 模板部分到此就算是配置完毕了,但是Jekyll只是个静态页面的发布系统,想做到关爽场倒是很容易,如果想要评论呢?也很简单。
261 |
262 | 现在专做评论模块的产品有很多,比如[Disqus][],还有国产的[多说][],Disqus对现在各种系统的支持都比较全面,到写博客为止,多说现在仅是WordPress的一个插件,所以我这里暂时也使用不了,多说与国内的社交网络紧密结合,还是有很多亮点的,值得期待一下。我先选择了Disqus。
263 |
264 | 注册账号什么的就不提了,Disqus支持很多的博客平台,参见下图:
265 | 
266 |
267 | 我们选择最下面的`Universal Code`就好,然后会看到一个介绍页面,把下面这段代码复制到你的模板里面,可以只复制到显示文章的模板中:
268 |
269 |
270 |
281 |
282 | blog comments powered by
283 |
284 | 配置完之后,你也可以做一些异步加载的处理,提高性能,比如我就在最开始页面打开的时候不显示评论,当你想看评论的时候,点击“显示评论”再加载Disqus的模块。代码很简单,你可以参考我的写法。
285 |
286 | $('#disqus_container .comment').on('click',function(){
287 | $(this).html('加载中...');
288 | var disqus_shortname = 'beiyuu';
289 | var that = this;
290 | BYB.includeScript('http://' + disqus_shortname + '.disqus.com/embed.js',function(){$(that).remove()}); //这是一个加载js的函数
291 | });
292 |
293 | 如果你不喜欢Disqus的样式,你也可以根据他生成的HTML结构,自己改写样式覆盖它的,Disqus现在也提供每个页面的评论数接口,[帮助文档][12]在这里可以看到。
294 |
295 | ## 代码高亮插件
296 | 如果写技术博客,代码高亮少不了,有两个可选插件[DlHightLight代码高亮组件][13]和[Google Code Prettify][14]。DLHightLight支持的语言相对较少一些,有js、css、xml和html,Google的高亮插件基本上任何语言都支持,也可以自定义语言,也支持自动识别,也有行号的特别支持。
297 |
298 | Google的高亮插件使用也比较方便,只需要在``的标签上加入`prettyprint`即可。所以我选择了Google Code Prettify。
299 |
300 | ## 搭建本地jekyll环境
301 | 这里主要介绍一下在Mac OS X下面的安装过程,其他操作系统可以参考官方的[jekyll安装][15]。
302 |
303 | 作为生活在水深火热的墙内人民,有必要进行下面一步修改gem的源,方便我们更快的下载所需组建:
304 |
305 | sudo gem sources --remove http://rubygems.org/
306 | sudo gem sources -a http://ruby.taobao.org/
307 |
308 | 然后用Gem安装jekyll
309 |
310 | $ gem install jekyll
311 |
312 | 不过一般如果有出错提示,你可能需要这样安装:
313 |
314 | $ sudo gem install jekyll
315 |
316 | 我到了这一步的时候总是提示错误`Failed to build gem native extension`,很可能的一个原因是没有安装rvm,[rvm的安装][16]可以参考这里,或者敲入下面的命令:
317 |
318 | $ curl -L https://get.rvm.io | bash -s stable --ruby
319 |
320 | 然后还需要安装Markdown的解释器,这个需要在你的_config.yml里面设置`markdown:rdiscount`:
321 |
322 | $ gem install jekyll rdiscount
323 |
324 | 好了,如果一切顺利的话,本地环境就基本搭建完成了,进入之前我们建立的博客目录,运行下面的命令:
325 |
326 | $ jekyll serve --watch
327 |
328 | 这个时候,你就可以通过`localhost:4000`来访问了。还有关于[jekyll bootstrap][17]的资料,需要自己修改调试的,可以研究一下。
329 |
330 | 我在这个过程中还遇到两个诡异的没有解决的问题,一个是我放在根目录下面的blog.md等文件,在GitHub的pages服务上一切正常,可以通过`beiyuu.com/blog`访问的到,但是在本地环境下,总是`not found`,很是让人郁闷,看生成的`_site`目录下面的文件,也是正常的`blog.html`,但就是找不到,只有当我把URL改为`localhost:4000/blog.html`的时候,才能访问的到,环境不同真糟糕。
331 |
332 | 还有一个是关于`category`的问题,根据`YAML`的语法,我们在文章头部可以定义文章所属的类别,也可以定义为`category:[blog,rss]`这样子的多类别,我在本地试一切正常,但是push到GitHub之后,就无法读取了,真让人着急,没有办法,只能采用别的办法满足我的需求了。这里还有一篇[Jekyll 本地调试之若干问题][18],安装中如果有其他问题,也可以对照参考一下。
333 |
334 | ## 结语
335 | 如果你跟着这篇不那么详尽的教程,成功搭建了自己的博客,恭喜你!剩下的就是保持热情的去写自己的文章吧。
336 |
337 |
338 | [BeiYuu]: http://beiyuu.com "BeiYuu"
339 | [Github]: http://github.com "Github"
340 | [jQuery]: https://github.com/jquery/jquery "jQuery@github"
341 | [Twitter]: https://github.com/twitter/bootstrap "Twitter@github"
342 | [Github Pages]: http://pages.github.com/ "Github Pages"
343 | [Godaddy]: http://www.godaddy.com/ "Godaddy"
344 | [Jekyll]: https://github.com/mojombo/jekyll "Jekyll"
345 | [DNSPod]: https://www.dnspod.cn/ "DNSPod"
346 | [Disqus]: http://disqus.com/
347 | [多说]: http://duoshuo.com/
348 | [1]: {{ page.url}} ({{ page.title }})
349 | [2]: http://markdown.tw/ "Markdown语法"
350 | [3]: http://baike.baidu.com/view/65575.htm "A记录"
351 | [4]: http://progit.org/book/zh/ "Pro Git中文版"
352 | [5]: http://help.github.com/mac-set-up-git/ "Mac下Git安装"
353 | [6]: http://help.github.com/ssh-key-passphrases/
354 | [7]: http://beiyuu.github.io
355 | [8]: https://github.com/mojombo/jekyll/blob/master/README.textile
356 | [9]: https://github.com/mojombo/jekyll/wiki/YAML-Front-Matter
357 | [10]: https://github.com/mojombo/jekyll/wiki/configuration
358 | [11]: https://github.com/beiyuu/Github-Pages-Example
359 | [12]: http://docs.disqus.com/developers/universal/
360 | [13]: http://mihai.bazon.net/projects/javascript-syntax-highlighting-engine
361 | [14]: http://code.google.com/p/google-code-prettify/
362 | [15]: https://github.com/mojombo/jekyll/wiki/Install
363 | [16]: https://rvm.io/rvm/install/
364 | [17]: http://jekyllbootstrap.com/
365 | [18]: http://chxt6896.github.com/blog/2012/02/13/blog-jekyll-native.html
366 | [a-record]: https://help.github.com/articles/my-custom-domain-isn-t-working
367 |
--------------------------------------------------------------------------------
/_posts/2016-05-18-carriage-return-line-feed-new-line-end-file.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: 回车、换行、和文件末尾空行
4 | description: 回车和换行在不同系统下面定义不同,时不时会有一些小问题出来,git 经常出现的 No new line at the end of file 也让很多人费解,需要梳理一下
5 | category: blog
6 | ---
7 |
8 | ## 回车和换行
9 |
10 | 回车 (Carriage Return) 和换行 (Line Feed) 的区别,[这里](http://stackoverflow.com/questions/1761051/difference-between-n-and-r)有一个历史原因可参考:
11 |
12 | > 在计算机还没有出现之前,有一种叫做电传打字机(Teletype Model 33)的玩意,每秒钟可以打10个字符。但是它有一个问题,就是打完一行换行的时候,要用去0.2秒,正好可以打两个字符。要是在这0.2秒里面,又有新的字符传过来,那么这个字符将丢失。
13 |
14 | > 于是,研制人员想了个办法解决这个问题,就是在每行后面加两个表示结束的字符。一个叫做"回车",告诉打字机把打印头定位在左边界;另一个叫做"换行",告诉打字机把纸向下移一行。
15 |
16 | 发明计算机时,这个概念被沿用下来,但因为条件的限制和设计者的喜好,有了一些分歧:
17 |
18 | - Unix 系统里,每行结尾只有"<换行>",即"\n"
19 | - Windows 系统里面,每行结尾是"<回车><换行>",即"\r\n"
20 | - 在老的 Mac 系统里,每行结尾是"<回车>",即"\r"
21 |
22 | 我们来验证一下,我在 Windows 下用记事本新建一个文本文件,它的二进制编码如下:
23 |
24 | //源文件内容
25 | hello
26 | hello2
27 |
28 | //二进制内容
29 | 0000000: 6865 6c6c 6f0d 0a68 656c 6c6f 32 hello..hello2
30 |
31 | 同样在 Mac 下用 Vim 新建一个:
32 |
33 | //源文件内容
34 | hello
35 | hello2
36 |
37 | //二进制内容
38 | 0000000: 6865 6c6c 6f0a 6865 6c6c 6f32 0a hello.hello2.
39 |
40 | `0a`是 LF 的 ASCII 编码, `0d`是 CR 的 ASCII 编码。区别很明显了
41 |
42 | - Mac 下的文本文件在 Windows 下打开会成为一行,因为 Windows 只认识`\r\n`,也就是`0d0a`
43 | - Windows 下的文本文件在 Mac 下打开,Vim 中会在每行末尾显示一个 `^M`,(不是两个字符组成的)
44 |
45 | ## 文件末尾空行
46 |
47 | [POSIX](https://zh.wikipedia.org/zh-sg/POSIX)对行的[定义](http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_206)如下:
48 |
49 | > 3.206 Line
50 |
51 | > A sequence of zero or more non- characters plus a terminating character.
52 |
53 | > 行是由0个或者多个非 "换行" 符的字符组成,并且以 "换行" 符结尾。
54 |
55 | 这样做有什么好处呢,举个例子:
56 |
57 | //hello.c
58 | #include head.h
59 | print('hello')
60 |
61 | //world.c
62 | #include tail.h
63 | print('hello')
64 |
65 | 如果这两个文件都按 POSIX 规范来写, 在`cat *.c`之后,是没有问题的:
66 |
67 | //cat.c
68 |
69 | #include head.h
70 | print('hello')
71 | #include tail.h
72 | print('hello')
73 |
74 | 如果缺少最后一行的换行符(如 Windows 文件那样的定义),`cat`之后,就有问题了:
75 |
76 | //error.c
77 |
78 | #include head.h
79 | print('hello')#include tail.h
80 | print('hello')
81 |
82 | 所以,从这点去理解 POSIX 对行的定义,非常合理,对于任意文件的拼接,也各自保持了文件的完整性。
83 |
84 | 不遵守标准带来的则是:在一些编辑器下面,比如 Sublime,他把`\n`的当做了行之间的分隔符,于是文件最后一行的`\n`就看上去成了一个新的空行,这就是错误解读标准造成的,拼接文件时也会产生不必要的麻烦,比如上例。
85 |
86 | ## \ No new line at end of file
87 |
88 | 基于上面的原因,再去看 git diff 的`\ No new line at end of file`信息,就很好解释了。
89 |
90 | 各编辑器对于换行符的理解偏差,导致的文件确实发生了变化,多了或少了最后的`0a`,那么对于 diff 程序来说,这当然是不可忽略的,但因为`0a`是不可见字符,并且是长久以来的历史原因,所以 diff 程序有个专门的标记来说明这个变化,就是:
91 |
92 | `\ No new line at end of file`
93 |
94 | 各编辑器也有相应的办法去解决这个问题,比如 Sublime,在`Default/Preferences.sublime-settings`中设置:
95 |
96 | // Set to true to ensure the last line of the file ends in a newline
97 | // character when saving
98 | "ensure_newline_at_eof_on_save": true,
99 |
100 | 所以,请遵守规范。
101 |
102 | [BeiYuu]: http://beiyuu.com "BeiYuu"
103 |
--------------------------------------------------------------------------------
/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/beiyuu/Github-Pages-Example/de1c302bc19b2903b5c01465ebea8ff637c74c81/favicon.ico
--------------------------------------------------------------------------------
/images/external_link.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/beiyuu/Github-Pages-Example/de1c302bc19b2903b5c01465ebea8ff637c74c81/images/external_link.gif
--------------------------------------------------------------------------------
/images/external_link_on.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/beiyuu/Github-Pages-Example/de1c302bc19b2903b5c01465ebea8ff637c74c81/images/external_link_on.gif
--------------------------------------------------------------------------------
/images/githubpages/bootcamp_1_ssh.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/beiyuu/Github-Pages-Example/de1c302bc19b2903b5c01465ebea8ff637c74c81/images/githubpages/bootcamp_1_ssh.jpg
--------------------------------------------------------------------------------
/images/githubpages/bootcamp_1_token.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/beiyuu/Github-Pages-Example/de1c302bc19b2903b5c01465ebea8ff637c74c81/images/githubpages/bootcamp_1_token.jpg
--------------------------------------------------------------------------------
/images/githubpages/bootcamp_1_win_gitbash.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/beiyuu/Github-Pages-Example/de1c302bc19b2903b5c01465ebea8ff637c74c81/images/githubpages/bootcamp_1_win_gitbash.jpg
--------------------------------------------------------------------------------
/images/githubpages/disqus-site.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/beiyuu/Github-Pages-Example/de1c302bc19b2903b5c01465ebea8ff637c74c81/images/githubpages/disqus-site.jpg
--------------------------------------------------------------------------------
/images/githubpages/github-account-setting.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/beiyuu/Github-Pages-Example/de1c302bc19b2903b5c01465ebea8ff637c74c81/images/githubpages/github-account-setting.png
--------------------------------------------------------------------------------
/images/githubpages/other-pages.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/beiyuu/Github-Pages-Example/de1c302bc19b2903b5c01465ebea8ff637c74c81/images/githubpages/other-pages.png
--------------------------------------------------------------------------------
/images/githubpages/ssh-key-set.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/beiyuu/Github-Pages-Example/de1c302bc19b2903b5c01465ebea8ff637c74c81/images/githubpages/ssh-key-set.png
--------------------------------------------------------------------------------
/images/githubpages/user-pages.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/beiyuu/Github-Pages-Example/de1c302bc19b2903b5c01465ebea8ff637c74c81/images/githubpages/user-pages.png
--------------------------------------------------------------------------------
/images/icons.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/beiyuu/Github-Pages-Example/de1c302bc19b2903b5c01465ebea8ff637c74c81/images/icons.gif
--------------------------------------------------------------------------------
/images/other/Tabby-440.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/beiyuu/Github-Pages-Example/de1c302bc19b2903b5c01465ebea8ff637c74c81/images/other/Tabby-440.png
--------------------------------------------------------------------------------
/images/other/Tabby-pro1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/beiyuu/Github-Pages-Example/de1c302bc19b2903b5c01465ebea8ff637c74c81/images/other/Tabby-pro1.png
--------------------------------------------------------------------------------
/images/other/Tabby-pro2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/beiyuu/Github-Pages-Example/de1c302bc19b2903b5c01465ebea8ff637c74c81/images/other/Tabby-pro2.png
--------------------------------------------------------------------------------
/images/other/auto-edit-bar.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/beiyuu/Github-Pages-Example/de1c302bc19b2903b5c01465ebea8ff637c74c81/images/other/auto-edit-bar.jpg
--------------------------------------------------------------------------------
/images/other/side-slide.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/beiyuu/Github-Pages-Example/de1c302bc19b2903b5c01465ebea8ff637c74c81/images/other/side-slide.jpg
--------------------------------------------------------------------------------
/index.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: default
3 | ---
4 |
5 |
6 |
7 |
8 |
9 |
BeiYuu
10 |

11 |

12 |

13 |
14 |
15 |
16 |
17 |
18 |
19 | {% for post in site.categories.blog %}
20 | -
21 | {{ post.title }}
22 |
{{ post.description }}
23 |
24 | {% endfor %}
25 |
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/js/css3-ani.js:
--------------------------------------------------------------------------------
1 | $(function(){
2 |
3 | $('#cardflip').click(function(){
4 | $('#card1').toggleClass('flipped')
5 | });
6 |
7 | $('body').delegate('#cardflip1','click',function(){
8 | $('#card2').toggleClass('flipped')
9 | });
10 |
11 | $('body').delegate('#cube-btn button','click',function(){
12 | var cls = $(this).attr('data-class');
13 | $('#cube').removeClass();
14 | $('#cube').addClass(cls);
15 | });
16 |
17 | $('#car-pre').click(function(){
18 | var deg = $('#carousel').attr('data-deg') || 0;
19 | deg = parseInt(deg)+40;
20 |
21 | var value = 'translateZ(-288px) rotateY('+deg+'deg)';
22 |
23 | $('#carousel')
24 | .attr('data-deg',deg)
25 | .css({
26 | '-webkit-transform':value
27 | ,'-moz-transform':value
28 | ,'-o-transform':value
29 | ,'transform':value
30 | });
31 | });
32 | $('#car-next').click(function(){
33 | var deg = $('#carousel').attr('data-deg') || 0;
34 | deg = parseInt(deg)-40;
35 |
36 | var value = 'translateZ(-288px) rotateY('+deg+'deg)';
37 |
38 | $('#carousel')
39 | .attr('data-deg',deg)
40 | .css({
41 | '-webkit-transform':value
42 | ,'-moz-transform':value
43 | ,'-o-transform':value
44 | ,'transform':value
45 | });
46 | });
47 | });
48 |
--------------------------------------------------------------------------------
/js/jquery-1.7.1.min.js:
--------------------------------------------------------------------------------
1 | /*! jQuery v1.7.1 jquery.com | jquery.org/license */
2 | (function(a,b){function cy(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cv(a){if(!ck[a]){var b=c.body,d=f("<"+a+">").appendTo(b),e=d.css("display");d.remove();if(e==="none"||e===""){cl||(cl=c.createElement("iframe"),cl.frameBorder=cl.width=cl.height=0),b.appendChild(cl);if(!cm||!cl.createElement)cm=(cl.contentWindow||cl.contentDocument).document,cm.write((c.compatMode==="CSS1Compat"?"":"")+""),cm.close();d=cm.createElement(a),cm.body.appendChild(d),e=f.css(d,"display"),b.removeChild(cl)}ck[a]=e}return ck[a]}function cu(a,b){var c={};f.each(cq.concat.apply([],cq.slice(0,b)),function(){c[this]=a});return c}function ct(){cr=b}function cs(){setTimeout(ct,0);return cr=f.now()}function cj(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function ci(){try{return new a.XMLHttpRequest}catch(b){}}function cc(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var d=a.dataTypes,e={},g,h,i=d.length,j,k=d[0],l,m,n,o,p;for(g=1;g0){if(c!=="border")for(;g=0===c})}function S(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function K(){return!0}function J(){return!1}function n(a,b,c){var d=b+"defer",e=b+"queue",g=b+"mark",h=f._data(a,d);h&&(c==="queue"||!f._data(a,e))&&(c==="mark"||!f._data(a,g))&&setTimeout(function(){!f._data(a,e)&&!f._data(a,g)&&(f.removeData(a,d,!0),h.fire())},0)}function m(a){for(var b in a){if(b==="data"&&f.isEmptyObject(a[b]))continue;if(b!=="toJSON")return!1}return!0}function l(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(k,"-$1").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:f.isNumeric(d)?parseFloat(d):j.test(d)?f.parseJSON(d):d}catch(g){}f.data(a,c,d)}else d=b}return d}function h(a){var b=g[a]={},c,d;a=a.split(/\s+/);for(c=0,d=a.length;c)[^>]*$|#([\w\-]*)$)/,j=/\S/,k=/^\s+/,l=/\s+$/,m=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,n=/^[\],:{}\s]*$/,o=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,p=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,q=/(?:^|:|,)(?:\s*\[)+/g,r=/(webkit)[ \/]([\w.]+)/,s=/(opera)(?:.*version)?[ \/]([\w.]+)/,t=/(msie) ([\w.]+)/,u=/(mozilla)(?:.*? rv:([\w.]+))?/,v=/-([a-z]|[0-9])/ig,w=/^-ms-/,x=function(a,b){return(b+"").toUpperCase()},y=d.userAgent,z,A,B,C=Object.prototype.toString,D=Object.prototype.hasOwnProperty,E=Array.prototype.push,F=Array.prototype.slice,G=String.prototype.trim,H=Array.prototype.indexOf,I={};e.fn=e.prototype={constructor:e,init:function(a,d,f){var g,h,j,k;if(!a)return this;if(a.nodeType){this.context=this[0]=a,this.length=1;return this}if(a==="body"&&!d&&c.body){this.context=c,this[0]=c.body,this.selector=a,this.length=1;return this}if(typeof a=="string"){a.charAt(0)!=="<"||a.charAt(a.length-1)!==">"||a.length<3?g=i.exec(a):g=[null,a,null];if(g&&(g[1]||!d)){if(g[1]){d=d instanceof e?d[0]:d,k=d?d.ownerDocument||d:c,j=m.exec(a),j?e.isPlainObject(d)?(a=[c.createElement(j[1])],e.fn.attr.call(a,d,!0)):a=[k.createElement(j[1])]:(j=e.buildFragment([g[1]],[k]),a=(j.cacheable?e.clone(j.fragment):j.fragment).childNodes);return e.merge(this,a)}h=c.getElementById(g[2]);if(h&&h.parentNode){if(h.id!==g[2])return f.find(a);this.length=1,this[0]=h}this.context=c,this.selector=a;return this}return!d||d.jquery?(d||f).find(a):this.constructor(d).find(a)}if(e.isFunction(a))return f.ready(a);a.selector!==b&&(this.selector=a.selector,this.context=a.context);return e.makeArray(a,this)},selector:"",jquery:"1.7.1",length:0,size:function(){return this.length},toArray:function(){return F.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=this.constructor();e.isArray(a)?E.apply(d,a):e.merge(d,a),d.prevObject=this,d.context=this.context,b==="find"?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")");return d},each:function(a,b){return e.each(this,a,b)},ready:function(a){e.bindReady(),A.add(a);return this},eq:function(a){a=+a;return a===-1?this.slice(a):this.slice(a,a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(F.apply(this,arguments),"slice",F.call(arguments).join(","))},map:function(a){return this.pushStack(e.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:E,sort:[].sort,splice:[].splice},e.fn.init.prototype=e.fn,e.extend=e.fn.extend=function(){var a,c,d,f,g,h,i=arguments[0]||{},j=1,k=arguments.length,l=!1;typeof i=="boolean"&&(l=i,i=arguments[1]||{},j=2),typeof i!="object"&&!e.isFunction(i)&&(i={}),k===j&&(i=this,--j);for(;j0)return;A.fireWith(c,[e]),e.fn.trigger&&e(c).trigger("ready").off("ready")}},bindReady:function(){if(!A){A=e.Callbacks("once memory");if(c.readyState==="complete")return setTimeout(e.ready,1);if(c.addEventListener)c.addEventListener("DOMContentLoaded",B,!1),a.addEventListener("load",e.ready,!1);else if(c.attachEvent){c.attachEvent("onreadystatechange",B),a.attachEvent("onload",e.ready);var b=!1;try{b=a.frameElement==null}catch(d){}c.documentElement.doScroll&&b&&J()}}},isFunction:function(a){return e.type(a)==="function"},isArray:Array.isArray||function(a){return e.type(a)==="array"},isWindow:function(a){return a&&typeof a=="object"&&"setInterval"in a},isNumeric:function(a){return!isNaN(parseFloat(a))&&isFinite(a)},type:function(a){return a==null?String(a):I[C.call(a)]||"object"},isPlainObject:function(a){if(!a||e.type(a)!=="object"||a.nodeType||e.isWindow(a))return!1;try{if(a.constructor&&!D.call(a,"constructor")&&!D.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}var d;for(d in a);return d===b||D.call(a,d)},isEmptyObject:function(a){for(var b in a)return!1;return!0},error:function(a){throw new Error(a)},parseJSON:function(b){if(typeof b!="string"||!b)return null;b=e.trim(b);if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);if(n.test(b.replace(o,"@").replace(p,"]").replace(q,"")))return(new Function("return "+b))();e.error("Invalid JSON: "+b)},parseXML:function(c){var d,f;try{a.DOMParser?(f=new DOMParser,d=f.parseFromString(c,"text/xml")):(d=new ActiveXObject("Microsoft.XMLDOM"),d.async="false",d.loadXML(c))}catch(g){d=b}(!d||!d.documentElement||d.getElementsByTagName("parsererror").length)&&e.error("Invalid XML: "+c);return d},noop:function(){},globalEval:function(b){b&&j.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(w,"ms-").replace(v,x)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,d){var f,g=0,h=a.length,i=h===b||e.isFunction(a);if(d){if(i){for(f in a)if(c.apply(a[f],d)===!1)break}else for(;g0&&a[0]&&a[j-1]||j===0||e.isArray(a));if(k)for(;i1?i.call(arguments,0):b,j.notifyWith(k,e)}}function l(a){return function(c){b[a]=arguments.length>1?i.call(arguments,0):c,--g||j.resolveWith(j,b)}}var b=i.call(arguments,0),c=0,d=b.length,e=Array(d),g=d,h=d,j=d<=1&&a&&f.isFunction(a.promise)?a:f.Deferred(),k=j.promise();if(d>1){for(;ca",d=q.getElementsByTagName("*"),e=q.getElementsByTagName("a")[0];if(!d||!d.length||!e)return{};g=c.createElement("select"),h=g.appendChild(c.createElement("option")),i=q.getElementsByTagName("input")[0],b={leadingWhitespace:q.firstChild.nodeType===3,tbody:!q.getElementsByTagName("tbody").length,htmlSerialize:!!q.getElementsByTagName("link").length,style:/top/.test(e.getAttribute("style")),hrefNormalized:e.getAttribute("href")==="/a",opacity:/^0.55/.test(e.style.opacity),cssFloat:!!e.style.cssFloat,checkOn:i.value==="on",optSelected:h.selected,getSetAttribute:q.className!=="t",enctype:!!c.createElement("form").enctype,html5Clone:c.createElement("nav").cloneNode(!0).outerHTML!=="<:nav>",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0},i.checked=!0,b.noCloneChecked=i.cloneNode(!0).checked,g.disabled=!0,b.optDisabled=!h.disabled;try{delete q.test}catch(s){b.deleteExpando=!1}!q.addEventListener&&q.attachEvent&&q.fireEvent&&(q.attachEvent("onclick",function(){b.noCloneEvent=!1}),q.cloneNode(!0).fireEvent("onclick")),i=c.createElement("input"),i.value="t",i.setAttribute("type","radio"),b.radioValue=i.value==="t",i.setAttribute("checked","checked"),q.appendChild(i),k=c.createDocumentFragment(),k.appendChild(q.lastChild),b.checkClone=k.cloneNode(!0).cloneNode(!0).lastChild.checked,b.appendChecked=i.checked,k.removeChild(i),k.appendChild(q),q.innerHTML="",a.getComputedStyle&&(j=c.createElement("div"),j.style.width="0",j.style.marginRight="0",q.style.width="2px",q.appendChild(j),b.reliableMarginRight=(parseInt((a.getComputedStyle(j,null)||{marginRight:0}).marginRight,10)||0)===0);if(q.attachEvent)for(o in{submit:1,change:1,focusin:1})n="on"+o,p=n in q,p||(q.setAttribute(n,"return;"),p=typeof q[n]=="function"),b[o+"Bubbles"]=p;k.removeChild(q),k=g=h=j=q=i=null,f(function(){var a,d,e,g,h,i,j,k,m,n,o,r=c.getElementsByTagName("body")[0];!r||(j=1,k="position:absolute;top:0;left:0;width:1px;height:1px;margin:0;",m="visibility:hidden;border:0;",n="style='"+k+"border:5px solid #000;padding:0;'",o=""+"",a=c.createElement("div"),a.style.cssText=m+"width:0;height:0;position:static;top:0;margin-top:"+j+"px",r.insertBefore(a,r.firstChild),q=c.createElement("div"),a.appendChild(q),q.innerHTML="",l=q.getElementsByTagName("td"),p=l[0].offsetHeight===0,l[0].style.display="",l[1].style.display="none",b.reliableHiddenOffsets=p&&l[0].offsetHeight===0,q.innerHTML="",q.style.width=q.style.paddingLeft="1px",f.boxModel=b.boxModel=q.offsetWidth===2,typeof q.style.zoom!="undefined"&&(q.style.display="inline",q.style.zoom=1,b.inlineBlockNeedsLayout=q.offsetWidth===2,q.style.display="",q.innerHTML="",b.shrinkWrapBlocks=q.offsetWidth!==2),q.style.cssText=k+m,q.innerHTML=o,d=q.firstChild,e=d.firstChild,h=d.nextSibling.firstChild.firstChild,i={doesNotAddBorder:e.offsetTop!==5,doesAddBorderForTableAndCells:h.offsetTop===5},e.style.position="fixed",e.style.top="20px",i.fixedPosition=e.offsetTop===20||e.offsetTop===15,e.style.position=e.style.top="",d.style.overflow="hidden",d.style.position="relative",i.subtractsBorderForOverflowNotVisible=e.offsetTop===-5,i.doesNotIncludeMarginInBodyOffset=r.offsetTop!==j,r.removeChild(a),q=a=null,f.extend(b,i))});return b}();var j=/^(?:\{.*\}|\[.*\])$/,k=/([A-Z])/g;f.extend({cache:{},uuid:0,expando:"jQuery"+(f.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){a=a.nodeType?f.cache[a[f.expando]]:a[f.expando];return!!a&&!m(a)},data:function(a,c,d,e){if(!!f.acceptData(a)){var g,h,i,j=f.expando,k=typeof c=="string",l=a.nodeType,m=l?f.cache:a,n=l?a[j]:a[j]&&j,o=c==="events";if((!n||!m[n]||!o&&!e&&!m[n].data)&&k&&d===b)return;n||(l?a[j]=n=++f.uuid:n=j),m[n]||(m[n]={},l||(m[n].toJSON=f.noop));if(typeof c=="object"||typeof c=="function")e?m[n]=f.extend(m[n],c):m[n].data=f.extend(m[n].data,c);g=h=m[n],e||(h.data||(h.data={}),h=h.data),d!==b&&(h[f.camelCase(c)]=d);if(o&&!h[c])return g.events;k?(i=h[c],i==null&&(i=h[f.camelCase(c)])):i=h;return i}},removeData:function(a,b,c){if(!!f.acceptData(a)){var d,e,g,h=f.expando,i=a.nodeType,j=i?f.cache:a,k=i?a[h]:h;if(!j[k])return;if(b){d=c?j[k]:j[k].data;if(d){f.isArray(b)||(b in d?b=[b]:(b=f.camelCase(b),b in d?b=[b]:b=b.split(" ")));for(e=0,g=b.length;e-1)return!0;return!1},val:function(a){var c,d,e,g=this[0];{if(!!arguments.length){e=f.isFunction(a);return this.each(function(d){var g=f(this),h;if(this.nodeType===1){e?h=a.call(this,d,g.val()):h=a,h==null?h="":typeof h=="number"?h+="":f.isArray(h)&&(h=f.map(h,function(a){return a==null?"":a+""})),c=f.valHooks[this.nodeName.toLowerCase()]||f.valHooks[this.type];if(!c||!("set"in c)||c.set(this,h,"value")===b)this.value=h}})}if(g){c=f.valHooks[g.nodeName.toLowerCase()]||f.valHooks[g.type];if(c&&"get"in c&&(d=c.get(g,"value"))!==b)return d;d=g.value;return typeof d=="string"?d.replace(q,""):d==null?"":d}}}}),f.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,c,d,e,g=a.selectedIndex,h=[],i=a.options,j=a.type==="select-one";if(g<0)return null;c=j?g:0,d=j?g+1:i.length;for(;c=0}),c.length||(a.selectedIndex=-1);return c}}},attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attr:function(a,c,d,e){var g,h,i,j=a.nodeType;if(!!a&&j!==3&&j!==8&&j!==2){if(e&&c in f.attrFn)return f(a)[c](d);if(typeof a.getAttribute=="undefined")return f.prop(a,c,d);i=j!==1||!f.isXMLDoc(a),i&&(c=c.toLowerCase(),h=f.attrHooks[c]||(u.test(c)?x:w));if(d!==b){if(d===null){f.removeAttr(a,c);return}if(h&&"set"in h&&i&&(g=h.set(a,d,c))!==b)return g;a.setAttribute(c,""+d);return d}if(h&&"get"in h&&i&&(g=h.get(a,c))!==null)return g;g=a.getAttribute(c);return g===null?b:g}},removeAttr:function(a,b){var c,d,e,g,h=0;if(b&&a.nodeType===1){d=b.toLowerCase().split(p),g=d.length;for(;h=0}})});var z=/^(?:textarea|input|select)$/i,A=/^([^\.]*)?(?:\.(.+))?$/,B=/\bhover(\.\S+)?\b/,C=/^key/,D=/^(?:mouse|contextmenu)|click/,E=/^(?:focusinfocus|focusoutblur)$/,F=/^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,G=function(a){var b=F.exec(a);b&&(b[1]=(b[1]||"").toLowerCase(),b[3]=b[3]&&new RegExp("(?:^|\\s)"+b[3]+"(?:\\s|$)"));return b},H=function(a,b){var c=a.attributes||{};return(!b[1]||a.nodeName.toLowerCase()===b[1])&&(!b[2]||(c.id||{}).value===b[2])&&(!b[3]||b[3].test((c["class"]||{}).value))},I=function(a){return f.event.special.hover?a:a.replace(B,"mouseenter$1 mouseleave$1")};
3 | f.event={add:function(a,c,d,e,g){var h,i,j,k,l,m,n,o,p,q,r,s;if(!(a.nodeType===3||a.nodeType===8||!c||!d||!(h=f._data(a)))){d.handler&&(p=d,d=p.handler),d.guid||(d.guid=f.guid++),j=h.events,j||(h.events=j={}),i=h.handle,i||(h.handle=i=function(a){return typeof f!="undefined"&&(!a||f.event.triggered!==a.type)?f.event.dispatch.apply(i.elem,arguments):b},i.elem=a),c=f.trim(I(c)).split(" ");for(k=0;k=0&&(h=h.slice(0,-1),k=!0),h.indexOf(".")>=0&&(i=h.split("."),h=i.shift(),i.sort());if((!e||f.event.customEvent[h])&&!f.event.global[h])return;c=typeof c=="object"?c[f.expando]?c:new f.Event(h,c):new f.Event(h),c.type=h,c.isTrigger=!0,c.exclusive=k,c.namespace=i.join("."),c.namespace_re=c.namespace?new RegExp("(^|\\.)"+i.join("\\.(?:.*\\.)?")+"(\\.|$)"):null,o=h.indexOf(":")<0?"on"+h:"";if(!e){j=f.cache;for(l in j)j[l].events&&j[l].events[h]&&f.event.trigger(c,d,j[l].handle.elem,!0);return}c.result=b,c.target||(c.target=e),d=d!=null?f.makeArray(d):[],d.unshift(c),p=f.event.special[h]||{};if(p.trigger&&p.trigger.apply(e,d)===!1)return;r=[[e,p.bindType||h]];if(!g&&!p.noBubble&&!f.isWindow(e)){s=p.delegateType||h,m=E.test(s+h)?e:e.parentNode,n=null;for(;m;m=m.parentNode)r.push([m,s]),n=m;n&&n===e.ownerDocument&&r.push([n.defaultView||n.parentWindow||a,s])}for(l=0;le&&i.push({elem:this,matches:d.slice(e)});for(j=0;j0?this.on(b,null,a,c):this.trigger(b)},f.attrFn&&(f.attrFn[b]=!0),C.test(b)&&(f.event.fixHooks[b]=f.event.keyHooks),D.test(b)&&(f.event.fixHooks[b]=f.event.mouseHooks)}),function(){function x(a,b,c,e,f,g){for(var h=0,i=e.length;h0){k=j;break}}j=j[a]}e[h]=k}}}function w(a,b,c,e,f,g){for(var h=0,i=e.length;h+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,d="sizcache"+(Math.random()+"").replace(".",""),e=0,g=Object.prototype.toString,h=!1,i=!0,j=/\\/g,k=/\r\n/g,l=/\W/;[0,0].sort(function(){i=!1;return 0});var m=function(b,d,e,f){e=e||[],d=d||c;var h=d;if(d.nodeType!==1&&d.nodeType!==9)return[];if(!b||typeof b!="string")return e;var i,j,k,l,n,q,r,t,u=!0,v=m.isXML(d),w=[],x=b;do{a.exec(""),i=a.exec(x);if(i){x=i[3],w.push(i[1]);if(i[2]){l=i[3];break}}}while(i);if(w.length>1&&p.exec(b))if(w.length===2&&o.relative[w[0]])j=y(w[0]+w[1],d,f);else{j=o.relative[w[0]]?[d]:m(w.shift(),d);while(w.length)b=w.shift(),o.relative[b]&&(b+=w.shift()),j=y(b,j,f)}else{!f&&w.length>1&&d.nodeType===9&&!v&&o.match.ID.test(w[0])&&!o.match.ID.test(w[w.length-1])&&(n=m.find(w.shift(),d,v),d=n.expr?m.filter(n.expr,n.set)[0]:n.set[0]);if(d){n=f?{expr:w.pop(),set:s(f)}:m.find(w.pop(),w.length===1&&(w[0]==="~"||w[0]==="+")&&d.parentNode?d.parentNode:d,v),j=n.expr?m.filter(n.expr,n.set):n.set,w.length>0?k=s(j):u=!1;while(w.length)q=w.pop(),r=q,o.relative[q]?r=w.pop():q="",r==null&&(r=d),o.relative[q](k,r,v)}else k=w=[]}k||(k=j),k||m.error(q||b);if(g.call(k)==="[object Array]")if(!u)e.push.apply(e,k);else if(d&&d.nodeType===1)for(t=0;k[t]!=null;t++)k[t]&&(k[t]===!0||k[t].nodeType===1&&m.contains(d,k[t]))&&e.push(j[t]);else for(t=0;k[t]!=null;t++)k[t]&&k[t].nodeType===1&&e.push(j[t]);else s(k,e);l&&(m(l,h,e,f),m.uniqueSort(e));return e};m.uniqueSort=function(a){if(u){h=i,a.sort(u);if(h)for(var b=1;b0},m.find=function(a,b,c){var d,e,f,g,h,i;if(!a)return[];for(e=0,f=o.order.length;e":function(a,b){var c,d=typeof b=="string",e=0,f=a.length;if(d&&!l.test(b)){b=b.toLowerCase();for(;e=0)?c||d.push(h):c&&(b[g]=!1));return!1},ID:function(a){return a[1].replace(j,"")},TAG:function(a,b){return a[1].replace(j,"").toLowerCase()},CHILD:function(a){if(a[1]==="nth"){a[2]||m.error(a[0]),a[2]=a[2].replace(/^\+|\s*/g,"");var b=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2]==="even"&&"2n"||a[2]==="odd"&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0,a[3]=b[3]-0}else a[2]&&m.error(a[0]);a[0]=e++;return a},ATTR:function(a,b,c,d,e,f){var g=a[1]=a[1].replace(j,"");!f&&o.attrMap[g]&&(a[1]=o.attrMap[g]),a[4]=(a[4]||a[5]||"").replace(j,""),a[2]==="~="&&(a[4]=" "+a[4]+" ");return a},PSEUDO:function(b,c,d,e,f){if(b[1]==="not")if((a.exec(b[3])||"").length>1||/^\w/.test(b[3]))b[3]=m(b[3],null,null,c);else{var g=m.filter(b[3],c,d,!0^f);d||e.push.apply(e,g);return!1}else if(o.match.POS.test(b[0])||o.match.CHILD.test(b[0]))return!0;return b},POS:function(a){a.unshift(!0);return a}},filters:{enabled:function(a){return a.disabled===!1&&a.type!=="hidden"},disabled:function(a){return a.disabled===!0},checked:function(a){return a.checked===!0},selected:function(a){a.parentNode&&a.parentNode.selectedIndex;return a.selected===!0},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,b,c){return!!m(c[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){var b=a.getAttribute("type"),c=a.type;return a.nodeName.toLowerCase()==="input"&&"text"===c&&(b===c||b===null)},radio:function(a){return a.nodeName.toLowerCase()==="input"&&"radio"===a.type},checkbox:function(a){return a.nodeName.toLowerCase()==="input"&&"checkbox"===a.type},file:function(a){return a.nodeName.toLowerCase()==="input"&&"file"===a.type},password:function(a){return a.nodeName.toLowerCase()==="input"&&"password"===a.type},submit:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"submit"===a.type},image:function(a){return a.nodeName.toLowerCase()==="input"&&"image"===a.type},reset:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"reset"===a.type},button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&"button"===a.type||b==="button"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)},focus:function(a){return a===a.ownerDocument.activeElement}},setFilters:{first:function(a,b){return b===0},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return b%2===0},odd:function(a,b){return b%2===1},lt:function(a,b,c){return bc[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(a,b,c,d){var e=b[1],f=o.filters[e];if(f)return f(a,c,b,d);if(e==="contains")return(a.textContent||a.innerText||n([a])||"").indexOf(b[3])>=0;if(e==="not"){var g=b[3];for(var h=0,i=g.length;h=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||!!a.nodeName&&a.nodeName.toLowerCase()===b},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var c=b[1],d=m.attr?m.attr(a,c):o.attrHandle[c]?o.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];return d==null?f==="!=":!f&&m.attr?d!=null:f==="="?e===g:f==="*="?e.indexOf(g)>=0:f==="~="?(" "+e+" ").indexOf(g)>=0:g?f==="!="?e!==g:f==="^="?e.indexOf(g)===0:f==="$="?e.substr(e.length-g.length)===g:f==="|="?e===g||e.substr(0,g.length+1)===g+"-":!1:e&&d!==!1},POS:function(a,b,c,d){var e=b[2],f=o.setFilters[e];if(f)return f(a,c,b,d)}}},p=o.match.POS,q=function(a,b){return"\\"+(b-0+1)};for(var r in o.match)o.match[r]=new RegExp(o.match[r].source+/(?![^\[]*\])(?![^\(]*\))/.source),o.leftMatch[r]=new RegExp(/(^(?:.|\r|\n)*?)/.source+o.match[r].source.replace(/\\(\d+)/g,q));var s=function(a,b){a=Array.prototype.slice.call(a,0);if(b){b.push.apply(b,a);return b}return a};try{Array.prototype.slice.call(c.documentElement.childNodes,0)[0].nodeType}catch(t){s=function(a,b){var c=0,d=b||[];if(g.call(a)==="[object Array]")Array.prototype.push.apply(d,a);else if(typeof a.length=="number")for(var e=a.length;c",e.insertBefore(a,e.firstChild),c.getElementById(d)&&(o.find.ID=function(a,c,d){if(typeof c.getElementById!="undefined"&&!d){var e=c.getElementById(a[1]);return e?e.id===a[1]||typeof e.getAttributeNode!="undefined"&&e.getAttributeNode("id").nodeValue===a[1]?[e]:b:[]}},o.filter.ID=function(a,b){var c=typeof a.getAttributeNode!="undefined"&&a.getAttributeNode("id");return a.nodeType===1&&c&&c.nodeValue===b}),e.removeChild(a),e=a=null}(),function(){var a=c.createElement("div");a.appendChild(c.createComment("")),a.getElementsByTagName("*").length>0&&(o.find.TAG=function(a,b){var c=b.getElementsByTagName(a[1]);if(a[1]==="*"){var d=[];for(var e=0;c[e];e++)c[e].nodeType===1&&d.push(c[e]);c=d}return c}),a.innerHTML="",a.firstChild&&typeof a.firstChild.getAttribute!="undefined"&&a.firstChild.getAttribute("href")!=="#"&&(o.attrHandle.href=function(a){return a.getAttribute("href",2)}),a=null}(),c.querySelectorAll&&function(){var a=m,b=c.createElement("div"),d="__sizzle__";b.innerHTML="";if(!b.querySelectorAll||b.querySelectorAll(".TEST").length!==0){m=function(b,e,f,g){e=e||c;if(!g&&!m.isXML(e)){var h=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(h&&(e.nodeType===1||e.nodeType===9)){if(h[1])return s(e.getElementsByTagName(b),f);if(h[2]&&o.find.CLASS&&e.getElementsByClassName)return s(e.getElementsByClassName(h[2]),f)}if(e.nodeType===9){if(b==="body"&&e.body)return s([e.body],f);if(h&&h[3]){var i=e.getElementById(h[3]);if(!i||!i.parentNode)return s([],f);if(i.id===h[3])return s([i],f)}try{return s(e.querySelectorAll(b),f)}catch(j){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!=="object"){var k=e,l=e.getAttribute("id"),n=l||d,p=e.parentNode,q=/^\s*[+~]/.test(b);l?n=n.replace(/'/g,"\\$&"):e.setAttribute("id",n),q&&p&&(e=e.parentNode);try{if(!q||p)return s(e.querySelectorAll("[id='"+n+"'] "+b),f)}catch(r){}finally{l||k.removeAttribute("id")}}}return a(b,e,f,g)};for(var e in a)m[e]=a[e];b=null}}(),function(){var a=c.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector;if(b){var d=!b.call(c.createElement("div"),"div"),e=!1;try{b.call(c.documentElement,"[test!='']:sizzle")}catch(f){e=!0}m.matchesSelector=function(a,c){c=c.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!m.isXML(a))try{if(e||!o.match.PSEUDO.test(c)&&!/!=/.test(c)){var f=b.call(a,c);if(f||!d||a.document&&a.document.nodeType!==11)return f}}catch(g){}return m(c,null,null,[a]).length>0}}}(),function(){var a=c.createElement("div");a.innerHTML="";if(!!a.getElementsByClassName&&a.getElementsByClassName("e").length!==0){a.lastChild.className="e";if(a.getElementsByClassName("e").length===1)return;o.order.splice(1,0,"CLASS"),o.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!="undefined"&&!c)return b.getElementsByClassName(a[1])},a=null}}(),c.documentElement.contains?m.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:c.documentElement.compareDocumentPosition?m.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:m.contains=function(){return!1},m.isXML=function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!=="HTML":!1};var y=function(a,b,c){var d,e=[],f="",g=b.nodeType?[b]:b;while(d=o.match.PSEUDO.exec(a))f+=d[0],a=a.replace(o.match.PSEUDO,"");a=o.relative[a]?a+"*":a;for(var h=0,i=g.length;h0)for(h=g;h=0:f.filter(a,this).length>0:this.filter(a).length>0)},closest:function(a,b){var c=[],d,e,g=this[0];if(f.isArray(a)){var h=1;while(g&&g.ownerDocument&&g!==b){for(d=0;d-1:f.find.matchesSelector(g,a)){c.push(g);break}g=g.parentNode;if(!g||!g.ownerDocument||g===b||g.nodeType===11)break}}c=c.length>1?f.unique(c):c;return this.pushStack(c,"closest",a)},index:function(a){if(!a)return this[0]&&this[0].parentNode?this.prevAll().length:-1;if(typeof a=="string")return f.inArray(this[0],f(a));return f.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var c=typeof a=="string"?f(a,b):f.makeArray(a&&a.nodeType?[a]:a),d=f.merge(this.get(),c);return this.pushStack(S(c[0])||S(d[0])?d:f.unique(d))},andSelf:function(){return this.add(this.prevObject)}}),f.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return f.dir(a,"parentNode")},parentsUntil:function(a,b,c){return f.dir(a,"parentNode",c)},next:function(a){return f.nth(a,2,"nextSibling")},prev:function(a){return f.nth(a,2,"previousSibling")},nextAll:function(a){return f.dir(a,"nextSibling")},prevAll:function(a){return f.dir(a,"previousSibling")},nextUntil:function(a,b,c){return f.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return f.dir(a,"previousSibling",c)},siblings:function(a){return f.sibling(a.parentNode.firstChild,a)},children:function(a){return f.sibling(a.firstChild)},contents:function(a){return f.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:f.makeArray(a.childNodes)}},function(a,b){f.fn[a]=function(c,d){var e=f.map(this,b,c);L.test(a)||(d=c),d&&typeof d=="string"&&(e=f.filter(d,e)),e=this.length>1&&!R[a]?f.unique(e):e,(this.length>1||N.test(d))&&M.test(a)&&(e=e.reverse());return this.pushStack(e,a,P.call(arguments).join(","))}}),f.extend({filter:function(a,b,c){c&&(a=":not("+a+")");return b.length===1?f.find.matchesSelector(b[0],a)?[b[0]]:[]:f.find.matches(a,b)},dir:function(a,c,d){var e=[],g=a[c];while(g&&g.nodeType!==9&&(d===b||g.nodeType!==1||!f(g).is(d)))g.nodeType===1&&e.push(g),g=g[c];return e},nth:function(a,b,c,d){b=b||1;var e=0;for(;a;a=a[c])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var V="abbr|article|aside|audio|canvas|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",W=/ jQuery\d+="(?:\d+|null)"/g,X=/^\s+/,Y=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,Z=/<([\w:]+)/,$=/",""],legend:[1,""],thead:[1,""],tr:[2,""],td:[3,""],col:[2,""],area:[1,""],_default:[0,"",""]},bh=U(c);bg.optgroup=bg.option,bg.tbody=bg.tfoot=bg.colgroup=bg.caption=bg.thead,bg.th=bg.td,f.support.htmlSerialize||(bg._default=[1,"div","
"]),f.fn.extend({text:function(a){if(f.isFunction(a))return this.each(function(b){var c=f(this);c.text(a.call(this,b,c.text()))});if(typeof a!="object"&&a!==b)return this.empty().append((this[0]&&this[0].ownerDocument||c).createTextNode(a));return f.text(this)},wrapAll:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapAll(a.call(this,b))});if(this[0]){var b=f(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapInner(a.call(this,b))});return this.each(function(){var b=f(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=f.isFunction(a);return this.each(function(c){f(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){f.nodeName(this,"body")||f(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=f.clean(arguments);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,f.clean(arguments));return a}},remove:function(a,b){for(var c=0,d;(d=this[c])!=null;c++)if(!a||f.filter(a,[d]).length)!b&&d.nodeType===1&&(f.cleanData(d.getElementsByTagName("*")),f.cleanData([d])),d.parentNode&&d.parentNode.removeChild(d);return this},empty:function()
4 | {for(var a=0,b;(b=this[a])!=null;a++){b.nodeType===1&&f.cleanData(b.getElementsByTagName("*"));while(b.firstChild)b.removeChild(b.firstChild)}return this},clone:function(a,b){a=a==null?!1:a,b=b==null?a:b;return this.map(function(){return f.clone(this,a,b)})},html:function(a){if(a===b)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(W,""):null;if(typeof a=="string"&&!ba.test(a)&&(f.support.leadingWhitespace||!X.test(a))&&!bg[(Z.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Y,"<$1>$2>");try{for(var c=0,d=this.length;c1&&l0?this.clone(!0):this).get();f(e[h])[b](j),d=d.concat(j)}return this.pushStack(d,a,e.selector)}}),f.extend({clone:function(a,b,c){var d,e,g,h=f.support.html5Clone||!bc.test("<"+a.nodeName)?a.cloneNode(!0):bo(a);if((!f.support.noCloneEvent||!f.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!f.isXMLDoc(a)){bk(a,h),d=bl(a),e=bl(h);for(g=0;d[g];++g)e[g]&&bk(d[g],e[g])}if(b){bj(a,h);if(c){d=bl(a),e=bl(h);for(g=0;d[g];++g)bj(d[g],e[g])}}d=e=null;return h},clean:function(a,b,d,e){var g;b=b||c,typeof b.createElement=="undefined"&&(b=b.ownerDocument||b[0]&&b[0].ownerDocument||c);var h=[],i;for(var j=0,k;(k=a[j])!=null;j++){typeof k=="number"&&(k+="");if(!k)continue;if(typeof k=="string")if(!_.test(k))k=b.createTextNode(k);else{k=k.replace(Y,"<$1>$2>");var l=(Z.exec(k)||["",""])[1].toLowerCase(),m=bg[l]||bg._default,n=m[0],o=b.createElement("div");b===c?bh.appendChild(o):U(b).appendChild(o),o.innerHTML=m[1]+k+m[2];while(n--)o=o.lastChild;if(!f.support.tbody){var p=$.test(k),q=l==="table"&&!p?o.firstChild&&o.firstChild.childNodes:m[1]===""&&!p?o.childNodes:[];for(i=q.length-1;i>=0;--i)f.nodeName(q[i],"tbody")&&!q[i].childNodes.length&&q[i].parentNode.removeChild(q[i])}!f.support.leadingWhitespace&&X.test(k)&&o.insertBefore(b.createTextNode(X.exec(k)[0]),o.firstChild),k=o.childNodes}var r;if(!f.support.appendChecked)if(k[0]&&typeof (r=k.length)=="number")for(i=0;i=0)return b+"px"}}}),f.support.opacity||(f.cssHooks.opacity={get:function(a,b){return br.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=f.isNumeric(b)?"alpha(opacity="+b*100+")":"",g=d&&d.filter||c.filter||"";c.zoom=1;if(b>=1&&f.trim(g.replace(bq,""))===""){c.removeAttribute("filter");if(d&&!d.filter)return}c.filter=bq.test(g)?g.replace(bq,e):g+" "+e}}),f(function(){f.support.reliableMarginRight||(f.cssHooks.marginRight={get:function(a,b){var c;f.swap(a,{display:"inline-block"},function(){b?c=bz(a,"margin-right","marginRight"):c=a.style.marginRight});return c}})}),c.defaultView&&c.defaultView.getComputedStyle&&(bA=function(a,b){var c,d,e;b=b.replace(bs,"-$1").toLowerCase(),(d=a.ownerDocument.defaultView)&&(e=d.getComputedStyle(a,null))&&(c=e.getPropertyValue(b),c===""&&!f.contains(a.ownerDocument.documentElement,a)&&(c=f.style(a,b)));return c}),c.documentElement.currentStyle&&(bB=function(a,b){var c,d,e,f=a.currentStyle&&a.currentStyle[b],g=a.style;f===null&&g&&(e=g[b])&&(f=e),!bt.test(f)&&bu.test(f)&&(c=g.left,d=a.runtimeStyle&&a.runtimeStyle.left,d&&(a.runtimeStyle.left=a.currentStyle.left),g.left=b==="fontSize"?"1em":f||0,f=g.pixelLeft+"px",g.left=c,d&&(a.runtimeStyle.left=d));return f===""?"auto":f}),bz=bA||bB,f.expr&&f.expr.filters&&(f.expr.filters.hidden=function(a){var b=a.offsetWidth,c=a.offsetHeight;return b===0&&c===0||!f.support.reliableHiddenOffsets&&(a.style&&a.style.display||f.css(a,"display"))==="none"},f.expr.filters.visible=function(a){return!f.expr.filters.hidden(a)});var bD=/%20/g,bE=/\[\]$/,bF=/\r?\n/g,bG=/#.*$/,bH=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,bI=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bJ=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,bK=/^(?:GET|HEAD)$/,bL=/^\/\//,bM=/\?/,bN=/