├── .gitignore ├── LICENSE ├── README.md ├── _config.yml ├── css ├── font │ ├── fontawesome-webfont.eot │ ├── fontawesome-webfont.svg │ ├── fontawesome-webfont.ttf │ └── fontawesome-webfont.woff └── style.css ├── fancybox ├── blank.gif ├── fancybox_loading.gif ├── fancybox_overlay.png ├── fancybox_sprite.png ├── jquery.fancybox.css └── jquery.fancybox.pack.js ├── js ├── gallery.js ├── jquery.imagesloaded.min.js └── moment.min.js ├── languages ├── default.yml ├── ru.yml ├── zh-CN.yml └── zh-TW.yml ├── layout ├── _partial │ ├── after_footer.ejs │ ├── archive.ejs │ ├── article.ejs │ ├── bighomepage.ejs │ ├── comment.ejs │ ├── footer.ejs │ ├── google_analytics.ejs │ ├── head.ejs │ ├── header.ejs │ ├── pagination.ejs │ ├── post │ │ ├── category.ejs │ │ ├── gallery.ejs │ │ ├── share.ejs │ │ ├── tag.ejs │ │ └── title.ejs │ ├── sidebar.ejs │ └── tag.ejs ├── _widget │ ├── category.ejs │ ├── recent_posts.ejs │ ├── search.ejs │ ├── tag.ejs │ └── tagcloud.ejs ├── archive.ejs ├── category.ejs ├── index.ejs ├── layout.ejs ├── page.ejs ├── post.ejs └── tag.ejs └── source ├── css ├── _base │ ├── layout.styl │ ├── utils.styl │ └── variable.styl ├── _partial │ ├── archive.styl │ ├── article.styl │ ├── comment.styl │ ├── footer.styl │ ├── header.styl │ ├── index.styl │ ├── sidebar.styl │ └── syntax.styl ├── animate.css ├── font │ ├── fontawesome-webfont.eot │ ├── fontawesome-webfont.svg │ ├── fontawesome-webfont.ttf │ └── fontawesome-webfont.woff └── style.styl ├── fancybox ├── blank.gif ├── fancybox_loading.gif ├── fancybox_overlay.png ├── fancybox_sprite.png ├── jquery.fancybox.css └── jquery.fancybox.pack.js ├── js ├── excanvas.js ├── gallery.js ├── headroom.min.and.gallery.js ├── headroom.min.js ├── jquery-2.0.3.min.js ├── jquery-2.0.3.min.map ├── jquery.imagesloaded.min.js ├── jquery.tagcanvas.min.js ├── pangu.js └── twitter.js └── robots.txt /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | *.swp 3 | *.swo 4 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2013 Thiago Pontes 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 4 | 5 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 6 | 7 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Persona Color 2 | 3 | Theme for [Hexo]. 4 | 5 | [Demo] 6 | 7 | ![4 color schemes](http://ww3.sinaimg.cn/large/66cab368gw1ed07yp2yjfj21400mi7a2.jpg) 8 | 9 | You can edit the color schemes in `themes/persona-color/source/css/_base/variable.styl` 10 | 11 | ## Install 12 | 13 | Execute the following command and modify `theme` in `_config.yml` to `persona-color`. 14 | 15 | ``` 16 | git clone git://github.com/heruoxin/hexo-persona-color.git themes/persona-color 17 | ``` 18 | 19 | ## Update 20 | 21 | Execute the following command to update Persona Color. 22 | 23 | ``` 24 | cd themes/persona-color 25 | git pull 26 | ``` 27 | 28 | ## Config 29 | 30 | Default config: 31 | 32 | ``` 33 | 34 | photo: /icon.jpg 35 | 36 | email: 37 | twitter: 38 | facebook: 39 | googleplus: 40 | github: 41 | pinterest: 42 | linkedin: 43 | instagram: 44 | zhihu: 45 | weibo: 46 | renren: 47 | 48 | addthis: 49 | enable: false 50 | pubid: 51 | facebook: true 52 | twitter: true 53 | google: true 54 | pinterest: true 55 | 56 | fancybox: true 57 | bighomepage: true 58 | usecdn: true 59 | 60 | google_analytics: 61 | rss: /atom.xml 62 | ``` 63 | 64 | - **photo** - Your Photo. The best size is 340x340. 65 | - **twitter** - Your twitter username,will show on the sidebar (Desktop view) or the header (Mobile view). 66 | - **facebook and etc.** - Same as twitter. 67 | - **addthis** - Share buttons at the buttom of articles (Powered by [AddThis]). 68 | - **enable** - Enable share buttons (true/false). 69 | - **pubid** - Profile ID of [AddThis]. 70 | - **facebook** - Enable Facebook button. 71 | - **twitter** - Enable Twitter button. 72 | - **google** - Enable Google+ button. 73 | - **pinterest** - Enable Pinterest button. 74 | - **fancybox** - Enable [Fancybox] 75 | - **bighomepage** - Using html5 history.pushState API to get better user experience. But may slow down the homepage. 76 | - **usecdn** - Using CNDJS and some other CDN to improve a few loading speed. You can disable it if your web server is fast. 77 | - **google_analytics** - Google Analytics ID(example: UA-xxxxxxxx-x) 78 | - **rss** - RSS subscription link (change if using Feedburner) 79 | 80 | 81 | [Hexo]: http://zespia.tw/hexo/ 82 | [Demo]: http://1ittlecup.com/ 83 | [AddThis]: https://www.addthis.com 84 | [Fancybox]: http://fancyapps.com/fancybox/ 85 | -------------------------------------------------------------------------------- /_config.yml: -------------------------------------------------------------------------------- 1 | #You can eidt the color scheme in source/css/_base/variable.styl 2 | 3 | photo: /icon.jpg 4 | 5 | email: 6 | twitter: 1ittlecup 7 | facebook: 8 | googleplus: "+RuoxinHe" 9 | github: 10 | pinterest: 11 | linkedin: 12 | instagram: 13 | zhihu: 1ittlecup 14 | weibo: 15 | renren: 16 | 17 | 18 | addthis: 19 | enable: false 20 | pubid: 21 | facebook: true 22 | twitter: true 23 | google: true 24 | pinterest: true 25 | 26 | fancybox: true 27 | 28 | # 29 | bighomepage: true 30 | 31 | #Use cdnjs' CDN 32 | usecdn: false 33 | 34 | google_analytics: UA-46393541-1 35 | rss: /atom.xml 36 | 37 | forvirgo: true 38 | -------------------------------------------------------------------------------- /css/font/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heruoxin/hexo-persona-color/394e6dd0cefec782df584be0bc99164fc053f260/css/font/fontawesome-webfont.eot -------------------------------------------------------------------------------- /css/font/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heruoxin/hexo-persona-color/394e6dd0cefec782df584be0bc99164fc053f260/css/font/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /css/font/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heruoxin/hexo-persona-color/394e6dd0cefec782df584be0bc99164fc053f260/css/font/fontawesome-webfont.woff -------------------------------------------------------------------------------- /css/style.css: -------------------------------------------------------------------------------- 1 | @import url("//fonts.googleapis.com/css?family=Lato:400,400italic"); 2 | @font-face { 3 | font-family: 'FontAwesome'; 4 | font-style: normal; 5 | font-weight: normal; 6 | src: url("font/fontawesome-webfont.eot?#iefix") format('embedded-opentype'), url("font/fontawesome-webfont.woff") format('woff'), url("font/fontawesome-webfont.ttf") format('truetype'), url("font/fontawesome-webfont.svg#FontAwesomeRegular") format('svg'); 7 | } 8 | .depth { 9 | color: #444; 10 | text-shadow: 0px 2px 3px rgba(3,3,3,0.5); 11 | } 12 | * { 13 | margin: 0; 14 | padding: 0; 15 | } 16 | body { 17 | background: #1f1f1f; 18 | color: #444; 19 | font-family: "Helvetica Neue", "Helvetica", Arial, sans-serif; 20 | font-size: 14px; 21 | text-shadow: 0 0 1px transparent; 22 | } 23 | @media screen and (max-width: 1260px) { 24 | body { 25 | margin: 0 30px; 26 | } 27 | } 28 | @media screen and (max-width: 600px) { 29 | body { 30 | font-size: 13px; 31 | } 32 | } 33 | h1, 34 | h2, 35 | h3, 36 | h4, 37 | h5, 38 | h6 { 39 | font-family: "Lato", Helvetica Neue, Helvetica, Arial, sans-serif; 40 | } 41 | h1 { 42 | font-size: 1.8em; 43 | } 44 | h2 { 45 | font-size: 1.5em; 46 | } 47 | h3 { 48 | font-size: 1.3em; 49 | } 50 | a { 51 | text-decoration: none; 52 | color: #444; 53 | } 54 | a:hover { 55 | text-decoration: underline; 56 | } 57 | .alignleft { 58 | float: left; 59 | } 60 | .alignright { 61 | float: right; 62 | } 63 | .clearfix { 64 | zoom: 1; 65 | } 66 | .clearfix:before, 67 | .clearfix:after { 68 | content: ""; 69 | display: table; 70 | } 71 | .clearfix:after { 72 | clear: both; 73 | } 74 | .inner { 75 | width: 1200px; 76 | margin: 0 auto; 77 | } 78 | @media screen and (max-width: 1260px) { 79 | .inner { 80 | width: 100%; 81 | } 82 | } 83 | #main-col { 84 | width: 900px; 85 | overflow: auto; 86 | } 87 | @media screen and (max-width: 1260px) { 88 | #main-col { 89 | width: 100%; 90 | margin-right: -300px; 91 | } 92 | } 93 | @media screen and (max-width: 900px) { 94 | #main-col { 95 | margin-right: 0; 96 | float: none; 97 | } 98 | } 99 | @media screen and (max-width: 1260px) { 100 | #wrapper { 101 | margin-right: 300px; 102 | } 103 | } 104 | @media screen and (max-width: 900px) { 105 | #wrapper { 106 | margin-right: 0; 107 | } 108 | } 109 | #header { 110 | text-shadow: 0 0 1px #fff; 111 | margin: 50px auto; 112 | } 113 | #header a { 114 | color: #999; 115 | } 116 | #header a:hover { 117 | color: #444; 118 | text-decoration: none; 119 | } 120 | #header h1 { 121 | font-weight: normal; 122 | font-size: 2.5em; 123 | line-height: 1; 124 | } 125 | #header h2 { 126 | font-weight: normal; 127 | font-size: 0.9em; 128 | line-height: 1; 129 | margin-top: 10px; 130 | } 131 | #header #main-nav { 132 | font-family: "Lato", Helvetica Neue, Helvetica, Arial, sans-serif; 133 | line-height: 2.5em; 134 | } 135 | #header #main-nav ul { 136 | list-style: none; 137 | } 138 | #header #main-nav ul li { 139 | float: left; 140 | margin-left: 30px; 141 | } 142 | article.page { 143 | padding-left: 20px; 144 | } 145 | article.page .icon { 146 | display: none; 147 | } 148 | article.post .icon:before { 149 | content: '\f016'; 150 | } 151 | article.photo .icon:before { 152 | content: '\f030'; 153 | } 154 | article.link .icon:before { 155 | content: '\f0c1'; 156 | } 157 | article.link .title a:after { 158 | content: '\f08e'; 159 | color: #999; 160 | font: 12px FontAwesome; 161 | padding-left: 10px; 162 | vertical-align: super; 163 | } 164 | article .time { 165 | position: relative; 166 | font-size: 1.2em; 167 | display: inline; 168 | top: 5px; 169 | float: right; 170 | } 171 | article .post-content { 172 | padding: 10px 10px 10px 67px; 173 | margin-bottom: 50px; 174 | position: relative; 175 | } 176 | @media screen and (max-width: 600px) { 177 | article .post-content { 178 | padding-left: 20px; 179 | } 180 | } 181 | article .gallery { 182 | overflow: hidden; 183 | position: relative; 184 | } 185 | article .gallery:hover .control { 186 | opacity: 1; 187 | -ms-filter: none; 188 | filter: none; 189 | } 190 | article .gallery img { 191 | min-width: 100%; 192 | max-width: 100%; 193 | height: auto; 194 | position: absolute; 195 | top: 0; 196 | left: 0; 197 | opacity: 0; 198 | filter: alpha(opacity=0); 199 | -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)"; 200 | } 201 | article .gallery .control { 202 | opacity: 0; 203 | filter: alpha(opacity=0); 204 | -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)"; 205 | -webkit-transition: 0.3s; 206 | -moz-transition: 0.3s; 207 | -o-transition: 0.3s; 208 | -ms-transition: 0.3s; 209 | transition: 0.3s; 210 | } 211 | article .gallery .prev, 212 | article .gallery .next { 213 | position: absolute; 214 | top: 0; 215 | width: 50%; 216 | height: 100%; 217 | cursor: pointer; 218 | } 219 | article .gallery .prev:before, 220 | article .gallery .next:before { 221 | position: absolute; 222 | font: 24px/1 FontAwesome; 223 | text-align: center; 224 | width: 24px; 225 | text-shadow: 0 0 15px rgba(0,0,0,0.5); 226 | color: #fff; 227 | margin-top: -12px; 228 | top: 50%; 229 | } 230 | article .gallery .prev { 231 | left: 0; 232 | } 233 | article .gallery .prev:before { 234 | content: '\f053'; 235 | left: 10px; 236 | } 237 | article .gallery .next { 238 | right: 0; 239 | } 240 | article .gallery .next:before { 241 | content: '\f054'; 242 | right: 10px; 243 | } 244 | article header .icon { 245 | width: 22px; 246 | height: 22px; 247 | margin-right: 25px; 248 | position: absolute; 249 | top: 16px; 250 | left: 20px; 251 | color: #469632; 252 | } 253 | article header .icon:hover { 254 | color: #444; 255 | text-decoration: none; 256 | } 257 | @media screen and (max-width: 600px) { 258 | article header .icon { 259 | display: none; 260 | } 261 | } 262 | article header .icon:before { 263 | position: absolute; 264 | font: 25px FontAwesome; 265 | top: 0; 266 | left: 0; 267 | width: 32px; 268 | text-align: center; 269 | } 270 | article header time { 271 | color: #999; 272 | font: 0.9em "Lato", Helvetica Neue, Helvetica, Arial, sans-serif; 273 | margin-bottom: 5px; 274 | display: block; 275 | line-height: 1; 276 | } 277 | article header .title { 278 | font-weight: normal; 279 | display: inline; 280 | color: #469632; 281 | } 282 | article header .title a { 283 | color: #469632; 284 | } 285 | article header .title a:hover { 286 | color: #444; 287 | text-decoration: none; 288 | } 289 | article .entry { 290 | text-align: justify; 291 | line-height: 1.6; 292 | font-size: 1.3em; 293 | } 294 | article .entry p, 295 | article .entry blockquote, 296 | article .entry ul, 297 | article .entry ol, 298 | article .entry dl, 299 | article .entry table, 300 | article .entry iframe, 301 | article .entry h3, 302 | article .entry h4, 303 | article .entry h5, 304 | article .entry h6, 305 | article .entry .video-container { 306 | margin-top: 15px; 307 | } 308 | article .entry blockquote { 309 | border-top: 1px solid #292929; 310 | border-bottom: 1px solid #292929; 311 | font-style: italic; 312 | font-family: "Georgia", serif; 313 | font-size: 1.2em; 314 | padding: 0 30px 15px; 315 | text-align: center; 316 | } 317 | article .entry blockquote footer { 318 | border-top: none; 319 | font-size: 0.8em; 320 | line-height: 1; 321 | margin: 20px 0 0; 322 | padding-top: 0; 323 | } 324 | article .entry blockquote footer cite:before { 325 | content: '—'; 326 | color: #ccc; 327 | padding: 0 0.5em; 328 | } 329 | article .entry code, 330 | article .entry pre { 331 | font-family: Monaco, Menlo, Consolas, Courier New, monospace; 332 | } 333 | article .entry code { 334 | background: #eee; 335 | color: #666; 336 | padding: 0 5px; 337 | margin: 0 2px; 338 | font-size: 0.9em; 339 | border: 1px solid #292929; 340 | -webkit-border-radius: 3px; 341 | border-radius: 3px; 342 | } 343 | article .entry pre { 344 | background: #eee; 345 | border: 1px solid #292929; 346 | margin-top: 15px; 347 | overflow: auto; 348 | padding: 7px 15px; 349 | -webkit-border-radius: 2px; 350 | border-radius: 2px; 351 | } 352 | article .entry pre code { 353 | background: none; 354 | padding: 0; 355 | margin: 0; 356 | border: none; 357 | -webkit-border-radius: 0; 358 | border-radius: 0; 359 | } 360 | article .entry ul, 361 | article .entry ol, 362 | article .entry dl { 363 | margin-left: 20px; 364 | } 365 | article .entry ul ul, 366 | article .entry ol ul, 367 | article .entry dl ul, 368 | article .entry ul ol, 369 | article .entry ol ol, 370 | article .entry dl ol, 371 | article .entry ul dl, 372 | article .entry ol dl, 373 | article .entry dl dl { 374 | margin-top: 0; 375 | } 376 | article .entry h1, 377 | article .entry h2 { 378 | font-weight: normal; 379 | border-bottom: 1px solid #292929; 380 | padding-bottom: 10px; 381 | margin-top: 20px; 382 | } 383 | article .entry h3, 384 | article .entry h4, 385 | article .entry h5, 386 | article .entry h6 { 387 | font-weight: normal; 388 | } 389 | article .entry img, 390 | article .entry video { 391 | max-width: 100%; 392 | height: auto; 393 | border: none; 394 | } 395 | article .entry iframe { 396 | border: none; 397 | } 398 | article .entry .caption { 399 | display: block; 400 | margin-top: 5px; 401 | color: #999; 402 | position: relative; 403 | font-size: 0.9em; 404 | padding-left: 25px; 405 | } 406 | article .entry .caption:before { 407 | content: '\f040'; 408 | position: absolute; 409 | font: 1.3em FontAwesome; 410 | position: absolute; 411 | left: 0; 412 | top: 3px; 413 | } 414 | article .entry .video-container { 415 | position: relative; 416 | padding-bottom: 56.25%; 417 | padding-top: 30px; 418 | height: 0; 419 | overflow: hidden; 420 | } 421 | article .entry .video-container iframe, 422 | article .entry .video-container object, 423 | article .entry .video-container embed { 424 | position: absolute; 425 | top: 0; 426 | left: 0; 427 | width: 100%; 428 | height: 100%; 429 | margin-top: 0; 430 | } 431 | article .entry .pullquote { 432 | float: right; 433 | border: none; 434 | padding: 0; 435 | margin: 1em 0 0.5em 1.5em; 436 | text-align: left; 437 | width: 45%; 438 | font-size: 1.5em; 439 | } 440 | article footer { 441 | margin-top: 15px; 442 | padding-top: 10px; 443 | border-top: 1px solid #292929; 444 | color: #999; 445 | font-size: 0.9em; 446 | line-height: 16px; 447 | position: relative; 448 | min-height: 16px; 449 | } 450 | article footer a { 451 | color: #999; 452 | } 453 | article footer a:hover { 454 | color: #444; 455 | text-decoration: none; 456 | } 457 | article footer a:before { 458 | font: 1.1em FontAwesome; 459 | padding-right: 10px; 460 | vertical-align: middle; 461 | } 462 | article footer a.more-link:before { 463 | content: '\f054'; 464 | } 465 | article footer a.comment-link:before { 466 | content: '\f075'; 467 | } 468 | article footer .categories, 469 | article footer .tags { 470 | position: relative; 471 | padding-left: 25px; 472 | margin: 5px 0; 473 | } 474 | article footer .categories:before, 475 | article footer .tags:before { 476 | position: absolute; 477 | font: 1.1em FontAwesome; 478 | } 479 | article footer .categories:before { 480 | content: '\f07b'; 481 | top: 2px; 482 | left: 1px; 483 | } 484 | article footer .tags:before { 485 | content: '\f02b'; 486 | top: 3px; 487 | left: 2px; 488 | } 489 | article footer .addthis { 490 | margin-top: 15px; 491 | } 492 | article footer .addthis iframe { 493 | margin-top: 0; 494 | } 495 | #comment { 496 | padding: 20px; 497 | background: #fff; 498 | -webkit-box-shadow: 1px 2px 3px #ddd; 499 | box-shadow: 1px 2px 3px #ddd; 500 | margin-bottom: 50px; 501 | } 502 | #comment .title { 503 | font-weight: normal; 504 | margin-bottom: 15px; 505 | } 506 | #pagination a { 507 | display: block; 508 | padding: 5px 10px; 509 | background: #292929; 510 | color: #469632; 511 | font-family: "Lato", Helvetica Neue, Helvetica, Arial, sans-serif; 512 | text-shadow: 0 0 2px #333; 513 | margin-bottom: 50px; 514 | } 515 | #pagination a:hover { 516 | background: #469632; 517 | color: #fff; 518 | text-decoration: none; 519 | text-shadow: none; 520 | } 521 | #pagination .prev:before { 522 | content: '\f053'; 523 | padding-right: 10px; 524 | font-family: FontAwesome; 525 | } 526 | #pagination .next:after { 527 | content: '\f054'; 528 | padding-left: 10px; 529 | font-family: FontAwesome; 530 | } 531 | .archive-title { 532 | color: #999; 533 | font-weight: normal; 534 | margin-bottom: 30px; 535 | text-shadow: 0 0 1px #fff; 536 | } 537 | .archive-title:before { 538 | font-family: FontAwesome; 539 | content: '\f073'; 540 | padding-right: 15px; 541 | } 542 | .archive-title.tag:before { 543 | content: '\f02b'; 544 | } 545 | .archive-title.category:before { 546 | content: '\f07b'; 547 | } 548 | .archive { 549 | border-bottom: 1px solid #292929; 550 | margin-bottom: 20px; 551 | } 552 | .archive article { 553 | -webkit-box-shadow: none; 554 | box-shadow: none; 555 | } 556 | .archive article .post-content { 557 | margin-bottom: 0; 558 | } 559 | #sidebar { 560 | width: 0; 561 | line-height: 1.8em; 562 | position: fixed; 563 | right: 70%; 564 | top: 0; 565 | left: 0px; 566 | border-right: solid 1px #2d2d2d; 567 | height: 100%; 568 | background-color: #1f1f1f; 569 | background: -webkit-gradient(linear, left top, left bottom, color-stop(0, #1f1f1f), color-stop(1, #222)); 570 | background: -webkit-linear-gradient(top, #1f1f1f 0%, #222 100%); 571 | background: -moz-linear-gradient(top, #1f1f1f 0%, #222 100%); 572 | background: -o-linear-gradient(top, #1f1f1f 0%, #222 100%); 573 | background: -ms-linear-gradient(top, #1f1f1f 0%, #222 100%); 574 | background: linear-gradient(top, #1f1f1f 0%, #222 100%); 575 | -webkit-box-shadow: 1px 0 0 0 #222; 576 | box-shadow: 1px 0 0 0 #222; 577 | } 578 | @media screen and (max-width: 900px) { 579 | #sidebar { 580 | display: none; 581 | } 582 | } 583 | #sidebar .personal-info { 584 | color: #469632; 585 | position: relative; 586 | text-align: center; 587 | top: 5%; 588 | display: none; 589 | margin: 0 auto; 590 | max-width: 30%; 591 | } 592 | #sidebar .personal-info figure { 593 | border-bottom: solid 1px #001; 594 | } 595 | #sidebar .social { 596 | border-top: solid 1px #2d2d2d; 597 | width: 200px; 598 | } 599 | #sidebar .personal-photo { 600 | -webkit-border-radius: 150px; 601 | border-radius: 150px; 602 | height: 170px; 603 | width: 170px; 604 | } 605 | #sidebar .personal-name { 606 | font-size: 1.5em; 607 | } 608 | #sidebar .icon { 609 | position: relative; 610 | font: 1.1em FontAwesome; 611 | margin: 0 auto; 612 | padding: 10px; 613 | top: 25px; 614 | text-decoration: none; 615 | color: #444; 616 | font-size: 30px; 617 | } 618 | #sidebar .icon:hover { 619 | color: #469632; 620 | } 621 | #sidebar .github:before { 622 | content: "\f09b"; 623 | } 624 | #sidebar .facebook:before { 625 | content: "\f082"; 626 | } 627 | #sidebar .twitter:before { 628 | content: "\f081"; 629 | } 630 | #sidebar .email:before { 631 | content: "\f0e0"; 632 | } 633 | #sidebar .widget { 634 | background: #fff; 635 | -webkit-box-shadow: 1px 2px 3px #ddd; 636 | box-shadow: 1px 2px 3px #ddd; 637 | margin-bottom: 30px; 638 | word-wrap: break-word; 639 | } 640 | #sidebar .widget .title { 641 | padding: 15px 20px; 642 | font-size: 1em; 643 | border-bottom: 1px solid #292929; 644 | font-weight: normal; 645 | } 646 | #sidebar .widget .entry { 647 | font-size: 0.9em; 648 | padding: 15px 20px; 649 | } 650 | #sidebar .widget ul, 651 | #sidebar .widget ol, 652 | #sidebar .widget dl { 653 | list-style: none; 654 | } 655 | #sidebar .widget ul ul, 656 | #sidebar .widget ol ul, 657 | #sidebar .widget dl ul, 658 | #sidebar .widget ul ol, 659 | #sidebar .widget ol ol, 660 | #sidebar .widget dl ol, 661 | #sidebar .widget ul dl, 662 | #sidebar .widget ol dl, 663 | #sidebar .widget dl dl { 664 | list-style: disc; 665 | margin-left: 20px; 666 | } 667 | #sidebar .search { 668 | margin-bottom: 30px; 669 | } 670 | #sidebar .search input { 671 | background: #fff; 672 | font-family: "Lato", Helvetica Neue, Helvetica, Arial, sans-serif; 673 | font-style: italic; 674 | font-size: 1em; 675 | padding: 10px 15px; 676 | border: 1px solid #292929; 677 | width: 100%; 678 | -webkit-box-sizing: border-box; 679 | -moz-box-sizing: border-box; 680 | box-sizing: border-box; 681 | color: #999; 682 | } 683 | #sidebar .search input:focus { 684 | color: #444; 685 | } 686 | #sidebar .tag small { 687 | margin-left: 15px; 688 | color: #999; 689 | } 690 | #sidebar .tag small:before { 691 | content: '('; 692 | } 693 | #sidebar .tag small:after { 694 | content: ')'; 695 | } 696 | #sidebar .twitter li { 697 | border-bottom: 1px solid #292929; 698 | padding: 15px 20px; 699 | font-size: 0.9em; 700 | } 701 | #sidebar .twitter li:last-of-type { 702 | border-bottom: none; 703 | } 704 | #sidebar .twitter small { 705 | display: block; 706 | margin-top: 10px; 707 | color: #999; 708 | line-height: 1; 709 | } 710 | #sidebar .tagcloud .entry { 711 | padding-right: 5px; 712 | } 713 | #sidebar .tagcloud a { 714 | margin-right: 10px; 715 | display: inline-block; 716 | } 717 | #footer { 718 | color: #999; 719 | margin-bottom: 50px; 720 | font: 0.9em/1.6 "Lato", Helvetica Neue, Helvetica, Arial, sans-serif; 721 | text-shadow: 0 0 1px #fff; 722 | } 723 | .entry .gist { 724 | background: #eee; 725 | border: 1px solid #292929; 726 | margin-top: 15px; 727 | padding: 7px 15px; 728 | -webkit-border-radius: 2px; 729 | border-radius: 2px; 730 | text-shadow: 0 0 1px #fff; 731 | line-height: 1.6; 732 | overflow: auto; 733 | color: #666; 734 | } 735 | .entry .gist .gist-file { 736 | border: none; 737 | font-family: inherit; 738 | margin: 0; 739 | font-size: 0.9em; 740 | } 741 | .entry .gist .gist-file .gist-data { 742 | background: none; 743 | border-bottom: none; 744 | } 745 | .entry .gist .gist-file .gist-data pre { 746 | padding: 0 !important; 747 | font-family: Monaco, Menlo, Consolas, Courier New, monospace; 748 | } 749 | .entry .gist .gist-file .gist-meta { 750 | background: none; 751 | color: #999; 752 | margin-top: 5px; 753 | padding: 0; 754 | text-shadow: 0 0 1px #fff; 755 | font-size: 100%; 756 | } 757 | .entry .gist .gist-file .gist-meta a { 758 | color: #444; 759 | } 760 | .entry .gist .gist-file .gist-meta a:visited { 761 | color: #444; 762 | } 763 | figure.highlight { 764 | background: #eee; 765 | border: 1px solid #292929; 766 | margin-top: 15px; 767 | padding: 7px 15px; 768 | -webkit-border-radius: 2px; 769 | border-radius: 2px; 770 | text-shadow: 0 0 1px #fff; 771 | line-height: 1.6; 772 | overflow: auto; 773 | position: relative; 774 | font-size: 0.9em; 775 | } 776 | figure.highlight figcaption { 777 | color: #999; 778 | margin-bottom: 5px; 779 | text-shadow: 0 0 1px #fff; 780 | } 781 | figure.highlight figcaption a { 782 | position: absolute; 783 | right: 15px; 784 | } 785 | figure.highlight pre { 786 | border: none; 787 | padding: 0; 788 | margin: 0; 789 | } 790 | figure.highlight table { 791 | margin-top: 0; 792 | border-spacing: 0; 793 | } 794 | figure.highlight .gutter { 795 | color: #999; 796 | padding-right: 15px; 797 | border-right: 1px solid #292929; 798 | text-align: right; 799 | } 800 | figure.highlight .code { 801 | padding-left: 15px; 802 | border-left: 1px solid #fff; 803 | color: #666; 804 | } 805 | pre .comment, 806 | pre .template_comment, 807 | pre .diff .header, 808 | pre .doctype, 809 | pre .pi, 810 | pre .lisp .string, 811 | pre .javadoc { 812 | color: #93a1a1; 813 | font-style: italic; 814 | } 815 | pre .keyword, 816 | pre .winutils, 817 | pre .method, 818 | pre .addition, 819 | pre .css .tag, 820 | pre .request, 821 | pre .status, 822 | pre .nginx .title { 823 | color: #859900; 824 | } 825 | pre .number, 826 | pre .command, 827 | pre .string, 828 | pre .tag .value, 829 | pre .phpdoc, 830 | pre .tex .formula, 831 | pre .regexp, 832 | pre .hexcolor { 833 | color: #2aa198; 834 | } 835 | pre .title, 836 | pre .localvars, 837 | pre .chunk, 838 | pre .decorator, 839 | pre .built_in, 840 | pre .identifier, 841 | pre .vhdl, 842 | pre .literal, 843 | pre .id { 844 | color: #268bd2; 845 | } 846 | pre .attribute, 847 | pre .variable, 848 | pre .lisp .body, 849 | pre .smalltalk .number, 850 | pre .constant, 851 | pre .class .title, 852 | pre .parent, 853 | pre .haskell .type { 854 | color: #b58900; 855 | } 856 | pre .preprocessor, 857 | pre .preprocessor .keyword, 858 | pre .shebang, 859 | pre .symbol, 860 | pre .symbol .string, 861 | pre .diff .change, 862 | pre .special, 863 | pre .attr_selector, 864 | pre .important, 865 | pre .subst, 866 | pre .cdata, 867 | pre .clojure .title { 868 | color: #cb4b16; 869 | } 870 | pre .deletion { 871 | color: #dc322f; 872 | } 873 | -------------------------------------------------------------------------------- /fancybox/blank.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heruoxin/hexo-persona-color/394e6dd0cefec782df584be0bc99164fc053f260/fancybox/blank.gif -------------------------------------------------------------------------------- /fancybox/fancybox_loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heruoxin/hexo-persona-color/394e6dd0cefec782df584be0bc99164fc053f260/fancybox/fancybox_loading.gif -------------------------------------------------------------------------------- /fancybox/fancybox_overlay.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heruoxin/hexo-persona-color/394e6dd0cefec782df584be0bc99164fc053f260/fancybox/fancybox_overlay.png -------------------------------------------------------------------------------- /fancybox/fancybox_sprite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heruoxin/hexo-persona-color/394e6dd0cefec782df584be0bc99164fc053f260/fancybox/fancybox_sprite.png -------------------------------------------------------------------------------- /fancybox/jquery.fancybox.css: -------------------------------------------------------------------------------- 1 | /*! fancyBox v2.1.0 fancyapps.com | fancyapps.com/fancybox/#license */ 2 | .fancybox-wrap, 3 | .fancybox-skin, 4 | .fancybox-outer, 5 | .fancybox-inner, 6 | .fancybox-image, 7 | .fancybox-wrap iframe, 8 | .fancybox-wrap object, 9 | .fancybox-nav, 10 | .fancybox-nav span, 11 | .fancybox-tmp 12 | { 13 | padding: 0; 14 | margin: 0; 15 | border: 0; 16 | outline: none; 17 | vertical-align: top; 18 | } 19 | 20 | .fancybox-wrap { 21 | position: absolute; 22 | top: 0; 23 | left: 0; 24 | z-index: 8020; 25 | } 26 | 27 | .fancybox-skin { 28 | position: relative; 29 | background: #f9f9f9; 30 | color: #444; 31 | text-shadow: none; 32 | -webkit-border-radius: 4px; 33 | -moz-border-radius: 4px; 34 | border-radius: 4px; 35 | } 36 | 37 | .fancybox-opened { 38 | z-index: 8030; 39 | } 40 | 41 | .fancybox-opened .fancybox-skin { 42 | -webkit-box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5); 43 | -moz-box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5); 44 | box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5); 45 | } 46 | 47 | .fancybox-outer, .fancybox-inner { 48 | position: relative; 49 | } 50 | 51 | .fancybox-inner { 52 | overflow: hidden; 53 | } 54 | 55 | .fancybox-type-iframe .fancybox-inner { 56 | -webkit-overflow-scrolling: touch; 57 | } 58 | 59 | .fancybox-error { 60 | color: #444; 61 | font: 14px/20px "Helvetica Neue",Helvetica,Arial,sans-serif; 62 | margin: 0; 63 | padding: 15px; 64 | white-space: nowrap; 65 | } 66 | 67 | .fancybox-image, .fancybox-iframe { 68 | display: block; 69 | width: 100%; 70 | height: 100%; 71 | } 72 | 73 | .fancybox-image { 74 | max-width: 100%; 75 | max-height: 100%; 76 | } 77 | 78 | #fancybox-loading, .fancybox-close, .fancybox-prev span, .fancybox-next span { 79 | background-image: url('fancybox_sprite.png'); 80 | } 81 | 82 | #fancybox-loading { 83 | position: fixed; 84 | top: 50%; 85 | left: 50%; 86 | margin-top: -22px; 87 | margin-left: -22px; 88 | background-position: 0 -108px; 89 | opacity: 0.8; 90 | cursor: pointer; 91 | z-index: 8060; 92 | } 93 | 94 | #fancybox-loading div { 95 | width: 44px; 96 | height: 44px; 97 | background: url('fancybox_loading.gif') center center no-repeat; 98 | } 99 | 100 | .fancybox-close { 101 | position: absolute; 102 | top: -18px; 103 | right: -18px; 104 | width: 36px; 105 | height: 36px; 106 | cursor: pointer; 107 | z-index: 8040; 108 | } 109 | 110 | .fancybox-nav { 111 | position: absolute; 112 | top: 0; 113 | width: 40%; 114 | height: 100%; 115 | cursor: pointer; 116 | text-decoration: none; 117 | background: transparent url('blank.gif'); /* helps IE */ 118 | -webkit-tap-highlight-color: rgba(0,0,0,0); 119 | z-index: 8040; 120 | } 121 | 122 | .fancybox-prev { 123 | left: 0; 124 | } 125 | 126 | .fancybox-next { 127 | right: 0; 128 | } 129 | 130 | .fancybox-nav span { 131 | position: absolute; 132 | top: 50%; 133 | width: 36px; 134 | height: 34px; 135 | margin-top: -18px; 136 | cursor: pointer; 137 | z-index: 8040; 138 | visibility: hidden; 139 | } 140 | 141 | .fancybox-prev span { 142 | left: 10px; 143 | background-position: 0 -36px; 144 | } 145 | 146 | .fancybox-next span { 147 | right: 10px; 148 | background-position: 0 -72px; 149 | } 150 | 151 | .fancybox-nav:hover span { 152 | visibility: visible; 153 | } 154 | 155 | .fancybox-tmp { 156 | position: absolute; 157 | top: -9999px; 158 | left: -9999px; 159 | visibility: hidden; 160 | } 161 | 162 | /* Overlay helper */ 163 | 164 | .fancybox-lock { 165 | overflow: hidden; 166 | } 167 | 168 | .fancybox-overlay { 169 | position: absolute; 170 | top: 0; 171 | left: 0; 172 | overflow: hidden; 173 | display: none; 174 | z-index: 8010; 175 | background: url('fancybox_overlay.png'); 176 | } 177 | 178 | .fancybox-overlay-fixed { 179 | position: fixed; 180 | bottom: 0; 181 | right: 0; 182 | } 183 | 184 | .fancybox-lock .fancybox-overlay { 185 | overflow: auto; 186 | overflow-y: scroll; 187 | } 188 | 189 | /* Title helper */ 190 | 191 | .fancybox-title { 192 | visibility: hidden; 193 | font: normal 13px/20px "Helvetica Neue",Helvetica,Arial,sans-serif; 194 | position: relative; 195 | text-shadow: none; 196 | z-index: 8050; 197 | } 198 | 199 | .fancybox-opened .fancybox-title { 200 | visibility: visible; 201 | } 202 | 203 | .fancybox-title-float-wrap { 204 | position: absolute; 205 | bottom: 0; 206 | right: 50%; 207 | margin-bottom: -35px; 208 | z-index: 8050; 209 | text-align: center; 210 | } 211 | 212 | .fancybox-title-float-wrap .child { 213 | display: inline-block; 214 | margin-right: -100%; 215 | padding: 2px 20px; 216 | background: transparent; /* Fallback for web browsers that doesn't support RGBa */ 217 | background: rgba(0, 0, 0, 0.8); 218 | -webkit-border-radius: 15px; 219 | -moz-border-radius: 15px; 220 | border-radius: 15px; 221 | text-shadow: 0 1px 2px #222; 222 | color: #FFF; 223 | font-weight: bold; 224 | line-height: 24px; 225 | white-space: nowrap; 226 | } 227 | 228 | .fancybox-title-outside-wrap { 229 | position: relative; 230 | margin-top: 10px; 231 | color: #fff; 232 | } 233 | 234 | .fancybox-title-inside-wrap { 235 | padding-top: 10px; 236 | } 237 | 238 | .fancybox-title-over-wrap { 239 | position: absolute; 240 | bottom: 0; 241 | left: 0; 242 | color: #fff; 243 | padding: 10px; 244 | background: #000; 245 | background: rgba(0, 0, 0, .8); 246 | } -------------------------------------------------------------------------------- /fancybox/jquery.fancybox.pack.js: -------------------------------------------------------------------------------- 1 | /*! fancyBox v2.1.1 fancyapps.com | fancyapps.com/fancybox/#license */ 2 | (function(v,q,f,r){var p=f(v),n=f(q),b=f.fancybox=function(){b.open.apply(this,arguments)},A=null,m=q.createTouch!==r,y=function(a){return a&&a.hasOwnProperty&&a instanceof f},t=function(a){return a&&"string"===f.type(a)},D=function(a){return t(a)&&0
',image:'',iframe:'",error:'

The requested content cannot be loaded.
Please try again later.

',closeBtn:'',next:'',prev:''},openEffect:"fade",openSpeed:250,openEasing:"swing", 6 | openOpacity:!0,openMethod:"zoomIn",closeEffect:"fade",closeSpeed:250,closeEasing:"swing",closeOpacity:!0,closeMethod:"zoomOut",nextEffect:"elastic",nextSpeed:250,nextEasing:"swing",nextMethod:"changeIn",prevEffect:"elastic",prevSpeed:250,prevEasing:"swing",prevMethod:"changeOut",helpers:{overlay:!0,title:!0},onCancel:f.noop,beforeLoad:f.noop,afterLoad:f.noop,beforeShow:f.noop,afterShow:f.noop,beforeChange:f.noop,beforeClose:f.noop,afterClose:f.noop},group:{},opts:{},previous:null,coming:null,current:null, 7 | isActive:!1,isOpen:!1,isOpened:!1,wrap:null,skin:null,outer:null,inner:null,player:{timer:null,isActive:!1},ajaxLoad:null,imgPreload:null,transitions:{},helpers:{},open:function(a,d){if(a&&(f.isPlainObject(d)||(d={}),!1!==b.close(!0)))return f.isArray(a)||(a=y(a)?f(a).get():[a]),f.each(a,function(e,c){var j={},g,h,i,l,k;"object"===f.type(c)&&(c.nodeType&&(c=f(c)),y(c)?(j={href:c.data("fancybox-href")||c.attr("href"),title:c.data("fancybox-title")||c.attr("title"),isDom:!0,element:c},f.metadata&&f.extend(!0, 8 | j,c.metadata())):j=c);g=d.href||j.href||(t(c)?c:null);h=d.title!==r?d.title:j.title||"";l=(i=d.content||j.content)?"html":d.type||j.type;!l&&j.isDom&&(l=c.data("fancybox-type"),l||(l=(l=c.prop("class").match(/fancybox\.(\w+)/))?l[1]:null));t(g)&&(l||(b.isImage(g)?l="image":b.isSWF(g)?l="swf":"#"===g.charAt(0)?l="inline":t(c)&&(l="html",i=c)),"ajax"===l&&(k=g.split(/\s+/,2),g=k.shift(),k=k.shift()));i||("inline"===l?g?i=f(t(g)?g.replace(/.*(?=#[^\s]+$)/,""):g):j.isDom&&(i=c):"html"===l?i=g:!l&&(!g&& 9 | j.isDom)&&(l="inline",i=c));f.extend(j,{href:g,type:l,content:i,title:h,selector:k});a[e]=j}),b.opts=f.extend(!0,{},b.defaults,d),d.keys!==r&&(b.opts.keys=d.keys?f.extend({},b.defaults.keys,d.keys):!1),b.group=a,b._start(b.opts.index)},cancel:function(){var a=b.coming;a&&!1!==b.trigger("onCancel")&&(b.hideLoading(),b.ajaxLoad&&b.ajaxLoad.abort(),b.ajaxLoad=null,b.imgPreload&&(b.imgPreload.onload=b.imgPreload.onerror=null),a.wrap&&a.wrap.stop(!0).trigger("onReset").remove(),b.current||b.trigger("afterClose"), 10 | b.coming=null)},close:function(a){b.cancel();!1!==b.trigger("beforeClose")&&(b.unbindEvents(),!b.isOpen||!0===a?(f(".fancybox-wrap").stop(!0).trigger("onReset").remove(),b._afterZoomOut()):(b.isOpen=b.isOpened=!1,b.isClosing=!0,f(".fancybox-item, .fancybox-nav").remove(),b.wrap.stop(!0,!0).removeClass("fancybox-opened"),"fixed"===b.wrap.css("position")&&b.wrap.css(b._getPosition(!0)),b.transitions[b.current.closeMethod]()))},play:function(a){var d=function(){clearTimeout(b.player.timer)},e=function(){d(); 11 | b.current&&b.player.isActive&&(b.player.timer=setTimeout(b.next,b.current.playSpeed))},c=function(){d();f("body").unbind(".player");b.player.isActive=!1;b.trigger("onPlayEnd")};if(!0===a||!b.player.isActive&&!1!==a){if(b.current&&(b.current.loop||b.current.index=c.index?"next":"prev"],b.router=e||"jumpto",c.loop&&(0>a&&(a=c.group.length+a%c.group.length),a%=c.group.length),c.group[a]!==r&&(b.cancel(),b._start(a)))},reposition:function(a,d){var e;b.isOpen&&(e=b._getPosition(d),a&&"scroll"===a.type?(delete e.position,b.wrap.stop(!0,!0).animate(e, 13 | 200)):b.wrap.css(e))},update:function(a){var d=a&&a.type,e=!d||"orientationchange"===d;e&&(clearTimeout(A),A=null);if(b.isOpen&&!A){if(e||m)b.wrap.removeAttr("style").addClass("fancybox-tmp"),b.trigger("onUpdate");A=setTimeout(function(){var c=b.current;c&&(b.wrap.removeClass("fancybox-tmp"),"scroll"!==d&&b._setDimension(),"scroll"===d&&c.canShrink||b.reposition(a),b.trigger("onUpdate"),A=null)},m?500:e?20:300)}},toggle:function(a){b.isOpen&&(b.current.fitToView="boolean"===f.type(a)?a:!b.current.fitToView, 14 | b.update())},hideLoading:function(){n.unbind("keypress.fb");f("#fancybox-loading").remove()},showLoading:function(){var a,d;b.hideLoading();n.bind("keypress.fb",function(a){if(27===(a.which||a.keyCode))a.preventDefault(),b.cancel()});a=f('
').click(b.cancel).appendTo("body");b.defaults.fixed||(d=b.getViewport(),a.css({position:"absolute",top:0.5*d.h+d.y,left:0.5*d.w+d.x}))},getViewport:function(){var a=b.current&&b.current.locked||!1,d={x:p.scrollLeft(), 15 | y:p.scrollTop()};a?(d.w=a[0].clientWidth,d.h=a[0].clientHeight):(d.w=m&&v.innerWidth?v.innerWidth:p.width(),d.h=m&&v.innerHeight?v.innerHeight:p.height());return d},unbindEvents:function(){b.wrap&&y(b.wrap)&&b.wrap.unbind(".fb");n.unbind(".fb");p.unbind(".fb")},bindEvents:function(){var a=b.current,d;a&&(p.bind("orientationchange.fb"+(a.autoResize?" resize.fb":"")+(a.autoCenter&&!a.locked?" scroll.fb":""),b.update),(d=a.keys)&&n.bind("keydown.fb",function(e){var c=e.which||e.keyCode,j=e.target||e.srcElement; 16 | !e.ctrlKey&&(!e.altKey&&!e.shiftKey&&!e.metaKey&&(!j||!j.type&&!f(j).is("[contenteditable]")))&&f.each(d,function(d,j){if(1h[0].clientWidth||h[0].clientHeight&&h[0].scrollHeight>h[0].clientHeight),h=f(h).parent();if(0!==c&&!i&&1g||0>j)b.next(0>g?"up":"right");d.preventDefault()}}))},trigger:function(a,d){var e,c=d||b.coming||b.current;if(c){f.isFunction(c[a])&&(e=c[a].apply(c,Array.prototype.slice.call(arguments,1)));if(!1===e)return!1;"onCancel"===a&&!b.isOpened&&(b.isActive=!1);c.helpers&&f.each(c.helpers,function(d,e){e&& 18 | (b.helpers[d]&&f.isFunction(b.helpers[d][a]))&&(e=f.extend(!0,{},b.helpers[d].defaults,e),b.helpers[d][a](e,c))});f.event.trigger(a+".fb")}},isImage:function(a){return t(a)&&a.match(/(^data:image\/.*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp)((\?|#).*)?$)/i)},isSWF:function(a){return t(a)&&a.match(/\.(swf)((\?|#).*)?$/i)},_start:function(a){var d={},e,c,a=k(a);e=b.group[a]||null;if(!e)return!1;d=f.extend(!0,{},b.opts,e);e=d.margin;c=d.padding;"number"===f.type(e)&&(d.margin=[e,e,e,e]);"number"===f.type(c)&& 19 | (d.padding=[c,c,c,c]);d.modal&&f.extend(!0,d,{closeBtn:!1,closeClick:!1,nextClick:!1,arrows:!1,mouseWheel:!1,keys:null,helpers:{overlay:{closeClick:!1}}});d.autoSize&&(d.autoWidth=d.autoHeight=!0);"auto"===d.width&&(d.autoWidth=!0);"auto"===d.height&&(d.autoHeight=!0);d.group=b.group;d.index=a;b.coming=d;if(!1===b.trigger("beforeLoad"))b.coming=null;else{c=d.type;e=d.href;if(!c)return b.coming=null,b.current&&b.router&&"jumpto"!==b.router?(b.current.index=a,b[b.router](b.direction)):!1;b.isActive= 20 | !0;if("image"===c||"swf"===c)d.autoHeight=d.autoWidth=!1,d.scrolling="visible";"image"===c&&(d.aspectRatio=!0);"iframe"===c&&m&&(d.scrolling="scroll");d.wrap=f(d.tpl.wrap).addClass("fancybox-"+(m?"mobile":"desktop")+" fancybox-type-"+c+" fancybox-tmp "+d.wrapCSS).appendTo(d.parent||"body");f.extend(d,{skin:f(".fancybox-skin",d.wrap),outer:f(".fancybox-outer",d.wrap),inner:f(".fancybox-inner",d.wrap)});f.each(["Top","Right","Bottom","Left"],function(a,b){d.skin.css("padding"+b,w(d.padding[a]))});b.trigger("onReady"); 21 | if("inline"===c||"html"===c){if(!d.content||!d.content.length)return b._error("content")}else if(!e)return b._error("href");"image"===c?b._loadImage():"ajax"===c?b._loadAjax():"iframe"===c?b._loadIframe():b._afterLoad()}},_error:function(a){f.extend(b.coming,{type:"html",autoWidth:!0,autoHeight:!0,minWidth:0,minHeight:0,scrolling:"no",hasError:a,content:b.coming.tpl.error});b._afterLoad()},_loadImage:function(){var a=b.imgPreload=new Image;a.onload=function(){this.onload=this.onerror=null;b.coming.width= 22 | this.width;b.coming.height=this.height;b._afterLoad()};a.onerror=function(){this.onload=this.onerror=null;b._error("image")};a.src=b.coming.href;(a.complete===r||!a.complete)&&b.showLoading()},_loadAjax:function(){var a=b.coming;b.showLoading();b.ajaxLoad=f.ajax(f.extend({},a.ajax,{url:a.href,error:function(a,e){b.coming&&"abort"!==e?b._error("ajax",a):b.hideLoading()},success:function(d,e){"success"===e&&(a.content=d,b._afterLoad())}}))},_loadIframe:function(){var a=b.coming,d=f(a.tpl.iframe.replace(/\{rnd\}/g, 23 | (new Date).getTime())).attr("scrolling",m?"auto":a.iframe.scrolling).attr("src",a.href);f(a.wrap).bind("onReset",function(){try{f(this).find("iframe").hide().attr("src","//about:blank").end().empty()}catch(a){}});a.iframe.preload&&(b.showLoading(),d.one("load",function(){f(this).data("ready",1);m||f(this).bind("load.fb",b.update);f(this).parents(".fancybox-wrap").width("100%").removeClass("fancybox-tmp").show();b._afterLoad()}));a.content=d.appendTo(a.inner);a.iframe.preload||b._afterLoad()},_preloadImages:function(){var a= 24 | b.group,d=b.current,e=a.length,c=d.preload?Math.min(d.preload,e-1):0,f,g;for(g=1;g<=c;g+=1)f=a[(d.index+g)%e],"image"===f.type&&f.href&&((new Image).src=f.href)},_afterLoad:function(){var a=b.coming,d=b.current,e,c,j,g,h;b.hideLoading();if(a&&!1!==b.isActive)if(!1===b.trigger("afterLoad",a,d))a.wrap.stop(!0).trigger("onReset").remove(),b.coming=null;else{d&&(b.trigger("beforeChange",d),d.wrap.stop(!0).removeClass("fancybox-opened").find(".fancybox-item, .fancybox-nav").remove(),"fixed"===d.wrap.css("position")&& 25 | d.wrap.css(b._getPosition(!0)));b.unbindEvents();e=a.content;c=a.type;j=a.scrolling;f.extend(b,{wrap:a.wrap,skin:a.skin,outer:a.outer,inner:a.inner,current:a,previous:d});g=a.href;switch(c){case "inline":case "ajax":case "html":a.selector?e=f("
").html(e).find(a.selector):y(e)&&(e.data("fancybox-placeholder")||e.data("fancybox-placeholder",f('
').insertAfter(e).hide()),e=e.show().detach(),a.wrap.bind("onReset",function(){f(this).find(e).length&&e.hide().replaceAll(e.data("fancybox-placeholder")).data("fancybox-placeholder", 26 | !1)}));break;case "image":e=a.tpl.image.replace("{href}",g);break;case "swf":e='',h="",f.each(a.swf,function(a,b){e+='';h+=" "+a+'="'+b+'"'}),e+='"}(!y(e)||!e.parent().is(a.inner))&&a.inner.append(e);b.trigger("beforeShow"); 27 | a.inner.css("overflow","yes"===j?"scroll":"no"===j?"hidden":j);b._setDimension();a.wrap.removeClass("fancybox-tmp");a.pos=f.extend({},a.dim,b._getPosition(!0));b.isOpen=!1;b.coming=null;b.bindEvents();if(b.isOpened){if(d.prevMethod)b.transitions[d.prevMethod]()}else f(".fancybox-wrap").not(a.wrap).stop(!0).trigger("onReset").remove();b.transitions[b.isOpened?a.nextMethod:a.openMethod]();b._preloadImages()}},_setDimension:function(){var a=b.getViewport(),d=0,e=!1,c=!1,e=b.wrap,j=b.skin,g=b.inner,h= 28 | b.current,c=h.width,i=h.height,l=h.minWidth,u=h.minHeight,m=h.maxWidth,n=h.maxHeight,t=h.scrolling,r=h.scrollOutside?h.scrollbarWidth:0,x=h.margin,p=x[1]+x[3],q=x[0]+x[2],y,s,v,B,z,E,A,C,F;e.add(j).add(g).width("auto").height("auto");x=j.outerWidth(!0)-j.width();y=j.outerHeight(!0)-j.height();s=p+x;v=q+y;B=D(c)?(a.w-s)*k(c)/100:c;z=D(i)?(a.h-v)*k(i)/100:i;if("iframe"===h.type){if(F=h.content,h.autoHeight&&1===F.data("ready"))try{F[0].contentWindow.document.location&&(g.width(B).height(9999),E=F.contents().find("body"), 29 | r&&E.css("overflow-x","hidden"),z=E.height())}catch(G){}}else if(h.autoWidth||h.autoHeight)g.addClass("fancybox-tmp"),h.autoWidth||g.width(B),h.autoHeight||g.height(z),h.autoWidth&&(B=g.width()),h.autoHeight&&(z=g.height()),g.removeClass("fancybox-tmp");c=k(B);i=k(z);C=B/z;l=k(D(l)?k(l,"w")-s:l);m=k(D(m)?k(m,"w")-s:m);u=k(D(u)?k(u,"h")-v:u);n=k(D(n)?k(n,"h")-v:n);E=m;A=n;p=a.w-p;q=a.h-q;h.aspectRatio?(c>m&&(c=m,i=c/C),i>n&&(i=n,c=i*C),cp||s>q)&&(c>l&&i>u)&&!(19m&&(c=m,i=c/C),g.width(k(c)).height(k(i)),e.width(k(c+x)),a=e.width(),s=e.height();else c=Math.max(l,Math.min(c,c-(a-p))),i=Math.max(u,Math.min(i,i-(s-q)));r&&("auto"===t&&ip||s>q)&&c>l&&i>u;c=h.aspectRatio?cu&&ib&&(a=n.width())):n.width()>p.width()&& 39 | (a=n.width());this.overlay.width(a).height(n.height())},onReady:function(a,b){f(".fancybox-overlay").stop(!0,!0);this.overlay||f.extend(this,{overlay:f('
').appendTo(b.parent||"body"),margin:n.height()>p.height()||"scroll"===f("body").css("overflow-y")?f("body").css("margin-right"):!1,el:q.all&&!q.querySelector?f("html"):f("body")});b.fixed&&!m&&(this.overlay.addClass("fancybox-overlay-fixed"),b.autoCenter&&a.locked&&(b.locked=this.overlay.append(b.wrap)));!0=== 40 | a.showEarly&&this.beforeShow.apply(this,arguments)},beforeShow:function(a,d){var e=this.overlay.unbind(".fb").width("auto").height("auto").css(a.css);a.closeClick&&e.bind("click.fb",function(a){f(a.target).hasClass("fancybox-overlay")&&b.close()});d.fixed&&!m?d.locked&&(this.el.addClass("fancybox-lock"),!1!==this.margin&&f("body").css("margin-right",k(this.margin)+d.scrollbarWidth)):this.update();e.show()},onUpdate:function(a,b){(!b.fixed||m)&&this.update()},afterClose:function(a){var d=this,a=a.speedOut|| 41 | 0;d.overlay&&!b.isActive&&d.overlay.fadeOut(a||0,function(){f("body").css("margin-right",d.margin);d.el.removeClass("fancybox-lock");d.overlay.remove();d.overlay=null})}};b.helpers.title={defaults:{type:"float",position:"bottom"},beforeShow:function(a){var d=b.current,e=d.title,c=a.type;f.isFunction(e)&&(e=e.call(d.element,d));if(t(e)&&""!==f.trim(e)){d=f('
'+e+"
");switch(c){case "inside":c=b.skin;break;case "outside":c=b.wrap;break;case "over":c= 42 | b.inner;break;default:c=b.skin,d.appendTo("body"),f.browser.msie&&d.width(d.width()),d.wrapInner(''),b.current.margin[2]+=Math.abs(k(d.css("margin-bottom")))}d["top"===a.position?"prependTo":"appendTo"](c)}}};f.fn.fancybox=function(a){var d,e=f(this),c=this.selector||"",j=function(g){var h=f(this).blur(),i=d,j,k;!g.ctrlKey&&(!g.altKey&&!g.shiftKey&&!g.metaKey)&&!h.is(".fancybox-wrap")&&(j=a.groupAttr||"data-fancybox-group",k=h.attr(j),k||(j="rel",k=h.get(0)[j]),k&&(""!== 43 | k&&"nofollow"!==k)&&(h=c.length?f(c):e,h=h.filter("["+j+'="'+k+'"]'),i=h.index(this)),a.index=i,!1!==b.open(h,a)&&g.preventDefault())},a=a||{};d=a.index||0;!c||!1===a.live?e.unbind("click.fb-start").bind("click.fb-start",j):n.undelegate(c,"click.fb-start").delegate(c+":not('.fancybox-item, .fancybox-nav')","click.fb-start",j);return this};n.ready(function(){f.scrollbarWidth===r&&(f.scrollbarWidth=function(){var a=f('
').appendTo("body"), 44 | b=a.children(),b=b.innerWidth()-b.height(99).innerWidth();a.remove();return b});if(f.support.fixedPosition===r){var a=f.support,d=f('
').appendTo("body"),e=20===d[0].offsetTop||15===d[0].offsetTop;d.remove();a.fixedPosition=e}f.extend(b.defaults,{scrollbarWidth:f.scrollbarWidth(),fixed:f.support.fixedPosition,parent:f("body")})})})(window,document,jQuery); -------------------------------------------------------------------------------- /js/gallery.js: -------------------------------------------------------------------------------- 1 | (function($){ 2 | // Caption 3 | $('.entry').each(function(i){ 4 | $(this).find('img').each(function(){ 5 | var alt = this.alt; 6 | 7 | if (alt){ 8 | $(this).after('' + alt + ''); 9 | } 10 | 11 | $(this).wrap(''); 12 | }); 13 | }); 14 | 15 | // Gallery 16 | var play = function(parent, item, callback){ 17 | var width = parent.width(); 18 | 19 | item.imagesLoaded(function(){ 20 | var _this = this[0], 21 | nWidth = _this.naturalWidth, 22 | nHeight = _this.naturalHeight; 23 | 24 | callback(); 25 | this.animate({opacity: 1}, 500); 26 | parent.animate({height: width * nHeight / nWidth}, 500); 27 | }); 28 | }; 29 | 30 | $('.gallery').each(function(){ 31 | var $this = $(this), 32 | current = 0, 33 | photoset = $this.children('.photoset').children(), 34 | all = photoset.length, 35 | loading = true; 36 | 37 | play($this, photoset.eq(0), function(){ 38 | loading = false; 39 | }); 40 | 41 | $this.on('click', '.prev', function(){ 42 | if (!loading){ 43 | var next = (current - 1) % all; 44 | loading = true; 45 | 46 | play($this, photoset.eq(next), function(){ 47 | photoset.eq(current).animate({opacity: 0}, 500); 48 | loading = false; 49 | current = next; 50 | }); 51 | } 52 | }).on('click', '.next', function(){ 53 | if (!loading){ 54 | var next = (current + 1) % all; 55 | loading = true; 56 | 57 | play($this, photoset.eq(next), function(){ 58 | photoset.eq(current).animate({opacity: 0}, 500); 59 | loading = false; 60 | current = next; 61 | }); 62 | } 63 | }); 64 | }); 65 | })(jQuery); -------------------------------------------------------------------------------- /js/jquery.imagesloaded.min.js: -------------------------------------------------------------------------------- 1 | (function(c,n){var l="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw==";c.fn.imagesLoaded=function(f){function m(){var b=c(i),a=c(h);d&&(h.length?d.reject(e,b,a):d.resolve(e));c.isFunction(f)&&f.call(g,e,b,a)}function j(b,a){b.src===l||-1!==c.inArray(b,k)||(k.push(b),a?h.push(b):i.push(b),c.data(b,"imagesLoaded",{isBroken:a,src:b.src}),o&&d.notifyWith(c(b),[a,e,c(i),c(h)]),e.length===k.length&&(setTimeout(m),e.unbind(".imagesLoaded")))}var g=this,d=c.isFunction(c.Deferred)?c.Deferred(): 2 | 0,o=c.isFunction(d.notify),e=g.find("img").add(g.filter("img")),k=[],i=[],h=[];c.isPlainObject(f)&&c.each(f,function(b,a){if("callback"===b)f=a;else if(d)d[b](a)});e.length?e.bind("load.imagesLoaded error.imagesLoaded",function(b){j(b.target,"error"===b.type)}).each(function(b,a){var d=a.src,e=c.data(a,"imagesLoaded");if(e&&e.src===d)j(a,e.isBroken);else if(a.complete&&a.naturalWidth!==n)j(a,0===a.naturalWidth||0===a.naturalHeight);else if(a.readyState||a.complete)a.src=l,a.src=d}):m();return d?d.promise(g): 3 | g}})(jQuery); 4 | -------------------------------------------------------------------------------- /js/moment.min.js: -------------------------------------------------------------------------------- 1 | // moment.js 2 | // version : 1.7.2 3 | // author : Tim Wood 4 | // license : MIT 5 | // momentjs.com 6 | (function(a){function E(a,b,c,d){var e=c.lang();return e[a].call?e[a](c,d):e[a][b]}function F(a,b){return function(c){return K(a.call(this,c),b)}}function G(a){return function(b){var c=a.call(this,b);return c+this.lang().ordinal(c)}}function H(a,b,c){this._d=a,this._isUTC=!!b,this._a=a._a||null,this._lang=c||!1}function I(a){var b=this._data={},c=a.years||a.y||0,d=a.months||a.M||0,e=a.weeks||a.w||0,f=a.days||a.d||0,g=a.hours||a.h||0,h=a.minutes||a.m||0,i=a.seconds||a.s||0,j=a.milliseconds||a.ms||0;this._milliseconds=j+i*1e3+h*6e4+g*36e5,this._days=f+e*7,this._months=d+c*12,b.milliseconds=j%1e3,i+=J(j/1e3),b.seconds=i%60,h+=J(i/60),b.minutes=h%60,g+=J(h/60),b.hours=g%24,f+=J(g/24),f+=e*7,b.days=f%30,d+=J(f/30),b.months=d%12,c+=J(d/12),b.years=c,this._lang=!1}function J(a){return a<0?Math.ceil(a):Math.floor(a)}function K(a,b){var c=a+"";while(c.length70?1900:2e3);break;case"YYYY":c[0]=~~Math.abs(b);break;case"a":case"A":d.isPm=(b+"").toLowerCase()==="pm";break;case"H":case"HH":case"h":case"hh":c[3]=~~b;break;case"m":case"mm":c[4]=~~b;break;case"s":case"ss":c[5]=~~b;break;case"S":case"SS":case"SSS":c[6]=~~(("0."+b)*1e3);break;case"Z":case"ZZ":d.isUTC=!0,e=(b+"").match(x),e&&e[1]&&(d.tzh=~~e[1]),e&&e[2]&&(d.tzm=~~e[2]),e&&e[0]==="+"&&(d.tzh=-d.tzh,d.tzm=-d.tzm)}b==null&&(c[8]=!1)}function W(a,b){var c=[0,0,1,0,0,0,0],d={tzh:0,tzm:0},e=b.match(k),f,g;for(f=0;f0,j[4]=c,Z.apply({},j)}function _(a,c){b.fn[a]=function(a){var b=this._isUTC?"UTC":"";return a!=null?(this._d["set"+b+c](a),this):this._d["get"+b+c]()}}function ab(a){b.duration.fn[a]=function(){return this._data[a]}}function bb(a,c){b.duration.fn["as"+a]=function(){return+this/c}}var b,c="1.7.2",d=Math.round,e,f={},g="en",h=typeof module!="undefined"&&module.exports,i="months|monthsShort|weekdays|weekdaysShort|weekdaysMin|longDateFormat|calendar|relativeTime|ordinal|meridiem".split("|"),j=/^\/?Date\((\-?\d+)/i,k=/(\[[^\[]*\])|(\\)?(Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|YYYY|YY|a|A|hh?|HH?|mm?|ss?|SS?S?|zz?|ZZ?|.)/g,l=/(\[[^\[]*\])|(\\)?(LT|LL?L?L?)/g,m=/([0-9a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+)/gi,n=/\d\d?/,o=/\d{1,3}/,p=/\d{3}/,q=/\d{1,4}/,r=/[0-9a-z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+/i,s=/Z|[\+\-]\d\d:?\d\d/i,t=/T/i,u=/^\s*\d{4}-\d\d-\d\d(T(\d\d(:\d\d(:\d\d(\.\d\d?\d?)?)?)?)?([\+\-]\d\d:?\d\d)?)?/,v="YYYY-MM-DDTHH:mm:ssZ",w=[["HH:mm:ss.S",/T\d\d:\d\d:\d\d\.\d{1,3}/],["HH:mm:ss",/T\d\d:\d\d:\d\d/],["HH:mm",/T\d\d:\d\d/],["HH",/T\d\d/]],x=/([\+\-]|\d\d)/gi,y="Month|Date|Hours|Minutes|Seconds|Milliseconds".split("|"),z={Milliseconds:1,Seconds:1e3,Minutes:6e4,Hours:36e5,Days:864e5,Months:2592e6,Years:31536e6},A={},B="DDD w M D d".split(" "),C="M D H h m s w".split(" "),D={M:function(){return this.month()+1},MMM:function(a){return E("monthsShort",this.month(),this,a)},MMMM:function(a){return E("months",this.month(),this,a)},D:function(){return this.date()},DDD:function(){var a=new Date(this.year(),this.month(),this.date()),b=new Date(this.year(),0,1);return~~((a-b)/864e5+1.5)},d:function(){return this.day()},dd:function(a){return E("weekdaysMin",this.day(),this,a)},ddd:function(a){return E("weekdaysShort",this.day(),this,a)},dddd:function(a){return E("weekdays",this.day(),this,a)},w:function(){var a=new Date(this.year(),this.month(),this.date()-this.day()+5),b=new Date(a.getFullYear(),0,4);return~~((a-b)/864e5/7+1.5)},YY:function(){return K(this.year()%100,2)},YYYY:function(){return K(this.year(),4)},a:function(){return this.lang().meridiem(this.hours(),this.minutes(),!0)},A:function(){return this.lang().meridiem(this.hours(),this.minutes(),!1)},H:function(){return this.hours()},h:function(){return this.hours()%12||12},m:function(){return this.minutes()},s:function(){return this.seconds()},S:function(){return~~(this.milliseconds()/100)},SS:function(){return K(~~(this.milliseconds()/10),2)},SSS:function(){return K(this.milliseconds(),3)},Z:function(){var a=-this.zone(),b="+";return a<0&&(a=-a,b="-"),b+K(~~(a/60),2)+":"+K(~~a%60,2)},ZZ:function(){var a=-this.zone(),b="+";return a<0&&(a=-a,b="-"),b+K(~~(10*a/6),4)}};while(B.length)e=B.pop(),D[e+"o"]=G(D[e]);while(C.length)e=C.pop(),D[e+e]=F(D[e],2);D.DDDD=F(D.DDD,3),b=function(c,d){if(c===null||c==="")return null;var e,f;return b.isMoment(c)?new H(new Date(+c._d),c._isUTC,c._lang):(d?M(d)?e=X(c,d):e=W(c,d):(f=j.exec(c),e=c===a?new Date:f?new Date(+f[1]):c instanceof Date?c:M(c)?O(c):typeof c=="string"?Y(c):new Date(c)),new H(e))},b.utc=function(a,c){return M(a)?new H(O(a,!0),!0):(typeof a=="string"&&!s.exec(a)&&(a+=" +0000",c&&(c+=" Z")),b(a,c).utc())},b.unix=function(a){return b(a*1e3)},b.duration=function(a,c){var d=b.isDuration(a),e=typeof a=="number",f=d?a._data:e?{}:a,g;return e&&(c?f[c]=a:f.milliseconds=a),g=new I(f),d&&(g._lang=a._lang),g},b.humanizeDuration=function(a,c,d){return b.duration(a,c===!0?null:c).humanize(c===!0?!0:d)},b.version=c,b.defaultFormat=v,b.lang=function(a,c){var d;if(!a)return g;(c||!f[a])&&P(a,c);if(f[a]){for(d=0;d11?c?"pm":"PM":c?"am":"AM"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},ordinal:function(a){var b=a%10;return~~(a%100/10)===1?"th":b===1?"st":b===2?"nd":b===3?"rd":"th"}}),b.fn=H.prototype={clone:function(){return b(this)},valueOf:function(){return+this._d},unix:function(){return Math.floor(+this._d/1e3)},toString:function(){return this._d.toString()},toDate:function(){return this._d},toArray:function(){var a=this;return[a.year(),a.month(),a.date(),a.hours(),a.minutes(),a.seconds(),a.milliseconds(),!!this._isUTC]},isValid:function(){return this._a?this._a[8]!=null?!!this._a[8]:!N(this._a,(this._a[7]?b.utc(this._a):b(this._a)).toArray()):!isNaN(this._d.getTime())},utc:function(){return this._isUTC=!0,this},local:function(){return this._isUTC=!1,this},format:function(a){return T(this,a?a:b.defaultFormat)},add:function(a,c){var d=c?b.duration(+c,a):b.duration(a);return L(this,d,1),this},subtract:function(a,c){var d=c?b.duration(+c,a):b.duration(a);return L(this,d,-1),this},diff:function(a,c,e){var f=this._isUTC?b(a).utc():b(a).local(),g=(this.zone()-f.zone())*6e4,h=this._d-f._d-g,i=this.year()-f.year(),j=this.month()-f.month(),k=this.date()-f.date(),l;return c==="months"?l=i*12+j+k/30:c==="years"?l=i+(j+k/30)/12:l=c==="seconds"?h/1e3:c==="minutes"?h/6e4:c==="hours"?h/36e5:c==="days"?h/864e5:c==="weeks"?h/6048e5:h,e?l:d(l)},from:function(a,c){return b.duration(this.diff(a)).lang(this._lang).humanize(!c)},fromNow:function(a){return this.from(b(),a)},calendar:function(){var a=this.diff(b().sod(),"days",!0),c=this.lang().calendar,d=c.sameElse,e=a<-6?d:a<-1?c.lastWeek:a<0?c.lastDay:a<1?c.sameDay:a<2?c.nextDay:a<7?c.nextWeek:d;return this.format(typeof e=="function"?e.apply(this):e)},isLeapYear:function(){var a=this.year();return a%4===0&&a%100!==0||a%400===0},isDST:function(){return this.zone() 2 | 14 | 15 | 28 | 29 | 39 | 40 | <%- partial('google_analytics') %> 41 | 42 | 43 | 44 | 59 | 60 | <% if (theme.forvirgo){ %> 61 | 62 | 63 | <% } %> 64 | 65 | <% if (theme.usecdn){ %> 66 | 67 | 68 | <% if (theme.fancybox){ %> 69 | 70 | 71 | 76 | <% } %> 77 | 78 | <% } else { %> 79 | 80 | 81 | <% if (theme.fancybox){ %> 82 | 83 | 84 | 89 | <% } %> 90 | <% } %> 91 | -------------------------------------------------------------------------------- /layout/_partial/archive.ejs: -------------------------------------------------------------------------------- 1 | <% 2 | var title = ''; 3 | if (page.category) title = page.category; 4 | if (page.tag) title = page.tag; 5 | if (page.archive){ 6 | if (page.year) title = page.year + (page.month ? '/' + page.month : ''); 7 | else title = __('archive_a'); 8 | } 9 | %> 10 |

<%= title %>

11 | 12 | <% if (pagination == 2){ %> 13 | <% page.posts.each(function(item){ %> 14 | <%- partial('article', {item: item, index: true}) %> 15 | <% }); %> 16 | 17 | <%- partial('pagination') %> 18 | <% } else { %> 19 |
20 | <% page.posts.each(function(item){ %> 21 | 38 | <% }); %> 39 |
40 | <% } %> -------------------------------------------------------------------------------- /layout/_partial/article.ejs: -------------------------------------------------------------------------------- 1 |
2 | <% if (item.photos){ %> 3 | <%- partial('post/gallery') %> 4 | <% } %> 5 |
6 |
7 | <% if (item.layout != 'page'){ %> 8 |
9 | 10 | <% } %> 11 | <%- partial('post/title') %> 12 |
13 |
14 | <% if (item.excerpt && index){ %> 15 | <%- item.excerpt %> 16 | <% } else { %> 17 | <%- item.content %> 18 | <% } %> 19 |
20 |
21 | <% if (index){ %> 22 | <% if (item.excerpt){ %> 23 |
24 | Read More 25 |
26 | <% } %> 27 | <% if (item.comment && config.disqus_shortname){ %> 28 |
29 | Comments 30 |
31 | <% } %> 32 | <% } else { %> 33 | <%- partial('post/category') %> 34 | <%- partial('post/tag') %> 35 | <%- partial('post/share') %> 36 | <% } %> 37 |
38 |
39 |
40 |
41 | 42 | <% if (config.disqus_shortname && page.comments){ %> 43 | <%- partial('comment') %> 44 | <% } %> 45 | -------------------------------------------------------------------------------- /layout/_partial/bighomepage.ejs: -------------------------------------------------------------------------------- 1 | <% if (theme.bighomepage){ %> 2 | <%- partial('tag') %> 3 | 19 | 35 | 36 | 62 | 71 | 74 | <% } %> 75 | 76 | -------------------------------------------------------------------------------- /layout/_partial/comment.ejs: -------------------------------------------------------------------------------- 1 |
2 |

<%= __('comment') %>

3 |
4 | 5 |
6 |
7 | 8 | 18 | -------------------------------------------------------------------------------- /layout/_partial/footer.ejs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heruoxin/hexo-persona-color/394e6dd0cefec782df584be0bc99164fc053f260/layout/_partial/footer.ejs -------------------------------------------------------------------------------- /layout/_partial/google_analytics.ejs: -------------------------------------------------------------------------------- 1 | <% if (theme.google_analytics){ %> 2 | 13 | <% } %> -------------------------------------------------------------------------------- /layout/_partial/head.ejs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | <% 21 | var title = []; 22 | if (page.current > 1) title.push(__('page', page.current)); 23 | if (page.title) title.push(page.title); 24 | if (page.category) title.push(page.category); 25 | if (page.tag) title.push(page.tag); 26 | if (page.archive){ 27 | if (page.year) title.push(__('archive_b', page.year + (page.month ? '/' + page.month : ''))); 28 | else title.push(__('archive_a')); 29 | } 30 | title.push(config.title); 31 | %> 32 | <%= title.join(' | ') %> 33 | <% if (config.author){ %><% } %> 34 | <% if (page.description){ %> 35 | 36 | <% } else if (config.description){ %> 37 | 38 | <% } else if (page.excerpt){ %> 39 | 40 | <% } else if (page.content){ %> 41 | 42 | <% } %> 43 | <% if (page.keywords){ %><% } %> 44 | 45 | 46 | <% if (page.title){ %><% } %> 47 | 48 | 49 | <% if(page.cover) { %> 50 | 51 | <% } else { %> 52 | 53 | <% } %> 54 | 55 | 56 | 57 | 58 | <% if (theme.usecdn){ %> 59 | 60 | <% } else { %> 61 | 62 | <% } %> 63 | <% if (theme.usecdn){ %> 64 | 65 | <% } else { %> 66 | 67 | <% } %> 68 | 69 | 74 | 75 | 76 | -------------------------------------------------------------------------------- /layout/_partial/header.ejs: -------------------------------------------------------------------------------- 1 | 7 | 8 | 46 | 47 | -------------------------------------------------------------------------------- /layout/_partial/pagination.ejs: -------------------------------------------------------------------------------- 1 | 10 | -------------------------------------------------------------------------------- /layout/_partial/post/category.ejs: -------------------------------------------------------------------------------- 1 | <% if (item.categories && item.categories.length){ %> 2 | <% 3 | var cats = []; 4 | item.categories.forEach(function(cat){ 5 | cats.push('' + cat.name + ''); 6 | }); 7 | %> 8 |
9 | <%- cats.join(', ') %> 10 |
11 | <% } %> -------------------------------------------------------------------------------- /layout/_partial/post/gallery.ejs: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /layout/_partial/post/share.ejs: -------------------------------------------------------------------------------- 1 | <% if (theme.addthis.enable){ %> 2 |
3 | <% if (theme.addthis.facebook){ %> 4 | 5 | <% } %> 6 | <% if (theme.addthis.twitter){ %> 7 | 8 | <% } %> 9 | <% if (theme.addthis.google){ %> 10 | 11 | <% } %> 12 | <% if (theme.addthis.pinterest){ %> 13 | 14 | <% } %> 15 | 16 |
17 | 18 | <% } %> -------------------------------------------------------------------------------- /layout/_partial/post/tag.ejs: -------------------------------------------------------------------------------- 1 | <% if (item.tags && item.tags.length){ %> 2 | <% 3 | var tags = []; 4 | item.tags.forEach(function(tag){ 5 | tags.push('' + tag.name + ''); 6 | }); 7 | %> 8 |
9 | <%- tags.join(', ') %> 10 |
11 | <% } %> -------------------------------------------------------------------------------- /layout/_partial/post/title.ejs: -------------------------------------------------------------------------------- 1 | <% if (item.link){ %> 2 | <% if (item.title){ %> 3 |

<%= item.title %>

4 | <% } else { %> 5 |

<%= item.link %>

6 | <% } %> 7 | <% } else { %> 8 | <% if (index){ %> 9 |

<%= item.title %>

10 | <% } else { %> 11 |

<%= item.title %>

12 | <% } %> 13 | <% } %> -------------------------------------------------------------------------------- /layout/_partial/sidebar.ejs: -------------------------------------------------------------------------------- 1 |
2 |
3 | <% if(theme.photo) { %> 4 |
5 | 6 | <%- config.author %> 7 | 8 |
9 | <% } %> 10 |
11 |

<%- config.author %>

12 |

<%- config.subtitle %>

13 |
14 |
15 | 51 |
52 |
53 | Persona Color Theme <% if (config.author){ %> 54 | © - <%= new Date().getFullYear() %> <%= config.author %> 55 | <% } else { %> 56 | © <%= new Date().getFullYear() %> <%= config.title %> 57 | <% } %> 58 |
59 | -------------------------------------------------------------------------------- /layout/_partial/tag.ejs: -------------------------------------------------------------------------------- 1 | <% if (site.tags.length){ %> 2 | 11 | 12 | <% } %> 13 | -------------------------------------------------------------------------------- /layout/_widget/category.ejs: -------------------------------------------------------------------------------- 1 | <% if (site.categories.length){ %> 2 |
3 |

<%= __('categories') %>

4 |
    5 | <% site.categories.sort('name').each(function(item){ %> 6 |
  • <%= item.name %><%= item.posts.length %>
  • 7 | <% }); %> 8 |
9 |
10 | <% } %> -------------------------------------------------------------------------------- /layout/_widget/recent_posts.ejs: -------------------------------------------------------------------------------- 1 | <% if (site.posts.length){ %> 2 |
3 |

<%= __('recent_posts') %>

4 |
    5 | <% site.posts.sort('date', -1).limit(5).each(function(post){ %> 6 |
  • 7 | <%= post.title %> 8 |
  • 9 | <% }); %> 10 |
11 |
12 | <% } %> -------------------------------------------------------------------------------- /layout/_widget/search.ejs: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /layout/_widget/tag.ejs: -------------------------------------------------------------------------------- 1 | <% if (site.tags.length){ %> 2 | 6 | 7 | 14 | 15 | 30 | 31 | <% } %> 32 | -------------------------------------------------------------------------------- /layout/_widget/tagcloud.ejs: -------------------------------------------------------------------------------- 1 | <% if (site.tags.length){ %> 2 |
3 |

<%= __('tagcloud') %>

4 |
5 | <%- tagcloud(site.tags, {}) %> 6 |
7 |
8 | <% } %> -------------------------------------------------------------------------------- /layout/archive.ejs: -------------------------------------------------------------------------------- 1 | <%- partial('_partial/archive', {pagination: config.archive}) %> -------------------------------------------------------------------------------- /layout/category.ejs: -------------------------------------------------------------------------------- 1 | <%- partial('_partial/archive', {pagination: config.category}) %> -------------------------------------------------------------------------------- /layout/index.ejs: -------------------------------------------------------------------------------- 1 | <% page.posts.each(function(item){ %> 2 |
3 |
4 |
5 |
6 | <% if (item.link){ %> 7 |
8 | <% if (item.title){ %> 9 | 10 | <% } else { %> 11 | 12 | <% } %> 13 | <% } else { %> 14 | 15 |

<%= item.title %>

16 | <% } %> 17 | 18 |
19 |
20 |
21 |
22 | <% }); %> 23 | 24 | <% page.posts.each(function(item){ %> 25 | <% if (theme.bighomepage){ %> 26 |
" style="display: none;"> 27 |
"> 28 | <%- partial('_partial/article', {item: item, index: false}).replace(/img\ src/g, "img s1c") %> 29 | <% if (config.disqus_shortname){ %> 30 | 34 | <% } %> 35 |
36 |
37 | <% } %> 38 | <% }); %> 39 | 40 | <%- partial('_partial/bighomepage') %> 41 | 42 | <%- partial('_partial/pagination') %> 43 | -------------------------------------------------------------------------------- /layout/layout.ejs: -------------------------------------------------------------------------------- 1 | <%- partial('_partial/head') %> 2 | 3 | 4 | 9 | 10 | 11 |
12 |

13 |
<%- body %>
14 |
15 |
16 | 17 |
<%- partial('_partial/footer') %>
18 | <%- partial('_partial/after_footer') %> 19 | 20 | 21 | -------------------------------------------------------------------------------- /layout/page.ejs: -------------------------------------------------------------------------------- 1 | <%- partial('_partial/article', {item: page, index: false}) %> 2 | -------------------------------------------------------------------------------- /layout/post.ejs: -------------------------------------------------------------------------------- 1 | <%- partial('_partial/article', {item: page, index: false}) %> 2 | -------------------------------------------------------------------------------- /layout/tag.ejs: -------------------------------------------------------------------------------- 1 | <%- partial('_partial/archive', {pagination: config.tag}) %> -------------------------------------------------------------------------------- /source/css/_base/layout.styl: -------------------------------------------------------------------------------- 1 | * 2 | margin 0 3 | padding 0 4 | 5 | body 6 | background color-background 7 | color color-font 8 | font-family font-default 9 | font-size 14px 10 | text-shadow 0 0 1px transparent 11 | @media screen and (max-width: 1260px) 12 | margin 0 30px 13 | @media screen and (max-width: 600px) 14 | font-size 13px 15 | margin 0 10px 16 | 17 | h1, h2, h3, h4, h5, h6 18 | font-family font-title 19 | 20 | h1 21 | font-size 1.8em 22 | 23 | h2 24 | font-size 1.5em 25 | 26 | h3 27 | font-size 1.3em 28 | 29 | a 30 | text-decoration none 31 | color color-link 32 | &:hover 33 | text-decoration underline 34 | 35 | .alignleft 36 | float left 37 | 38 | .alignright 39 | float right 40 | 41 | .clearfix 42 | clearfix() 43 | 44 | .inner 45 | width page-width 46 | margin 0 auto 47 | @media screen and (max-width: 1260px) 48 | width 100% 49 | 50 | #main-col 51 | width 900px 52 | overflow auto 53 | @media screen and (max-width: 1260px) 54 | max-width 70% 55 | @media screen and (max-width: 900px) 56 | max-width 66.5% 57 | @media screen and (max-width: 800px) 58 | max-width 100% 59 | margin-right 0 60 | float none 61 | 62 | #wrapper 63 | @media screen and (max-width: 800px) 64 | margin-right 0 65 | #myCanvasContainer 66 | margin-left auto 67 | margin-right auto 68 | width 500px 69 | 70 | p 71 | text-indent 2em 72 | 73 | #header-fix 74 | height 25px 75 | @media screen and (max-width: 800px) 76 | height 75px 77 | 78 | -------------------------------------------------------------------------------- /source/css/_base/utils.styl: -------------------------------------------------------------------------------- 1 | .depth 2 | color: color-font; 3 | // text-shadow: 0px 2px 3px rgba(3,3,3,0.5); 4 | -------------------------------------------------------------------------------- /source/css/_base/variable.styl: -------------------------------------------------------------------------------- 1 | // Blue-light 2 | color-background = #f1f1f1 3 | color-block-background = color-background 4 | color-font = #6d6d6d 5 | color-title-font = color-font 6 | color-border = #f1f1f1 7 | color-link = #1b7aca 8 | color-sidebar = #1b7aca 9 | color-transition = #1b7aca 10 | color-article = color-border 11 | color-title = #c0c0c0 12 | color-info = #ffffff 13 | color-shadow = #ececec 14 | 15 | // Green-dark 16 | //color-background = #1f1f1f 17 | //color-block-background = color-background 18 | //color-font = #6d6d6d 19 | //color-title-font = #469632 20 | //color-border = #444444 21 | //color-link = #444444 22 | //color-sidebar = #212321 23 | //color-transition = #2d2d2d 24 | //color-article = color-border 25 | //color-title = #469632 26 | //color-info = #469632 27 | //color-shadow = #2a2e34 28 | 29 | // Green-grey 30 | //color-background = #f1f1f1 31 | //color-block-background = color-background 32 | //color-font = #6d6d6d 33 | //color-title-font = #669966 34 | //color-border = #cccccc 35 | //color-link = #006633 36 | //color-sidebar = #cccccc 37 | //color-transition = #dedede 38 | //color-article = color-border 39 | //color-title = #c0c0c0 40 | //color-info = #5d5d5d 41 | //color-shadow = #ececec 42 | 43 | //Red-white 44 | //color-background = #ffffff 45 | //color-block-background = #eeeeee 46 | //color-font = #202020 47 | //color-title-font = #080808 48 | //color-border = #9fa8ad 49 | //color-link = #a90000 50 | //color-sidebar = #a20000 51 | //color-transition = #ffffff 52 | //color-article = color-border 53 | //color-title = #000000 54 | //color-info = #ffffff 55 | //color-shadow = #dddddd 56 | 57 | // Font 58 | font-default = "Helvetica Neue", "Helvetica", Arial, sans-serif 59 | font-serif = "Georgia", serif 60 | font-mono = Monaco, Menlo, Consolas, Courier New, monospace 61 | font-title = "Lato", Helvetica Neue, Helvetica, Arial, sans-serif 62 | 63 | //@import url("//fonts.googleapis.com/css?family=Lato:400,400italic") 64 | 65 | font-icon = FontAwesome 66 | font-icon-path = 'font/fontawesome-webfont' 67 | 68 | @font-face { 69 | font-family 'FontAwesome' 70 | font-style normal 71 | font-weight normal 72 | src url(font-icon-path.eot?#iefix) format('embedded-opentype'), url(font-icon-path.woff) format('woff'), url(font-icon-path.ttf) format('truetype'), url(font-icon-path.svg#FontAwesomeRegular) format('svg') 73 | } 74 | 75 | // Width 76 | page-width = 1200px 77 | -------------------------------------------------------------------------------- /source/css/_partial/archive.styl: -------------------------------------------------------------------------------- 1 | .archive-title 2 | color #999 3 | font-weight normal 4 | margin-bottom 30px 5 | text-shadow 0 0 1px #fff 6 | &:before 7 | font-family font-icon 8 | content '\f073' 9 | padding-right 15px 10 | 11 | &.tag 12 | &:before 13 | content '\f02b' 14 | 15 | &.category 16 | &:before 17 | content '\f07b' 18 | 19 | .archive 20 | border-bottom 1px solid color-border 21 | margin-bottom 20px 22 | @media screen and (max-width: 450px) 23 | margin-bottom 10px 24 | article 25 | box-shadow none 26 | .post-content 27 | margin-bottom 0 28 | -------------------------------------------------------------------------------- /source/css/_partial/article.styl: -------------------------------------------------------------------------------- 1 | icon-size = 22px 2 | icon-gap = 25px 3 | 4 | 5 | article 6 | // box-shadow 1px 2px 3px #ddd 7 | // background linear-gradient(top, #1f1f1f, #222) 8 | &.page 9 | padding-left 20px 10 | @media screen and (max-width: 600px) 11 | padding-left 10px 12 | .icon 13 | display none 14 | 15 | &.post 16 | .icon 17 | &:before 18 | content '\f016' 19 | 20 | &.photo 21 | .icon 22 | &:before 23 | content '\f030' 24 | 25 | &.link 26 | .icon 27 | &:before 28 | content '\f0c1' 29 | 30 | .title 31 | a 32 | &:after 33 | content '\f08e' 34 | color #999 35 | font 12px font-icon 36 | padding-left 10px 37 | vertical-align super 38 | 39 | .time.title 40 | @media screen and (max-width: 450px) 41 | font-size 0.8em 42 | position relative 43 | font-size 1.2em 44 | display inline 45 | top 5px 46 | float right 47 | 48 | .post-content 49 | padding 10px 10px 10px (icon-size + icon-gap + 20) 50 | margin-bottom 50px 51 | position relative 52 | @media screen and (max-width: 600px) 53 | padding-left 10px 54 | 55 | .gallery 56 | overflow hidden 57 | position relative 58 | &:hover 59 | .control 60 | opacity 1 61 | 62 | img 63 | min-width 100% 64 | max-width 100% 65 | height auto 66 | position absolute 67 | top 0 68 | left 0 69 | opacity 0 70 | 71 | .control 72 | opacity 0 73 | transition 0.3s 74 | 75 | .prev, .next 76 | position absolute 77 | top 0 78 | width 50% 79 | height 100% 80 | cursor pointer 81 | &:before 82 | position absolute 83 | font 24px/1 font-icon 84 | text-align center 85 | width 24px 86 | text-shadow 0 0 15px rgba(0,0,0,0.5) 87 | color #fff 88 | margin-top -12px 89 | top 50% 90 | 91 | .prev 92 | left 0 93 | &:before 94 | content '\f053' 95 | left 10px 96 | 97 | .next 98 | right 0 99 | &:before 100 | content '\f054' 101 | right 10px 102 | 103 | header 104 | .icon 105 | width icon-size 106 | height icon-size 107 | margin-right icon-gap 108 | position absolute 109 | top 16px 110 | left 20px 111 | color color-title-font 112 | &:hover 113 | color color-font 114 | text-decoration none 115 | 116 | @media screen and (max-width: 600px) 117 | display none 118 | &:before 119 | position absolute 120 | font 25px font-icon 121 | top 0 122 | left 0 123 | width 32px 124 | text-align center 125 | 126 | time 127 | color #999 128 | font 0.9em font-title 129 | margin-bottom 5px 130 | display block 131 | line-height 1 132 | 133 | .title 134 | @media screen and (max-width: 450px) 135 | font-size 1.35em 136 | font-weight normal 137 | display inline 138 | color color-title-font 139 | a 140 | color color-title-font 141 | &:hover 142 | color color-link 143 | text-decoration none 144 | 145 | .entry 146 | line-height 1.6 147 | font-size 1.3em 148 | p, blockquote, ul, ol, dl, table, iframe, h3, h4, h5, h6, .video-container 149 | margin-top 15px 150 | 151 | blockquote 152 | border-top 1px solid color-border 153 | border-bottom 1px solid color-border 154 | font-family font-serif 155 | padding 0 20px 15px 156 | footer 157 | border-top none 158 | font-size 0.8em 159 | line-height 1 160 | margin 20px 0 0 161 | padding-top 0 162 | cite 163 | &:before 164 | content '—' 165 | color #ccc 166 | padding 0 0.5em 167 | 168 | code, pre 169 | font-family font-mono 170 | 171 | code 172 | background color-block-background 173 | color #666 174 | padding 0 5px 175 | margin 0 2px 176 | font-size 0.9em 177 | border 1px solid color-border 178 | border-radius 3px 179 | 180 | pre 181 | background color-block-background 182 | border 1px solid color-border 183 | margin-top 15px 184 | overflow auto 185 | padding 7px 15px 186 | border-radius 2px 187 | code 188 | background none 189 | padding 0 190 | margin 0 191 | border none 192 | border-radius 0 193 | 194 | ul, ol, dl 195 | margin-left 20px 196 | ul, ol, dl 197 | margin-top 0 198 | 199 | h1, h2 200 | font-weight normal 201 | border-bottom 1px solid color-border 202 | padding-bottom 10px 203 | margin-top 20px 204 | 205 | h3, h4, h5, h6 206 | font-weight normal 207 | 208 | img, video 209 | max-width 95% 210 | height auto 211 | border none 212 | 213 | iframe 214 | border none 215 | 216 | .caption 217 | display block 218 | margin-top 5px 219 | color #999 220 | position relative 221 | font-size 0.9em 222 | padding-left 25px 223 | &:before 224 | content '\f040' 225 | position absolute 226 | font 1.3em font-icon 227 | position absolute 228 | left 0 229 | top 3px 230 | 231 | .video-container 232 | position relative 233 | padding-bottom 56.25% 234 | padding-top 30px 235 | height 0 236 | overflow hidden 237 | iframe, object, embed 238 | position absolute 239 | top 0 240 | left 0 241 | width 100% 242 | height 100% 243 | margin-top 0 244 | 245 | .pullquote 246 | float right 247 | border none 248 | padding 0 249 | margin 1em 0 0.5em 1.5em 250 | text-align left 251 | width 45% 252 | font-size 1.5em 253 | 254 | img 255 | width: 100%; 256 | 257 | footer 258 | margin-top 15px 259 | padding-top 10px 260 | border-top 1px solid color-border 261 | color #999 262 | font-size 0.9em 263 | line-height 16px 264 | position relative 265 | min-height 16px 266 | a 267 | color #999 268 | &:hover 269 | color color-link 270 | text-decoration none 271 | &:before 272 | font 1.1em font-icon 273 | padding-right 10px 274 | vertical-align middle 275 | 276 | &.more-link 277 | &:before 278 | content '\f054' 279 | 280 | &.comment-link 281 | &:before 282 | content '\f075' 283 | 284 | .categories, .tags 285 | position relative 286 | padding-left 25px 287 | margin 5px 0 288 | &:before 289 | position absolute 290 | font 1.1em font-icon 291 | 292 | .categories 293 | &:before 294 | content '\f07b' 295 | top 2px 296 | left 1px 297 | 298 | .tags 299 | &:before 300 | content '\f02b' 301 | top 3px 302 | left 2px 303 | 304 | .addthis 305 | margin-top 15px 306 | iframe 307 | margin-top 0 308 | -------------------------------------------------------------------------------- /source/css/_partial/comment.styl: -------------------------------------------------------------------------------- 1 | #comment 2 | padding 20px 3 | background color-block-background 4 | box-shadow 1px 2px 3px color-shadow 5 | margin-bottom 50px 6 | .title 7 | font-weight normal 8 | margin-bottom 15px 9 | -------------------------------------------------------------------------------- /source/css/_partial/footer.styl: -------------------------------------------------------------------------------- 1 | #footer 2 | color #999 3 | \\ margin-bottom 50px 4 | font 0.9em/1.6 font-title 5 | text-shadow 0 0 1px #fff 6 | -------------------------------------------------------------------------------- /source/css/_partial/header.styl: -------------------------------------------------------------------------------- 1 | #header 2 | width 100% 3 | position fixed 4 | left 0px 5 | z-index 9999 6 | @media screen and (min-width: 801px) 7 | display none 8 | background-color color-sidebar 9 | height 66px 10 | a 11 | color color-info 12 | &:hover 13 | color color-info 14 | 15 | .personal-info-mini 16 | #title-mini 17 | @media screen and (max-width: 450px) 18 | font-size 2.3em 19 | 20 | h1 21 | display inline 22 | position relative 23 | left 20px 24 | color color-font 25 | font-weight normal 26 | font-size 2.5em 27 | line-height 1 28 | 29 | h2 30 | font-weight normal 31 | font-size 0.9em 32 | line-height 1 33 | margin-top 10px 34 | 35 | .personal-photo 36 | position relative 37 | left 15px 38 | top 10px 39 | border-radius 50px 40 | height 50px 41 | width 50px 42 | // border 5px 43 | #main-nav 44 | font-family font-title 45 | @media screen and (max-width: 501px) 46 | display none 47 | top 5px 48 | ul 49 | list-style none 50 | li 51 | float left 52 | margin-left 30px 53 | .icon 54 | @media screen and (min-width: 600px) 55 | font-size 30px 56 | top 18px 57 | @media screen and (max-width: 601px) 58 | font-size 28px 59 | top 20px 60 | position relative 61 | background-color color-sidebar 62 | font 1.1em font-icon 63 | margin 0 auto 64 | padding 10px 65 | text-decoration none 66 | color color-info 67 | &:hover 68 | color color-font 69 | .github 70 | &:before 71 | content "\f09b" 72 | .googleplus 73 | &:before 74 | content "\f0d4" 75 | .zhihu 76 | &:before 77 | content "知" 78 | .facebook 79 | &:before 80 | content "\f082" 81 | .twitter 82 | &:before 83 | content "\f099" 84 | .email 85 | &:before 86 | content "\f0e0" 87 | .weibo 88 | &:before 89 | content "\f18a" 90 | .renren 91 | &:before 92 | content "\f18b" 93 | .pinterest 94 | &:before 95 | content "\f0d3" 96 | .linkedin 97 | &:before 98 | content "\f0e1" 99 | .instagram 100 | &:before 101 | content "\f16d" 102 | 103 | 104 | 105 | .more 106 | &:before 107 | content "\f0c9" 108 | &:hover 109 | color color-title 110 | text-decoration none 111 | &:link 112 | color color-title 113 | text-decoration none 114 | display none 115 | text-decoration none 116 | @media screen and (max-width: 501px) 117 | display inline 118 | position relative 119 | font 2.1em font-icon 120 | margin 0 auto 121 | padding 10px 122 | top 18px 123 | text-decoration none 124 | color color-info 125 | 126 | -------------------------------------------------------------------------------- /source/css/_partial/index.styl: -------------------------------------------------------------------------------- 1 | #pagination 2 | a 3 | display block 4 | padding 5px 10px 5 | background color-sidebar 6 | color color-info 7 | font-family font-title 8 | text-shadow 0 0 2px #6d6d6d 9 | margin-bottom 50px 10 | &:hover 11 | background color-font 12 | color color-background 13 | text-decoration none 14 | text-shadow none 15 | 16 | .prev 17 | &:before 18 | content '\f053' 19 | padding-right 10px 20 | font-family font-icon 21 | 22 | .next 23 | &:after 24 | content '\f054' 25 | padding-left 10px 26 | font-family font-icon 27 | -------------------------------------------------------------------------------- /source/css/_partial/sidebar.styl: -------------------------------------------------------------------------------- 1 | 2 | #sidebar 3 | width 300px 4 | @media screen and (min-width: 1260px) 5 | width 350px 6 | line-height 1.8em 7 | position fixed 8 | right 70% 9 | top 0 10 | z-index 999 11 | left 0px 12 | border-right solid 1px color-transition 13 | height 100% 14 | background-color color-sidebar 15 | background color-sidebar 16 | box-shadow 0px 0 0 0 #222 17 | @media screen and (max-width: 800px) 18 | // float none 19 | // width 10% 20 | display none 21 | 22 | p 23 | text-indent 0 24 | position relative 25 | top 5px 26 | .personal-info 27 | color color-info 28 | position relative 29 | text-align center 30 | top 5% 31 | margin 0 auto 32 | max-width 60% 33 | .theme-info 34 | color color-info 35 | position relative 36 | text-align center 37 | bottom -49.3% 38 | margin 0 auto 39 | max-width 80% 40 | font-size 12px; 41 | a 42 | color color-info 43 | .personal-info figure 44 | border-bottom solid 1px color-sidebar 45 | .social 46 | text-indent 0 47 | border-top solid 1px color-sidebar 48 | text-align center 49 | .personal-photo 50 | border-radius 150px 51 | height 170px 52 | width 170px 53 | // border 5px solid white 54 | // box-shadow 1px 2px 3px #6d6d6d 55 | .personal-name 56 | font-size 1.5em 57 | .icon 58 | text-indent 0 59 | position relative 60 | font 1.1em font-icon 61 | margin 0 auto 62 | padding 10px 63 | top 25px 64 | text-decoration none 65 | color color-info 66 | font-size 30px 67 | &:hover 68 | color color-font 69 | .github 70 | &:before 71 | content "\f09b" 72 | .googleplus 73 | &:before 74 | content "\f0d4" 75 | .zhihu 76 | &:before 77 | content "知" 78 | .facebook 79 | &:before 80 | content "\f082" 81 | .twitter 82 | &:before 83 | content "\f099" 84 | .email 85 | &:before 86 | content "\f0e0" 87 | .weibo 88 | &:before 89 | content "\f18a" 90 | .renren 91 | &:before 92 | content "\f18b" 93 | .pinterest 94 | &:before 95 | content "\f0d3" 96 | .linkedin 97 | &:before 98 | content "\f0e1" 99 | .instagram 100 | &:before 101 | content "\f16d" 102 | .html5 103 | font 1.1em FontAwesome 104 | &:before 105 | content "\f13b" 106 | 107 | 108 | 109 | .widget 110 | background #fff 111 | box-shadow 1px 2px 3px #ddd 112 | margin-bottom 30px 113 | word-wrap break-word 114 | .title 115 | padding 15px 20px 116 | font-size 1em 117 | border-bottom 1px solid color-border 118 | font-weight normal 119 | 120 | .entry 121 | font-size 0.9em 122 | padding 15px 20px 123 | 124 | ul, ol, dl 125 | list-style none 126 | ul, ol, dl 127 | list-style disc 128 | margin-left 20px 129 | 130 | .search 131 | margin-bottom 30px 132 | input 133 | background #fff 134 | font-family font-title 135 | font-style italic 136 | font-size 1em 137 | padding 10px 15px 138 | border 1px solid color-border 139 | width 100% 140 | box-sizing border-box 141 | color #999 142 | &:focus 143 | color color-font 144 | 145 | .tag 146 | small 147 | margin-left 15px 148 | color #999 149 | &:before 150 | content '(' 151 | &:after 152 | content ')' 153 | 154 | .twitter 155 | li 156 | border-bottom 1px solid color-border 157 | padding 15px 20px 158 | font-size 0.9em 159 | &:last-of-type 160 | border-bottom none 161 | small 162 | display block 163 | margin-top 10px 164 | color #999 165 | line-height 1 166 | 167 | .tagcloud 168 | .entry 169 | padding-right 5px 170 | a 171 | margin-right 10px 172 | display inline-block 173 | -------------------------------------------------------------------------------- /source/css/_partial/syntax.styl: -------------------------------------------------------------------------------- 1 | .entry 2 | .gist 3 | background color-block-background 4 | border 1px solid color-border 5 | margin-top 15px 6 | padding 5px 7 | border-radius 2px 8 | text-shadow 0 0 1px #fff 9 | line-height 1.6 10 | overflow auto 11 | color #666 12 | .gist-file 13 | border none 14 | font-family inherit 15 | margin 0 16 | font-size 0.9em 17 | .gist-data 18 | background none 19 | border-bottom none 20 | pre 21 | padding 0 !important 22 | font-family font-mono 23 | .line-numbers 24 | background-color color-shadow 25 | 26 | .gist-meta 27 | background none 28 | color #999 29 | margin-top 5px 30 | padding 0 31 | text-shadow 0 0 1px #fff 32 | font-size 100% 33 | a 34 | color color-link 35 | &:visited 36 | color color-link 37 | 38 | figure.highlight 39 | background color-block-background 40 | border 1px solid color-border 41 | margin-top 15px 42 | padding 7px 15px 43 | border-radius 2px 44 | text-shadow 0 0 1px #fff 45 | line-height 1.6 46 | overflow auto 47 | position relative 48 | font-size 0.9em 49 | figcaption 50 | color #999 51 | margin-bottom 5px 52 | text-shadow 0 0 1px #fff 53 | a 54 | position absolute 55 | right 15px 56 | 57 | pre 58 | border none 59 | padding 0 60 | margin 0 61 | 62 | table 63 | margin-top 0 64 | border-spacing 0 65 | 66 | .gutter 67 | color #999 68 | padding-right 15px 69 | border-right 1px solid color-border 70 | text-align right 71 | 72 | .code 73 | padding-left 15px 74 | border-left 1px solid #fff 75 | color #666 76 | 77 | pre 78 | // Theme: Solarized - Light 79 | // More theme here: http://softwaremaniacs.org/media/soft/highlight/test.html 80 | .comment 81 | .template_comment 82 | .diff .header 83 | .doctype 84 | .pi 85 | .lisp .string 86 | .javadoc 87 | color #93a1a1 88 | font-style italic 89 | 90 | .keyword 91 | .winutils 92 | .method 93 | .addition 94 | .css .tag 95 | .request 96 | .status 97 | .nginx .title 98 | color #859900 99 | 100 | .number 101 | .command 102 | .string 103 | .tag .value 104 | .phpdoc 105 | .tex .formula 106 | .regexp 107 | .hexcolor 108 | color #2aa198 109 | 110 | .title 111 | .localvars 112 | .chunk 113 | .decorator 114 | .built_in 115 | .identifier 116 | .vhdl 117 | .literal 118 | .id 119 | color #268bd2 120 | 121 | .attribute 122 | .variable 123 | .lisp .body 124 | .smalltalk .number 125 | .constant 126 | .class .title 127 | .parent 128 | .haskell .type 129 | color #b58900 130 | 131 | .preprocessor 132 | .preprocessor .keyword 133 | .shebang 134 | .symbol 135 | .symbol .string 136 | .diff .change 137 | .special 138 | .attr_selector 139 | .important 140 | .subst 141 | .cdata 142 | .clojure .title 143 | color #cb4b16 144 | 145 | .deletion 146 | color #dc322f 147 | -------------------------------------------------------------------------------- /source/css/font/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heruoxin/hexo-persona-color/394e6dd0cefec782df584be0bc99164fc053f260/source/css/font/fontawesome-webfont.eot -------------------------------------------------------------------------------- /source/css/font/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heruoxin/hexo-persona-color/394e6dd0cefec782df584be0bc99164fc053f260/source/css/font/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /source/css/font/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heruoxin/hexo-persona-color/394e6dd0cefec782df584be0bc99164fc053f260/source/css/font/fontawesome-webfont.woff -------------------------------------------------------------------------------- /source/css/style.styl: -------------------------------------------------------------------------------- 1 | @import 'nib' 2 | 3 | @import '_base/variable' 4 | @import '_base/utils' 5 | @import '_base/layout' 6 | 7 | @import '_partial/header' 8 | @import '_partial/article' 9 | @import '_partial/comment' 10 | @import '_partial/index' 11 | @import '_partial/archive' 12 | @import '_partial/sidebar' 13 | @import '_partial/footer' 14 | @import '_partial/syntax' 15 | 16 | -------------------------------------------------------------------------------- /source/fancybox/blank.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heruoxin/hexo-persona-color/394e6dd0cefec782df584be0bc99164fc053f260/source/fancybox/blank.gif -------------------------------------------------------------------------------- /source/fancybox/fancybox_loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heruoxin/hexo-persona-color/394e6dd0cefec782df584be0bc99164fc053f260/source/fancybox/fancybox_loading.gif -------------------------------------------------------------------------------- /source/fancybox/fancybox_overlay.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heruoxin/hexo-persona-color/394e6dd0cefec782df584be0bc99164fc053f260/source/fancybox/fancybox_overlay.png -------------------------------------------------------------------------------- /source/fancybox/fancybox_sprite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heruoxin/hexo-persona-color/394e6dd0cefec782df584be0bc99164fc053f260/source/fancybox/fancybox_sprite.png -------------------------------------------------------------------------------- /source/fancybox/jquery.fancybox.css: -------------------------------------------------------------------------------- 1 | 2 | /*! fancyBox v2.1.5 fancyapps.com | fancyapps.com/fancybox/#license */ 3 | .fancybox-wrap, 4 | .fancybox-skin, 5 | .fancybox-outer, 6 | .fancybox-inner, 7 | .fancybox-image, 8 | .fancybox-wrap iframe, 9 | .fancybox-wrap object, 10 | .fancybox-nav, 11 | .fancybox-nav span, 12 | .fancybox-tmp 13 | { 14 | padding: 0; 15 | margin: 0; 16 | border: 0; 17 | outline: none; 18 | vertical-align: top; 19 | } 20 | 21 | .fancybox-wrap { 22 | position: absolute; 23 | top: 0; 24 | left: 0; 25 | z-index: 8020; 26 | } 27 | 28 | .fancybox-skin { 29 | position: relative; 30 | background: #f9f9f9; 31 | color: #444; 32 | text-shadow: none; 33 | -webkit-border-radius: 4px; 34 | -moz-border-radius: 4px; 35 | border-radius: 4px; 36 | } 37 | 38 | .fancybox-opened { 39 | z-index: 8030; 40 | } 41 | 42 | .fancybox-opened .fancybox-skin { 43 | -webkit-box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5); 44 | -moz-box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5); 45 | box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5); 46 | } 47 | 48 | .fancybox-outer, .fancybox-inner { 49 | position: relative; 50 | } 51 | 52 | .fancybox-inner { 53 | overflow: hidden; 54 | } 55 | 56 | .fancybox-type-iframe .fancybox-inner { 57 | -webkit-overflow-scrolling: touch; 58 | } 59 | 60 | .fancybox-error { 61 | color: #444; 62 | font: 14px/20px "Helvetica Neue",Helvetica,Arial,sans-serif; 63 | margin: 0; 64 | padding: 15px; 65 | white-space: nowrap; 66 | } 67 | 68 | .fancybox-image, .fancybox-iframe { 69 | display: block; 70 | width: 100%; 71 | height: 100%; 72 | } 73 | 74 | .fancybox-image { 75 | max-width: 100%; 76 | max-height: 100%; 77 | } 78 | 79 | #fancybox-loading, .fancybox-close, .fancybox-prev span, .fancybox-next span { 80 | background-image: url('fancybox_sprite.png'); 81 | } 82 | 83 | #fancybox-loading { 84 | position: fixed; 85 | top: 50%; 86 | left: 50%; 87 | margin-top: -22px; 88 | margin-left: -22px; 89 | background-position: 0 -108px; 90 | opacity: 0.8; 91 | cursor: pointer; 92 | z-index: 8060; 93 | } 94 | 95 | #fancybox-loading div { 96 | width: 44px; 97 | height: 44px; 98 | background: url('fancybox_loading.gif') center center no-repeat; 99 | } 100 | 101 | .fancybox-close { 102 | position: absolute; 103 | top: -18px; 104 | right: -18px; 105 | width: 36px; 106 | height: 36px; 107 | cursor: pointer; 108 | z-index: 8040; 109 | } 110 | 111 | .fancybox-nav { 112 | position: absolute; 113 | top: 0; 114 | width: 40%; 115 | height: 100%; 116 | cursor: pointer; 117 | text-decoration: none; 118 | background: transparent url('blank.gif'); /* helps IE */ 119 | -webkit-tap-highlight-color: rgba(0,0,0,0); 120 | z-index: 8040; 121 | } 122 | 123 | .fancybox-prev { 124 | left: 0; 125 | } 126 | 127 | .fancybox-next { 128 | right: 0; 129 | } 130 | 131 | .fancybox-nav span { 132 | position: absolute; 133 | top: 50%; 134 | width: 36px; 135 | height: 34px; 136 | margin-top: -18px; 137 | cursor: pointer; 138 | z-index: 8040; 139 | visibility: hidden; 140 | } 141 | 142 | .fancybox-prev span { 143 | left: 10px; 144 | background-position: 0 -36px; 145 | } 146 | 147 | .fancybox-next span { 148 | right: 10px; 149 | background-position: 0 -72px; 150 | } 151 | 152 | .fancybox-nav:hover span { 153 | visibility: visible; 154 | } 155 | 156 | .fancybox-tmp { 157 | position: absolute; 158 | top: -99999px; 159 | left: -99999px; 160 | visibility: hidden; 161 | max-width: 99999px; 162 | max-height: 99999px; 163 | overflow: visible !important; 164 | } 165 | 166 | /* Overlay helper */ 167 | 168 | .fancybox-lock { 169 | overflow: hidden !important; 170 | width: auto; 171 | } 172 | 173 | .fancybox-lock body { 174 | overflow: hidden !important; 175 | } 176 | 177 | .fancybox-lock-test { 178 | overflow-y: hidden !important; 179 | } 180 | 181 | .fancybox-overlay { 182 | position: absolute; 183 | top: 0; 184 | left: 0; 185 | overflow: hidden; 186 | display: none; 187 | z-index: 8010; 188 | background: url('fancybox_overlay.png'); 189 | } 190 | 191 | .fancybox-overlay-fixed { 192 | position: fixed; 193 | bottom: 0; 194 | right: 0; 195 | } 196 | 197 | .fancybox-lock .fancybox-overlay { 198 | overflow: auto; 199 | overflow-y: scroll; 200 | } 201 | 202 | /* Title helper */ 203 | 204 | .fancybox-title { 205 | visibility: hidden; 206 | font: normal 13px/20px "Helvetica Neue",Helvetica,Arial,sans-serif; 207 | position: relative; 208 | text-shadow: none; 209 | z-index: 8050; 210 | } 211 | 212 | .fancybox-opened .fancybox-title { 213 | visibility: visible; 214 | } 215 | 216 | .fancybox-title-float-wrap { 217 | position: absolute; 218 | bottom: 0; 219 | right: 50%; 220 | margin-bottom: -35px; 221 | z-index: 8050; 222 | text-align: center; 223 | } 224 | 225 | .fancybox-title-float-wrap .child { 226 | display: inline-block; 227 | margin-right: -100%; 228 | padding: 2px 20px; 229 | background: transparent; /* Fallback for web browsers that doesn't support RGBa */ 230 | background: rgba(0, 0, 0, 0.8); 231 | -webkit-border-radius: 15px; 232 | -moz-border-radius: 15px; 233 | border-radius: 15px; 234 | text-shadow: 0 1px 2px #222; 235 | color: #FFF; 236 | font-weight: bold; 237 | line-height: 24px; 238 | white-space: nowrap; 239 | } 240 | 241 | .fancybox-title-outside-wrap { 242 | position: relative; 243 | margin-top: 10px; 244 | color: #fff; 245 | } 246 | 247 | .fancybox-title-inside-wrap { 248 | padding-top: 10px; 249 | } 250 | 251 | .fancybox-title-over-wrap { 252 | position: absolute; 253 | bottom: 0; 254 | left: 0; 255 | color: #fff; 256 | padding: 10px; 257 | background: #000; 258 | background: rgba(0, 0, 0, .8); 259 | } 260 | 261 | /*Retina graphics!*/ 262 | @media only screen and (-webkit-min-device-pixel-ratio: 1.5), 263 | only screen and (min--moz-device-pixel-ratio: 1.5), 264 | only screen and (min-device-pixel-ratio: 1.5){ 265 | 266 | #fancybox-loading, .fancybox-close, .fancybox-prev span, .fancybox-next span { 267 | background-image: url('fancybox_sprite@2x.png'); 268 | background-size: 44px 152px; /*The size of the normal image, half the size of the hi-res image*/ 269 | } 270 | 271 | #fancybox-loading div { 272 | background-image: url('fancybox_loading@2x.gif'); 273 | background-size: 24px 24px; /*The size of the normal image, half the size of the hi-res image*/ 274 | } 275 | } 276 | -------------------------------------------------------------------------------- /source/fancybox/jquery.fancybox.pack.js: -------------------------------------------------------------------------------- 1 | 2 | /*! fancyBox v2.1.5 fancyapps.com | fancyapps.com/fancybox/#license */ 3 | (function(r,G,f,v){var J=f("html"),n=f(r),p=f(G),b=f.fancybox=function(){b.open.apply(this,arguments)},I=navigator.userAgent.match(/msie/i),B=null,s=G.createTouch!==v,t=function(a){return a&&a.hasOwnProperty&&a instanceof f},q=function(a){return a&&"string"===f.type(a)},E=function(a){return q(a)&&0
',image:'',iframe:'",error:'

The requested content cannot be loaded.
Please try again later.

',closeBtn:'',next:'',prev:''},openEffect:"fade",openSpeed:250,openEasing:"swing",openOpacity:!0, 7 | openMethod:"zoomIn",closeEffect:"fade",closeSpeed:250,closeEasing:"swing",closeOpacity:!0,closeMethod:"zoomOut",nextEffect:"elastic",nextSpeed:250,nextEasing:"swing",nextMethod:"changeIn",prevEffect:"elastic",prevSpeed:250,prevEasing:"swing",prevMethod:"changeOut",helpers:{overlay:!0,title:!0},onCancel:f.noop,beforeLoad:f.noop,afterLoad:f.noop,beforeShow:f.noop,afterShow:f.noop,beforeChange:f.noop,beforeClose:f.noop,afterClose:f.noop},group:{},opts:{},previous:null,coming:null,current:null,isActive:!1, 8 | isOpen:!1,isOpened:!1,wrap:null,skin:null,outer:null,inner:null,player:{timer:null,isActive:!1},ajaxLoad:null,imgPreload:null,transitions:{},helpers:{},open:function(a,d){if(a&&(f.isPlainObject(d)||(d={}),!1!==b.close(!0)))return f.isArray(a)||(a=t(a)?f(a).get():[a]),f.each(a,function(e,c){var k={},g,h,j,m,l;"object"===f.type(c)&&(c.nodeType&&(c=f(c)),t(c)?(k={href:c.data("fancybox-href")||c.attr("href"),title:c.data("fancybox-title")||c.attr("title"),isDom:!0,element:c},f.metadata&&f.extend(!0,k, 9 | c.metadata())):k=c);g=d.href||k.href||(q(c)?c:null);h=d.title!==v?d.title:k.title||"";m=(j=d.content||k.content)?"html":d.type||k.type;!m&&k.isDom&&(m=c.data("fancybox-type"),m||(m=(m=c.prop("class").match(/fancybox\.(\w+)/))?m[1]:null));q(g)&&(m||(b.isImage(g)?m="image":b.isSWF(g)?m="swf":"#"===g.charAt(0)?m="inline":q(c)&&(m="html",j=c)),"ajax"===m&&(l=g.split(/\s+/,2),g=l.shift(),l=l.shift()));j||("inline"===m?g?j=f(q(g)?g.replace(/.*(?=#[^\s]+$)/,""):g):k.isDom&&(j=c):"html"===m?j=g:!m&&(!g&& 10 | k.isDom)&&(m="inline",j=c));f.extend(k,{href:g,type:m,content:j,title:h,selector:l});a[e]=k}),b.opts=f.extend(!0,{},b.defaults,d),d.keys!==v&&(b.opts.keys=d.keys?f.extend({},b.defaults.keys,d.keys):!1),b.group=a,b._start(b.opts.index)},cancel:function(){var a=b.coming;a&&!1!==b.trigger("onCancel")&&(b.hideLoading(),b.ajaxLoad&&b.ajaxLoad.abort(),b.ajaxLoad=null,b.imgPreload&&(b.imgPreload.onload=b.imgPreload.onerror=null),a.wrap&&a.wrap.stop(!0,!0).trigger("onReset").remove(),b.coming=null,b.current|| 11 | b._afterZoomOut(a))},close:function(a){b.cancel();!1!==b.trigger("beforeClose")&&(b.unbindEvents(),b.isActive&&(!b.isOpen||!0===a?(f(".fancybox-wrap").stop(!0).trigger("onReset").remove(),b._afterZoomOut()):(b.isOpen=b.isOpened=!1,b.isClosing=!0,f(".fancybox-item, .fancybox-nav").remove(),b.wrap.stop(!0,!0).removeClass("fancybox-opened"),b.transitions[b.current.closeMethod]())))},play:function(a){var d=function(){clearTimeout(b.player.timer)},e=function(){d();b.current&&b.player.isActive&&(b.player.timer= 12 | setTimeout(b.next,b.current.playSpeed))},c=function(){d();p.unbind(".player");b.player.isActive=!1;b.trigger("onPlayEnd")};if(!0===a||!b.player.isActive&&!1!==a){if(b.current&&(b.current.loop||b.current.index=c.index?"next":"prev"],b.router=e||"jumpto",c.loop&&(0>a&&(a=c.group.length+a%c.group.length),a%=c.group.length),c.group[a]!==v&&(b.cancel(),b._start(a)))},reposition:function(a,d){var e=b.current,c=e?e.wrap:null,k;c&&(k=b._getPosition(d),a&&"scroll"===a.type?(delete k.position,c.stop(!0,!0).animate(k,200)):(c.css(k),e.pos=f.extend({},e.dim,k)))},update:function(a){var d= 14 | a&&a.type,e=!d||"orientationchange"===d;e&&(clearTimeout(B),B=null);b.isOpen&&!B&&(B=setTimeout(function(){var c=b.current;c&&!b.isClosing&&(b.wrap.removeClass("fancybox-tmp"),(e||"load"===d||"resize"===d&&c.autoResize)&&b._setDimension(),"scroll"===d&&c.canShrink||b.reposition(a),b.trigger("onUpdate"),B=null)},e&&!s?0:300))},toggle:function(a){b.isOpen&&(b.current.fitToView="boolean"===f.type(a)?a:!b.current.fitToView,s&&(b.wrap.removeAttr("style").addClass("fancybox-tmp"),b.trigger("onUpdate")), 15 | b.update())},hideLoading:function(){p.unbind(".loading");f("#fancybox-loading").remove()},showLoading:function(){var a,d;b.hideLoading();a=f('
').click(b.cancel).appendTo("body");p.bind("keydown.loading",function(a){if(27===(a.which||a.keyCode))a.preventDefault(),b.cancel()});b.defaults.fixed||(d=b.getViewport(),a.css({position:"absolute",top:0.5*d.h+d.y,left:0.5*d.w+d.x}))},getViewport:function(){var a=b.current&&b.current.locked||!1,d={x:n.scrollLeft(), 16 | y:n.scrollTop()};a?(d.w=a[0].clientWidth,d.h=a[0].clientHeight):(d.w=s&&r.innerWidth?r.innerWidth:n.width(),d.h=s&&r.innerHeight?r.innerHeight:n.height());return d},unbindEvents:function(){b.wrap&&t(b.wrap)&&b.wrap.unbind(".fb");p.unbind(".fb");n.unbind(".fb")},bindEvents:function(){var a=b.current,d;a&&(n.bind("orientationchange.fb"+(s?"":" resize.fb")+(a.autoCenter&&!a.locked?" scroll.fb":""),b.update),(d=a.keys)&&p.bind("keydown.fb",function(e){var c=e.which||e.keyCode,k=e.target||e.srcElement; 17 | if(27===c&&b.coming)return!1;!e.ctrlKey&&(!e.altKey&&!e.shiftKey&&!e.metaKey&&(!k||!k.type&&!f(k).is("[contenteditable]")))&&f.each(d,function(d,k){if(1h[0].clientWidth||h[0].clientHeight&&h[0].scrollHeight>h[0].clientHeight),h=f(h).parent();if(0!==c&&!j&&1g||0>k)b.next(0>g?"up":"right");d.preventDefault()}}))},trigger:function(a,d){var e,c=d||b.coming||b.current;if(c){f.isFunction(c[a])&&(e=c[a].apply(c,Array.prototype.slice.call(arguments,1)));if(!1===e)return!1;c.helpers&&f.each(c.helpers,function(d,e){if(e&&b.helpers[d]&&f.isFunction(b.helpers[d][a]))b.helpers[d][a](f.extend(!0, 19 | {},b.helpers[d].defaults,e),c)});p.trigger(a)}},isImage:function(a){return q(a)&&a.match(/(^data:image\/.*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp|svg)((\?|#).*)?$)/i)},isSWF:function(a){return q(a)&&a.match(/\.(swf)((\?|#).*)?$/i)},_start:function(a){var d={},e,c;a=l(a);e=b.group[a]||null;if(!e)return!1;d=f.extend(!0,{},b.opts,e);e=d.margin;c=d.padding;"number"===f.type(e)&&(d.margin=[e,e,e,e]);"number"===f.type(c)&&(d.padding=[c,c,c,c]);d.modal&&f.extend(!0,d,{closeBtn:!1,closeClick:!1,nextClick:!1,arrows:!1, 20 | mouseWheel:!1,keys:null,helpers:{overlay:{closeClick:!1}}});d.autoSize&&(d.autoWidth=d.autoHeight=!0);"auto"===d.width&&(d.autoWidth=!0);"auto"===d.height&&(d.autoHeight=!0);d.group=b.group;d.index=a;b.coming=d;if(!1===b.trigger("beforeLoad"))b.coming=null;else{c=d.type;e=d.href;if(!c)return b.coming=null,b.current&&b.router&&"jumpto"!==b.router?(b.current.index=a,b[b.router](b.direction)):!1;b.isActive=!0;if("image"===c||"swf"===c)d.autoHeight=d.autoWidth=!1,d.scrolling="visible";"image"===c&&(d.aspectRatio= 21 | !0);"iframe"===c&&s&&(d.scrolling="scroll");d.wrap=f(d.tpl.wrap).addClass("fancybox-"+(s?"mobile":"desktop")+" fancybox-type-"+c+" fancybox-tmp "+d.wrapCSS).appendTo(d.parent||"body");f.extend(d,{skin:f(".fancybox-skin",d.wrap),outer:f(".fancybox-outer",d.wrap),inner:f(".fancybox-inner",d.wrap)});f.each(["Top","Right","Bottom","Left"],function(a,b){d.skin.css("padding"+b,w(d.padding[a]))});b.trigger("onReady");if("inline"===c||"html"===c){if(!d.content||!d.content.length)return b._error("content")}else if(!e)return b._error("href"); 22 | "image"===c?b._loadImage():"ajax"===c?b._loadAjax():"iframe"===c?b._loadIframe():b._afterLoad()}},_error:function(a){f.extend(b.coming,{type:"html",autoWidth:!0,autoHeight:!0,minWidth:0,minHeight:0,scrolling:"no",hasError:a,content:b.coming.tpl.error});b._afterLoad()},_loadImage:function(){var a=b.imgPreload=new Image;a.onload=function(){this.onload=this.onerror=null;b.coming.width=this.width/b.opts.pixelRatio;b.coming.height=this.height/b.opts.pixelRatio;b._afterLoad()};a.onerror=function(){this.onload= 23 | this.onerror=null;b._error("image")};a.src=b.coming.href;!0!==a.complete&&b.showLoading()},_loadAjax:function(){var a=b.coming;b.showLoading();b.ajaxLoad=f.ajax(f.extend({},a.ajax,{url:a.href,error:function(a,e){b.coming&&"abort"!==e?b._error("ajax",a):b.hideLoading()},success:function(d,e){"success"===e&&(a.content=d,b._afterLoad())}}))},_loadIframe:function(){var a=b.coming,d=f(a.tpl.iframe.replace(/\{rnd\}/g,(new Date).getTime())).attr("scrolling",s?"auto":a.iframe.scrolling).attr("src",a.href); 24 | f(a.wrap).bind("onReset",function(){try{f(this).find("iframe").hide().attr("src","//about:blank").end().empty()}catch(a){}});a.iframe.preload&&(b.showLoading(),d.one("load",function(){f(this).data("ready",1);s||f(this).bind("load.fb",b.update);f(this).parents(".fancybox-wrap").width("100%").removeClass("fancybox-tmp").show();b._afterLoad()}));a.content=d.appendTo(a.inner);a.iframe.preload||b._afterLoad()},_preloadImages:function(){var a=b.group,d=b.current,e=a.length,c=d.preload?Math.min(d.preload, 25 | e-1):0,f,g;for(g=1;g<=c;g+=1)f=a[(d.index+g)%e],"image"===f.type&&f.href&&((new Image).src=f.href)},_afterLoad:function(){var a=b.coming,d=b.current,e,c,k,g,h;b.hideLoading();if(a&&!1!==b.isActive)if(!1===b.trigger("afterLoad",a,d))a.wrap.stop(!0).trigger("onReset").remove(),b.coming=null;else{d&&(b.trigger("beforeChange",d),d.wrap.stop(!0).removeClass("fancybox-opened").find(".fancybox-item, .fancybox-nav").remove());b.unbindEvents();e=a.content;c=a.type;k=a.scrolling;f.extend(b,{wrap:a.wrap,skin:a.skin, 26 | outer:a.outer,inner:a.inner,current:a,previous:d});g=a.href;switch(c){case "inline":case "ajax":case "html":a.selector?e=f("
").html(e).find(a.selector):t(e)&&(e.data("fancybox-placeholder")||e.data("fancybox-placeholder",f('
').insertAfter(e).hide()),e=e.show().detach(),a.wrap.bind("onReset",function(){f(this).find(e).length&&e.hide().replaceAll(e.data("fancybox-placeholder")).data("fancybox-placeholder",!1)}));break;case "image":e=a.tpl.image.replace("{href}", 27 | g);break;case "swf":e='',h="",f.each(a.swf,function(a,b){e+='';h+=" "+a+'="'+b+'"'}),e+='"}(!t(e)||!e.parent().is(a.inner))&&a.inner.append(e);b.trigger("beforeShow");a.inner.css("overflow","yes"===k?"scroll": 28 | "no"===k?"hidden":k);b._setDimension();b.reposition();b.isOpen=!1;b.coming=null;b.bindEvents();if(b.isOpened){if(d.prevMethod)b.transitions[d.prevMethod]()}else f(".fancybox-wrap").not(a.wrap).stop(!0).trigger("onReset").remove();b.transitions[b.isOpened?a.nextMethod:a.openMethod]();b._preloadImages()}},_setDimension:function(){var a=b.getViewport(),d=0,e=!1,c=!1,e=b.wrap,k=b.skin,g=b.inner,h=b.current,c=h.width,j=h.height,m=h.minWidth,u=h.minHeight,n=h.maxWidth,p=h.maxHeight,s=h.scrolling,q=h.scrollOutside? 29 | h.scrollbarWidth:0,x=h.margin,y=l(x[1]+x[3]),r=l(x[0]+x[2]),v,z,t,C,A,F,B,D,H;e.add(k).add(g).width("auto").height("auto").removeClass("fancybox-tmp");x=l(k.outerWidth(!0)-k.width());v=l(k.outerHeight(!0)-k.height());z=y+x;t=r+v;C=E(c)?(a.w-z)*l(c)/100:c;A=E(j)?(a.h-t)*l(j)/100:j;if("iframe"===h.type){if(H=h.content,h.autoHeight&&1===H.data("ready"))try{H[0].contentWindow.document.location&&(g.width(C).height(9999),F=H.contents().find("body"),q&&F.css("overflow-x","hidden"),A=F.outerHeight(!0))}catch(G){}}else if(h.autoWidth|| 30 | h.autoHeight)g.addClass("fancybox-tmp"),h.autoWidth||g.width(C),h.autoHeight||g.height(A),h.autoWidth&&(C=g.width()),h.autoHeight&&(A=g.height()),g.removeClass("fancybox-tmp");c=l(C);j=l(A);D=C/A;m=l(E(m)?l(m,"w")-z:m);n=l(E(n)?l(n,"w")-z:n);u=l(E(u)?l(u,"h")-t:u);p=l(E(p)?l(p,"h")-t:p);F=n;B=p;h.fitToView&&(n=Math.min(a.w-z,n),p=Math.min(a.h-t,p));z=a.w-y;r=a.h-r;h.aspectRatio?(c>n&&(c=n,j=l(c/D)),j>p&&(j=p,c=l(j*D)),cz||y>r)&&(c>m&&j>u)&&!(19n&&(c=n,j=l(c/D)),g.width(c).height(j),e.width(c+x),a=e.width(),y=e.height();else c=Math.max(m,Math.min(c,c-(a-z))),j=Math.max(u,Math.min(j,j-(y-r)));q&&("auto"===s&&jz||y>r)&&c>m&&j>u;c=h.aspectRatio?cu&&j
').appendTo(b.coming?b.coming.parent:a.parent);this.fixed=!1;a.fixed&&b.defaults.fixed&&(this.overlay.addClass("fancybox-overlay-fixed"),this.fixed=!0)},open:function(a){var d=this;a=f.extend({},this.defaults,a);this.overlay?this.overlay.unbind(".overlay").width("auto").height("auto"):this.create(a);this.fixed||(n.bind("resize.overlay",f.proxy(this.update,this)),this.update());a.closeClick&&this.overlay.bind("click.overlay",function(a){if(f(a.target).hasClass("fancybox-overlay"))return b.isActive? 41 | b.close():d.close(),!1});this.overlay.css(a.css).show()},close:function(){var a,b;n.unbind("resize.overlay");this.el.hasClass("fancybox-lock")&&(f(".fancybox-margin").removeClass("fancybox-margin"),a=n.scrollTop(),b=n.scrollLeft(),this.el.removeClass("fancybox-lock"),n.scrollTop(a).scrollLeft(b));f(".fancybox-overlay").remove().hide();f.extend(this,{overlay:null,fixed:!1})},update:function(){var a="100%",b;this.overlay.width(a).height("100%");I?(b=Math.max(G.documentElement.offsetWidth,G.body.offsetWidth), 42 | p.width()>b&&(a=p.width())):p.width()>n.width()&&(a=p.width());this.overlay.width(a).height(p.height())},onReady:function(a,b){var e=this.overlay;f(".fancybox-overlay").stop(!0,!0);e||this.create(a);a.locked&&(this.fixed&&b.fixed)&&(e||(this.margin=p.height()>n.height()?f("html").css("margin-right").replace("px",""):!1),b.locked=this.overlay.append(b.wrap),b.fixed=!1);!0===a.showEarly&&this.beforeShow.apply(this,arguments)},beforeShow:function(a,b){var e,c;b.locked&&(!1!==this.margin&&(f("*").filter(function(){return"fixed"=== 43 | f(this).css("position")&&!f(this).hasClass("fancybox-overlay")&&!f(this).hasClass("fancybox-wrap")}).addClass("fancybox-margin"),this.el.addClass("fancybox-margin")),e=n.scrollTop(),c=n.scrollLeft(),this.el.addClass("fancybox-lock"),n.scrollTop(e).scrollLeft(c));this.open(a)},onUpdate:function(){this.fixed||this.update()},afterClose:function(a){this.overlay&&!b.coming&&this.overlay.fadeOut(a.speedOut,f.proxy(this.close,this))}};b.helpers.title={defaults:{type:"float",position:"bottom"},beforeShow:function(a){var d= 44 | b.current,e=d.title,c=a.type;f.isFunction(e)&&(e=e.call(d.element,d));if(q(e)&&""!==f.trim(e)){d=f('
'+e+"
");switch(c){case "inside":c=b.skin;break;case "outside":c=b.wrap;break;case "over":c=b.inner;break;default:c=b.skin,d.appendTo("body"),I&&d.width(d.width()),d.wrapInner(''),b.current.margin[2]+=Math.abs(l(d.css("margin-bottom")))}d["top"===a.position?"prependTo":"appendTo"](c)}}};f.fn.fancybox=function(a){var d, 45 | e=f(this),c=this.selector||"",k=function(g){var h=f(this).blur(),j=d,k,l;!g.ctrlKey&&(!g.altKey&&!g.shiftKey&&!g.metaKey)&&!h.is(".fancybox-wrap")&&(k=a.groupAttr||"data-fancybox-group",l=h.attr(k),l||(k="rel",l=h.get(0)[k]),l&&(""!==l&&"nofollow"!==l)&&(h=c.length?f(c):e,h=h.filter("["+k+'="'+l+'"]'),j=h.index(this)),a.index=j,!1!==b.open(h,a)&&g.preventDefault())};a=a||{};d=a.index||0;!c||!1===a.live?e.unbind("click.fb-start").bind("click.fb-start",k):p.undelegate(c,"click.fb-start").delegate(c+ 46 | ":not('.fancybox-item, .fancybox-nav')","click.fb-start",k);this.filter("[data-fancybox-start=1]").trigger("click");return this};p.ready(function(){var a,d;f.scrollbarWidth===v&&(f.scrollbarWidth=function(){var a=f('
').appendTo("body"),b=a.children(),b=b.innerWidth()-b.height(99).innerWidth();a.remove();return b});if(f.support.fixedPosition===v){a=f.support;d=f('
').appendTo("body");var e=20=== 47 | d[0].offsetTop||15===d[0].offsetTop;d.remove();a.fixedPosition=e}f.extend(b.defaults,{scrollbarWidth:f.scrollbarWidth(),fixed:f.support.fixedPosition,parent:f("body")});a=f(r).width();J.addClass("fancybox-lock-test");d=f(r).width();J.removeClass("fancybox-lock-test");f("").appendTo("head")})})(window,document,jQuery); 48 | -------------------------------------------------------------------------------- /source/js/gallery.js: -------------------------------------------------------------------------------- 1 | !function(a){a(".entry").each(function(b){a(this).find("img").each(function(){var c=this.alt;c&&a(this).after(''+c+""),a(this).wrap('')})});var b=function(a,b,c){var d=a.width();b.imagesLoaded(function(){var b=this[0],e=b.naturalWidth,f=b.naturalHeight;c(),this.animate({opacity:1},500),a.animate({height:d*f/e},500)})};a(".gallery").each(function(){var c=a(this),d=0,e=c.children(".photoset").children(),f=e.length,g=!0;b(c,e.eq(0),function(){g=!1}),c.on("click",".prev",function(){if(!g){var a=(d-1)%f;g=!0,b(c,e.eq(a),function(){e.eq(d).animate({opacity:0},500),g=!1,d=a})}}).on("click",".next",function(){if(!g){var a=(d+1)%f;g=!0,b(c,e.eq(a),function(){e.eq(d).animate({opacity:0},500),g=!1,d=a})}})})}(jQuery); 2 | -------------------------------------------------------------------------------- /source/js/headroom.min.and.gallery.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * headroom.js v0.4.0 - Give your page some headroom. Hide your header until you need it 3 | * Copyright (c) 2014 Nick Williams - http://wicky.nillia.ms/headroom.js 4 | * License: MIT 5 | */ 6 | !function(a,b){"use strict";function c(a){this.callback=a,this.ticking=!1}function d(a){if(arguments.length<=0)throw new Error("Missing arguments in extend function");var b,c,e=a||{};for(c=1;ca,c=a+this.getViewportHeight()>this.getDocumentHeight();return b||c},toleranceExceeded:function(a){return Math.abs(a-this.lastKnownScrollY)>=this.tolerance},shouldUnpin:function(a,b){var c=a>this.lastKnownScrollY,d=a>=this.offset;return c&&d&&b},shouldPin:function(a,b){var c=a'+c+""),a(this).wrap('')})});var b=function(a,b,c){var d=a.width();b.imagesLoaded(function(){var b=this[0],e=b.naturalWidth,f=b.naturalHeight;c(),this.animate({opacity:1},500),a.animate({height:d*f/e},500)})};a(".gallery").each(function(){var c=a(this),d=0,e=c.children(".photoset").children(),f=e.length,g=!0;b(c,e.eq(0),function(){g=!1}),c.on("click",".prev",function(){if(!g){var a=(d-1)%f;g=!0,b(c,e.eq(a),function(){e.eq(d).animate({opacity:0},500),g=!1,d=a})}}).on("click",".next",function(){if(!g){var a=(d+1)%f;g=!0,b(c,e.eq(a),function(){e.eq(d).animate({opacity:0},500),g=!1,d=a})}})})}(jQuery); 11 | 12 | -------------------------------------------------------------------------------- /source/js/headroom.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * headroom.js v0.4.0 - Give your page some headroom. Hide your header until you need it 3 | * Copyright (c) 2014 Nick Williams - http://wicky.nillia.ms/headroom.js 4 | * License: MIT 5 | */ 6 | 7 | !function(a,b){"use strict";function c(a){this.callback=a,this.ticking=!1}function d(a){if(arguments.length<=0)throw new Error("Missing arguments in extend function");var b,c,e=a||{};for(c=1;ca,c=a+this.getViewportHeight()>this.getDocumentHeight();return b||c},toleranceExceeded:function(a){return Math.abs(a-this.lastKnownScrollY)>=this.tolerance},shouldUnpin:function(a,b){var c=a>this.lastKnownScrollY,d=a>=this.offset;return c&&d&&b},shouldPin:function(a,b){var c=a. 16 | */ 17 | /** 18 | * jQuery.tagcanvas 2.2 19 | * For more information, please contact 20 | */ 21 | (function(ad){var ap,ao,aa=Math.abs,w=Math.sin,l=Math.cos,I=Math.max,au=Math.min,V=Math.ceil,ai=Math.sqrt,X=Math.pow,L={},O={},R={0:"0,",1:"17,",2:"34,",3:"51,",4:"68,",5:"85,",6:"102,",7:"119,",8:"136,",9:"153,",a:"170,",A:"170,",b:"187,",B:"187,",c:"204,",C:"204,",d:"221,",D:"221,",e:"238,",E:"238,",f:"255,",F:"255,"},e,ae,d,a,af,z,o=document,H,c={};for(ap=0;ap<256;++ap){ao=ap.toString(16);if(ap<16){ao="0"+ao}O[ao]=O[ao.toUpperCase()]=ap.toString()+","}function ak(i){return typeof i!="undefined"}function v(i){return typeof i=="object"&&i!=null}function b(i,j,aw){return isNaN(i)?aw:au(aw,I(j,i))}function Y(){return false}function T(){return new Date().valueOf()}function n(aw,az){var j=[],ax=aw.length,ay;for(ay=0;ay=1){return 0}if(aw<=-1){return Math.PI}return Math.acos(aw)};af.unit=function(){var i=this.length();return new U(this.x/i,this.y/i,this.z/i)};function K(aw,j){j=j*Math.PI/180;aw=aw*Math.PI/180;var i=w(aw)*l(j),ay=-w(j),ax=-l(aw)*l(j);return new U(i,ay,ax)}function k(i){this[1]={1:i[0],2:i[1],3:i[2]};this[2]={1:i[3],2:i[4],3:i[5]};this[3]={1:i[6],2:i[7],3:i[8]}}a=k.prototype;k.Identity=function(){return new k([1,0,0,0,1,0,0,0,1])};k.Rotation=function(ax,i){var j=w(ax),aw=l(ax),ay=1-aw;return new k([aw+X(i.x,2)*ay,i.x*i.y*ay-i.z*j,i.x*i.z*ay+i.y*j,i.y*i.x*ay+i.z*j,aw+X(i.y,2)*ay,i.y*i.z*ay-i.x*j,i.z*i.x*ay-i.y*j,i.z*i.y*ay+i.x*j,aw+X(i.z,2)*ay])};a.mul=function(aw){var ax=[],aA,az,ay=(aw.xform?1:0);for(aA=1;aA<=3;++aA){for(az=1;az<=3;++az){if(ay){ax.push(this[aA][1]*aw[1][az]+this[aA][2]*aw[2][az]+this[aA][3]*aw[3][az])}else{ax.push(this[aA][az]*aw)}}}return new k(ax)};a.xform=function(aw){var j={},i=aw.x,ay=aw.y,ax=aw.z;j.x=i*this[1][1]+ay*this[2][1]+ax*this[3][1];j.y=i*this[1][2]+ay*this[2][2]+ax*this[3][2];j.z=i*this[1][3]+ay*this[2][3]+ax*this[3][3];return j};function s(ax,az,aE,aB){var aA,aD,j,aC,aF=[],ay=Math.PI*(3-ai(5)),aw=2/ax;for(aA=0;aA0)}function av(aD,j){var aw=1024,az=aD.weightGradient,ay,aB,ax,aC,aA;if(aD.gCanvas){aB=aD.gCanvas.getContext("2d")}else{aD.gCanvas=ay=h(aw,1);if(!ay){return null}aB=ay.getContext("2d");aC=aB.createLinearGradient(0,0,aw,0);for(ax in az){aC.addColorStop(1-ax,az[ax])}aB.fillStyle=aC;aB.fillRect(0,0,aw,1)}aA=aB.getImageData(~~((aw-1)*j),0,1,1).data;return"rgba("+aA[0]+","+aA[1]+","+aA[2]+","+(aA[3]/255)+")"}function B(aB,aA,ax,aH,aC,aD,aw,aE,aF){var az=(aD||0)+(aw&&aw[0]<0?aa(aw[0]):0),j=(aD||0)+(aw&&aw[1]<0?aa(aw[1]):0),ay,aG;aB.font=aA;aB.textBaseline="top";aB.fillStyle=ax;aC&&(aB.shadowColor=aC);aD&&(aB.shadowBlur=aD);aw&&(aB.shadowOffsetX=aw[0],aB.shadowOffsetY=aw[1]);for(ay=0;ayaF?aG+aF:aF*2),j=aB.height+(aC>aF?aC+aF:aF*2),aA=(aF||0)+(ax[0]<0?aG:0),aw=(aF||0)+(ax[1]<0?aC:0),az,aD;az=h(ay,j);if(!az){return null}aD=az.getContext("2d");aE&&(aD.shadowColor=aE);aF&&(aD.shadowBlur=aF);ax&&(aD.shadowOffsetX=ax[0],aD.shadowOffsetY=ax[1]);aD.drawImage(aB,aA,aw,aB.width,aB.height);return az}function ag(aI,aA,aG){var aH=parseInt(aI.toString().length*aG),az=parseInt(aG*2*aI.length),ax=h(aH,az),aD,j,ay,aC,aF,aE,aw,aB;if(!ax){return null}aD=ax.getContext("2d");aD.fillStyle="#000";aD.fillRect(0,0,aH,az);B(aD,aG+"px "+aA,"#fff",aI,0,0,[]);j=aD.getImageData(0,0,aH,az);ay=j.width;aC=j.height;aB={min:{x:ay,y:aC},max:{x:-1,y:-1}};for(aE=0;aE0){if(aFaB.max.x){aB.max.x=aF}if(aEaB.max.y){aB.max.y=aE}}}}if(ay!=aH){aB.min.x*=(aH/ay);aB.max.x*=(aH/ay)}if(aC!=az){aB.min.y*=(aH/aC);aB.max.y*=(aH/aC)}ax=null;return aB}function y(i){return"'"+i.replace(/(\'|\")/g,"").replace(/\s*,\s*/g,"', '")+"'"}function G(i,j,aw){aw=aw||o;if(aw.addEventListener){aw.addEventListener(i,j,false)}else{aw.attachEvent("on"+i,j)}}function am(ay,aA,ax,aw){var az=aw.imageScale,j;if(!aA.complete){return G("load",function(){am(ay,aA,ax,aw)},aA)}if(!ay.complete){return G("load",function(){am(ay,aA,ax,aw)},ay)}aA.width=aA.width;aA.height=aA.height;if(az){ay.width=aA.width*az;ay.height=aA.height*az}ax.w=ay.width;ax.h=ay.height;if(aw.txtOpt&&aw.shadow){j=an(ay,aw.shadow,aw.shadowBlur,aw.shadowOffset);if(j){ax.image=j;ax.w=j.width;ax.h=j.height}}}function aj(ax,aw){var j=o.defaultView,i=aw.replace(/\-([a-z])/g,function(ay){return ay.charAt(1).toUpperCase()});return(j&&j.getComputedStyle&&j.getComputedStyle(ax,null).getPropertyValue(aw))||(ax.currentStyle&&ax.currentStyle[i])}function F(aw,j){var i=1,ax;if(aw.weightFrom){i=1*(j.getAttribute(aw.weightFrom)||aw.textHeight)}else{if(ax=aj(j,"font-size")){i=(ax.indexOf("px")>-1&&ax.replace("px","")*1)||(ax.indexOf("pt")>-1&&ax.replace("pt","")*1.25)||ax*3.3}else{aw.weight=false}}return i}function A(i){return i.target&&ak(i.target.id)?i.target.id:i.srcElement.parentNode.id}function M(ay,az){var ax,aw,i=parseInt(aj(az,"width"))/az.width,j=parseInt(aj(az,"height"))/az.height;if(ak(ay.offsetX)){ax={x:ay.offsetX,y:ay.offsetY}}else{aw=r(az.id);if(ak(ay.changedTouches)){ay=ay.changedTouches[0]}if(ay.pageX){ax={x:ay.pageX-aw.x,y:ay.pageY-aw.y}}}if(ax&&i&&j){ax.x/=i;ax.y/=j}return ax}function m(aw){var j=aw.target||aw.fromElement.parentNode,i=x.tc[j.id];if(i){i.mx=i.my=-1;i.UnFreeze();i.EndDrag()}}function ah(aA){var ax,aw=x,j,az,ay=A(aA);for(ax in aw.tc){j=aw.tc[ax];if(j.tttimer){clearTimeout(j.tttimer);j.tttimer=null}}if(ay&&aw.tc[ay]){j=aw.tc[ay];if(az=M(aA,j.canvas)){j.mx=az.x;j.my=az.y;j.Drag(aA,az)}j.drawn=0}}function Z(ax){var j=x,i=o.addEventListener?0:1,aw=A(ax);if(aw&&ax.button==i&&j.tc[aw]){j.tc[aw].BeginDrag(ax)}}function g(ay){var aw=x,j=o.addEventListener?0:1,ax=A(ay),i;if(ax&&ay.button==j&&aw.tc[ax]){i=aw.tc[ax];ah(ay);if(!i.EndDrag()&&!i.touched){i.Clicked(ay)}}}function J(aw){var i=x,j=A(aw);if(j&&aw.changedTouches&&i.tc[j]){i.tc[j].touched=1;i.tc[j].BeginDrag(aw)}}function p(aw){var i=x,j=A(aw);if(j&&aw.changedTouches&&i.tc[j]){ab(aw);if(!i.tc[j].EndDrag()){i.tc[j].Draw();i.tc[j].Clicked(aw)}}}function ab(aA){var ax,aw=x,j,az,ay=A(aA);for(ax in aw.tc){j=aw.tc[ax];if(j.tttimer){clearTimeout(j.tttimer);j.tttimer=null}}if(ay&&aw.tc[ay]&&aA.changedTouches){j=aw.tc[ay];if(az=M(aA,j.canvas)){j.mx=az.x;j.my=az.y;j.Drag(aA,az)}j.drawn=0}}function ar(aw){var i=x,j=A(aw);if(j&&i.tc[j]){aw.cancelBubble=true;aw.returnValue=false;aw.preventDefault&&aw.preventDefault();i.tc[j].Wheel((aw.wheelDelta||aw.detail)>0)}}function t(ay){var j=x.tc,ax,aw;ay=ay||T();for(ax in j){aw=j[ax].interval;j[ax].Draw(ay)}x.NextFrame(aw)}function r(aw){var az=o.getElementById(aw),i=az.getBoundingClientRect(),aC=o.documentElement,aA=o.body,aB=window,ax=aB.pageXOffset||aC.scrollLeft,aD=aB.pageYOffset||aC.scrollTop,ay=aC.clientLeft||aA.clientLeft,j=aC.clientTop||aA.clientTop;return{x:i.left+ax-ay,y:i.top+aD-j}}function aq(j,ax,ay,aw){var i=j.radius*j.z1/(j.z1+j.z2+ax.z);return{x:ax.x*i*ay,y:ax.y*i*aw,z:ax.z,w:(j.z1-ax.z)/j.z2}}function P(i){this.e=i;this.br=0;this.line=[];this.text=[];this.original=i.innerText||i.textContent}z=P.prototype;z.Lines=function(ay){var ax=ay?1:0,az,j,aw;ay=ay||this.e;az=ay.childNodes;j=az.length;for(aw=0;awaw){aB.push(this.line.join(" "));this.line=[aC[ax]]}else{this.line.push(aC[ax])}}aB.push(this.line.join(" "))}return this.text=aB};function f(i){this.ts=T();this.tc=i;this.x=this.y=this.w=this.h=this.sc=1;this.z=0;this.Draw=i.pulsateTo<1&&i.outlineMethod!="colour"?this.DrawPulsate:this.DrawSimple;this.SetMethod(i.outlineMethod)}e=f.prototype;e.SetMethod=function(aw){var j={block:["PreDraw","DrawBlock"],colour:["PreDraw","DrawColour"],outline:["PostDraw","DrawOutline"],classic:["LastDraw","DrawOutline"],none:["LastDraw"]},i=j[aw]||j.outline;if(aw=="none"){this.Draw=function(){return 1}}else{this.drawFunc=this[i[1]]}this[i[0]]=this.Draw};e.Update=function(aC,aB,aD,ay,az,aA,ax,i){var j=this.tc.outlineOffset,aw=2*j;this.x=az*aC+ax-j;this.y=az*aB+i-j;this.w=az*aD+aw;this.h=az*ay+aw;this.sc=az;this.z=aA};e.DrawOutline=function(az,i,ay,j,aw,ax){az.strokeStyle=ax;az.strokeRect(i,ay,j,aw)};e.DrawColour=function(ax,aA,ay,aB,aw,i,aC,j,az){return this[aC.image?"DrawColourImage":"DrawColourText"](ax,aA,ay,aB,aw,i,aC,j,az)};e.DrawColourText=function(ay,aB,az,aC,aw,i,aD,j,aA){var ax=aD.colour;aD.colour=i;aD.alpha=1;aD.Draw(ay,j,aA);aD.colour=ax;return 1};e.DrawColourImage=function(aB,aE,aC,aF,aA,i,aI,j,aD){var aG=aB.canvas,ay=~~I(aE,0),ax=~~I(aC,0),az=au(aG.width-ay,aF)+0.5|0,aH=au(aG.height-ax,aA)+0.5|0,aw;if(H){H.width=az,H.height=aH}else{H=h(az,aH)}if(!H){return this.SetMethod("outline")}aw=H.getContext("2d");aw.drawImage(aG,ay,ax,az,aH,0,0,az,aH);aB.clearRect(ay,ax,az,aH);aI.alpha=1;aI.Draw(aB,j,aD);aB.setTransform(1,0,0,1,0,0);aB.save();aB.beginPath();aB.rect(ay,ax,az,aH);aB.clip();aB.globalCompositeOperation="source-in";aB.fillStyle=i;aB.fillRect(ay,ax,az,aH);aB.restore();aB.globalCompositeOperation="destination-over";aB.drawImage(H,0,0,az,aH,ay,ax,az,aH);aB.globalCompositeOperation="source-over";return 1};e.DrawBlock=function(az,i,ay,j,aw,ax){az.fillStyle=ax;az.fillRect(i,ay,j,aw)};e.DrawSimple=function(ay,i,j,ax){var aw=this.tc;ay.setTransform(1,0,0,1,0,0);ay.strokeStyle=aw.outlineColour;ay.lineWidth=aw.outlineThickness;ay.shadowBlur=ay.shadowOffsetX=ay.shadowOffsetY=0;ay.globalAlpha=1;return this.drawFunc(ay,this.x,this.y,this.w,this.h,aw.outlineColour,i,j,ax)};e.DrawPulsate=function(az,i,j,ax){var ay=T()-this.ts,aw=this.tc;az.setTransform(1,0,0,1,0,0);az.strokeStyle=aw.outlineColour;az.lineWidth=aw.outlineThickness;az.shadowBlur=az.shadowOffsetX=az.shadowOffsetY=0;az.globalAlpha=aw.pulsateTo+((1-aw.pulsateTo)*(0.5+(l(2*Math.PI*ay/(1000*aw.pulsateTime))/2)));return this.drawFunc(az,this.x,this.y,this.w,this.h,aw.outlineColour,i,j,ax)};e.Active=function(aw,i,j){return(i>=this.x&&j>=this.y&&i<=this.x+this.w&&j<=this.y+this.h)};e.PreDraw=e.PostDraw=e.LastDraw=Y;function S(ax,aD,aA,aC,aB,ay,j,aw,i){var az=ax.ctxt;this.tc=ax;this.image=aD.src?aD:null;this.text=aD.src?[]:aD;this.text_original=i;this.line_widths=[];this.title=aA.title||null;this.a=aA;this.position=new U(aC[0],aC[1],aC[2]);this.x=this.y=this.z=0;this.w=aB;this.h=ay;this.colour=j||ax.textColour;this.textFont=aw||ax.textFont;this.weight=this.sc=this.alpha=1;this.weighted=!ax.weight;this.outline=new f(ax);if(!this.image){this.textHeight=ax.textHeight;this.extents=ag(this.text,this.textFont,this.textHeight);this.Measure(az,ax)}this.SetShadowColour=ax.shadowAlpha?this.SetShadowColourAlpha:this.SetShadowColourFixed;this.SetDraw(ax)}ae=S.prototype;ae.EqualTo=function(aw){var j=aw.getElementsByTagName("img");if(this.a.href!=aw.href){return 0}if(j.length){return this.image.src==j[0].src}return(aw.innerText||aw.textContent)==this.text_original};ae.SetDraw=function(i){this.Draw=this.image?(i.ie>7?this.DrawImageIE:this.DrawImage):this.DrawText;i.noSelect&&(this.CheckActive=Y)};ae.MeasureText=function(az){var ax,aw=this.text.length,j=0,ay;for(ax=0;ax0&&aw.weightSizeMax>aw.weightSizeMin){this.textHeight=aw.weightSize*(aw.weightSizeMin+(aw.weightSizeMax-aw.weightSizeMin)*(j-aw.min_weight)/(aw.max_weight-aw.min_weight))}else{this.textHeight=j*aw.weightSize}}this.extents=ag(this.text,this.textFont,this.textHeight)};ae.SetShadowColourFixed=function(aw,j,i){aw.shadowColor=j};ae.SetShadowColourAlpha=function(aw,j,i){aw.shadowColor=u(j,i)};ae.DrawText=function(ay,aB,ax){var aC=this.tc,aA=this.x,az=this.y,aD=this.sc,j,aw;ay.globalAlpha=this.alpha;ay.fillStyle=this.colour;aC.shadow&&this.SetShadowColour(ay,aC.shadow,this.alpha);ay.font=this.font;aA+=aB/aD;az+=(ax/aD)-(this.h/2);for(j=0;jthis.max_weight){this.max_weight=j}if(jthis.min_weight){for(ay=0;ay=0&&this.my>=0&&this.taglist[aK].CheckActive(aM,aE,aD);if(aN&&aN.sc>aI&&(!j||aN.z<=0)){aC=aN;aw=aK;aC.tag=this.taglist[aK];aI=aN.sc}}this.active=aC;this.txtOpt||(this.shadow&&this.SetShadow(aM));aM.clearRect(0,0,ay,aF);for(aK=0;aK=this.fadeIn){this.fadeIn=0;this.fixedAlpha=1}else{this.fixedAlpha=j/this.fadeIn}}if(this.fixedAnim){if(!this.fixedAnim.transform){this.fixedAnim.transform=this.transform}aw=this.fixedAnim,j=T()-aw.t0,ay=aw.angle,i,ax=this.animTiming(aw.t,j);this.transform=aw.transform;if(j>=aw.t){this.fixedCallbackTag=aw.tag;this.fixedCallback=aw.cb;this.fixedAnim=this.yaw=this.pitch=0}else{ay*=ax}i=k.Rotation(ay,aw.axis);this.transform=this.transform.mul(i);return(this.fixedAnim!=0)}return false};d.AnimatePosition=function(aw,az,ax){var j=this,i=j.mx,aB=j.my,ay,aA;if(!j.frozen&&i>=0&&aB>=0&&iaw){i.yaw=ax>i.z0?i.yaw*i.decel:0}if(!i.ly&&j>aw){i.pitch=j>i.z0?i.pitch*i.decel:0}};d.Zoom=function(i){this.z2=this.z1*(1/i);this.drawn=0};d.Clicked=function(aw){var i=this.active;try{if(i&&i.tag){if(this.clickToFront===false||this.clickToFront===null){i.tag.Clicked(aw)}else{this.TagToFront(i.tag,this.clickToFront,function(){i.tag.Clicked(aw)})}}}catch(j){}};d.Wheel=function(j){var aw=this.zoom+this.zoomStep*(j?1:-1);this.zoom=au(this.zoomMax,I(this.zoomMin,aw));this.Zoom(this.zoom)};d.BeginDrag=function(i){this.down=M(i,this.canvas);i.cancelBubble=true;i.returnValue=false;i.preventDefault&&i.preventDefault()};d.Drag=function(ay,ax){if(this.dragControl&&this.down){var aw=this.dragThreshold*this.dragThreshold,j=ax.x-this.down.x,i=ax.y-this.down.y;if(this.dragging||j*j+i*i>aw){this.dx=j;this.dy=i;this.dragging=1;this.down=ax}}};d.EndDrag=function(){var i=this.dragging;this.dragging=this.down=null;return i};d.Pause=function(){this.paused=true};d.Resume=function(){this.paused=false};d.FindTag=function(aw){if(!ak(aw)){return null}ak(aw.index)&&(aw=aw.index);if(!v(aw)){return this.taglist[aw]}var ax,ay,j;if(ak(aw.id)){ax="id",ay=aw.id}else{if(ak(aw.text)){ax="innerText",ay=aw.text}}for(j=0;j= 0) { 27 | return true; 28 | } 29 | else { 30 | parent_node = parent_node.parentNode; 31 | } 32 | } 33 | 34 | return false; 35 | } 36 | 37 | /* 38 | nodeType: http://www.w3schools.com/dom/dom_nodetype.asp 39 | 1: ELEMENT_NODE 40 | 3: TEXT_NODE 41 | 8: COMMENT_NODE 42 | */ 43 | function is_first_text_child(parent_node, target_node) { 44 | var child_nodes = parent_node.childNodes; 45 | 46 | // 只判斷第一個含有 text 的 node 47 | for (var i = 0; i < child_nodes.length; i++) { 48 | var child_node = child_nodes[i]; 49 | if (child_node.nodeType != 8 && child_node.textContent) { 50 | return child_node === target_node; 51 | } 52 | } 53 | 54 | return false; 55 | } 56 | 57 | function is_last_text_child(parent_node, target_node) { 58 | var child_nodes = parent_node.childNodes; 59 | 60 | // 只判斷倒數第一個含有 text 的 node 61 | for (var i = child_nodes.length - 1; i > -1; i--) { 62 | var child_node = child_nodes[i]; 63 | if (child_node.nodeType != 8 && child_node.textContent) { 64 | return child_node === target_node; 65 | } 66 | } 67 | 68 | return false; 69 | } 70 | 71 | function insert_space(text) { 72 | var old_text = text; 73 | var new_text; 74 | 75 | /* 76 | Regular Expressions 77 | https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions 78 | 79 | 3000-303F 中日韓符號和標點 80 | 3040-309F 日文平假名 (V) 81 | 30A0-30FF 日文片假名 (V) 82 | 3100-312F 注音字母 (V) 83 | 31C0-31EF 中日韓筆畫 84 | 31F0-31FF 日文片假名語音擴展 85 | 3200-32FF 帶圈中日韓字母和月份 (V) 86 | 3400-4DBF 中日韓統一表意文字擴展 A (V) 87 | 4E00-9FFF 中日韓統一表意文字 (V) 88 | AC00-D7AF 諺文音節 (韓文) 89 | F900-FAFF 中日韓兼容表意文字 (V) 90 | http://unicode-table.com/cn/ 91 | */ 92 | 93 | // 前面"字"後面 >> 前面 "字" 後面 94 | text = text.replace(/([\u3040-\u312f\u3200-\u32ff\u3400-\u4dbf\u4e00-\u9fff\uf900-\ufaff])(["'])/ig, '$1 $2'); 95 | text = text.replace(/(["'])([\u3040-\u312f\u3200-\u32ff\u3400-\u4dbf\u4e00-\u9fff\uf900-\ufaff])/ig, '$1 $2'); 96 | 97 | // 避免出現 '前面 " 字" 後面' 之類的不對稱的情況 98 | text = text.replace(/(["']+)(\s*)(.*?)(\s*)(["']+)/ig, '$1$3$5'); 99 | 100 | // # 符號需要特別處理 101 | text = text.replace(/([\u3040-\u312f\u3200-\u32ff\u3400-\u4dbf\u4e00-\u9fff\uf900-\ufaff])(#(\S+))/ig, '$1 $2'); 102 | text = text.replace(/((\S+)#)([\u3040-\u312f\u3200-\u32ff\u3400-\u4dbf\u4e00-\u9fff\uf900-\ufaff])/ig, '$1 $3'); 103 | 104 | // 1. 前面<字>後面 --> 前面 <字> 後面 105 | old_text = text; 106 | new_text = old_text.replace(/([\u3040-\u312f\u3200-\u32ff\u3400-\u4dbf\u4e00-\u9fff\uf900-\ufaff])([<\[\{\(]+(.*?)[>\]\}\)]+)([\u3040-\u312f\u3200-\u32ff\u3400-\u4dbf\u4e00-\u9fff\uf900-\ufaff])/ig, '$1 $2 $4'); 107 | text = new_text; 108 | if (old_text === new_text) { 109 | // 前面<後面 --> 前面 < 後面 110 | text = text.replace(/([\u3040-\u312f\u3200-\u32ff\u3400-\u4dbf\u4e00-\u9fff\uf900-\ufaff])([<>\[\]\{\}\(\)])/ig, '$1 $2'); 111 | text = text.replace(/([<>\[\]\{\}\(\)])([\u3040-\u312f\u3200-\u32ff\u3400-\u4dbf\u4e00-\u9fff\uf900-\ufaff])/ig, '$1 $2'); 112 | } 113 | // 避免出現 "前面 [ 字] 後面" 之類的不對稱的情況 114 | text = text.replace(/([<\[\{\(]+)(\s*)(.*?)(\s*)([>\]\}\)]+)/ig, '$1$3$5'); 115 | 116 | // 2. 前面<字>後面 --> 前面 < 字 > 後面 117 | // text = text.replace(/([\u3040-\u312f\u3200-\u32ff\u3400-\u4dbf\u4e00-\u9fff\uf900-\ufaff])([<>\[\]\{\}\(\)])/ig, '$1 $2'); 118 | // text = text.replace(/([<>\[\]\{\}\(\)])([\u3040-\u312f\u3200-\u32ff\u3400-\u4dbf\u4e00-\u9fff\uf900-\ufaff])/ig, '$1 $2'); 119 | 120 | // 中文在前 121 | text = text.replace(/([\u3040-\u312f\u3200-\u32ff\u3400-\u4dbf\u4e00-\u9fff\uf900-\ufaff])([a-z0-9@&=`\|\$\%\^\*\-\+\/\\])/ig, '$1 $2'); 122 | 123 | // 中文在後 124 | text = text.replace(/([a-z0-9!~&;=`\|\,\.\:\?\$\%\^\*\-\+\/\\])([\u3040-\u312f\u3200-\u32ff\u3400-\u4dbf\u4e00-\u9fff\uf900-\ufaff])/ig, '$1 $2'); 125 | 126 | return text; 127 | } 128 | 129 | function spacing(xpath_query) { 130 | // 是否加了空格 131 | var had_spacing = false; 132 | 133 | /* 134 | 因為 xpath_query 用的是 text(),所以這些 nodes 是 text 而不是 DOM element 135 | https://developer.mozilla.org/en-US/docs/DOM/document.evaluate 136 | http://www.w3cschool.cn/dom_xpathresult.html 137 | 138 | snapshotLength 要配合 XPathResult.ORDERED_NODE_SNAPSHOT_TYPE 使用 139 | */ 140 | var text_nodes = document.evaluate(xpath_query, document, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null); 141 | 142 | var nodes_length = text_nodes.snapshotLength; 143 | 144 | var next_text_node; 145 | 146 | // 從最下面、最裡面的節點開始 147 | for (var i = nodes_length - 1; i > -1; --i) { 148 | var current_text_node = text_nodes.snapshotItem(i); 149 | // console.log('current_text_node: %O, nextSibling: %O', current_text_node.data, current_text_node.nextSibling); 150 | // console.log('next_text_node: %O', next_text_node); 151 | 152 | if (can_ignore_node(current_text_node)) { 153 | next_text_node = current_text_node; 154 | continue; 155 | } 156 | 157 | // http://www.w3school.com.cn/xmldom/dom_text.asp 158 | var new_data = insert_space(current_text_node.data); 159 | if (current_text_node.data != new_data) { 160 | had_spacing = true; 161 | current_text_node.data = new_data; 162 | } 163 | 164 | // 處理嵌套的 中的文字 165 | if (next_text_node) { 166 | /* 167 | TODO: 168 | 現在只是簡單地判斷相鄰的下一個 node 是不是
169 | 萬一遇上嵌套的標籤就不行了 170 | */ 171 | if (current_text_node.nextSibling) { 172 | if (current_text_node.nextSibling.nodeName.search(/^(br|hr)$/i) >= 0) { 173 | next_text_node = current_text_node; 174 | continue; 175 | } 176 | } 177 | 178 | // current_text_node 的最後一個字 + next_text_node 的第一個字 179 | var text = current_text_node.data.toString().substr(-1) + next_text_node.data.toString().substr(0, 1); 180 | var new_text = insert_space(text); 181 | 182 | if (text != new_text) { 183 | had_spacing = true; 184 | 185 | /* 186 | 基本上 187 | next_node 就是 next_text_node 的 parent node 188 | current_node 就是 current_text_node 的 parent node 189 | */ 190 | 191 | // 不要把空格加在 裡的文字的開頭或結尾 192 | var space_sensitive_tags = /^(a|del|pre|s|strike|u)$/i; 193 | 194 | var block_tags = /^(div|h1|h2|h3|h4|h5|h6|p)$/i; 195 | 196 | /* 197 | 往上找 next_text_node 的 parent node 198 | 直到遇到 space_sensitive_tags 199 | 而且 next_text_node 必須是第一個 text child 200 | 才能把空格加在 next_text_node 的前面 201 | */ 202 | var next_node = next_text_node; 203 | while (next_node.parentNode && 204 | next_node.nodeName.search(space_sensitive_tags) === -1 && 205 | is_first_text_child(next_node.parentNode, next_node)) { 206 | next_node = next_node.parentNode; 207 | } 208 | // console.log('next_node: %O', next_node); 209 | 210 | var current_node = current_text_node; 211 | while (current_node.parentNode && 212 | current_node.nodeName.search(space_sensitive_tags) === -1 && 213 | is_last_text_child(current_node.parentNode, current_node)) { 214 | current_node = current_node.parentNode; 215 | } 216 | // console.log('current_node: %O, nextSibling: %O', current_node, current_node.nextSibling); 217 | 218 | if (current_node.nextSibling) { 219 | if (current_node.nextSibling.nodeName.search(/^(br|hr)$/i) >= 0) { 220 | next_text_node = current_text_node; 221 | continue; 222 | } 223 | } 224 | 225 | if (current_node.nodeName.search(block_tags) === -1) { 226 | if (next_node.nodeName.search(space_sensitive_tags) === -1) { 227 | if (next_node.nodeName.search(block_tags) === -1) { 228 | // console.log('spacing 1: %O', next_text_node.data); 229 | next_text_node.data = " " + next_text_node.data; 230 | } 231 | } 232 | else if (current_node.nodeName.search(space_sensitive_tags) === -1) { 233 | // console.log('spacing 2: %O', current_text_node.data); 234 | current_text_node.data = current_text_node.data + " "; 235 | } 236 | else { 237 | // console.log('spacing 3: %O', next_node.parentNode); 238 | var space_span = document.createElement('pangu'); 239 | space_span.innerHTML = ' '; 240 | 241 | // 避免一直被加空格 242 | if (next_node.previousSibling) { 243 | if (next_node.previousSibling.nodeName.search(/^pangu$/i) == -1) { 244 | next_node.parentNode.insertBefore(space_span, next_node); 245 | } 246 | } 247 | else { 248 | next_node.parentNode.insertBefore(space_span, next_node); 249 | } 250 | } 251 | } 252 | } 253 | } 254 | 255 | next_text_node = current_text_node; 256 | } 257 | 258 | return had_spacing; 259 | } 260 | 261 | pangu.text_spacing = function(text) { 262 | return insert_space(text); 263 | }; 264 | 265 | pangu.page_spacing = function() { 266 | // var p = 'page_spacing'; 267 | // console.profile(p); 268 | // console.time(p); 269 | // var start = new Date().getTime(); 270 | 271 | /* 272 | // >> 任意位置的節點 273 | . >> 當前節點 274 | .. >> 父節點 275 | [] >> 條件 276 | text() >> 節點的文字內容,例如 hello 之於 hello 277 | 278 | [@contenteditable] 279 | 帶有 contenteditable 屬性的節點 280 | 281 | normalize-space(.) 282 | 當前節點的頭尾的空白字元都會被移除,大於兩個以上的空白字元會被置換成單一空白 283 | https://developer.mozilla.org/en-US/docs/XPath/Functions/normalize-space 284 | 285 | name(..) 286 | 父節點的名稱 287 | https://developer.mozilla.org/en-US/docs/XPath/Functions/name 288 | 289 | translate(string, "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "abcdefghijklmnopqrstuvwxyz") 290 | 將 string 轉換成小寫,因為 XML 是 case-sensitive 的 291 | https://developer.mozilla.org/en-US/docs/XPath/Functions/translate 292 | 293 | 1. 處理 294 | 2. 處理 <body> 底下的節點 295 | 3. 略過 contentEditable 的節點 296 | 4. 略過特定節點,例如 <script> 和 <style> 297 | 298 | 注意,以下的 query 只會取出各節點的 text 內容! 299 | */ 300 | var title_query = '/html/head/title/text()'; 301 | spacing(title_query); 302 | 303 | // var body_query = '/html/body//*[not(@contenteditable)]/text()[normalize-space(.)]'; 304 | var body_query = '/html/body//*/text()[normalize-space(.)]'; 305 | ['script', 'style', 'textarea'].forEach(function(tag) { 306 | /* 307 | 理論上這幾個 tag 裡面不會包含其他 tag 308 | 所以可以直接用 .. 取父節點 309 | 310 | ex: [translate(name(..), "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "abcdefghijklmnopqrstuvwxyz") != "script"] 311 | */ 312 | body_query += '[translate(name(..),"ABCDEFGHIJKLMNOPQRSTUVWXYZ","abcdefghijklmnopqrstuvwxyz")!="' + tag + '"]'; 313 | }); 314 | var had_spacing = spacing(body_query); 315 | 316 | // console.profileEnd(p); 317 | // console.timeEnd(p); 318 | // var end = new Date().getTime(); 319 | // console.log(end - start); 320 | 321 | return had_spacing; 322 | }; 323 | 324 | pangu.element_spacing = function(selector_string) { 325 | var xpath_query; 326 | 327 | if (selector_string.indexOf('#') === 0) { 328 | var target_id = selector_string.substr(1, selector_string.length - 1); 329 | 330 | // ex: id("id_name")//text() 331 | xpath_query = 'id("' + target_id + '")//text()'; 332 | } 333 | else if (selector_string.indexOf('.') === 0) { 334 | var target_class = selector_string.slice(1); 335 | 336 | // ex: //*[contains(@class, "target_class")]//*/text() 337 | xpath_query = '//*[contains(@class, "' + target_class + '")]//*/text()'; 338 | } 339 | else { 340 | var target_tag = selector_string; 341 | 342 | // ex: //tag_name/text() 343 | xpath_query = '//' + target_tag + '//text()'; 344 | } 345 | 346 | var had_spacing = spacing(xpath_query); 347 | 348 | return had_spacing; 349 | }; 350 | 351 | }(window.pangu = window.pangu || {})); 352 | -------------------------------------------------------------------------------- /source/js/twitter.js: -------------------------------------------------------------------------------- 1 | (function($){ 2 | $.getScript(moment_js_path, function(){ 3 | var url = 'https://api.twitter.com/1/statuses/user_timeline/' + twitter_stream[0] + '.json?count=' + twitter_stream[1] + '&exclude_replies=' + (twitter_stream[2] ? 0 : 1) + '&trim_user=true&callback=?'; 4 | 5 | var linkify = function(text){ 6 | text = text 7 | .replace(/(https?:\/\/)([\w\-:;?&=+.%#\/]+)/gi, '<a href="$1$2">$2</a>') 8 | .replace(/(^|\W)@(\w+)/g, '$1<a href="//twitter.com/$2">@$2</a>') 9 | .replace(/(^|\W)#(\w+)/g, '$1<a href="//search.twitter.com/search?q=%23$2">#$2</a>'); 10 | 11 | return text; 12 | }; 13 | 14 | $.getJSON(url, function(json){ 15 | var result = ''; 16 | 17 | for (var i=0, len=json.length; i<len; i++){ 18 | var item = json[i]; 19 | result += '<li>' + linkify(item.text) + '<small>' + moment(item.created_at).fromNow() + '</small></li>'; 20 | } 21 | 22 | $('#tweets').html(result); 23 | }); 24 | }); 25 | })(jQuery); 26 | -------------------------------------------------------------------------------- /source/robots.txt: -------------------------------------------------------------------------------- 1 | Sitemap: /sitemap.xml 2 | --------------------------------------------------------------------------------