├── 2015 ├── 10 │ ├── 25 │ │ └── 详谈 CSS 文字属性 │ │ │ └── index.html │ ├── 31 │ │ └── 代码规范那些事 │ │ │ └── index.html │ └── 08 │ │ └── 详谈 css 选择器 │ │ └── index.html ├── 11 │ └── 25 │ │ └── 前端初学之浅谈前后端关系 │ │ └── index.html ├── 07 │ ├── 15 │ │ └── 试谈JavaScript事件处理机制 │ │ │ └── index.html │ └── 27 │ │ └── JavaScript学习笔记 │ │ └── index.html ├── 08 │ └── 14 │ │ └── 新番!羁绊の协同前端! │ │ └── index.html └── 09 │ └── 22 │ └── JavaScript DOM 基础 │ └── index.html ├── 2016 ├── 11 │ └── 25 │ │ └── HTTP 必知必会 │ │ └── index.html ├── 12 │ └── 20 │ │ └── script 标签的 defer 与 async │ │ └── index.html ├── 01 │ └── 22 │ │ └── 学习 CSS 浮动 │ │ └── index.html ├── 02 │ ├── 27 │ │ └── JavaScript 学习笔记——数据类型及应用 │ │ │ └── index.html │ └── 04 │ │ └── CSS 布局实战 │ │ └── index.html ├── 03 │ ├── 13 │ │ └── JavaScript 学习笔记——BOM │ │ │ └── index.html │ ├── 22 │ │ └── JavaScript 学习笔记——事件 │ │ │ └── index.html │ ├── 30 │ │ └── JavaScript 核心学习——作用域与作用域链 │ │ │ └── index.html │ └── 08 │ │ └── JavaScript 学习笔记——DOM │ │ └── index.html ├── 04 │ ├── 20 │ │ └── 前端技能之 PHP 学习笔记 │ │ │ └── index.html │ └── 26 │ │ └── JavaScript 核心学习——闭包 │ │ └── index.html ├── 05 │ ├── 13 │ │ └── JavaScript 核心学习——对象与构造函数 │ │ │ └── index.html │ ├── 18 │ │ └── JavaScript 核心学习——继承 │ │ │ └── index.html │ ├── 31 │ │ └── 移动开发总结 │ │ │ └── index.html │ └── 01 │ │ └── JavaScript 核心学习—— this 关键字 │ │ └── index.html ├── 07 │ └── 18 │ │ └── 浏览器从输入 URL 到页面显示的过程 │ │ └── index.html ├── 08 │ └── 14 │ │ └── 你们无法逃避的谈心 │ │ └── index.html └── 09 │ ├── 11 │ └── Parse 系列之 Parse-server 搭建(译) │ │ └── index.html │ ├── 18 │ ├── 2016 女生节许愿墙脚手架文档 │ │ └── index.html │ └── Parse 系列之 Parse Dashboard 搭建(译) │ │ └── index.html │ └── 01 │ └── Vue 项目总结 │ └── index.html ├── 2017 ├── 11 │ └── 25 │ │ └── git │ │ └── index.html ├── 12 │ ├── 29 │ │ └── 记一次线上 node 服务 502 错误 │ │ │ └── index.html │ ├── 30 │ │ └── 使用 request, mocha, chai 让接口更稳定 │ │ │ └── index.html │ └── 09 │ │ └── 关于 CORS 的小细节 │ │ └── index.html ├── 01 │ ├── 11 │ │ └── 微信调试 │ │ │ └── index.html │ ├── 20 │ │ └── Nginx 的反向代理 │ │ │ └── index.html │ ├── 22 │ │ └── React In GirlWall │ │ │ └── index.html │ ├── 23 │ │ └── 前端使用 Mock 与后端独立 │ │ │ └── index.html │ ├── 24 │ │ └── 项目开发流程反思 │ │ │ └── index.html │ ├── 31 │ │ └── Ajax │ │ │ └── index.html │ ├── 08 │ │ └── 开启 Gzip 为前端加速 │ │ │ └── index.html │ └── 09 │ │ └── Throttle In LazyLoad │ │ └── index.html ├── 02 │ ├── 16 │ │ ├── Zepto 源码全剖析 │ │ │ └── index.html │ │ └── Zepto 源码简单剖析 │ │ │ └── index.html │ ├── 20 │ │ └── Event In Zepto │ │ │ └── index.html │ └── 02 │ │ └── WebSocket In GirlWall │ │ └── index.html ├── 03 │ ├── 13 │ │ └── 浅析 ES6 特性 │ │ │ └── index.html │ ├── 15 │ │ └── ready 函数的兼容深入 │ │ │ └── index.html │ ├── 28 │ │ └── 深入响应式布局兼容 │ │ │ └── index.html │ ├── 04 │ │ └── Zepto 点击穿透问题深究与解决 │ │ │ └── index.html │ └── 06 │ │ └── 前端安全之 XSS 与 CSRF │ │ └── index.html ├── 04 │ └── 05 │ │ └── Modal In React │ │ └── index.html ├── 05 │ ├── 20 │ │ └── 细说 window.performance │ │ │ └── index.html │ └── 27 │ │ └── JQuery Promise 不执行成功回调 │ │ └── index.html ├── 06 │ ├── 13 │ │ └── ES6 小结 │ │ │ └── index.html │ └── 09 │ │ └── 当我在谈论前端监控时我在谈什么 │ │ └── index.html ├── 07 │ └── 23 │ │ └── 浅谈设计模式实战 │ │ └── index.html ├── 08 │ └── 12 │ │ └── Vue 2 in Android webView throw Uncaught ReferenceError_create2 is not defined exception │ │ └── index.html └── 09 │ └── 08 │ └── underscore 硬绑定中的优化 │ └── index.html ├── 2018 ├── 01 │ └── 27 │ │ └── Git 小手记 │ │ └── index.html ├── 02 │ ├── 25 │ │ ├── co 源码剖析 │ │ │ └── index.html │ │ └── 理解 ES6 generator │ │ │ └── index.html │ └── 03 │ │ └── Event Loop 中的 microtask 与 macrotask │ │ └── index.html ├── 03 │ └── 16 │ │ └── 理解 Koa 的中间件机制 │ │ └── index.html ├── 04 │ ├── 03 │ │ └── koa 源码解析 │ │ │ └── index.html │ └── 08 │ │ └── 解析 SMTP 协议 │ │ └── index.html ├── 05 │ └── 16 │ │ └── 实现 JavaScript 继承的三种模式设计 │ │ └── index.html ├── 06 │ ├── 10 │ │ └── 理解模板引擎 │ │ │ └── index.html │ └── 03 │ │ └── 全面理解 koa-router │ │ └── index.html ├── 07 │ └── 15 │ │ └── 你所需要知道的关于 Node 模块的一切 │ │ └── index.html └── 09 │ └── 01 │ └── 理解 Node.js Stream 模块 │ └── index.html ├── 2019 └── 01 │ └── 26 │ └── promise 杂谈 │ └── index.html ├── README.md ├── archives ├── 2015 │ ├── 10 │ │ └── index.html │ ├── 11 │ │ └── index.html │ ├── 07 │ │ └── index.html │ ├── 08 │ │ └── index.html │ ├── 09 │ │ └── index.html │ └── index.html ├── 2016 │ ├── 11 │ │ └── index.html │ ├── 12 │ │ └── index.html │ ├── 01 │ │ └── index.html │ ├── 02 │ │ └── index.html │ ├── 03 │ │ └── index.html │ ├── 04 │ │ └── index.html │ ├── 05 │ │ └── index.html │ ├── 07 │ │ └── index.html │ ├── 08 │ │ └── index.html │ ├── 09 │ │ └── index.html │ ├── index.html │ └── page │ │ ├── 2 │ │ └── index.html │ │ └── 3 │ │ └── index.html ├── 2017 │ ├── 11 │ │ └── index.html │ ├── 12 │ │ └── index.html │ ├── 01 │ │ └── index.html │ ├── 02 │ │ └── index.html │ ├── 03 │ │ └── index.html │ ├── 04 │ │ └── index.html │ ├── 05 │ │ └── index.html │ ├── 06 │ │ └── index.html │ ├── 07 │ │ └── index.html │ ├── 08 │ │ └── index.html │ ├── 09 │ │ └── index.html │ ├── index.html │ └── page │ │ ├── 2 │ │ └── index.html │ │ └── 3 │ │ └── index.html ├── 2018 │ ├── 01 │ │ └── index.html │ ├── 02 │ │ └── index.html │ ├── 03 │ │ └── index.html │ ├── 04 │ │ └── index.html │ ├── 05 │ │ └── index.html │ ├── 06 │ │ └── index.html │ ├── 07 │ │ └── index.html │ ├── 09 │ │ └── index.html │ ├── index.html │ └── page │ │ └── 2 │ │ └── index.html ├── 2019 │ ├── 01 │ │ └── index.html │ └── index.html ├── index.html └── page │ ├── 2 │ └── index.html │ ├── 3 │ └── index.html │ ├── 4 │ └── index.html │ ├── 5 │ └── index.html │ ├── 6 │ └── index.html │ ├── 7 │ └── index.html │ └── 8 │ └── index.html ├── categories ├── CSS │ └── index.html ├── HTTP │ └── index.html ├── JavaScript │ ├── index.html │ └── page │ │ ├── 2 │ │ └── index.html │ │ └── 3 │ │ └── index.html ├── Life │ └── index.html ├── Node-js │ └── index.html ├── PHP │ └── index.html ├── Parse │ └── index.html ├── React │ └── index.html ├── Server │ └── index.html ├── Web-Develop │ ├── index.html │ └── page │ │ └── 2 │ │ └── index.html ├── git │ └── index.html ├── 代码规范 │ └── index.html ├── 前端杂烩 │ └── index.html ├── 单元测试 │ └── index.html ├── 性能优化 │ └── index.html ├── 查缺补漏 │ └── index.html ├── 移动开发 │ └── index.html ├── 虫师手记 │ └── index.html ├── 计算机网络 │ └── index.html └── 设计模式 │ └── index.html ├── css └── main.css ├── images ├── algolia_logo.svg ├── apple-touch-icon-next.png ├── avatar.gif ├── cc-by-nc-nd.svg ├── cc-by-nc-sa.svg ├── cc-by-nc.svg ├── cc-by-nd.svg ├── cc-by-sa.svg ├── cc-by.svg ├── cc-zero.svg ├── favicon-16x16-next.png ├── favicon-32x32-next.png ├── loading.gif ├── logo.svg ├── placeholder.gif ├── quote-l.svg ├── quote-r.svg └── searchicon.png ├── index.html ├── js └── src │ ├── affix.js │ ├── algolia-search.js │ ├── bootstrap.js │ ├── exturl.js │ ├── hook-duoshuo.js │ ├── js.cookie.js │ ├── motion.js │ ├── post-details.js │ ├── schemes │ └── pisces.js │ ├── scroll-cookie.js │ ├── scrollspy.js │ └── utils.js ├── lib ├── Han │ └── dist │ │ ├── font │ │ ├── han-space.otf │ │ ├── han-space.woff │ │ ├── han.otf │ │ ├── han.woff │ │ └── han.woff2 │ │ ├── han.css │ │ ├── han.js │ │ ├── han.min.css │ │ └── han.min.js ├── algolia-instant-search │ ├── instantsearch.min.css │ └── instantsearch.min.js ├── canvas-nest │ └── canvas-nest.min.js ├── canvas-ribbon │ └── canvas-ribbon.js ├── fancybox │ └── source │ │ ├── blank.gif │ │ ├── fancybox_loading.gif │ │ ├── fancybox_loading@2x.gif │ │ ├── fancybox_overlay.png │ │ ├── fancybox_sprite.png │ │ ├── fancybox_sprite@2x.png │ │ ├── helpers │ │ ├── fancybox_buttons.png │ │ ├── jquery.fancybox-buttons.css │ │ ├── jquery.fancybox-buttons.js │ │ ├── jquery.fancybox-media.js │ │ ├── jquery.fancybox-thumbs.css │ │ └── jquery.fancybox-thumbs.js │ │ ├── jquery.fancybox.css │ │ ├── jquery.fancybox.js │ │ └── jquery.fancybox.pack.js ├── fastclick │ ├── LICENSE │ ├── README.html │ ├── bower.json │ └── lib │ │ ├── fastclick.js │ │ └── fastclick.min.js ├── font-awesome │ ├── HELP-US-OUT.txt │ ├── bower.json │ ├── css │ │ ├── font-awesome.css │ │ ├── font-awesome.css.map │ │ └── font-awesome.min.css │ └── fonts │ │ ├── FontAwesome.otf │ │ ├── fontawesome-webfont.eot │ │ ├── fontawesome-webfont.svg │ │ ├── fontawesome-webfont.ttf │ │ ├── fontawesome-webfont.woff │ │ └── fontawesome-webfont.woff2 ├── jquery │ └── index.js ├── jquery_lazyload │ ├── CONTRIBUTING.html │ ├── README.html │ ├── bower.json │ ├── jquery.lazyload.js │ └── jquery.scrollstop.js ├── needsharebutton │ ├── font-embedded.css │ ├── needsharebutton.css │ └── needsharebutton.js ├── pace │ ├── pace-theme-barber-shop.min.css │ ├── pace-theme-big-counter.min.css │ ├── pace-theme-bounce.min.css │ ├── pace-theme-center-atom.min.css │ ├── pace-theme-center-circle.min.css │ ├── pace-theme-center-radar.min.css │ ├── pace-theme-center-simple.min.css │ ├── pace-theme-corner-indicator.min.css │ ├── pace-theme-fill-left.min.css │ ├── pace-theme-flash.min.css │ ├── pace-theme-loading-bar.min.css │ ├── pace-theme-mac-osx.min.css │ ├── pace-theme-minimal.min.css │ └── pace.min.js ├── three │ ├── canvas_lines.min.js │ ├── canvas_sphere.min.js │ ├── three-waves.min.js │ └── three.min.js ├── ua-parser-js │ └── dist │ │ ├── ua-parser.min.js │ │ └── ua-parser.pack.js └── velocity │ ├── bower.json │ ├── velocity.js │ ├── velocity.min.js │ ├── velocity.ui.js │ └── velocity.ui.min.js └── page ├── 2 └── index.html ├── 3 └── index.html ├── 4 └── index.html └── 5 └── index.html /README.md: -------------------------------------------------------------------------------- 1 | # 阿翔的博客 2 | 3 | > 腾讯高级前端工程师,腾讯云监控团队-RUM前端监控平台,现腾讯文档前端工程师, 欢迎来投简历 4 | > 联系方式:wechat(zxiang702) 5 | 6 | ## Node.js 7 | 8 | 1. [如何构造属于自己的 DSL —— PEG.js 使用指南](https://github.com/zhangxiang958/Blog/issues/54) 9 | 2. [JavaScript 中的装饰器语法](https://github.com/zhangxiang958/Blog/issues/50) 10 | 3. [[译]理解 Node.js 的中 Worker Threads](https://github.com/zhangxiang958/Blog/issues/49) 11 | 4. [[译]事件循环最佳实践——NodeJS 事件循环 Part 5](https://github.com/zhangxiang958/Blog/issues/47) 12 | 5. [[译]IO 处理——NodeJS 事件循环 Part 4](https://github.com/zhangxiang958/Blog/issues/46) 13 | 6. [[译]Promises, Next-Ticks 和 Immediates— NodeJS Event Loop Part 3](https://github.com/zhangxiang958/Blog/issues/45) 14 | 7. [[译]定时器,Immediates 和 process.nextTick——NodeJS 事件循环 Part 2](https://github.com/zhangxiang958/Blog/issues/44) 15 | 8. [[译]事件循环总览—— Nodejs 事件循环 Part 1](https://github.com/zhangxiang958/Blog/issues/43) 16 | 9. [promise 杂谈](https://github.com/zhangxiang958/Blog/issues/42) 17 | 10. [理解 Node.js Stream 模块](https://github.com/zhangxiang958/Blog/issues/41) 18 | 11. [Node.js 中的模块机制](https://github.com/zhangxiang958/Blog/issues/40) 19 | 12. [实现 JavaScript 继承的三种模式设计](https://github.com/zhangxiang958/Blog/issues/37) 20 | 13. [理解 ES6 generator](https://github.com/zhangxiang958/Blog/issues/32) 21 | 14. [Event Loop 中的 microtask 与 macrotask](https://github.com/zhangxiang958/Blog/issues/31) 22 | 15. [Underscore 硬绑定中的性能优化](https://github.com/zhangxiang958/Blog/issues/28) 23 | 16. [ES6 小结](https://github.com/zhangxiang958/Blog/issues/26) 24 | 17. [浅谈设计模式实战](https://github.com/zhangxiang958/Blog/issues/27) 25 | 26 | ## Koa 源码系列 27 | 28 | 1. [koa 源码解析](https://github.com/zhangxiang958/Blog/issues/35) 29 | 2. [理解 Koa 的中间件机制](https://github.com/zhangxiang958/Blog/issues/34) 30 | 3. [co 源码剖析](https://github.com/zhangxiang958/Blog/issues/33) 31 | 4. [全面理解 koa-router](https://github.com/zhangxiang958/Blog/issues/38) 32 | 33 | ## 前端相关 34 | 1. [理解 Redux](https://github.com/zhangxiang958/Blog/issues/48) 35 | 2. [理解模板引擎](https://github.com/zhangxiang958/Blog/issues/39) 36 | 3. [JS 开发者写编译器必须懂的编码](https://github.com/zhangxiang958/Blog/issues/61) 37 | 38 | ## Typescript 39 | 40 | 1. [IOC in Typescript](https://github.com/zhangxiang958/Blog/issues/51) 41 | 42 | ## Golang 43 | 44 | 1. [解读 Golang 的 fmt 包](https://github.com/zhangxiang958/Blog/issues/53) 45 | 2. [RPC in Golang(一)](https://github.com/zhangxiang958/Blog/issues/55) 46 | 3. [Golang Compiler 实现学习](https://github.com/zhangxiang958/Blog/issues/59) 47 | 4. [基于 Kong + Konga 实现接口服务蓝绿部署](https://github.com/zhangxiang958/Blog/issues/62) 48 | 5. [揭秘 OpenTelemetry-Collector 源码内幕](https://github.com/zhangxiang958/Blog/issues/66) 49 | 50 | ## 写给 Node.js 开发者的 Golang 学习书 51 | 52 | 1. [Golang 包教不包会(一) Golang 开发环境](https://github.com/zhangxiang958/Blog/issues/57) 53 | 2. [Golang 包教不包会(二) Golang 中的包与作用域](https://github.com/zhangxiang958/Blog/issues/58) 54 | 55 | ## Git 56 | 57 | 1. [Git 的主干开发工作流](https://github.com/zhangxiang958/Blog/issues/52) 58 | 2. [Git 小手记](https://github.com/zhangxiang958/Blog/issues/30) 59 | 60 | ## 网络 & 协议 61 | 1. [解析 SMTP 协议](https://github.com/zhangxiang958/Blog/issues/36) 62 | 63 | ### HTTPS 原理与实践 64 | 待更持续... 65 | 66 | ## 杂谈 67 | 1. [记一次 node 服务高并发 502 错误](https://github.com/zhangxiang958/Blog/issues/29) 68 | 69 | ## 个人记录 70 | 1. [Mac 系统初始化记录](https://github.com/zhangxiang958/Blog/issues/60) 71 | 72 | ## 勘误与鼓励/交流 73 | 74 | 如果对于博客内容有疑问或者发现错误,欢迎在相应 issues 下面可以进行交流或勘误。 75 | 76 | 如果喜欢我的文章或者有所启发/收获,欢迎 star,对作者的创作也是一种鼓励。 77 | -------------------------------------------------------------------------------- /images/algolia_logo.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /images/apple-touch-icon-next.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhangxiang958/Blog/c488898721077e73fbf79809b89bbfc970871ab9/images/apple-touch-icon-next.png -------------------------------------------------------------------------------- /images/avatar.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhangxiang958/Blog/c488898721077e73fbf79809b89bbfc970871ab9/images/avatar.gif -------------------------------------------------------------------------------- /images/cc-by-nc-nd.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 19 | 21 | 24 | 31 | 32 | 33 | 56 | 58 | 59 | 61 | image/svg+xml 62 | 64 | 65 | 66 | 67 | 71 | 74 | 77 | 84 | 91 | 96 | 100 | 109 | 113 | 114 | 115 | 119 | 120 | 121 | 122 | -------------------------------------------------------------------------------- /images/cc-by-nc.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 19 | 21 | 24 | 31 | 32 | 33 | 56 | 58 | 59 | 61 | image/svg+xml 62 | 64 | 65 | 66 | 67 | 71 | 74 | 77 | 84 | 91 | 96 | 100 | 109 | 113 | 114 | 115 | 119 | 120 | 121 | 122 | -------------------------------------------------------------------------------- /images/cc-by-nd.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 19 | 21 | 24 | 31 | 32 | 33 | 56 | 58 | 59 | 61 | image/svg+xml 62 | 64 | 65 | 66 | 67 | 71 | 74 | 81 | 88 | 93 | 97 | 106 | 110 | 111 | 115 | 116 | 117 | 118 | -------------------------------------------------------------------------------- /images/cc-by-sa.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 19 | 21 | 24 | 31 | 32 | 33 | 56 | 58 | 59 | 61 | image/svg+xml 62 | 64 | 65 | 66 | 67 | 71 | 74 | 77 | 84 | 91 | 96 | 100 | 109 | 113 | 114 | 115 | 119 | 120 | 121 | 122 | -------------------------------------------------------------------------------- /images/cc-by.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 19 | 21 | 24 | 31 | 32 | 33 | 56 | 58 | 59 | 61 | image/svg+xml 62 | 64 | 65 | 66 | 67 | 71 | 74 | 77 | 84 | 91 | 96 | 100 | 109 | 113 | 114 | 115 | 119 | 120 | 121 | 122 | -------------------------------------------------------------------------------- /images/cc-zero.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 17 | 26 | 27 | 28 | 29 | 30 | 31 | 35 | 38 | 45 | 46 | 47 | 53 | 57 | 63 | 66 | 68 | 69 | 70 | 71 | 72 | 73 | -------------------------------------------------------------------------------- /images/favicon-16x16-next.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhangxiang958/Blog/c488898721077e73fbf79809b89bbfc970871ab9/images/favicon-16x16-next.png -------------------------------------------------------------------------------- /images/favicon-32x32-next.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhangxiang958/Blog/c488898721077e73fbf79809b89bbfc970871ab9/images/favicon-32x32-next.png -------------------------------------------------------------------------------- /images/loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhangxiang958/Blog/c488898721077e73fbf79809b89bbfc970871ab9/images/loading.gif -------------------------------------------------------------------------------- /images/logo.svg: -------------------------------------------------------------------------------- 1 | 2 | image/svg+xml 24 | -------------------------------------------------------------------------------- /images/placeholder.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhangxiang958/Blog/c488898721077e73fbf79809b89bbfc970871ab9/images/placeholder.gif -------------------------------------------------------------------------------- /images/quote-l.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 8 | 13 | 14 | -------------------------------------------------------------------------------- /images/quote-r.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 8 | 12 | 13 | -------------------------------------------------------------------------------- /images/searchicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhangxiang958/Blog/c488898721077e73fbf79809b89bbfc970871ab9/images/searchicon.png -------------------------------------------------------------------------------- /js/src/affix.js: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Bootstrap: affix.js v3.3.5 3 | * http://getbootstrap.com/javascript/#affix 4 | * ======================================================================== 5 | * Copyright 2011-2015 Twitter, Inc. 6 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 7 | * ======================================================================== */ 8 | 9 | 10 | +function ($) { 11 | 'use strict'; 12 | 13 | // AFFIX CLASS DEFINITION 14 | // ====================== 15 | 16 | var Affix = function (element, options) { 17 | this.options = $.extend({}, Affix.DEFAULTS, options) 18 | 19 | this.$target = $(this.options.target) 20 | .on('scroll.bs.affix.data-api', $.proxy(this.checkPosition, this)) 21 | .on('click.bs.affix.data-api', $.proxy(this.checkPositionWithEventLoop, this)) 22 | 23 | this.$element = $(element) 24 | this.affixed = null 25 | this.unpin = null 26 | this.pinnedOffset = null 27 | 28 | this.checkPosition() 29 | } 30 | 31 | Affix.VERSION = '3.3.5' 32 | 33 | Affix.RESET = 'affix affix-top affix-bottom' 34 | 35 | Affix.DEFAULTS = { 36 | offset: 0, 37 | target: window 38 | } 39 | 40 | Affix.prototype.getState = function (scrollHeight, height, offsetTop, offsetBottom) { 41 | var scrollTop = this.$target.scrollTop() 42 | var position = this.$element.offset() 43 | var targetHeight = this.$target.height() 44 | 45 | if (offsetTop != null && this.affixed == 'top') return scrollTop < offsetTop ? 'top' : false 46 | 47 | if (this.affixed == 'bottom') { 48 | if (offsetTop != null) return (scrollTop + this.unpin <= position.top) ? false : 'bottom' 49 | return (scrollTop + targetHeight <= scrollHeight - offsetBottom) ? false : 'bottom' 50 | } 51 | 52 | var initializing = this.affixed == null 53 | var colliderTop = initializing ? scrollTop : position.top 54 | var colliderHeight = initializing ? targetHeight : height 55 | 56 | if (offsetTop != null && scrollTop <= offsetTop) return 'top' 57 | if (offsetBottom != null && (colliderTop + colliderHeight >= scrollHeight - offsetBottom)) return 'bottom' 58 | 59 | return false 60 | } 61 | 62 | Affix.prototype.getPinnedOffset = function () { 63 | if (this.pinnedOffset) return this.pinnedOffset 64 | this.$element.removeClass(Affix.RESET).addClass('affix') 65 | var scrollTop = this.$target.scrollTop() 66 | var position = this.$element.offset() 67 | return (this.pinnedOffset = position.top - scrollTop) 68 | } 69 | 70 | Affix.prototype.checkPositionWithEventLoop = function () { 71 | setTimeout($.proxy(this.checkPosition, this), 1) 72 | } 73 | 74 | Affix.prototype.checkPosition = function () { 75 | if (!this.$element.is(':visible')) return 76 | 77 | var height = this.$element.height() 78 | var offset = this.options.offset 79 | var offsetTop = offset.top 80 | var offsetBottom = offset.bottom 81 | var scrollHeight = Math.max($(document).height(), $(document.body).height()) 82 | 83 | if (typeof offset != 'object') offsetBottom = offsetTop = offset 84 | if (typeof offsetTop == 'function') offsetTop = offset.top(this.$element) 85 | if (typeof offsetBottom == 'function') offsetBottom = offset.bottom(this.$element) 86 | 87 | var affix = this.getState(scrollHeight, height, offsetTop, offsetBottom) 88 | 89 | if (this.affixed != affix) { 90 | if (this.unpin != null) this.$element.css('top', '') 91 | 92 | var affixType = 'affix' + (affix ? '-' + affix : '') 93 | var e = $.Event(affixType + '.bs.affix') 94 | 95 | this.$element.trigger(e) 96 | 97 | if (e.isDefaultPrevented()) return 98 | 99 | this.affixed = affix 100 | this.unpin = affix == 'bottom' ? this.getPinnedOffset() : null 101 | 102 | this.$element 103 | .removeClass(Affix.RESET) 104 | .addClass(affixType) 105 | .trigger(affixType.replace('affix', 'affixed') + '.bs.affix') 106 | } 107 | 108 | if (affix == 'bottom') { 109 | this.$element.offset({ 110 | top: scrollHeight - height - offsetBottom 111 | }) 112 | } 113 | } 114 | 115 | 116 | // AFFIX PLUGIN DEFINITION 117 | // ======================= 118 | 119 | function Plugin(option) { 120 | return this.each(function () { 121 | var $this = $(this) 122 | var data = $this.data('bs.affix') 123 | var options = typeof option == 'object' && option 124 | 125 | if (!data) $this.data('bs.affix', (data = new Affix(this, options))) 126 | if (typeof option == 'string') data[option]() 127 | }) 128 | } 129 | 130 | var old = $.fn.affix 131 | 132 | $.fn.affix = Plugin 133 | $.fn.affix.Constructor = Affix 134 | 135 | 136 | // AFFIX NO CONFLICT 137 | // ================= 138 | 139 | $.fn.affix.noConflict = function () { 140 | $.fn.affix = old 141 | return this 142 | } 143 | 144 | 145 | // AFFIX DATA-API 146 | // ============== 147 | 148 | $(window).on('load', function () { 149 | $('[data-spy="affix"]').each(function () { 150 | var $spy = $(this) 151 | var data = $spy.data() 152 | 153 | data.offset = data.offset || {} 154 | 155 | if (data.offsetBottom != null) data.offset.bottom = data.offsetBottom 156 | if (data.offsetTop != null) data.offset.top = data.offsetTop 157 | 158 | Plugin.call($spy, data) 159 | }) 160 | }) 161 | 162 | }(jQuery); 163 | -------------------------------------------------------------------------------- /js/src/algolia-search.js: -------------------------------------------------------------------------------- 1 | /* global instantsearch: true */ 2 | /*jshint camelcase: false */ 3 | 4 | $(document).ready(function () { 5 | var algoliaSettings = CONFIG.algolia; 6 | var isAlgoliaSettingsValid = algoliaSettings.applicationID && 7 | algoliaSettings.apiKey && 8 | algoliaSettings.indexName; 9 | 10 | if (!isAlgoliaSettingsValid) { 11 | window.console.error('Algolia Settings are invalid.'); 12 | return; 13 | } 14 | 15 | var search = instantsearch({ 16 | appId: algoliaSettings.applicationID, 17 | apiKey: algoliaSettings.apiKey, 18 | indexName: algoliaSettings.indexName, 19 | searchFunction: function (helper) { 20 | var searchInput = $('#algolia-search-input').find('input'); 21 | 22 | if (searchInput.val()) { 23 | helper.search(); 24 | } 25 | } 26 | }); 27 | 28 | // Registering Widgets 29 | [ 30 | instantsearch.widgets.searchBox({ 31 | container: '#algolia-search-input', 32 | placeholder: algoliaSettings.labels.input_placeholder 33 | }), 34 | 35 | instantsearch.widgets.hits({ 36 | container: '#algolia-hits', 37 | hitsPerPage: algoliaSettings.hits.per_page || 10, 38 | templates: { 39 | item: function (data) { 40 | var link = data.permalink ? data.permalink : (CONFIG.root + data.path); 41 | return ( 42 | '' + 43 | data._highlightResult.title.value + 44 | '' 45 | ); 46 | }, 47 | empty: function (data) { 48 | return ( 49 | '
' + 50 | algoliaSettings.labels.hits_empty.replace(/\$\{query}/, data.query) + 51 | '
' 52 | ); 53 | } 54 | }, 55 | cssClasses: { 56 | item: 'algolia-hit-item' 57 | } 58 | }), 59 | 60 | instantsearch.widgets.stats({ 61 | container: '#algolia-stats', 62 | templates: { 63 | body: function (data) { 64 | var stats = algoliaSettings.labels.hits_stats 65 | .replace(/\$\{hits}/, data.nbHits) 66 | .replace(/\$\{time}/, data.processingTimeMS); 67 | return ( 68 | stats + 69 | '' + 70 | ' Algolia' + 71 | '' + 72 | '
' 73 | ); 74 | } 75 | } 76 | }), 77 | 78 | instantsearch.widgets.pagination({ 79 | container: '#algolia-pagination', 80 | scrollTo: false, 81 | showFirstLast: false, 82 | labels: { 83 | first: '', 84 | last: '', 85 | previous: '', 86 | next: '' 87 | }, 88 | cssClasses: { 89 | root: 'pagination', 90 | item: 'pagination-item', 91 | link: 'page-number', 92 | active: 'current', 93 | disabled: 'disabled-item' 94 | } 95 | }) 96 | ].forEach(search.addWidget, search); 97 | 98 | search.start(); 99 | 100 | $('.popup-trigger').on('click', function(e) { 101 | e.stopPropagation(); 102 | $('body') 103 | .append('
') 104 | .css('overflow', 'hidden'); 105 | $('.popup').toggle(); 106 | $('#algolia-search-input').find('input').focus(); 107 | }); 108 | 109 | $('.popup-btn-close').click(function(){ 110 | $('.popup').hide(); 111 | $('.algolia-pop-overlay').remove(); 112 | $('body').css('overflow', ''); 113 | }); 114 | 115 | }); 116 | -------------------------------------------------------------------------------- /js/src/bootstrap.js: -------------------------------------------------------------------------------- 1 | /* global NexT: true */ 2 | 3 | $(document).ready(function () { 4 | 5 | $(document).trigger('bootstrap:before'); 6 | 7 | NexT.utils.isMobile() && window.FastClick.attach(document.body); 8 | 9 | NexT.utils.lazyLoadPostsImages(); 10 | 11 | NexT.utils.registerESCKeyEvent(); 12 | 13 | NexT.utils.registerBackToTop(); 14 | 15 | // Mobile top menu bar. 16 | $('.site-nav-toggle button').on('click', function () { 17 | var $siteNav = $('.site-nav'); 18 | var ON_CLASS_NAME = 'site-nav-on'; 19 | var isSiteNavOn = $siteNav.hasClass(ON_CLASS_NAME); 20 | var animateAction = isSiteNavOn ? 'slideUp' : 'slideDown'; 21 | var animateCallback = isSiteNavOn ? 'removeClass' : 'addClass'; 22 | 23 | $siteNav.stop()[animateAction]('fast', function () { 24 | $siteNav[animateCallback](ON_CLASS_NAME); 25 | }); 26 | }); 27 | 28 | /** 29 | * Register JS handlers by condition option. 30 | * Need to add config option in Front-End at 'layout/_partials/head.swig' file. 31 | */ 32 | CONFIG.fancybox && NexT.utils.wrapImageWithFancyBox(); 33 | CONFIG.tabs && NexT.utils.registerTabsTag(); 34 | 35 | NexT.utils.embeddedVideoTransformer(); 36 | NexT.utils.addActiveClassToMenuItem(); 37 | 38 | 39 | // Define Motion Sequence. 40 | NexT.motion.integrator 41 | .add(NexT.motion.middleWares.logo) 42 | .add(NexT.motion.middleWares.menu) 43 | .add(NexT.motion.middleWares.postList) 44 | .add(NexT.motion.middleWares.sidebar); 45 | 46 | $(document).trigger('motion:before'); 47 | 48 | // Bootstrap Motion. 49 | CONFIG.motion.enable && NexT.motion.integrator.bootstrap(); 50 | 51 | $(document).trigger('bootstrap:after'); 52 | }); 53 | -------------------------------------------------------------------------------- /js/src/exturl.js: -------------------------------------------------------------------------------- 1 | /* global NexT: true */ 2 | 3 | $(document).ready(function () { 4 | 5 | // Create Base64 Object 6 | var Base64={_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",encode:function(e){var t="";var n,r,i,s,o,u,a;var f=0;e=Base64._utf8_encode(e);while(f>2;o=(n&3)<<4|r>>4;u=(r&15)<<2|i>>6;a=i&63;if(isNaN(r)){u=a=64}else if(isNaN(i)){a=64}t=t+this._keyStr.charAt(s)+this._keyStr.charAt(o)+this._keyStr.charAt(u)+this._keyStr.charAt(a)}return t},decode:function(e){var t="";var n,r,i;var s,o,u,a;var f=0;e=e.replace(/[^A-Za-z0-9+/=]/g,"");while(f>4;r=(o&15)<<4|u>>2;i=(u&3)<<6|a;t=t+String.fromCharCode(n);if(u!=64){t=t+String.fromCharCode(r)}if(a!=64){t=t+String.fromCharCode(i)}}t=Base64._utf8_decode(t);return t},_utf8_encode:function(e){e=e.replace(/rn/g,"n");var t="";for(var n=0;n127&&r<2048){t+=String.fromCharCode(r>>6|192);t+=String.fromCharCode(r&63|128)}else{t+=String.fromCharCode(r>>12|224);t+=String.fromCharCode(r>>6&63|128);t+=String.fromCharCode(r&63|128)}}return t},_utf8_decode:function(e){var t="";var n=0;var r=c1=c2=0;while(n191&&r<224){c2=e.charCodeAt(n+1);t+=String.fromCharCode((r&31)<<6|c2&63);n+=2}else{c2=e.charCodeAt(n+1);c3=e.charCodeAt(n+2);t+=String.fromCharCode((r&15)<<12|(c2&63)<<6|c3&63);n+=3}}return t}}; 7 | 8 | $('.exturl').on('click', function () { 9 | var $exturl = $(this).attr('data-url'); 10 | var $decurl = Base64.decode($exturl); 11 | window.open($decurl, '_blank'); 12 | return false; 13 | }); 14 | 15 | }); 16 | -------------------------------------------------------------------------------- /js/src/hook-duoshuo.js: -------------------------------------------------------------------------------- 1 | /* global DUOSHUO: true */ 2 | /* jshint camelcase: false */ 3 | 4 | typeof DUOSHUO !== 'undefined' ? 5 | hookTemplate() : 6 | ($('#duoshuo-script')[0].onload = hookTemplate); 7 | 8 | 9 | function hookTemplate() { 10 | var post = DUOSHUO.templates.post; 11 | 12 | DUOSHUO.templates.post = function (e, t) { 13 | var rs = post(e, t); 14 | var agent = e.post.agent; 15 | var userId = e.post.author.user_id; 16 | var admin = ''; 17 | 18 | if (userId && (userId == CONFIG.duoshuo.userId)) { 19 | admin = '' + CONFIG.duoshuo.author + ''; 20 | } 21 | 22 | if (agent && /^Mozilla/.test(agent)) { 23 | rs = rs.replace(/<\/div>

/, admin + getAgentInfo(agent) + '

'); 24 | } 25 | 26 | return rs; 27 | }; 28 | } 29 | 30 | function getAgentInfo(string) { 31 | $.ua.set(string); 32 | 33 | var UNKNOWN = 'Unknown'; 34 | var sua = $.ua; 35 | var separator = isMobile() ? '

' : ''; 36 | var osName = sua.os.name || UNKNOWN; 37 | var osVersion = sua.os.version || UNKNOWN; 38 | var browserName = sua.browser.name || UNKNOWN; 39 | var browserVersion = sua.browser.version || UNKNOWN; 40 | var iconMapping = { 41 | os: { 42 | android : 'android', 43 | linux : 'linux', 44 | windows : 'windows', 45 | ios : 'apple', 46 | 'mac os': 'apple', 47 | unknown : 'desktop' 48 | }, 49 | browser: { 50 | chrome : 'chrome', 51 | chromium : 'chrome', 52 | firefox : 'firefox', 53 | opera : 'opera', 54 | safari : 'safari', 55 | ie : 'internet-explorer', 56 | wechat : 'wechat', 57 | qq : 'qq', 58 | unknown : 'globe' 59 | } 60 | }; 61 | var osIcon = iconMapping.os[osName.toLowerCase()]; 62 | var browserIcon = iconMapping.browser[getBrowserKey()]; 63 | 64 | return separator + 65 | '' + 66 | '' + 67 | osName + ' ' + osVersion + 68 | '' + separator + 69 | '' + 70 | '' + 71 | browserName + ' ' + browserVersion + 72 | ''; 73 | 74 | function getBrowserKey () { 75 | var key = browserName.toLowerCase(); 76 | 77 | if (key.match(/WeChat/i)) { 78 | return 'wechat'; 79 | } 80 | 81 | if (key.match(/QQBrowser/i)) { 82 | return 'qq'; 83 | } 84 | 85 | return key; 86 | } 87 | 88 | function isMobile() { 89 | var userAgent = window.navigator.userAgent; 90 | 91 | var isiPad = userAgent.match(/iPad/i) !== null; 92 | var mobileUA = [ 93 | 'iphone', 'android', 'phone', 'mobile', 94 | 'wap', 'netfront', 'x11', 'java', 'opera mobi', 95 | 'opera mini', 'ucweb', 'windows ce', 'symbian', 96 | 'symbianos', 'series', 'webos', 'sony', 97 | 'blackberry', 'dopod', 'nokia', 'samsung', 98 | 'palmsource', 'xda', 'pieplus', 'meizu', 99 | 'midp' ,'cldc' , 'motorola', 'foma', 100 | 'docomo', 'up.browser', 'up.link', 'blazer', 101 | 'helio', 'hosin', 'huawei', 'novarra', 102 | 'coolpad', 'webos', 'techfaith', 'palmsource', 103 | 'alcatel', 'amoi', 'ktouch', 'nexian', 104 | 'ericsson', 'philips', 'sagem', 'wellcom', 105 | 'bunjalloo', 'maui', 'smartphone', 'iemobile', 106 | 'spice', 'bird', 'zte-', 'longcos', 107 | 'pantech', 'gionee', 'portalmmm', 'jig browser', 108 | 'hiptop', 'benq', 'haier', '^lct', 109 | '320x320', '240x320', '176x220' 110 | ]; 111 | var pattern = new RegExp(mobileUA.join('|'), 'i'); 112 | 113 | return !isiPad && userAgent.match(pattern); 114 | } 115 | } 116 | -------------------------------------------------------------------------------- /js/src/js.cookie.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * JavaScript Cookie v2.1.4 3 | * https://github.com/js-cookie/js-cookie 4 | * 5 | * Copyright 2006, 2015 Klaus Hartl & Fagner Brack 6 | * Released under the MIT license 7 | */ 8 | ;(function (factory) { 9 | var registeredInModuleLoader = false; 10 | if (typeof define === 'function' && define.amd) { 11 | define(factory); 12 | registeredInModuleLoader = true; 13 | } 14 | if (typeof exports === 'object') { 15 | module.exports = factory(); 16 | registeredInModuleLoader = true; 17 | } 18 | if (!registeredInModuleLoader) { 19 | var OldCookies = window.Cookies; 20 | var api = window.Cookies = factory(); 21 | api.noConflict = function () { 22 | window.Cookies = OldCookies; 23 | return api; 24 | }; 25 | } 26 | }(function () { 27 | function extend () { 28 | var i = 0; 29 | var result = {}; 30 | for (; i < arguments.length; i++) { 31 | var attributes = arguments[ i ]; 32 | for (var key in attributes) { 33 | result[key] = attributes[key]; 34 | } 35 | } 36 | return result; 37 | } 38 | 39 | function init (converter) { 40 | function api (key, value, attributes) { 41 | var result; 42 | if (typeof document === 'undefined') { 43 | return; 44 | } 45 | 46 | // Write 47 | 48 | if (arguments.length > 1) { 49 | attributes = extend({ 50 | path: '/' 51 | }, api.defaults, attributes); 52 | 53 | if (typeof attributes.expires === 'number') { 54 | var expires = new Date(); 55 | expires.setMilliseconds(expires.getMilliseconds() + attributes.expires * 864e+5); 56 | attributes.expires = expires; 57 | } 58 | 59 | // We're using "expires" because "max-age" is not supported by IE 60 | attributes.expires = attributes.expires ? attributes.expires.toUTCString() : ''; 61 | 62 | try { 63 | result = JSON.stringify(value); 64 | if (/^[\{\[]/.test(result)) { 65 | value = result; 66 | } 67 | } catch (e) {} 68 | 69 | if (!converter.write) { 70 | value = encodeURIComponent(String(value)) 71 | .replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g, decodeURIComponent); 72 | } else { 73 | value = converter.write(value, key); 74 | } 75 | 76 | key = encodeURIComponent(String(key)); 77 | key = key.replace(/%(23|24|26|2B|5E|60|7C)/g, decodeURIComponent); 78 | key = key.replace(/[\(\)]/g, escape); 79 | 80 | var stringifiedAttributes = ''; 81 | 82 | for (var attributeName in attributes) { 83 | if (!attributes[attributeName]) { 84 | continue; 85 | } 86 | stringifiedAttributes += '; ' + attributeName; 87 | if (attributes[attributeName] === true) { 88 | continue; 89 | } 90 | stringifiedAttributes += '=' + attributes[attributeName]; 91 | } 92 | return (document.cookie = key + '=' + value + stringifiedAttributes); 93 | } 94 | 95 | // Read 96 | 97 | if (!key) { 98 | result = {}; 99 | } 100 | 101 | // To prevent the for loop in the first place assign an empty array 102 | // in case there are no cookies at all. Also prevents odd result when 103 | // calling "get()" 104 | var cookies = document.cookie ? document.cookie.split('; ') : []; 105 | var rdecode = /(%[0-9A-Z]{2})+/g; 106 | var i = 0; 107 | 108 | for (; i < cookies.length; i++) { 109 | var parts = cookies[i].split('='); 110 | var cookie = parts.slice(1).join('='); 111 | 112 | if (cookie.charAt(0) === '"') { 113 | cookie = cookie.slice(1, -1); 114 | } 115 | 116 | try { 117 | var name = parts[0].replace(rdecode, decodeURIComponent); 118 | cookie = converter.read ? 119 | converter.read(cookie, name) : converter(cookie, name) || 120 | cookie.replace(rdecode, decodeURIComponent); 121 | 122 | if (this.json) { 123 | try { 124 | cookie = JSON.parse(cookie); 125 | } catch (e) {} 126 | } 127 | 128 | if (key === name) { 129 | result = cookie; 130 | break; 131 | } 132 | 133 | if (!key) { 134 | result[name] = cookie; 135 | } 136 | } catch (e) {} 137 | } 138 | 139 | return result; 140 | } 141 | 142 | api.set = api; 143 | api.get = function (key) { 144 | return api.call(api, key); 145 | }; 146 | api.getJSON = function () { 147 | return api.apply({ 148 | json: true 149 | }, [].slice.call(arguments)); 150 | }; 151 | api.defaults = {}; 152 | 153 | api.remove = function (key, attributes) { 154 | api(key, '', extend(attributes, { 155 | expires: -1 156 | })); 157 | }; 158 | 159 | api.withConverter = init; 160 | 161 | return api; 162 | } 163 | 164 | return init(function () {}); 165 | })); 166 | -------------------------------------------------------------------------------- /js/src/post-details.js: -------------------------------------------------------------------------------- 1 | /* global NexT: true */ 2 | 3 | $(document).ready(function () { 4 | 5 | initScrollSpy(); 6 | 7 | function initScrollSpy () { 8 | var tocSelector = '.post-toc'; 9 | var $tocElement = $(tocSelector); 10 | var activeCurrentSelector = '.active-current'; 11 | 12 | $tocElement 13 | .on('activate.bs.scrollspy', function () { 14 | var $currentActiveElement = $(tocSelector + ' .active').last(); 15 | 16 | removeCurrentActiveClass(); 17 | $currentActiveElement.addClass('active-current'); 18 | 19 | // Scrolling to center active TOC element if TOC content is taller then viewport. 20 | $tocElement.scrollTop($currentActiveElement.offset().top - $tocElement.offset().top + $tocElement.scrollTop() - ($tocElement.height() / 2)); 21 | }) 22 | .on('clear.bs.scrollspy', removeCurrentActiveClass); 23 | 24 | $('body').scrollspy({ target: tocSelector }); 25 | 26 | function removeCurrentActiveClass () { 27 | $(tocSelector + ' ' + activeCurrentSelector) 28 | .removeClass(activeCurrentSelector.substring(1)); 29 | } 30 | } 31 | 32 | }); 33 | 34 | $(document).ready(function () { 35 | var html = $('html'); 36 | var TAB_ANIMATE_DURATION = 200; 37 | var hasVelocity = $.isFunction(html.velocity); 38 | 39 | $('.sidebar-nav li').on('click', function () { 40 | var item = $(this); 41 | var activeTabClassName = 'sidebar-nav-active'; 42 | var activePanelClassName = 'sidebar-panel-active'; 43 | if (item.hasClass(activeTabClassName)) { 44 | return; 45 | } 46 | 47 | var currentTarget = $('.' + activePanelClassName); 48 | var target = $('.' + item.data('target')); 49 | 50 | hasVelocity ? 51 | currentTarget.velocity('transition.slideUpOut', TAB_ANIMATE_DURATION, function () { 52 | target 53 | .velocity('stop') 54 | .velocity('transition.slideDownIn', TAB_ANIMATE_DURATION) 55 | .addClass(activePanelClassName); 56 | }) : 57 | currentTarget.animate({ opacity: 0 }, TAB_ANIMATE_DURATION, function () { 58 | currentTarget.hide(); 59 | target 60 | .stop() 61 | .css({'opacity': 0, 'display': 'block'}) 62 | .animate({ opacity: 1 }, TAB_ANIMATE_DURATION, function () { 63 | currentTarget.removeClass(activePanelClassName); 64 | target.addClass(activePanelClassName); 65 | }); 66 | }); 67 | 68 | item.siblings().removeClass(activeTabClassName); 69 | item.addClass(activeTabClassName); 70 | }); 71 | 72 | // TOC item animation navigate & prevent #item selector in adress bar. 73 | $('.post-toc a').on('click', function (e) { 74 | e.preventDefault(); 75 | var targetSelector = NexT.utils.escapeSelector(this.getAttribute('href')); 76 | var offset = $(targetSelector).offset().top; 77 | 78 | hasVelocity ? 79 | html.velocity('stop').velocity('scroll', { 80 | offset: offset + 'px', 81 | mobileHA: false 82 | }) : 83 | $('html, body').stop().animate({ 84 | scrollTop: offset 85 | }, 500); 86 | }); 87 | 88 | // Expand sidebar on post detail page by default, when post has a toc. 89 | var $tocContent = $('.post-toc-content'); 90 | var isSidebarCouldDisplay = CONFIG.sidebar.display === 'post' || 91 | CONFIG.sidebar.display === 'always'; 92 | var hasTOC = $tocContent.length > 0 && $tocContent.html().trim().length > 0; 93 | if (isSidebarCouldDisplay && hasTOC) { 94 | CONFIG.motion.enable ? 95 | (NexT.motion.middleWares.sidebar = function () { 96 | NexT.utils.displaySidebar(); 97 | }) : NexT.utils.displaySidebar(); 98 | } 99 | }); 100 | -------------------------------------------------------------------------------- /js/src/schemes/pisces.js: -------------------------------------------------------------------------------- 1 | $(document).ready(function () { 2 | 3 | var sidebarInner = $('.sidebar-inner'); 4 | 5 | initAffix(); 6 | resizeListener(); 7 | 8 | function initAffix () { 9 | var headerOffset = getHeaderOffset(), 10 | footerOffset = getFooterOffset(), 11 | sidebarHeight = $('#sidebar').height() + NexT.utils.getSidebarb2tHeight(), 12 | contentHeight = $('#content').height(); 13 | 14 | // Not affix if sidebar taller then content (to prevent bottom jumping). 15 | if (headerOffset + sidebarHeight < contentHeight) { 16 | sidebarInner.affix({ 17 | offset: { 18 | top: headerOffset - CONFIG.sidebar.offset, 19 | bottom: footerOffset 20 | } 21 | }); 22 | } 23 | 24 | setSidebarMarginTop(headerOffset).css({ 'margin-left': 'initial' }); 25 | } 26 | 27 | function resizeListener () { 28 | var mql = window.matchMedia('(min-width: 991px)'); 29 | mql.addListener(function(e){ 30 | if(e.matches){ 31 | recalculateAffixPosition(); 32 | } 33 | }); 34 | } 35 | 36 | function getHeaderOffset () { 37 | return $('.header-inner').height() + CONFIG.sidebar.offset; 38 | } 39 | 40 | function getFooterOffset () { 41 | var footerInner = $('.footer-inner'), 42 | footerMargin = footerInner.outerHeight(true) - footerInner.outerHeight(), 43 | footerOffset = footerInner.outerHeight(true) + footerMargin; 44 | return footerOffset; 45 | } 46 | 47 | function setSidebarMarginTop (headerOffset) { 48 | return $('#sidebar').css({ 'margin-top': headerOffset }); 49 | } 50 | 51 | function recalculateAffixPosition () { 52 | $(window).off('.affix'); 53 | sidebarInner.removeData('bs.affix').removeClass('affix affix-top affix-bottom'); 54 | initAffix(); 55 | } 56 | 57 | }); 58 | -------------------------------------------------------------------------------- /js/src/scroll-cookie.js: -------------------------------------------------------------------------------- 1 | $(document).ready(function() { 2 | 3 | // Set relative link path (without domain) 4 | var rpath = window.location.href.replace(window.location.origin, ""); 5 | 6 | // Write position in cookie 7 | var timeout; 8 | $(window).on("scroll", function() { 9 | clearTimeout(timeout); 10 | timeout = setTimeout(function () { 11 | Cookies.set("scroll-cookie", ($(window).scrollTop() + "|" + rpath), { expires: 365, path: '' }); 12 | }, 250); 13 | }); 14 | 15 | // Read position from cookie 16 | if (Cookies.get("scroll-cookie") !== undefined) { 17 | var cvalues = Cookies.get("scroll-cookie").split('|'); 18 | if (cvalues[1] == rpath) { 19 | $(window).scrollTop(cvalues[0]); 20 | } 21 | } 22 | 23 | }); 24 | -------------------------------------------------------------------------------- /js/src/scrollspy.js: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Bootstrap: scrollspy.js v3.3.2 3 | * http://getbootstrap.com/javascript/#scrollspy 4 | * ======================================================================== 5 | * Copyright 2011-2015 Twitter, Inc. 6 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 7 | * ======================================================================== */ 8 | 9 | /** 10 | * Custom by iissnan 11 | * 12 | * - Add a `clear.bs.scrollspy` event. 13 | * - Esacpe targets selector. 14 | */ 15 | 16 | 17 | +function ($) { 18 | 'use strict'; 19 | 20 | // SCROLLSPY CLASS DEFINITION 21 | // ========================== 22 | 23 | function ScrollSpy(element, options) { 24 | this.$body = $(document.body) 25 | this.$scrollElement = $(element).is(document.body) ? $(window) : $(element) 26 | this.options = $.extend({}, ScrollSpy.DEFAULTS, options) 27 | this.selector = (this.options.target || '') + ' .nav li > a' 28 | this.offsets = [] 29 | this.targets = [] 30 | this.activeTarget = null 31 | this.scrollHeight = 0 32 | 33 | this.$scrollElement.on('scroll.bs.scrollspy', $.proxy(this.process, this)) 34 | this.refresh() 35 | this.process() 36 | } 37 | 38 | ScrollSpy.VERSION = '3.3.2' 39 | 40 | ScrollSpy.DEFAULTS = { 41 | offset: 10 42 | } 43 | 44 | ScrollSpy.prototype.getScrollHeight = function () { 45 | return this.$scrollElement[0].scrollHeight || Math.max(this.$body[0].scrollHeight, document.documentElement.scrollHeight) 46 | } 47 | 48 | ScrollSpy.prototype.refresh = function () { 49 | var that = this 50 | var offsetMethod = 'offset' 51 | var offsetBase = 0 52 | 53 | this.offsets = [] 54 | this.targets = [] 55 | this.scrollHeight = this.getScrollHeight() 56 | 57 | if (!$.isWindow(this.$scrollElement[0])) { 58 | offsetMethod = 'position' 59 | offsetBase = this.$scrollElement.scrollTop() 60 | } 61 | 62 | this.$body 63 | .find(this.selector) 64 | .map(function () { 65 | var $el = $(this) 66 | var href = $el.data('target') || $el.attr('href') 67 | var $href = /^#./.test(href) && $(NexT.utils.escapeSelector(href)) // Need to escape selector. 68 | 69 | return ($href 70 | && $href.length 71 | && $href.is(':visible') 72 | && [[$href[offsetMethod]().top + offsetBase, href]]) || null 73 | }) 74 | .sort(function (a, b) { return a[0] - b[0] }) 75 | .each(function () { 76 | that.offsets.push(this[0]) 77 | that.targets.push(this[1]) 78 | }) 79 | 80 | 81 | } 82 | 83 | ScrollSpy.prototype.process = function () { 84 | var scrollTop = this.$scrollElement.scrollTop() + this.options.offset 85 | var scrollHeight = this.getScrollHeight() 86 | var maxScroll = this.options.offset + scrollHeight - this.$scrollElement.height() 87 | var offsets = this.offsets 88 | var targets = this.targets 89 | var activeTarget = this.activeTarget 90 | var i 91 | 92 | if (this.scrollHeight != scrollHeight) { 93 | this.refresh() 94 | } 95 | 96 | if (scrollTop >= maxScroll) { 97 | return activeTarget != (i = targets[targets.length - 1]) && this.activate(i) 98 | } 99 | 100 | if (activeTarget && scrollTop < offsets[0]) { 101 | $(this.selector).trigger('clear.bs.scrollspy') // Add a custom event. 102 | this.activeTarget = null 103 | return this.clear() 104 | } 105 | 106 | for (i = offsets.length; i--;) { 107 | activeTarget != targets[i] 108 | && scrollTop >= offsets[i] 109 | && (!offsets[i + 1] || scrollTop <= offsets[i + 1]) 110 | && this.activate(targets[i]) 111 | } 112 | } 113 | 114 | ScrollSpy.prototype.activate = function (target) { 115 | this.activeTarget = target 116 | 117 | this.clear() 118 | 119 | var selector = this.selector + 120 | '[data-target="' + target + '"],' + 121 | this.selector + '[href="' + target + '"]' 122 | 123 | var active = $(selector) 124 | .parents('li') 125 | .addClass('active') 126 | 127 | if (active.parent('.dropdown-menu').length) { 128 | active = active 129 | .closest('li.dropdown') 130 | .addClass('active') 131 | } 132 | 133 | active.trigger('activate.bs.scrollspy') 134 | } 135 | 136 | ScrollSpy.prototype.clear = function () { 137 | $(this.selector) 138 | .parentsUntil(this.options.target, '.active') 139 | .removeClass('active') 140 | } 141 | 142 | 143 | // SCROLLSPY PLUGIN DEFINITION 144 | // =========================== 145 | 146 | function Plugin(option) { 147 | return this.each(function () { 148 | var $this = $(this) 149 | var data = $this.data('bs.scrollspy') 150 | var options = typeof option == 'object' && option 151 | 152 | if (!data) $this.data('bs.scrollspy', (data = new ScrollSpy(this, options))) 153 | if (typeof option == 'string') data[option]() 154 | }) 155 | } 156 | 157 | var old = $.fn.scrollspy 158 | 159 | $.fn.scrollspy = Plugin 160 | $.fn.scrollspy.Constructor = ScrollSpy 161 | 162 | 163 | // SCROLLSPY NO CONFLICT 164 | // ===================== 165 | 166 | $.fn.scrollspy.noConflict = function () { 167 | $.fn.scrollspy = old 168 | return this 169 | } 170 | 171 | 172 | // SCROLLSPY DATA-API 173 | // ================== 174 | 175 | $(window).on('load.bs.scrollspy.data-api', function () { 176 | $('[data-spy="scroll"]').each(function () { 177 | var $spy = $(this) 178 | Plugin.call($spy, $spy.data()) 179 | }) 180 | }) 181 | 182 | }(jQuery); 183 | -------------------------------------------------------------------------------- /lib/Han/dist/font/han-space.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhangxiang958/Blog/c488898721077e73fbf79809b89bbfc970871ab9/lib/Han/dist/font/han-space.otf -------------------------------------------------------------------------------- /lib/Han/dist/font/han-space.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhangxiang958/Blog/c488898721077e73fbf79809b89bbfc970871ab9/lib/Han/dist/font/han-space.woff -------------------------------------------------------------------------------- /lib/Han/dist/font/han.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhangxiang958/Blog/c488898721077e73fbf79809b89bbfc970871ab9/lib/Han/dist/font/han.otf -------------------------------------------------------------------------------- /lib/Han/dist/font/han.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhangxiang958/Blog/c488898721077e73fbf79809b89bbfc970871ab9/lib/Han/dist/font/han.woff -------------------------------------------------------------------------------- /lib/Han/dist/font/han.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhangxiang958/Blog/c488898721077e73fbf79809b89bbfc970871ab9/lib/Han/dist/font/han.woff2 -------------------------------------------------------------------------------- /lib/algolia-instant-search/instantsearch.min.css: -------------------------------------------------------------------------------- 1 | /*! instantsearch.js 1.5.0 | © Algolia Inc. and other contributors; Licensed MIT | github.com/algolia/instantsearch.js */.ais-search-box--powered-by{font-size:.8em;text-align:right;margin-top:2px}.ais-search-box--powered-by-link{display:inline-block;width:45px;height:16px;text-indent:101%;overflow:hidden;white-space:nowrap;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAF0AAAAgCAYAAABwzXTcAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAACXBIWXMAAA7DAAAOwwHHb6hkAAAAGHRFWHRTb2Z0d2FyZQBwYWludC5uZXQgNC4wLjVlhTJlAAAIJElEQVRoQ+1Za2xURRTugqJVEBAlhICBRFEQeRfodssqiDZaS8vu3dsXVlAbxReJwVfAoqJ/sBqE3S1IgqgBrY9EQ6KJiUAokUfpvQUKogIBlKbyEEUolNL6ndkzw9129+72YaFJv+Rk737nzMyZ756dmXs3oQtd6EJ7oaioqJvX603kr1cl8vPzb+TLzo3MzMx+Xk0r03y+0x5Ne4vpqwoohjeQ4yHYcaYiwcGfVz+ysrIGQfBGsqtWdE37lvLz+nwnmVLIyMjoBd9GxPwL/wKmOw4zCgr6YPBNSGILEviYaVt0dtHxK/DK/BFXq2lad3Z1DJDUqzIBYZrmYldUdLToI4r29HCWmLozUPmEK2AUOgOmRysttRXKTnSPxzMWfD37q0B13DJTUFBwPQatlgKKJJAsu6Oio0VPDlQsTgmajWEWMOaxOyLsRCdQccGez87OHshUxwAJzZbiIYFKkaSmXdJ1fRiHRERHi+4MGk+mBMwXnSVGPj7nQPS3qeLZHRGxRL9ScCAxk8Ur92Rnj5VCItHlHBMRrRDdQRXl8/nG4eaOp5uKz57sC8OkoDEkOWCO5K8CtJRgabnT6TfuS/ZXOKet2duPXVHRDqI7svLz+yPnJCxH07ANuGFDiQ+5WwF0NkWJrOuziEOCm5n7Jy8v7yYRGAHxio4kEyHuK+j3oIyXRr8o2G/wrUXMGIonQbFe18Kq3Ms39By/orw3KnsxKr06fHkxLjkDxubkEuNhMVAE2Ikuni98vsMYtwafQaYVwLvQ9qg1X2mI/xXzyuXQlgGNP+NO/kxLS7tOcOhMda7rz4rACIhH9Ky8vEGY+G4ZZ2ua9hi1gbhvQvBDScu3DUC1j8X1YSV0wDgLsX9m7tJl3lw9onRPDzGoBTFFp1NLyL+WaQUU5GSZG+IuIeYCrhskJ3ivN6o+EYFJDuCOaNBipuXGepI73gMq4k8pluh0E5GsXLoo8U1IMgPLyhDYYExqNL6/Lv1S9FT/7sHOkp0TXCvNYbgBp0hUfB6A2D6rsKn+7YMh9nvOoHkxJL6xLiGhMSzXtoiOfHqDn41ch5MmFC+O1ihEtDnP7c5QHDeJDTSQx8QGTH4E0wLwLWVfo0fXU5kOQyzR0ecL0o/EvoI1O95ZlzcpugAmiKVjKwu+1f2+0Yc9As5VZb3gX4JfQn9XwEyH+HUi1m/kc4hAW0S3A3J9TeaNOWQybQ8aEA0O8IDbmFagM6zsFP5PmA5DTNF5WUH7c7QZMR2GaKK7Ssw0FvyMe2XlIKYVUkrMR4Q/YB6b4t85HKIv5Pj9CY2Xq/3/Ep2qX+aN4prPtD0w2ftlI0z2GaatsJ5qztLPinkFO9Fzc3P7ghfrH/r5nulmiCY6qnhVSEQz4gkKIvvJD2sQS8yqfb3wifWeuN2jOazdRIewibQszszJuYO0yMnJuUXmjbZFHGYPTHAdN7iQOWtWxKMXfPNkx5FujJ3oEHOk9KGfpUw3QzTRsWHuCAloZDFlQaMDN+Ugqrocy8tUJulG/Mg34lGm2iR6YWHhteDnIq8diLmo8gwV0zH5HTGxRcddu1kOhg6PotGCKKbWdVg5N1eIIfpo1VbT3mW6GWxE30cCulbscjOlkLRsb7+UQGUuVOvGlABu0JdC9IChCqS1olNlg9+ocqOY0PG2FrHi1YHi4xJd15+2NorTaLO9h7sQsBOdTieqLX5VTDdD9OXFLCMBm26MdqANV7QpMXWm2iK69VS1AXmm0AmGfOIX4PUmS398omPjFME0oKZtsTPEqDM22qljJcFOdLTtDv4E+2vkM0BT2FR6sRAwaJQyZYuJ2Gyx5NSj2htSPzDpiVGg1aLzfga+mqqeaQX6L0HmjRh70a27Lib5KdNRgZjelsSq3W73NewKEx1xYaITwJVY/IuYDkM00Scv2zGOBETF1+MkM4npqIDga8RNwhMqUwKtFt3n+13wmlbGVBhaJDom9o4MxoQfYtoW6PQLNYDXqx65cX2r4n2+j5hWoN0e/BmOoeUpgDFH0qsFXA+FPQ5/lezDKjoBoq8Ta3TQ/MPl3zWK6XBAOMQtCglu1qcsN8NeScvcIV5d01cadqIjF9o8qd0p+rODaYW4RedBjnBwjbVq7QChPJYBPmda9Ef9sO88fC/NnDnzLnYL4MFqBvk4xt6aiO5ebfSBoLu5gmtxXZzsr0hyBXb1xRFxYHKwwivXfrJkv/EyN1VAn4tk/8hvPebyIK3J5ItR6Qssee1Ageh4drkbn7dT4fC8ZL/RRUeDqZZA2zeIVqAd7eSnud05JKEee3GtnsyEYUlhlwK4MWi3HiZeOVjsF/g+VN+biE6gN4nOYOV3UtiIhvO5028+xU3CgD5vg7B/yzFwXSf3FzvR6Y9s+Lar3GwMbW1Ex7kbHW0iw12bwHRcQPILVVtdn8Y0wYF+52LwChhV+3PMN8N0TARVQu9bJtKLMFAO5HGvSh7VFIpsikaHeNQPGt9A5JMkNG2asP2wJfSuhgMjwpOdPQp5fY0xTiD/vUxL0X8Q88JphWkF8Q5K1+dj7hVoby2Yi+Bq0G4nPkvRdjo36XiI5aaF/zNiUur9DN0Mpu3gmFx8JHH8inKxRLQUcmlpKWhesN4Zc+b0aukcrwSivuynR2lUkHjHjqo53lpBumABKjcRolbBluJ6FpaWKVTNWJ4eQLXQXnD5DwJ852ZdaAsgsvoTwM5wU1Z3hp9spwCqeigELcbS8RPE/QvX9M6iAd/rcH0YtrbJptyFdoYD1dwjPT39hnifD7rQhTiRkPAfxnOcWpCmnRwAAAAASUVORK5CYII=);background-repeat:no-repeat;background-size:contain;vertical-align:middle}.ais-pagination--item{display:inline-block;padding:3px}.ais-range-slider--value,.ais-range-slider--value-sub{font-size:.8em;padding-top:15px}.ais-pagination--item__disabled{visibility:hidden}.ais-hierarchical-menu--list__lvl1,.ais-hierarchical-menu--list__lvl2{margin-left:10px}.ais-range-slider--target{position:relative;direction:ltr;background:#F3F4F7;height:6px;margin-top:2em;margin-bottom:2em}.ais-range-slider--base{height:100%;position:relative;z-index:1;border-top:1px solid #DDD;border-bottom:1px solid #DDD;border-left:2px solid #DDD;border-right:2px solid #DDD}.ais-range-slider--origin{position:absolute;right:0;top:0;left:0;bottom:0}.ais-range-slider--connect{background:#46AEDA}.ais-range-slider--background{background:#F3F4F7}.ais-range-slider--handle{width:20px;height:20px;position:relative;z-index:1;background:#FFF;border:1px solid #46AEDA;border-radius:50%;cursor:pointer}.ais-range-slider--handle-lower{left:-10px;bottom:7px}.ais-range-slider--handle-upper{right:10px;bottom:7px}.ais-range-slider--tooltip{position:absolute;background:#FFF;top:-22px;font-size:.8em}.ais-range-slider--pips{box-sizing:border-box;position:absolute;height:3em;top:100%;left:0;width:100%}.ais-range-slider--value{width:40px;position:absolute;text-align:center;margin-left:-20px}.ais-range-slider--marker{position:absolute;background:#DDD;margin-left:-1px;width:1px;height:5px}.ais-range-slider--marker-sub{background:#DDD;width:2px;margin-left:-2px;height:13px}.ais-range-slider--marker-large{background:#DDD;width:2px;margin-left:-2px;height:12px}.ais-star-rating--star,.ais-star-rating--star__empty{display:inline-block;width:1em;height:1em}.ais-range-slider--marker-large:first-child{margin-left:0}.ais-star-rating--item{vertical-align:middle}.ais-star-rating--item__active{font-weight:700}.ais-star-rating--star:before{content:'\2605';color:#FBAE00}.ais-star-rating--star__empty:before{content:'\2606';color:#FBAE00}.ais-star-rating--link__disabled .ais-star-rating--star:before,.ais-star-rating--link__disabled .ais-star-rating--star__empty:before{color:#C9C9C9}.ais-root__collapsible .ais-header{cursor:pointer}.ais-root__collapsed .ais-body,.ais-root__collapsed .ais-footer{display:none} -------------------------------------------------------------------------------- /lib/canvas-nest/canvas-nest.min.js: -------------------------------------------------------------------------------- 1 | !function(){function o(w,v,i){return w.getAttribute(v)||i}function j(i){return document.getElementsByTagName(i)}function l(){var i=j("script"),w=i.length,v=i[w-1];return{l:w,z:o(v,"zIndex",-1),o:o(v,"opacity",0.5),c:o(v,"color","0,0,0"),n:o(v,"count",99)}}function k(){r=u.width=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,n=u.height=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight}function b(){e.clearRect(0,0,r,n);var w=[f].concat(t);var x,v,A,B,z,y;t.forEach(function(i){i.x+=i.xa,i.y+=i.ya,i.xa*=i.x>r||i.x<0?-1:1,i.ya*=i.y>n||i.y<0?-1:1,e.fillRect(i.x-0.5,i.y-0.5,1,1);for(v=0;v=x.max/2&&(i.x-=0.03*B,i.y-=0.03*z),A=(x.max-y)/x.max,e.beginPath(),e.lineWidth=A/2,e.strokeStyle="rgba("+s.c+","+(A+0.2)+")",e.moveTo(i.x,i.y),e.lineTo(x.x,x.y),e.stroke())}}w.splice(w.indexOf(i),1)}),m(b)}var u=document.createElement("canvas"),s=l(),c="c_n"+s.l,e=u.getContext("2d"),r,n,m=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(i){window.setTimeout(i,1000/45)},a=Math.random,f={x:null,y:null,max:20000};u.id=c;u.style.cssText="position:fixed;top:0;left:0;z-index:"+s.z+";opacity:"+s.o;j("body")[0].appendChild(u);k(),window.onresize=k;window.onmousemove=function(i){i=i||window.event,f.x=i.clientX,f.y=i.clientY},window.onmouseout=function(){f.x=null,f.y=null};for(var t=[],p=0;s.n>p;p++){var h=a()*r,g=a()*n,q=2*a()-1,d=2*a()-1;t.push({x:h,y:g,xa:q,ya:d,max:6000})}setTimeout(function(){b()},100)}(); -------------------------------------------------------------------------------- /lib/canvas-ribbon/canvas-ribbon.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by zproo on 2017/4/8. 3 | */ 4 | !function () { 5 | function getAttr(script, attr, default_val) { 6 | return Number(script.getAttribute(attr)) || default_val; 7 | } 8 | 9 | // 获取自定义配置 10 | var ribbon = document.getElementById('ribbon'); // 当前加载的script 11 | config = { 12 | zIndex: getAttr(ribbon, "zIndex", -1), // z-index 13 | alpha: getAttr(ribbon, "alpha", 0.6), // alpha 14 | ribbon_width: getAttr(ribbon, "size", 90), // size 15 | }; 16 | 17 | var canvas = document.createElement("canvas"); 18 | canvas.style.cssText = "position:fixed;top:0;left:0;z-index:"+config.zIndex; 19 | document.getElementsByTagName("body")[0].appendChild(canvas); 20 | 21 | var canvasRibbon = canvas, 22 | ctx = canvasRibbon.getContext('2d'), // 获取canvas 2d上下文 23 | dpr = window.devicePixelRatio || 1, // the size of one CSS pixel to the size of one physical pixel. 24 | width = window.innerWidth, // 返回窗口的文档显示区的宽高 25 | height = window.innerHeight, 26 | RIBBON_WIDTH = config.ribbon_width, 27 | path, 28 | math = Math, 29 | r = 0, 30 | PI_2 = math.PI * 2, // 圆周率*2 31 | cos = math.cos, // cos函数返回一个数值的余弦值(-1~1) 32 | random = math.random; // 返回0-1随机数 33 | 34 | canvasRibbon.width = width * dpr; // 返回实际宽高 35 | canvasRibbon.height = height * dpr; 36 | ctx.scale(dpr, dpr); // 水平、竖直方向缩放 37 | ctx.globalAlpha = config.alpha; // 图形透明度 38 | 39 | function init() { 40 | ctx.clearRect(0, 0, width, height); // 擦除之前绘制内容 41 | path = [{x: 0, y: height * 0.7 + RIBBON_WIDTH}, {x: 0, y: height * 0.7 - RIBBON_WIDTH}]; 42 | // 路径没有填满屏幕宽度时,绘制路径 43 | while (path[1].x < width + RIBBON_WIDTH) { 44 | draw(path[0], path[1]) 45 | } 46 | } 47 | 48 | function draw(start, end) { 49 | ctx.beginPath(); // 创建一个新的路径 50 | ctx.moveTo(start.x, start.y); // path起点 51 | ctx.lineTo(end.x, end.y); // path终点 52 | var nextX = end.x + (random() * 2 - 0.25) * RIBBON_WIDTH, 53 | nextY = geneY(end.y); 54 | ctx.lineTo(nextX, nextY); 55 | ctx.closePath(); 56 | 57 | r -= PI_2 / -50; 58 | // 随机生成并设置canvas路径16进制颜色 59 | ctx.fillStyle = '#' + (cos(r) * 127 + 128 << 16 | cos(r + PI_2 / 3) * 127 + 128 << 8 | cos(r + PI_2 / 3 * 2) * 127 + 128).toString(16); 60 | ctx.fill(); // 根据当前样式填充路径 61 | path[0] = path[1]; // 起点更新为当前终点 62 | path[1] = {x: nextX, y: nextY} // 更新终点 63 | } 64 | 65 | function geneY(y) { 66 | var temp = y + (random() * 2 - 1.1) * RIBBON_WIDTH; 67 | return (temp > height || temp < 0) ? geneY(y) : temp; 68 | } 69 | 70 | document.onclick = init; 71 | document.ontouchstart = init; 72 | init(); 73 | }(); 74 | -------------------------------------------------------------------------------- /lib/fancybox/source/blank.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhangxiang958/Blog/c488898721077e73fbf79809b89bbfc970871ab9/lib/fancybox/source/blank.gif -------------------------------------------------------------------------------- /lib/fancybox/source/fancybox_loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhangxiang958/Blog/c488898721077e73fbf79809b89bbfc970871ab9/lib/fancybox/source/fancybox_loading.gif -------------------------------------------------------------------------------- /lib/fancybox/source/fancybox_loading@2x.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhangxiang958/Blog/c488898721077e73fbf79809b89bbfc970871ab9/lib/fancybox/source/fancybox_loading@2x.gif -------------------------------------------------------------------------------- /lib/fancybox/source/fancybox_overlay.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhangxiang958/Blog/c488898721077e73fbf79809b89bbfc970871ab9/lib/fancybox/source/fancybox_overlay.png -------------------------------------------------------------------------------- /lib/fancybox/source/fancybox_sprite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhangxiang958/Blog/c488898721077e73fbf79809b89bbfc970871ab9/lib/fancybox/source/fancybox_sprite.png -------------------------------------------------------------------------------- /lib/fancybox/source/fancybox_sprite@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhangxiang958/Blog/c488898721077e73fbf79809b89bbfc970871ab9/lib/fancybox/source/fancybox_sprite@2x.png -------------------------------------------------------------------------------- /lib/fancybox/source/helpers/fancybox_buttons.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhangxiang958/Blog/c488898721077e73fbf79809b89bbfc970871ab9/lib/fancybox/source/helpers/fancybox_buttons.png -------------------------------------------------------------------------------- /lib/fancybox/source/helpers/jquery.fancybox-buttons.css: -------------------------------------------------------------------------------- 1 | #fancybox-buttons { 2 | position: fixed; 3 | left: 0; 4 | width: 100%; 5 | z-index: 8050; 6 | } 7 | 8 | #fancybox-buttons.top { 9 | top: 10px; 10 | } 11 | 12 | #fancybox-buttons.bottom { 13 | bottom: 10px; 14 | } 15 | 16 | #fancybox-buttons ul { 17 | display: block; 18 | width: 166px; 19 | height: 30px; 20 | margin: 0 auto; 21 | padding: 0; 22 | list-style: none; 23 | border: 1px solid #111; 24 | border-radius: 3px; 25 | -webkit-box-shadow: inset 0 0 0 1px rgba(255,255,255,.05); 26 | -moz-box-shadow: inset 0 0 0 1px rgba(255,255,255,.05); 27 | box-shadow: inset 0 0 0 1px rgba(255,255,255,.05); 28 | background: rgb(50,50,50); 29 | background: -moz-linear-gradient(top, rgb(68,68,68) 0%, rgb(52,52,52) 50%, rgb(41,41,41) 50%, rgb(51,51,51) 100%); 30 | background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgb(68,68,68)), color-stop(50%,rgb(52,52,52)), color-stop(50%,rgb(41,41,41)), color-stop(100%,rgb(51,51,51))); 31 | background: -webkit-linear-gradient(top, rgb(68,68,68) 0%,rgb(52,52,52) 50%,rgb(41,41,41) 50%,rgb(51,51,51) 100%); 32 | background: -o-linear-gradient(top, rgb(68,68,68) 0%,rgb(52,52,52) 50%,rgb(41,41,41) 50%,rgb(51,51,51) 100%); 33 | background: -ms-linear-gradient(top, rgb(68,68,68) 0%,rgb(52,52,52) 50%,rgb(41,41,41) 50%,rgb(51,51,51) 100%); 34 | background: linear-gradient(top, rgb(68,68,68) 0%,rgb(52,52,52) 50%,rgb(41,41,41) 50%,rgb(51,51,51) 100%); 35 | filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#444444', endColorstr='#222222',GradientType=0 ); 36 | } 37 | 38 | #fancybox-buttons ul li { 39 | float: left; 40 | margin: 0; 41 | padding: 0; 42 | } 43 | 44 | #fancybox-buttons a { 45 | display: block; 46 | width: 30px; 47 | height: 30px; 48 | text-indent: -9999px; 49 | background-color: transparent; 50 | background-image: url('fancybox_buttons.png'); 51 | background-repeat: no-repeat; 52 | outline: none; 53 | opacity: 0.8; 54 | } 55 | 56 | #fancybox-buttons a:hover { 57 | opacity: 1; 58 | } 59 | 60 | #fancybox-buttons a.btnPrev { 61 | background-position: 5px 0; 62 | } 63 | 64 | #fancybox-buttons a.btnNext { 65 | background-position: -33px 0; 66 | border-right: 1px solid #3e3e3e; 67 | } 68 | 69 | #fancybox-buttons a.btnPlay { 70 | background-position: 0 -30px; 71 | } 72 | 73 | #fancybox-buttons a.btnPlayOn { 74 | background-position: -30px -30px; 75 | } 76 | 77 | #fancybox-buttons a.btnToggle { 78 | background-position: 3px -60px; 79 | border-left: 1px solid #111; 80 | border-right: 1px solid #3e3e3e; 81 | width: 35px 82 | } 83 | 84 | #fancybox-buttons a.btnToggleOn { 85 | background-position: -27px -60px; 86 | } 87 | 88 | #fancybox-buttons a.btnClose { 89 | border-left: 1px solid #111; 90 | width: 35px; 91 | background-position: -56px 0px; 92 | } 93 | 94 | #fancybox-buttons a.btnDisabled { 95 | opacity : 0.4; 96 | cursor: default; 97 | } -------------------------------------------------------------------------------- /lib/fancybox/source/helpers/jquery.fancybox-buttons.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Buttons helper for fancyBox 3 | * version: 1.0.5 (Mon, 15 Oct 2012) 4 | * @requires fancyBox v2.0 or later 5 | * 6 | * Usage: 7 | * $(".fancybox").fancybox({ 8 | * helpers : { 9 | * buttons: { 10 | * position : 'top' 11 | * } 12 | * } 13 | * }); 14 | * 15 | */ 16 | (function ($) { 17 | //Shortcut for fancyBox object 18 | var F = $.fancybox; 19 | 20 | //Add helper object 21 | F.helpers.buttons = { 22 | defaults : { 23 | skipSingle : false, // disables if gallery contains single image 24 | position : 'top', // 'top' or 'bottom' 25 | tpl : '

' 26 | }, 27 | 28 | list : null, 29 | buttons: null, 30 | 31 | beforeLoad: function (opts, obj) { 32 | //Remove self if gallery do not have at least two items 33 | 34 | if (opts.skipSingle && obj.group.length < 2) { 35 | obj.helpers.buttons = false; 36 | obj.closeBtn = true; 37 | 38 | return; 39 | } 40 | 41 | //Increase top margin to give space for buttons 42 | obj.margin[ opts.position === 'bottom' ? 2 : 0 ] += 30; 43 | }, 44 | 45 | onPlayStart: function () { 46 | if (this.buttons) { 47 | this.buttons.play.attr('title', 'Pause slideshow').addClass('btnPlayOn'); 48 | } 49 | }, 50 | 51 | onPlayEnd: function () { 52 | if (this.buttons) { 53 | this.buttons.play.attr('title', 'Start slideshow').removeClass('btnPlayOn'); 54 | } 55 | }, 56 | 57 | afterShow: function (opts, obj) { 58 | var buttons = this.buttons; 59 | 60 | if (!buttons) { 61 | this.list = $(opts.tpl).addClass(opts.position).appendTo('body'); 62 | 63 | buttons = { 64 | prev : this.list.find('.btnPrev').click( F.prev ), 65 | next : this.list.find('.btnNext').click( F.next ), 66 | play : this.list.find('.btnPlay').click( F.play ), 67 | toggle : this.list.find('.btnToggle').click( F.toggle ), 68 | close : this.list.find('.btnClose').click( F.close ) 69 | } 70 | } 71 | 72 | //Prev 73 | if (obj.index > 0 || obj.loop) { 74 | buttons.prev.removeClass('btnDisabled'); 75 | } else { 76 | buttons.prev.addClass('btnDisabled'); 77 | } 78 | 79 | //Next / Play 80 | if (obj.loop || obj.index < obj.group.length - 1) { 81 | buttons.next.removeClass('btnDisabled'); 82 | buttons.play.removeClass('btnDisabled'); 83 | 84 | } else { 85 | buttons.next.addClass('btnDisabled'); 86 | buttons.play.addClass('btnDisabled'); 87 | } 88 | 89 | this.buttons = buttons; 90 | 91 | this.onUpdate(opts, obj); 92 | }, 93 | 94 | onUpdate: function (opts, obj) { 95 | var toggle; 96 | 97 | if (!this.buttons) { 98 | return; 99 | } 100 | 101 | toggle = this.buttons.toggle.removeClass('btnDisabled btnToggleOn'); 102 | 103 | //Size toggle button 104 | if (obj.canShrink) { 105 | toggle.addClass('btnToggleOn'); 106 | 107 | } else if (!obj.canExpand) { 108 | toggle.addClass('btnDisabled'); 109 | } 110 | }, 111 | 112 | beforeClose: function () { 113 | if (this.list) { 114 | this.list.remove(); 115 | } 116 | 117 | this.list = null; 118 | this.buttons = null; 119 | } 120 | }; 121 | 122 | }(jQuery)); 123 | -------------------------------------------------------------------------------- /lib/fancybox/source/helpers/jquery.fancybox-media.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Media helper for fancyBox 3 | * version: 1.0.6 (Fri, 14 Jun 2013) 4 | * @requires fancyBox v2.0 or later 5 | * 6 | * Usage: 7 | * $(".fancybox").fancybox({ 8 | * helpers : { 9 | * media: true 10 | * } 11 | * }); 12 | * 13 | * Set custom URL parameters: 14 | * $(".fancybox").fancybox({ 15 | * helpers : { 16 | * media: { 17 | * youtube : { 18 | * params : { 19 | * autoplay : 0 20 | * } 21 | * } 22 | * } 23 | * } 24 | * }); 25 | * 26 | * Or: 27 | * $(".fancybox").fancybox({, 28 | * helpers : { 29 | * media: true 30 | * }, 31 | * youtube : { 32 | * autoplay: 0 33 | * } 34 | * }); 35 | * 36 | * Supports: 37 | * 38 | * Youtube 39 | * http://www.youtube.com/watch?v=opj24KnzrWo 40 | * http://www.youtube.com/embed/opj24KnzrWo 41 | * http://youtu.be/opj24KnzrWo 42 | * http://www.youtube-nocookie.com/embed/opj24KnzrWo 43 | * Vimeo 44 | * http://vimeo.com/40648169 45 | * http://vimeo.com/channels/staffpicks/38843628 46 | * http://vimeo.com/groups/surrealism/videos/36516384 47 | * http://player.vimeo.com/video/45074303 48 | * Metacafe 49 | * http://www.metacafe.com/watch/7635964/dr_seuss_the_lorax_movie_trailer/ 50 | * http://www.metacafe.com/watch/7635964/ 51 | * Dailymotion 52 | * http://www.dailymotion.com/video/xoytqh_dr-seuss-the-lorax-premiere_people 53 | * Twitvid 54 | * http://twitvid.com/QY7MD 55 | * Twitpic 56 | * http://twitpic.com/7p93st 57 | * Instagram 58 | * http://instagr.am/p/IejkuUGxQn/ 59 | * http://instagram.com/p/IejkuUGxQn/ 60 | * Google maps 61 | * http://maps.google.com/maps?q=Eiffel+Tower,+Avenue+Gustave+Eiffel,+Paris,+France&t=h&z=17 62 | * http://maps.google.com/?ll=48.857995,2.294297&spn=0.007666,0.021136&t=m&z=16 63 | * http://maps.google.com/?ll=48.859463,2.292626&spn=0.000965,0.002642&t=m&z=19&layer=c&cbll=48.859524,2.292532&panoid=YJ0lq28OOy3VT2IqIuVY0g&cbp=12,151.58,,0,-15.56 64 | */ 65 | (function ($) { 66 | "use strict"; 67 | 68 | //Shortcut for fancyBox object 69 | var F = $.fancybox, 70 | format = function( url, rez, params ) { 71 | params = params || ''; 72 | 73 | if ( $.type( params ) === "object" ) { 74 | params = $.param(params, true); 75 | } 76 | 77 | $.each(rez, function(key, value) { 78 | url = url.replace( '$' + key, value || '' ); 79 | }); 80 | 81 | if (params.length) { 82 | url += ( url.indexOf('?') > 0 ? '&' : '?' ) + params; 83 | } 84 | 85 | return url; 86 | }; 87 | 88 | //Add helper object 89 | F.helpers.media = { 90 | defaults : { 91 | youtube : { 92 | matcher : /(youtube\.com|youtu\.be|youtube-nocookie\.com)\/(watch\?v=|v\/|u\/|embed\/?)?(videoseries\?list=(.*)|[\w-]{11}|\?listType=(.*)&list=(.*)).*/i, 93 | params : { 94 | autoplay : 1, 95 | autohide : 1, 96 | fs : 1, 97 | rel : 0, 98 | hd : 1, 99 | wmode : 'opaque', 100 | enablejsapi : 1 101 | }, 102 | type : 'iframe', 103 | url : '//www.youtube.com/embed/$3' 104 | }, 105 | vimeo : { 106 | matcher : /(?:vimeo(?:pro)?.com)\/(?:[^\d]+)?(\d+)(?:.*)/, 107 | params : { 108 | autoplay : 1, 109 | hd : 1, 110 | show_title : 1, 111 | show_byline : 1, 112 | show_portrait : 0, 113 | fullscreen : 1 114 | }, 115 | type : 'iframe', 116 | url : '//player.vimeo.com/video/$1' 117 | }, 118 | metacafe : { 119 | matcher : /metacafe.com\/(?:watch|fplayer)\/([\w\-]{1,10})/, 120 | params : { 121 | autoPlay : 'yes' 122 | }, 123 | type : 'swf', 124 | url : function( rez, params, obj ) { 125 | obj.swf.flashVars = 'playerVars=' + $.param( params, true ); 126 | 127 | return '//www.metacafe.com/fplayer/' + rez[1] + '/.swf'; 128 | } 129 | }, 130 | dailymotion : { 131 | matcher : /dailymotion.com\/video\/(.*)\/?(.*)/, 132 | params : { 133 | additionalInfos : 0, 134 | autoStart : 1 135 | }, 136 | type : 'swf', 137 | url : '//www.dailymotion.com/swf/video/$1' 138 | }, 139 | twitvid : { 140 | matcher : /twitvid\.com\/([a-zA-Z0-9_\-\?\=]+)/i, 141 | params : { 142 | autoplay : 0 143 | }, 144 | type : 'iframe', 145 | url : '//www.twitvid.com/embed.php?guid=$1' 146 | }, 147 | twitpic : { 148 | matcher : /twitpic\.com\/(?!(?:place|photos|events)\/)([a-zA-Z0-9\?\=\-]+)/i, 149 | type : 'image', 150 | url : '//twitpic.com/show/full/$1/' 151 | }, 152 | instagram : { 153 | matcher : /(instagr\.am|instagram\.com)\/p\/([a-zA-Z0-9_\-]+)\/?/i, 154 | type : 'image', 155 | url : '//$1/p/$2/media/?size=l' 156 | }, 157 | google_maps : { 158 | matcher : /maps\.google\.([a-z]{2,3}(\.[a-z]{2})?)\/(\?ll=|maps\?)(.*)/i, 159 | type : 'iframe', 160 | url : function( rez ) { 161 | return '//maps.google.' + rez[1] + '/' + rez[3] + '' + rez[4] + '&output=' + (rez[4].indexOf('layer=c') > 0 ? 'svembed' : 'embed'); 162 | } 163 | } 164 | }, 165 | 166 | beforeLoad : function(opts, obj) { 167 | var url = obj.href || '', 168 | type = false, 169 | what, 170 | item, 171 | rez, 172 | params; 173 | 174 | for (what in opts) { 175 | if (opts.hasOwnProperty(what)) { 176 | item = opts[ what ]; 177 | rez = url.match( item.matcher ); 178 | 179 | if (rez) { 180 | type = item.type; 181 | params = $.extend(true, {}, item.params, obj[ what ] || ($.isPlainObject(opts[ what ]) ? opts[ what ].params : null)); 182 | 183 | url = $.type( item.url ) === "function" ? item.url.call( this, rez, params, obj ) : format( item.url, rez, params ); 184 | 185 | break; 186 | } 187 | } 188 | } 189 | 190 | if (type) { 191 | obj.href = url; 192 | obj.type = type; 193 | 194 | obj.autoHeight = false; 195 | } 196 | } 197 | }; 198 | 199 | }(jQuery)); -------------------------------------------------------------------------------- /lib/fancybox/source/helpers/jquery.fancybox-thumbs.css: -------------------------------------------------------------------------------- 1 | #fancybox-thumbs { 2 | position: fixed; 3 | left: 0; 4 | width: 100%; 5 | overflow: hidden; 6 | z-index: 8050; 7 | } 8 | 9 | #fancybox-thumbs.bottom { 10 | bottom: 2px; 11 | } 12 | 13 | #fancybox-thumbs.top { 14 | top: 2px; 15 | } 16 | 17 | #fancybox-thumbs ul { 18 | position: relative; 19 | list-style: none; 20 | margin: 0; 21 | padding: 0; 22 | } 23 | 24 | #fancybox-thumbs ul li { 25 | float: left; 26 | padding: 1px; 27 | opacity: 0.5; 28 | } 29 | 30 | #fancybox-thumbs ul li.active { 31 | opacity: 0.75; 32 | padding: 0; 33 | border: 1px solid #fff; 34 | } 35 | 36 | #fancybox-thumbs ul li:hover { 37 | opacity: 1; 38 | } 39 | 40 | #fancybox-thumbs ul li a { 41 | display: block; 42 | position: relative; 43 | overflow: hidden; 44 | border: 1px solid #222; 45 | background: #111; 46 | outline: none; 47 | } 48 | 49 | #fancybox-thumbs ul li img { 50 | display: block; 51 | position: relative; 52 | border: 0; 53 | padding: 0; 54 | max-width: none; 55 | } -------------------------------------------------------------------------------- /lib/fancybox/source/helpers/jquery.fancybox-thumbs.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Thumbnail helper for fancyBox 3 | * version: 1.0.7 (Mon, 01 Oct 2012) 4 | * @requires fancyBox v2.0 or later 5 | * 6 | * Usage: 7 | * $(".fancybox").fancybox({ 8 | * helpers : { 9 | * thumbs: { 10 | * width : 50, 11 | * height : 50 12 | * } 13 | * } 14 | * }); 15 | * 16 | */ 17 | (function ($) { 18 | //Shortcut for fancyBox object 19 | var F = $.fancybox; 20 | 21 | //Add helper object 22 | F.helpers.thumbs = { 23 | defaults : { 24 | width : 50, // thumbnail width 25 | height : 50, // thumbnail height 26 | position : 'bottom', // 'top' or 'bottom' 27 | source : function ( item ) { // function to obtain the URL of the thumbnail image 28 | var href; 29 | 30 | if (item.element) { 31 | href = $(item.element).find('img').attr('src'); 32 | } 33 | 34 | if (!href && item.type === 'image' && item.href) { 35 | href = item.href; 36 | } 37 | 38 | return href; 39 | } 40 | }, 41 | 42 | wrap : null, 43 | list : null, 44 | width : 0, 45 | 46 | init: function (opts, obj) { 47 | var that = this, 48 | list, 49 | thumbWidth = opts.width, 50 | thumbHeight = opts.height, 51 | thumbSource = opts.source; 52 | 53 | //Build list structure 54 | list = ''; 55 | 56 | for (var n = 0; n < obj.group.length; n++) { 57 | list += '
  • '; 58 | } 59 | 60 | this.wrap = $('
    ').addClass(opts.position).appendTo('body'); 61 | this.list = $('
      ' + list + '
    ').appendTo(this.wrap); 62 | 63 | //Load each thumbnail 64 | $.each(obj.group, function (i) { 65 | var href = thumbSource( obj.group[ i ] ); 66 | 67 | if (!href) { 68 | return; 69 | } 70 | 71 | $("").load(function () { 72 | var width = this.width, 73 | height = this.height, 74 | widthRatio, heightRatio, parent; 75 | 76 | if (!that.list || !width || !height) { 77 | return; 78 | } 79 | 80 | //Calculate thumbnail width/height and center it 81 | widthRatio = width / thumbWidth; 82 | heightRatio = height / thumbHeight; 83 | 84 | parent = that.list.children().eq(i).find('a'); 85 | 86 | if (widthRatio >= 1 && heightRatio >= 1) { 87 | if (widthRatio > heightRatio) { 88 | width = Math.floor(width / heightRatio); 89 | height = thumbHeight; 90 | 91 | } else { 92 | width = thumbWidth; 93 | height = Math.floor(height / widthRatio); 94 | } 95 | } 96 | 97 | $(this).css({ 98 | width : width, 99 | height : height, 100 | top : Math.floor(thumbHeight / 2 - height / 2), 101 | left : Math.floor(thumbWidth / 2 - width / 2) 102 | }); 103 | 104 | parent.width(thumbWidth).height(thumbHeight); 105 | 106 | $(this).hide().appendTo(parent).fadeIn(300); 107 | 108 | }).attr('src', href); 109 | }); 110 | 111 | //Set initial width 112 | this.width = this.list.children().eq(0).outerWidth(true); 113 | 114 | this.list.width(this.width * (obj.group.length + 1)).css('left', Math.floor($(window).width() * 0.5 - (obj.index * this.width + this.width * 0.5))); 115 | }, 116 | 117 | beforeLoad: function (opts, obj) { 118 | //Remove self if gallery do not have at least two items 119 | if (obj.group.length < 2) { 120 | obj.helpers.thumbs = false; 121 | 122 | return; 123 | } 124 | 125 | //Increase bottom margin to give space for thumbs 126 | obj.margin[ opts.position === 'top' ? 0 : 2 ] += ((opts.height) + 15); 127 | }, 128 | 129 | afterShow: function (opts, obj) { 130 | //Check if exists and create or update list 131 | if (this.list) { 132 | this.onUpdate(opts, obj); 133 | 134 | } else { 135 | this.init(opts, obj); 136 | } 137 | 138 | //Set active element 139 | this.list.children().removeClass('active').eq(obj.index).addClass('active'); 140 | }, 141 | 142 | //Center list 143 | onUpdate: function (opts, obj) { 144 | if (this.list) { 145 | this.list.stop(true).animate({ 146 | 'left': Math.floor($(window).width() * 0.5 - (obj.index * this.width + this.width * 0.5)) 147 | }, 150); 148 | } 149 | }, 150 | 151 | beforeClose: function () { 152 | if (this.wrap) { 153 | this.wrap.remove(); 154 | } 155 | 156 | this.wrap = null; 157 | this.list = null; 158 | this.width = 0; 159 | } 160 | } 161 | 162 | }(jQuery)); -------------------------------------------------------------------------------- /lib/fancybox/source/jquery.fancybox.css: -------------------------------------------------------------------------------- 1 | /*! fancyBox v2.1.5 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: -99999px; 158 | left: -99999px; 159 | visibility: hidden; 160 | max-width: 99999px; 161 | max-height: 99999px; 162 | overflow: visible !important; 163 | } 164 | 165 | /* Overlay helper */ 166 | 167 | .fancybox-lock { 168 | overflow: hidden !important; 169 | width: auto; 170 | } 171 | 172 | .fancybox-lock body { 173 | overflow: hidden !important; 174 | } 175 | 176 | .fancybox-lock-test { 177 | overflow-y: hidden !important; 178 | } 179 | 180 | .fancybox-overlay { 181 | position: absolute; 182 | top: 0; 183 | left: 0; 184 | overflow: hidden; 185 | display: none; 186 | z-index: 8010; 187 | background: url('fancybox_overlay.png'); 188 | } 189 | 190 | .fancybox-overlay-fixed { 191 | position: fixed; 192 | bottom: 0; 193 | right: 0; 194 | } 195 | 196 | .fancybox-lock .fancybox-overlay { 197 | overflow: auto; 198 | overflow-y: scroll; 199 | } 200 | 201 | /* Title helper */ 202 | 203 | .fancybox-title { 204 | visibility: hidden; 205 | font: normal 13px/20px "Helvetica Neue",Helvetica,Arial,sans-serif; 206 | position: relative; 207 | text-shadow: none; 208 | z-index: 8050; 209 | } 210 | 211 | .fancybox-opened .fancybox-title { 212 | visibility: visible; 213 | } 214 | 215 | .fancybox-title-float-wrap { 216 | position: absolute; 217 | bottom: 0; 218 | right: 50%; 219 | margin-bottom: -35px; 220 | z-index: 8050; 221 | text-align: center; 222 | } 223 | 224 | .fancybox-title-float-wrap .child { 225 | display: inline-block; 226 | margin-right: -100%; 227 | padding: 2px 20px; 228 | background: transparent; /* Fallback for web browsers that doesn't support RGBa */ 229 | background: rgba(0, 0, 0, 0.8); 230 | -webkit-border-radius: 15px; 231 | -moz-border-radius: 15px; 232 | border-radius: 15px; 233 | text-shadow: 0 1px 2px #222; 234 | color: #FFF; 235 | font-weight: bold; 236 | line-height: 24px; 237 | white-space: nowrap; 238 | } 239 | 240 | .fancybox-title-outside-wrap { 241 | position: relative; 242 | margin-top: 10px; 243 | color: #fff; 244 | } 245 | 246 | .fancybox-title-inside-wrap { 247 | padding-top: 10px; 248 | } 249 | 250 | .fancybox-title-over-wrap { 251 | position: absolute; 252 | bottom: 0; 253 | left: 0; 254 | color: #fff; 255 | padding: 10px; 256 | background: #000; 257 | background: rgba(0, 0, 0, .8); 258 | } 259 | 260 | /*Retina graphics!*/ 261 | @media only screen and (-webkit-min-device-pixel-ratio: 1.5), 262 | only screen and (min--moz-device-pixel-ratio: 1.5), 263 | only screen and (min-device-pixel-ratio: 1.5){ 264 | 265 | #fancybox-loading, .fancybox-close, .fancybox-prev span, .fancybox-next span { 266 | background-image: url('fancybox_sprite@2x.png'); 267 | background-size: 44px 152px; /*The size of the normal image, half the size of the hi-res image*/ 268 | } 269 | 270 | #fancybox-loading div { 271 | background-image: url('fancybox_loading@2x.gif'); 272 | background-size: 24px 24px; /*The size of the normal image, half the size of the hi-res image*/ 273 | } 274 | } -------------------------------------------------------------------------------- /lib/fastclick/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2014 The Financial Times Ltd. 2 | 3 | Permission is hereby granted, free of charge, to any person 4 | obtaining a copy of this software and associated documentation 5 | files (the "Software"), to deal in the Software without 6 | restriction, including without limitation the rights to use, 7 | copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | copies of the Software, and to permit persons to whom the 9 | Software is furnished to do so, subject to the following 10 | conditions: 11 | 12 | The above copyright notice and this permission notice shall be 13 | included in all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 16 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 17 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 18 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 19 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 20 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 21 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 22 | OTHER DEALINGS IN THE SOFTWARE. 23 | -------------------------------------------------------------------------------- /lib/fastclick/README.html: -------------------------------------------------------------------------------- 1 |

    FastClick

    FastClick is a simple, easy-to-use library for eliminating the 300ms delay between a physical tap and the firing of a click event on mobile browsers. The aim is to make your application feel less laggy and more responsive while avoiding any interference with your current logic.

    2 |

    FastClick is developed by FT Labs, part of the Financial Times.

    3 |

    Explication en français.

    4 |

    日本語で説明

    5 |

    Why does the delay exist?

    According to Google:

    6 |
    7 |

    …mobile browsers will wait approximately 300ms from the time that you tap the button to fire the click event. The reason for this is that the browser is waiting to see if you are actually performing a double tap.

    8 |
    9 |

    Compatibility

    The library has been deployed as part of the FT Web App and is tried and tested on the following mobile browsers:

    10 |
      11 |
    • Mobile Safari on iOS 3 and upwards
    • 12 |
    • Chrome on iOS 5 and upwards
    • 13 |
    • Chrome on Android (ICS)
    • 14 |
    • Opera Mobile 11.5 and upwards
    • 15 |
    • Android Browser since Android 2
    • 16 |
    • PlayBook OS 1 and upwards
    • 17 |
    18 |

    When it isn’t needed

    FastClick doesn’t attach any listeners on desktop browsers.

    19 |

    Chrome 32+ on Android with width=device-width in the viewport meta tag doesn’t have a 300ms delay, therefore listeners aren’t attached.

    20 |
    <meta name="viewport" content="width=device-width, initial-scale=1">
    21 | 
    22 |

    Same goes for Chrome on Android (all versions) with user-scalable=no in the viewport meta tag. But be aware that user-scalable=no also disables pinch zooming, which may be an accessibility concern.

    23 |

    For IE11+, you can use touch-action: manipulation; to disable double-tap-to-zoom on certain elements (like links and buttons). For IE10 use -ms-touch-action: manipulation.

    24 |

    Usage

    Include fastclick.js in your JavaScript bundle or add it to your HTML page like this:

    25 |
    <script type='application/javascript' src='/path/to/fastclick.js'></script>
    26 | 
    27 |

    The script must be loaded prior to instantiating FastClick on any element of the page.

    28 |

    To instantiate FastClick on the body, which is the recommended method of use:

    29 |
    if ('addEventListener' in document) {
    30 |     document.addEventListener('DOMContentLoaded', function() {
    31 |         FastClick.attach(document.body);
    32 |     }, false);
    33 | }
    34 | 
    35 |

    Or, if you’re using jQuery:

    36 |
    $(function() {
    37 |     FastClick.attach(document.body);
    38 | });
    39 | 
    40 |

    If you’re using Browserify or another CommonJS-style module system, the FastClick.attach function will be returned when you call require('fastclick'). As a result, the easiest way to use FastClick with these loaders is as follows:

    41 |
    var attachFastClick = require('fastclick');
    42 | attachFastClick(document.body);
    43 | 
    44 |

    Minified

    Run make to build a minified version of FastClick using the Closure Compiler REST API. The minified file is saved to build/fastclick.min.js or you can download a pre-minified version.

    45 |

    Note: the pre-minified version is built using our build service which exposes the FastClick object through Origami.fastclick and will have the Browserify/CommonJS API (see above).

    46 |
    var attachFastClick = Origami.fastclick;
    47 | attachFastClick(document.body);
    48 | 
    49 |

    AMD

    FastClick has AMD (Asynchronous Module Definition) support. This allows it to be lazy-loaded with an AMD loader, such as RequireJS. Note that when using the AMD style require, the full FastClick object will be returned, not FastClick.attach

    50 |
    var FastClick = require('fastclick');
    51 | FastClick.attach(document.body, options);
    52 | 
    53 |

    Package managers

    You can install FastClick using Component, npm or Bower.

    54 |

    For Ruby, there’s a third-party gem called fastclick-rails. For .NET there’s a NuGet package.

    55 |

    Advanced

    Ignore certain elements with needsclick

    Sometimes you need FastClick to ignore certain elements. You can do this easily by adding the needsclick class.

    56 |
    <a class="needsclick">Ignored by FastClick</a>
    57 | 
    58 |

    Use case 1: non-synthetic click required

    Internally, FastClick uses document.createEvent to fire a synthetic click event as soon as touchend is fired by the browser. It then suppresses the additional click event created by the browser after that. In some cases, the non-synthetic click event created by the browser is required, as described in the triggering focus example.

    59 |

    This is where the needsclick class comes in. Add the class to any element that requires a non-synthetic click.

    60 |

    Use case 2: Twitter Bootstrap 2.2.2 dropdowns

    Another example of when to use the needsclick class is with dropdowns in Twitter Bootstrap 2.2.2. Bootstrap add its own touchstart listener for dropdowns, so you want to tell FastClick to ignore those. If you don’t, touch devices will automatically close the dropdown as soon as it is clicked, because both FastClick and Bootstrap execute the synthetic click, one opens the dropdown, the second closes it immediately after.

    61 |
    <a class="dropdown-toggle needsclick" data-toggle="dropdown">Dropdown</a>
    62 | 
    63 |

    Examples

    FastClick is designed to cope with many different browser oddities. Here are some examples to illustrate this:

    64 |
      65 |
    • basic use showing the increase in perceived responsiveness
    • 66 |
    • triggering focus on an input element from a click handler
    • 67 |
    • input element which never receives clicks but gets fast focus
    • 68 |
    69 |

    Tests

    There are no automated tests. The files in tests/ are manual reduced test cases. We’ve had a think about how best to test these cases, but they tend to be very browser/device specific and sometimes subjective which means it’s not so trivial to test.

    70 |

    Credits and collaboration

    FastClick is maintained by Rowan Beentje, Matthew Caruana Galizia and Matthew Andrews at FT Labs. All open source code released by FT Labs is licenced under the MIT licence. We welcome comments, feedback and suggestions. Please feel free to raise an issue or pull request.

    71 | -------------------------------------------------------------------------------- /lib/fastclick/bower.json: -------------------------------------------------------------------------------- 1 | {"name":"fastclick","main":"lib/fastclick.js","ignore":["**/.*","component.json","package.json","Makefile","tests","examples"]} -------------------------------------------------------------------------------- /lib/fastclick/lib/fastclick.min.js: -------------------------------------------------------------------------------- 1 | !function(){"use strict";function t(e,o){function i(t,e){return function(){return t.apply(e,arguments)}}var r;if(o=o||{},this.trackingClick=!1,this.trackingClickStart=0,this.targetElement=null,this.touchStartX=0,this.touchStartY=0,this.lastTouchIdentifier=0,this.touchBoundary=o.touchBoundary||10,this.layer=e,this.tapDelay=o.tapDelay||200,this.tapTimeout=o.tapTimeout||700,!t.notNeeded(e)){for(var a=["onMouse","onClick","onTouchStart","onTouchMove","onTouchEnd","onTouchCancel"],c=this,s=0,u=a.length;u>s;s++)c[a[s]]=i(c[a[s]],c);n&&(e.addEventListener("mouseover",this.onMouse,!0),e.addEventListener("mousedown",this.onMouse,!0),e.addEventListener("mouseup",this.onMouse,!0)),e.addEventListener("click",this.onClick,!0),e.addEventListener("touchstart",this.onTouchStart,!1),e.addEventListener("touchmove",this.onTouchMove,!1),e.addEventListener("touchend",this.onTouchEnd,!1),e.addEventListener("touchcancel",this.onTouchCancel,!1),Event.prototype.stopImmediatePropagation||(e.removeEventListener=function(t,n,o){var i=Node.prototype.removeEventListener;"click"===t?i.call(e,t,n.hijacked||n,o):i.call(e,t,n,o)},e.addEventListener=function(t,n,o){var i=Node.prototype.addEventListener;"click"===t?i.call(e,t,n.hijacked||(n.hijacked=function(t){t.propagationStopped||n(t)}),o):i.call(e,t,n,o)}),"function"==typeof e.onclick&&(r=e.onclick,e.addEventListener("click",function(t){r(t)},!1),e.onclick=null)}}var e=navigator.userAgent.indexOf("Windows Phone")>=0,n=navigator.userAgent.indexOf("Android")>0&&!e,o=/iP(ad|hone|od)/.test(navigator.userAgent)&&!e,i=o&&/OS 4_\d(_\d)?/.test(navigator.userAgent),r=o&&/OS [6-7]_\d/.test(navigator.userAgent),a=navigator.userAgent.indexOf("BB10")>0;t.prototype.needsClick=function(t){switch(t.nodeName.toLowerCase()){case"button":case"select":case"textarea":if(t.disabled)return!0;break;case"input":if(o&&"file"===t.type||t.disabled)return!0;break;case"label":case"iframe":case"video":return!0}return/\bneedsclick\b/.test(t.className)},t.prototype.needsFocus=function(t){switch(t.nodeName.toLowerCase()){case"textarea":return!0;case"select":return!n;case"input":switch(t.type){case"button":case"checkbox":case"file":case"image":case"radio":case"submit":return!1}return!t.disabled&&!t.readOnly;default:return/\bneedsfocus\b/.test(t.className)}},t.prototype.sendClick=function(t,e){var n,o;document.activeElement&&document.activeElement!==t&&document.activeElement.blur(),o=e.changedTouches[0],n=document.createEvent("MouseEvents"),n.initMouseEvent(this.determineEventType(t),!0,!0,window,1,o.screenX,o.screenY,o.clientX,o.clientY,!1,!1,!1,!1,0,null),n.forwardedTouchEvent=!0,t.dispatchEvent(n)},t.prototype.determineEventType=function(t){return n&&"select"===t.tagName.toLowerCase()?"mousedown":"click"},t.prototype.focus=function(t){var e;o&&t.setSelectionRange&&0!==t.type.indexOf("date")&&"time"!==t.type&&"month"!==t.type?(e=t.value.length,t.setSelectionRange(e,e)):t.focus()},t.prototype.updateScrollParent=function(t){var e,n;if(e=t.fastClickScrollParent,!e||!e.contains(t)){n=t;do{if(n.scrollHeight>n.offsetHeight){e=n,t.fastClickScrollParent=n;break}n=n.parentElement}while(n)}e&&(e.fastClickLastScrollTop=e.scrollTop)},t.prototype.getTargetElementFromEventTarget=function(t){return t.nodeType===Node.TEXT_NODE?t.parentNode:t},t.prototype.onTouchStart=function(t){var e,n,r;if(t.targetTouches.length>1)return!0;if(e=this.getTargetElementFromEventTarget(t.target),n=t.targetTouches[0],o){if(r=window.getSelection(),r.rangeCount&&!r.isCollapsed)return!0;if(!i){if(n.identifier&&n.identifier===this.lastTouchIdentifier)return t.preventDefault(),!1;this.lastTouchIdentifier=n.identifier,this.updateScrollParent(e)}}return this.trackingClick=!0,this.trackingClickStart=t.timeStamp,this.targetElement=e,this.touchStartX=n.pageX,this.touchStartY=n.pageY,t.timeStamp-this.lastClickTimen||Math.abs(e.pageY-this.touchStartY)>n?!0:!1},t.prototype.onTouchMove=function(t){return this.trackingClick?((this.targetElement!==this.getTargetElementFromEventTarget(t.target)||this.touchHasMoved(t))&&(this.trackingClick=!1,this.targetElement=null),!0):!0},t.prototype.findControl=function(t){return void 0!==t.control?t.control:t.htmlFor?document.getElementById(t.htmlFor):t.querySelector("button, input:not([type=hidden]), keygen, meter, output, progress, select, textarea")},t.prototype.onTouchEnd=function(t){var e,a,c,s,u,l=this.targetElement;if(!this.trackingClick)return!0;if(t.timeStamp-this.lastClickTimethis.tapTimeout)return!0;if(this.cancelNextClick=!1,this.lastClickTime=t.timeStamp,a=this.trackingClickStart,this.trackingClick=!1,this.trackingClickStart=0,r&&(u=t.changedTouches[0],l=document.elementFromPoint(u.pageX-window.pageXOffset,u.pageY-window.pageYOffset)||l,l.fastClickScrollParent=this.targetElement.fastClickScrollParent),c=l.tagName.toLowerCase(),"label"===c){if(e=this.findControl(l)){if(this.focus(l),n)return!1;l=e}}else if(this.needsFocus(l))return t.timeStamp-a>100||o&&window.top!==window&&"input"===c?(this.targetElement=null,!1):(this.focus(l),this.sendClick(l,t),o&&"select"===c||(this.targetElement=null,t.preventDefault()),!1);return o&&!i&&(s=l.fastClickScrollParent,s&&s.fastClickLastScrollTop!==s.scrollTop)?!0:(this.needsClick(l)||(t.preventDefault(),this.sendClick(l,t)),!1)},t.prototype.onTouchCancel=function(){this.trackingClick=!1,this.targetElement=null},t.prototype.onMouse=function(t){return this.targetElement?t.forwardedTouchEvent?!0:t.cancelable&&(!this.needsClick(this.targetElement)||this.cancelNextClick)?(t.stopImmediatePropagation?t.stopImmediatePropagation():t.propagationStopped=!0,t.stopPropagation(),t.preventDefault(),!1):!0:!0},t.prototype.onClick=function(t){var e;return this.trackingClick?(this.targetElement=null,this.trackingClick=!1,!0):"submit"===t.target.type&&0===t.detail?!0:(e=this.onMouse(t),e||(this.targetElement=null),e)},t.prototype.destroy=function(){var t=this.layer;n&&(t.removeEventListener("mouseover",this.onMouse,!0),t.removeEventListener("mousedown",this.onMouse,!0),t.removeEventListener("mouseup",this.onMouse,!0)),t.removeEventListener("click",this.onClick,!0),t.removeEventListener("touchstart",this.onTouchStart,!1),t.removeEventListener("touchmove",this.onTouchMove,!1),t.removeEventListener("touchend",this.onTouchEnd,!1),t.removeEventListener("touchcancel",this.onTouchCancel,!1)},t.notNeeded=function(t){var e,o,i,r;if("undefined"==typeof window.ontouchstart)return!0;if(o=+(/Chrome\/([0-9]+)/.exec(navigator.userAgent)||[,0])[1]){if(!n)return!0;if(e=document.querySelector("meta[name=viewport]")){if(-1!==e.content.indexOf("user-scalable=no"))return!0;if(o>31&&document.documentElement.scrollWidth<=window.outerWidth)return!0}}if(a&&(i=navigator.userAgent.match(/Version\/([0-9]*)\.([0-9]*)/),i[1]>=10&&i[2]>=3&&(e=document.querySelector("meta[name=viewport]")))){if(-1!==e.content.indexOf("user-scalable=no"))return!0;if(document.documentElement.scrollWidth<=window.outerWidth)return!0}return"none"===t.style.msTouchAction||"manipulation"===t.style.touchAction?!0:(r=+(/Firefox\/([0-9]+)/.exec(navigator.userAgent)||[,0])[1],r>=27&&(e=document.querySelector("meta[name=viewport]"),e&&(-1!==e.content.indexOf("user-scalable=no")||document.documentElement.scrollWidth<=window.outerWidth))?!0:"none"===t.style.touchAction||"manipulation"===t.style.touchAction?!0:!1)},t.attach=function(e,n){return new t(e,n)},"function"==typeof define&&"object"==typeof define.amd&&define.amd?define(function(){return t}):"undefined"!=typeof module&&module.exports?(module.exports=t.attach,module.exports.FastClick=t):window.FastClick=t}(); -------------------------------------------------------------------------------- /lib/font-awesome/HELP-US-OUT.txt: -------------------------------------------------------------------------------- 1 | I hope you love Font Awesome. If you've found it useful, please do me a favor and check out my latest project, 2 | Fort Awesome (https://fortawesome.com). It makes it easy to put the perfect icons on your website. Choose from our awesome, 3 | comprehensive icon sets or copy and paste your own. 4 | 5 | Please. Check it out. 6 | 7 | -Dave Gandy 8 | -------------------------------------------------------------------------------- /lib/font-awesome/bower.json: -------------------------------------------------------------------------------- 1 | {"name":"font-awesome","description":"Font Awesome","keywords":[],"homepage":"http://fontawesome.io","dependencies":{},"devDependencies":{},"license":["OFL-1.1","MIT","CC-BY-3.0"],"main":["less/font-awesome.less","scss/font-awesome.scss"],"ignore":["*/.*","*.json","src","*.yml","Gemfile","Gemfile.lock","*.md"]} -------------------------------------------------------------------------------- /lib/font-awesome/fonts/FontAwesome.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhangxiang958/Blog/c488898721077e73fbf79809b89bbfc970871ab9/lib/font-awesome/fonts/FontAwesome.otf -------------------------------------------------------------------------------- /lib/font-awesome/fonts/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhangxiang958/Blog/c488898721077e73fbf79809b89bbfc970871ab9/lib/font-awesome/fonts/fontawesome-webfont.eot -------------------------------------------------------------------------------- /lib/font-awesome/fonts/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhangxiang958/Blog/c488898721077e73fbf79809b89bbfc970871ab9/lib/font-awesome/fonts/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /lib/font-awesome/fonts/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhangxiang958/Blog/c488898721077e73fbf79809b89bbfc970871ab9/lib/font-awesome/fonts/fontawesome-webfont.woff -------------------------------------------------------------------------------- /lib/font-awesome/fonts/fontawesome-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhangxiang958/Blog/c488898721077e73fbf79809b89bbfc970871ab9/lib/font-awesome/fonts/fontawesome-webfont.woff2 -------------------------------------------------------------------------------- /lib/jquery_lazyload/CONTRIBUTING.html: -------------------------------------------------------------------------------- 1 |

    Contributing to Lazy Load

    Only one feature or change per pull request

    Make pull requests only one feature or change at the time. For example you have fixed a bug. You also have optimized some code. Optimization is not related to a bug. These should be submitted as separate pull requests. This way I can easily choose what to include. It is also easier to understand the code changes. Commit messages should be descriptive and full sentences.

    2 |

    Do not commit minified versions. Do not touch the version number. Make the pull requests against 1.9.x branch.

    3 |

    Write meaningful commit messages

    Proper commit message is full sentence. It starts with capital letter but does not end with period. Headlines do not end with period. The GitHub default Update filename.js is not enough. When needed include also longer explanation what the commit does.

    4 |
    Capitalized, short (50 chars or less) summary
     5 | 
     6 | More detailed explanatory text, if necessary.  Wrap it to about 72
     7 | characters or so.  In some contexts, the first line is treated as the
     8 | subject of an email and the rest of the text as the body.  The blank
     9 | line separating the summary from the body is critical (unless you omit
    10 | the body entirely); tools like rebase can get confused if you run the
    11 | two together.
    12 | 

    When in doubt see Tim Pope’s blogpost A Note About Git Commit Messages

    13 |

    Follow the existing coding standards

    When contributing to open source project it is polite to follow the original authors coding standars. They might be different than yours. It is not a holy war. Just follow then original.

    14 |
    var snake_case = "something";
    15 | 
    16 | function camelCase(options) {
    17 | }
    18 | 
    19 | if (true !== false) {
    20 |     console.log("here be dragons");
    21 | }
    22 | 
    23 | -------------------------------------------------------------------------------- /lib/jquery_lazyload/README.html: -------------------------------------------------------------------------------- 1 |

    Lazy Load Plugin for jQuery

    Lazy Load delays loading of images in long web pages. Images outside of viewport wont be loaded before user scrolls to them. This is opposite of image preloading.

    2 |

    Using Lazy Load on long web pages containing many large images makes the page load faster. Browser will be in ready state after loading visible images. In some cases it can also help to reduce server load.

    3 |

    Lazy Load is inspired by YUI ImageLoader Utility by Matt Mlinac.

    4 |

    How to Use?

    Lazy Load depends on jQuery. Include them both in end of your HTML code:

    5 |
    <script src="jquery.js" type="text/javascript"></script>
     6 | <script src="jquery.lazyload.js" type="text/javascript"></script>
     7 | 
    8 |

    You must alter your HTML code. URL of the real image must be put into data-original attribute. It is good idea to give Lazy Loaded image a specific class. This way you can easily control which images plugin is binded to. Note that you should have width and height attributes in your image tag.

    9 |
    <img class="lazy" data-original="img/example.jpg" width="640" height="480">
    10 | 
    11 |

    then in your code do:

    12 |
    $("img.lazy").lazyload();
    13 | 
    14 |

    This causes all images of class lazy to be lazy loaded.

    15 |

    More information on Lazy Load project page.

    16 |

    Install

    You can install with bower or npm.

    17 |
    $ bower install jquery.lazyload
    18 | $ npm install jquery-lazyload
    19 | 
    20 |

    License

    All code licensed under the MIT License. All images licensed under Creative Commons Attribution 3.0 Unported License. In other words you are basically free to do whatever you want. Just don’t remove my name from the source.

    21 | -------------------------------------------------------------------------------- /lib/jquery_lazyload/bower.json: -------------------------------------------------------------------------------- 1 | {"name":"jquery_lazyload","version":"1.9.4","homepage":"http://www.appelsiini.net/projects/lazyload","authors":["Mika Tuupola "],"description":"jQuery plugin for lazy loading images","main":["jquery.lazyload.js","jquery.scrollstop.js"],"license":"MIT","ignore":["**/.*","**/*.min.js","**/*.html","**/*.textile","Gruntfile.js","lazyload.jquery.json","package.json","node_modules","bower_components","test","img"]} -------------------------------------------------------------------------------- /lib/jquery_lazyload/jquery.lazyload.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Lazy Load - jQuery plugin for lazy loading images 3 | * 4 | * Copyright (c) 2007-2015 Mika Tuupola 5 | * 6 | * Licensed under the MIT license: 7 | * http://www.opensource.org/licenses/mit-license.php 8 | * 9 | * Project home: 10 | * http://www.appelsiini.net/projects/lazyload 11 | * 12 | * Version: 1.9.7 13 | * 14 | */ 15 | 16 | (function($, window, document, undefined) { 17 | var $window = $(window); 18 | 19 | $.fn.lazyload = function(options) { 20 | var elements = this; 21 | var $container; 22 | var settings = { 23 | threshold : 0, 24 | failure_limit : 0, 25 | event : "scroll", 26 | effect : "show", 27 | container : window, 28 | data_attribute : "original", 29 | skip_invisible : false, 30 | appear : null, 31 | load : null, 32 | placeholder : "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB/AAffA0nNPuCLAAAAAElFTkSuQmCC" 33 | }; 34 | 35 | function update() { 36 | var counter = 0; 37 | 38 | elements.each(function() { 39 | var $this = $(this); 40 | if (settings.skip_invisible && !$this.is(":visible")) { 41 | return; 42 | } 43 | if ($.abovethetop(this, settings) || 44 | $.leftofbegin(this, settings)) { 45 | /* Nothing. */ 46 | } else if (!$.belowthefold(this, settings) && 47 | !$.rightoffold(this, settings)) { 48 | $this.trigger("appear"); 49 | /* if we found an image we'll load, reset the counter */ 50 | counter = 0; 51 | } else { 52 | if (++counter > settings.failure_limit) { 53 | return false; 54 | } 55 | } 56 | }); 57 | 58 | } 59 | 60 | if(options) { 61 | /* Maintain BC for a couple of versions. */ 62 | if (undefined !== options.failurelimit) { 63 | options.failure_limit = options.failurelimit; 64 | delete options.failurelimit; 65 | } 66 | if (undefined !== options.effectspeed) { 67 | options.effect_speed = options.effectspeed; 68 | delete options.effectspeed; 69 | } 70 | 71 | $.extend(settings, options); 72 | } 73 | 74 | /* Cache container as jQuery as object. */ 75 | $container = (settings.container === undefined || 76 | settings.container === window) ? $window : $(settings.container); 77 | 78 | /* Fire one scroll event per scroll. Not one scroll event per image. */ 79 | if (0 === settings.event.indexOf("scroll")) { 80 | $container.bind(settings.event, function() { 81 | return update(); 82 | }); 83 | } 84 | 85 | this.each(function() { 86 | var self = this; 87 | var $self = $(self); 88 | 89 | self.loaded = false; 90 | 91 | /* If no src attribute given use data:uri. */ 92 | if ($self.attr("src") === undefined || $self.attr("src") === false) { 93 | if ($self.is("img")) { 94 | $self.attr("src", settings.placeholder); 95 | } 96 | } 97 | 98 | /* When appear is triggered load original image. */ 99 | $self.one("appear", function() { 100 | if (!this.loaded) { 101 | if (settings.appear) { 102 | var elements_left = elements.length; 103 | settings.appear.call(self, elements_left, settings); 104 | } 105 | $("") 106 | .bind("load", function() { 107 | 108 | var original = $self.attr("data-" + settings.data_attribute); 109 | $self.hide(); 110 | if ($self.is("img")) { 111 | $self.attr("src", original); 112 | } else { 113 | $self.css("background-image", "url('" + original + "')"); 114 | } 115 | $self[settings.effect](settings.effect_speed); 116 | 117 | self.loaded = true; 118 | 119 | /* Remove image from array so it is not looped next time. */ 120 | var temp = $.grep(elements, function(element) { 121 | return !element.loaded; 122 | }); 123 | elements = $(temp); 124 | 125 | if (settings.load) { 126 | var elements_left = elements.length; 127 | settings.load.call(self, elements_left, settings); 128 | } 129 | }) 130 | .attr("src", $self.attr("data-" + settings.data_attribute)); 131 | } 132 | }); 133 | 134 | /* When wanted event is triggered load original image */ 135 | /* by triggering appear. */ 136 | if (0 !== settings.event.indexOf("scroll")) { 137 | $self.bind(settings.event, function() { 138 | if (!self.loaded) { 139 | $self.trigger("appear"); 140 | } 141 | }); 142 | } 143 | }); 144 | 145 | /* Check if something appears when window is resized. */ 146 | $window.bind("resize", function() { 147 | update(); 148 | }); 149 | 150 | /* With IOS5 force loading images when navigating with back button. */ 151 | /* Non optimal workaround. */ 152 | if ((/(?:iphone|ipod|ipad).*os 5/gi).test(navigator.appVersion)) { 153 | $window.bind("pageshow", function(event) { 154 | if (event.originalEvent && event.originalEvent.persisted) { 155 | elements.each(function() { 156 | $(this).trigger("appear"); 157 | }); 158 | } 159 | }); 160 | } 161 | 162 | /* Force initial check if images should appear. */ 163 | $(document).ready(function() { 164 | update(); 165 | }); 166 | 167 | return this; 168 | }; 169 | 170 | /* Convenience methods in jQuery namespace. */ 171 | /* Use as $.belowthefold(element, {threshold : 100, container : window}) */ 172 | 173 | $.belowthefold = function(element, settings) { 174 | var fold; 175 | 176 | if (settings.container === undefined || settings.container === window) { 177 | fold = (window.innerHeight ? window.innerHeight : $window.height()) + $window.scrollTop(); 178 | } else { 179 | fold = $(settings.container).offset().top + $(settings.container).height(); 180 | } 181 | 182 | return fold <= $(element).offset().top - settings.threshold; 183 | }; 184 | 185 | $.rightoffold = function(element, settings) { 186 | var fold; 187 | 188 | if (settings.container === undefined || settings.container === window) { 189 | fold = $window.width() + $window.scrollLeft(); 190 | } else { 191 | fold = $(settings.container).offset().left + $(settings.container).width(); 192 | } 193 | 194 | return fold <= $(element).offset().left - settings.threshold; 195 | }; 196 | 197 | $.abovethetop = function(element, settings) { 198 | var fold; 199 | 200 | if (settings.container === undefined || settings.container === window) { 201 | fold = $window.scrollTop(); 202 | } else { 203 | fold = $(settings.container).offset().top; 204 | } 205 | 206 | return fold >= $(element).offset().top + settings.threshold + $(element).height(); 207 | }; 208 | 209 | $.leftofbegin = function(element, settings) { 210 | var fold; 211 | 212 | if (settings.container === undefined || settings.container === window) { 213 | fold = $window.scrollLeft(); 214 | } else { 215 | fold = $(settings.container).offset().left; 216 | } 217 | 218 | return fold >= $(element).offset().left + settings.threshold + $(element).width(); 219 | }; 220 | 221 | $.inviewport = function(element, settings) { 222 | return !$.rightoffold(element, settings) && !$.leftofbegin(element, settings) && 223 | !$.belowthefold(element, settings) && !$.abovethetop(element, settings); 224 | }; 225 | 226 | /* Custom selectors for your convenience. */ 227 | /* Use as $("img:below-the-fold").something() or */ 228 | /* $("img").filter(":below-the-fold").something() which is faster */ 229 | 230 | $.extend($.expr[":"], { 231 | "below-the-fold" : function(a) { return $.belowthefold(a, {threshold : 0}); }, 232 | "above-the-top" : function(a) { return !$.belowthefold(a, {threshold : 0}); }, 233 | "right-of-screen": function(a) { return $.rightoffold(a, {threshold : 0}); }, 234 | "left-of-screen" : function(a) { return !$.rightoffold(a, {threshold : 0}); }, 235 | "in-viewport" : function(a) { return $.inviewport(a, {threshold : 0}); }, 236 | /* Maintain BC for couple of versions. */ 237 | "above-the-fold" : function(a) { return !$.belowthefold(a, {threshold : 0}); }, 238 | "right-of-fold" : function(a) { return $.rightoffold(a, {threshold : 0}); }, 239 | "left-of-fold" : function(a) { return !$.rightoffold(a, {threshold : 0}); } 240 | }); 241 | 242 | })(jQuery, window, document); 243 | -------------------------------------------------------------------------------- /lib/jquery_lazyload/jquery.scrollstop.js: -------------------------------------------------------------------------------- 1 | /* http://james.padolsey.com/javascript/special-scroll-events-for-jquery/ */ 2 | 3 | (function(){ 4 | 5 | var special = jQuery.event.special, 6 | uid1 = "D" + (+new Date()), 7 | uid2 = "D" + (+new Date() + 1); 8 | 9 | special.scrollstart = { 10 | setup: function() { 11 | 12 | var timer, 13 | handler = function(evt) { 14 | 15 | var _self = this, 16 | _args = arguments; 17 | 18 | if (timer) { 19 | clearTimeout(timer); 20 | } else { 21 | evt.type = "scrollstart"; 22 | jQuery.event.dispatch.apply(_self, _args); 23 | } 24 | 25 | timer = setTimeout( function(){ 26 | timer = null; 27 | }, special.scrollstop.latency); 28 | 29 | }; 30 | 31 | jQuery(this).bind("scroll", handler).data(uid1, handler); 32 | 33 | }, 34 | teardown: function(){ 35 | jQuery(this).unbind( "scroll", jQuery(this).data(uid1) ); 36 | } 37 | }; 38 | 39 | special.scrollstop = { 40 | latency: 300, 41 | setup: function() { 42 | 43 | var timer, 44 | handler = function(evt) { 45 | 46 | var _self = this, 47 | _args = arguments; 48 | 49 | if (timer) { 50 | clearTimeout(timer); 51 | } 52 | 53 | timer = setTimeout( function(){ 54 | 55 | timer = null; 56 | evt.type = "scrollstop"; 57 | jQuery.event.dispatch.apply(_self, _args); 58 | 59 | 60 | }, special.scrollstop.latency); 61 | 62 | }; 63 | 64 | jQuery(this).bind("scroll", handler).data(uid2, handler); 65 | 66 | }, 67 | teardown: function() { 68 | jQuery(this).unbind( "scroll", jQuery(this).data(uid2) ); 69 | } 70 | }; 71 | 72 | })(); -------------------------------------------------------------------------------- /lib/needsharebutton/needsharebutton.css: -------------------------------------------------------------------------------- 1 | /*********************************************** 2 | needShareButton 3 | - Version 1.0.0 4 | - Copyright 2015 Dzmitry Vasileuski 5 | - Licensed under MIT (http://opensource.org/licenses/MIT) 6 | ***********************************************/ 7 | /* Social icons font 8 | ***********************************************/ 9 | @import url('font-embedded.css'); 10 | .need-share-button { 11 | position: relative; 12 | } 13 | .need-share-button-opened { 14 | position: relative; 15 | } 16 | .need-share-button-opened img.need-share-wechat-code-image { 17 | display: block; 18 | 19 | width: 100%; 20 | max-width: 200px; 21 | margin: auto; 22 | } 23 | .need-share-button_dropdown { 24 | position: absolute; 25 | z-index: 10; 26 | 27 | visibility: hidden; 28 | overflow: hidden; 29 | 30 | width: 300px; 31 | 32 | font-size: 16px; 33 | 34 | -webkit-transition: .3s; 35 | transition: .3s; 36 | -webkit-transform: scale(.1); 37 | -ms-transform: scale(.1); 38 | transform: scale(.1); 39 | text-align: center; 40 | white-space: normal; 41 | 42 | opacity: 0; 43 | -webkit-border-radius: 4px; 44 | border-radius: 4px; 45 | background-color: #fff; 46 | -webkit-box-shadow: 0 0 2px rgba(0, 0, 0, .5); 47 | box-shadow: 0 0 2px rgba(0, 0, 0, .5); 48 | } 49 | .need-share-button-opened .need-share-button_dropdown { 50 | visibility: visible; 51 | 52 | -webkit-transform: scale(1); 53 | -ms-transform: scale(1); 54 | transform: scale(1); 55 | 56 | opacity: 1; 57 | } 58 | .need-share-button_dropdown-box-vertical, 59 | .need-share-button_dropdown-box-horizontal { 60 | -webkit-border-radius: 0; 61 | border-radius: 0; 62 | } 63 | .need-share-button_dropdown-box-vertical { 64 | width: 50px; 65 | } 66 | .need-share-button_dropdown-box-horizontal { 67 | width: auto; 68 | 69 | white-space: nowrap; 70 | } 71 | .need-share-button_link { 72 | display: inline-block; 73 | 74 | width: 50px; 75 | height: 50px; 76 | 77 | line-height: 50px; 78 | 79 | cursor: pointer; 80 | text-align: center; 81 | } 82 | .need-share-button_link:hover { 83 | -webkit-transition: .3s; 84 | transition: .3s; 85 | 86 | opacity: .7; 87 | } 88 | /* Dropdown position 89 | ***********************************************/ 90 | .need-share-button_dropdown-top-left { 91 | right: 100%; 92 | bottom: 100%; 93 | 94 | margin-right: 10px; 95 | margin-bottom: 10px; 96 | } 97 | .need-share-button_dropdown-top-right { 98 | bottom: 100%; 99 | left: 100%; 100 | 101 | margin-bottom: 10px; 102 | margin-left: 10px; 103 | } 104 | .need-share-button_dropdown-top-center { 105 | bottom: 100%; 106 | left: 50%; 107 | 108 | margin-bottom: 10px; 109 | } 110 | .need-share-button_dropdown-middle-left { 111 | top: 50%; 112 | right: 100%; 113 | 114 | margin-right: 10px; 115 | } 116 | .need-share-button_dropdown-middle-right { 117 | top: 50%; 118 | left: 100%; 119 | 120 | margin-left: 10px; 121 | } 122 | .need-share-button_dropdown-bottom-left { 123 | top: 100%; 124 | right: 100%; 125 | 126 | margin-top: 10px; 127 | margin-right: 10px; 128 | } 129 | .need-share-button_dropdown-bottom-right { 130 | top: 100%; 131 | left: 100%; 132 | 133 | margin-top: 10px; 134 | margin-left: 10px; 135 | } 136 | .need-share-button_dropdown-bottom-center { 137 | top: 100%; 138 | left: 50%; 139 | 140 | margin-top: 10px; 141 | } 142 | /* Default theme 143 | ***********************************************/ 144 | .need-share-button-default { 145 | display: inline-block; 146 | 147 | margin-bottom: 0; 148 | padding: 6px 12px; 149 | 150 | font-size: 14px; 151 | line-height: 1.42857143; 152 | font-weight: 400; 153 | color: #333; 154 | 155 | cursor: pointer; 156 | -webkit-user-select: none; 157 | -moz-user-select: none; 158 | -ms-user-select: none; 159 | user-select: none; 160 | text-align: center; 161 | vertical-align: middle; 162 | 163 | border: 1px solid #ccc; 164 | -webkit-border-radius: 4px; 165 | border-radius: 4px; 166 | background-color: #fff; 167 | } 168 | /* Network buttons 169 | ***********************************************/ 170 | .need-share-button_wechat { 171 | color: #a2dc30; 172 | } 173 | .need-share-button_wechat.need-share-button_link-box { 174 | color: #fff; 175 | 176 | background: #a2dc30; 177 | } 178 | .need-share-button_weibo { 179 | color: #d52b2b; 180 | } 181 | .need-share-button_weibo.need-share-button_link-box { 182 | color: #fff; 183 | 184 | background: #d52b2b; 185 | } 186 | .need-share-button_douban { 187 | color: #072; 188 | } 189 | .need-share-button_douban:before { 190 | content: '豆'; 191 | } 192 | .need-share-button_douban.need-share-button_link-box { 193 | color: #fff; 194 | 195 | background: #072; 196 | } 197 | .need-share-button_qqzone { 198 | color: #ffce00; 199 | } 200 | .need-share-button_qqzone.need-share-button_link-box { 201 | color: #fff; 202 | 203 | background: #ffce00; 204 | } 205 | .need-share-button_renren { 206 | color: #207cc5; 207 | } 208 | .need-share-button_renren.need-share-button_link-box { 209 | color: #fff; 210 | 211 | background: #207cc5; 212 | } 213 | .need-share-button_mailto { 214 | color: #efbe00; 215 | } 216 | .need-share-button_mailto.need-share-button_link-box { 217 | color: #fff; 218 | 219 | background: #efbe00; 220 | } 221 | .need-share-button_twitter { 222 | color: #00acec; 223 | } 224 | .need-share-button_twitter.need-share-button_link-box { 225 | color: #fff; 226 | 227 | background: #00acec; 228 | } 229 | .need-share-button_pinterest { 230 | color: #cd2027; 231 | } 232 | .need-share-button_pinterest.need-share-button_link-box { 233 | color: #fff; 234 | 235 | background: #cd2027; 236 | } 237 | .need-share-button_facebook { 238 | color: #3b5998; 239 | } 240 | .need-share-button_facebook.need-share-button_link-box { 241 | color: #fff; 242 | 243 | background: #3b5998; 244 | } 245 | .need-share-button_googleplus { 246 | color: #d44132; 247 | } 248 | .need-share-button_googleplus.need-share-button_link-box { 249 | color: #fff; 250 | 251 | background: #d44132; 252 | } 253 | .need-share-button_reddit { 254 | color: #000; 255 | } 256 | .need-share-button_reddit.need-share-button_link-box { 257 | color: #fff; 258 | 259 | background: #000; 260 | } 261 | .need-share-button_delicious { 262 | color: #000; 263 | } 264 | .need-share-button_delicious.need-share-button_link-box { 265 | color: #fff; 266 | 267 | background: #000; 268 | } 269 | .need-share-button_stumbleupon { 270 | color: #f04e23; 271 | } 272 | .need-share-button_stumbleupon.need-share-button_link-box { 273 | color: #fff; 274 | 275 | background: #f04e23; 276 | } 277 | .need-share-button_linkedin { 278 | color: #0085af; 279 | } 280 | .need-share-button_linkedin.need-share-button_link-box { 281 | color: #fff; 282 | 283 | background: #0085af; 284 | } 285 | .need-share-button_slashdot { 286 | color: #026664; 287 | } 288 | .need-share-button_slashdot.need-share-button_link-box { 289 | color: #fff; 290 | 291 | background: #026664; 292 | } 293 | .need-share-button_technorati { 294 | color: #49ae47; 295 | } 296 | .need-share-button_technorati.need-share-button_link-box { 297 | color: #fff; 298 | 299 | background: #49ae47; 300 | } 301 | .need-share-button_posterous { 302 | color: #795d31; 303 | } 304 | .need-share-button_posterous.need-share-button_link-box { 305 | color: #fff; 306 | 307 | background: #795d31; 308 | } 309 | .need-share-button_tumblr { 310 | color: #34465d; 311 | } 312 | .need-share-button_tumblr.need-share-button_link-box { 313 | color: #fff; 314 | 315 | background: #34465d; 316 | } 317 | .need-share-button_googlebookmarks { 318 | color: #fde331; 319 | } 320 | .need-share-button_googlebookmarks.need-share-button_link-box { 321 | color: #fff; 322 | 323 | background: #fde331; 324 | } 325 | .need-share-button_newsvine { 326 | color: #03652c; 327 | } 328 | .need-share-button_newsvine.need-share-button_link-box { 329 | color: #fff; 330 | 331 | background: #03652c; 332 | } 333 | .need-share-button_evernote { 334 | color: #79d626; 335 | } 336 | .need-share-button_evernote.need-share-button_link-box { 337 | color: #fff; 338 | 339 | background: #79d626; 340 | } 341 | .need-share-button_friendfeed { 342 | color: #b0cbe9; 343 | } 344 | .need-share-button_friendfeed.need-share-button_link-box { 345 | color: #fff; 346 | 347 | background: #b0cbe9; 348 | } 349 | .need-share-button_vkontakte { 350 | color: #4c75a3; 351 | } 352 | .need-share-button_vkontakte.need-share-button_link-box { 353 | color: #fff; 354 | 355 | background: #4c75a3; 356 | } 357 | .need-share-button_odnoklassniki { 358 | color: #ed812b; 359 | } 360 | .need-share-button_odnoklassniki.need-share-button_link-box { 361 | color: #fff; 362 | 363 | background: #ed812b; 364 | } 365 | .need-share-button_mailru { 366 | color: #f89c0e; 367 | } 368 | .need-share-button_mailru.need-share-button_link-box { 369 | color: #fff; 370 | 371 | background: #f89c0e; 372 | } 373 | -------------------------------------------------------------------------------- /lib/pace/pace-theme-barber-shop.min.css: -------------------------------------------------------------------------------- 1 | .pace,.pace .pace-progress{width:100%;overflow:hidden}.pace,.pace .pace-activity{position:fixed;top:0;left:0}.pace{-webkit-pointer-events:none;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;z-index:2000;height:12px;background:#fff}.pace-inactive{display:none}.pace .pace-progress{background-color:#29d;position:fixed;top:0;bottom:0;right:100%}.pace .pace-activity{right:-32px;bottom:0;-webkit-transform:translate3d(0,0,0);-moz-transform:translate3d(0,0,0);-ms-transform:translate3d(0,0,0);-o-transform:translate3d(0,0,0);transform:translate3d(0,0,0);background-image:-webkit-gradient(linear,0 100%,100% 0,color-stop(.25,rgba(255,255,255,.2)),color-stop(.25,transparent),color-stop(.5,transparent),color-stop(.5,rgba(255,255,255,.2)),color-stop(.75,rgba(255,255,255,.2)),color-stop(.75,transparent),to(transparent));background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.2) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.2) 50%,rgba(255,255,255,.2) 75%,transparent 75%,transparent);background-image:-moz-linear-gradient(45deg,rgba(255,255,255,.2) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.2) 50%,rgba(255,255,255,.2) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.2) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.2) 50%,rgba(255,255,255,.2) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.2) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.2) 50%,rgba(255,255,255,.2) 75%,transparent 75%,transparent);-webkit-background-size:32px 32px;-moz-background-size:32px 32px;-o-background-size:32px 32px;background-size:32px 32px;-webkit-animation:pace-theme-barber-shop-motion .5s linear infinite;-moz-animation:pace-theme-barber-shop-motion .5s linear infinite;-ms-animation:pace-theme-barber-shop-motion .5s linear infinite;-o-animation:pace-theme-barber-shop-motion .5s linear infinite;animation:pace-theme-barber-shop-motion .5s linear infinite}@-webkit-keyframes pace-theme-barber-shop-motion{0%{-webkit-transform:none;transform:none}100%{-webkit-transform:translate(-32px,0);transform:translate(-32px,0)}}@-moz-keyframes pace-theme-barber-shop-motion{0%{-moz-transform:none;transform:none}100%{-moz-transform:translate(-32px,0);transform:translate(-32px,0)}}@-o-keyframes pace-theme-barber-shop-motion{0%{-o-transform:none;transform:none}100%{-o-transform:translate(-32px,0);transform:translate(-32px,0)}}@-ms-keyframes pace-theme-barber-shop-motion{0%{-ms-transform:none;transform:none}100%{-ms-transform:translate(-32px,0);transform:translate(-32px,0)}}@keyframes pace-theme-barber-shop-motion{0%{transform:none}100%{transform:translate(-32px,0)}} -------------------------------------------------------------------------------- /lib/pace/pace-theme-big-counter.min.css: -------------------------------------------------------------------------------- 1 | .pace{-webkit-pointer-events:none;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.pace.pace-inactive .pace-progress{display:none}.pace .pace-progress{position:fixed;z-index:2000;top:0;right:0;height:5rem;width:5rem;-webkit-transform:translate3d(0,0,0)!important;-ms-transform:translate3d(0,0,0)!important;transform:translate3d(0,0,0)!important}.pace .pace-progress:after{display:block;position:absolute;top:0;right:.5rem;content:attr(data-progress-text);font-family:"Helvetica Neue",sans-serif;font-weight:100;font-size:5rem;line-height:1;text-align:right;color:rgba(34,153,221,.19999999999999996)} -------------------------------------------------------------------------------- /lib/pace/pace-theme-bounce.min.css: -------------------------------------------------------------------------------- 1 | .pace{width:140px;height:300px;position:fixed;top:-90px;right:-20px;z-index:2000;-webkit-transform:scale(0);-moz-transform:scale(0);-ms-transform:scale(0);-o-transform:scale(0);transform:scale(0);opacity:0;-webkit-transition:all 2s linear 0s;-moz-transition:all 2s linear 0s;transition:all 2s linear 0s}.pace.pace-active{-webkit-transform:scale(.25);-moz-transform:scale(.25);-ms-transform:scale(.25);-o-transform:scale(.25);transform:scale(.25);opacity:1}.pace .pace-activity{width:140px;height:140px;border-radius:70px;background:#29d;position:absolute;top:0;z-index:1911;-webkit-animation:pace-bounce 1s infinite;-moz-animation:pace-bounce 1s infinite;-o-animation:pace-bounce 1s infinite;-ms-animation:pace-bounce 1s infinite;animation:pace-bounce 1s infinite}.pace .pace-progress{position:absolute;display:block;left:50%;bottom:0;z-index:1910;margin-left:-30px;width:60px;height:75px;background:rgba(20,20,20,.1);box-shadow:0 0 20px 35px rgba(20,20,20,.1);border-radius:30px/40px;-webkit-transform:scaleY(.3)!important;-moz-transform:scaleY(.3)!important;-ms-transform:scaleY(.3)!important;-o-transform:scaleY(.3)!important;transform:scaleY(.3)!important;-webkit-animation:pace-compress .5s infinite alternate;-moz-animation:pace-compress .5s infinite alternate;-o-animation:pace-compress .5s infinite alternate;-ms-animation:pace-compress .5s infinite alternate;animation:pace-compress .5s infinite alternate}@-webkit-keyframes pace-bounce{0%,100%,95%{top:0;-webkit-animation-timing-function:ease-in}50%{top:140px;height:140px;-webkit-animation-timing-function:ease-out}55%{top:160px;height:120px;border-radius:70px/60px;-webkit-animation-timing-function:ease-in}65%{top:120px;height:140px;border-radius:70px;-webkit-animation-timing-function:ease-out}}@-moz-keyframes pace-bounce{0%,100%,95%{top:0;-moz-animation-timing-function:ease-in}50%{top:140px;height:140px;-moz-animation-timing-function:ease-out}55%{top:160px;height:120px;border-radius:70px/60px;-moz-animation-timing-function:ease-in}65%{top:120px;height:140px;border-radius:70px;-moz-animation-timing-function:ease-out}}@keyframes pace-bounce{0%,100%,95%{top:0;animation-timing-function:ease-in}50%{top:140px;height:140px;animation-timing-function:ease-out}55%{top:160px;height:120px;border-radius:70px/60px;animation-timing-function:ease-in}65%{top:120px;height:140px;border-radius:70px;animation-timing-function:ease-out}}@-webkit-keyframes pace-compress{0%{bottom:0;margin-left:-30px;width:60px;height:75px;background:rgba(20,20,20,.1);box-shadow:0 0 20px 35px rgba(20,20,20,.1);border-radius:30px/40px;-webkit-animation-timing-function:ease-in}100%{bottom:30px;margin-left:-10px;width:20px;height:5px;background:rgba(20,20,20,.3);box-shadow:0 0 20px 35px rgba(20,20,20,.3);border-radius:20px;-webkit-animation-timing-function:ease-out}}@-moz-keyframes pace-compress{0%{bottom:0;margin-left:-30px;width:60px;height:75px;background:rgba(20,20,20,.1);box-shadow:0 0 20px 35px rgba(20,20,20,.1);border-radius:30px/40px;-moz-animation-timing-function:ease-in}100%{bottom:30px;margin-left:-10px;width:20px;height:5px;background:rgba(20,20,20,.3);box-shadow:0 0 20px 35px rgba(20,20,20,.3);border-radius:20px;-moz-animation-timing-function:ease-out}}@keyframes pace-compress{0%{bottom:0;margin-left:-30px;width:60px;height:75px;background:rgba(20,20,20,.1);box-shadow:0 0 20px 35px rgba(20,20,20,.1);border-radius:30px/40px;animation-timing-function:ease-in}100%{bottom:30px;margin-left:-10px;width:20px;height:5px;background:rgba(20,20,20,.3);box-shadow:0 0 20px 35px rgba(20,20,20,.3);border-radius:20px;animation-timing-function:ease-out}} -------------------------------------------------------------------------------- /lib/pace/pace-theme-center-atom.min.css: -------------------------------------------------------------------------------- 1 | .pace,.pace .pace-progress{z-index:2000;height:60px;width:100px}.pace .pace-activity,.pace .pace-progress:before{border-radius:50%;display:block;position:absolute}.pace.pace-inactive{display:none}.pace{-webkit-pointer-events:none;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;position:fixed;margin:auto;top:0;left:0;right:0;bottom:0}.pace .pace-progress{position:absolute;-webkit-transform:translate3d(0,0,0)!important;-ms-transform:translate3d(0,0,0)!important;transform:translate3d(0,0,0)!important}.pace .pace-progress:before{content:attr(data-progress-text);text-align:center;color:#fff;background:#29d;font-family:"Helvetica Neue",sans-serif;font-size:14px;font-weight:100;line-height:1;padding:20% 0 7px;width:50%;height:40%;margin:10px 0 0 30px;z-index:999}.pace .pace-activity{font-size:15px;line-height:1;z-index:2000;-webkit-animation:pace-theme-center-atom-spin 2s linear infinite;-moz-animation:pace-theme-center-atom-spin 2s linear infinite;-o-animation:pace-theme-center-atom-spin 2s linear infinite;animation:pace-theme-center-atom-spin 2s linear infinite;border:5px solid #29d;content:' ';top:0;left:0;height:60px;width:100px}.pace .pace-activity:after,.pace .pace-activity:before{content:' ';display:block;position:absolute;top:-5px;left:-5px;height:60px;width:100px}.pace .pace-activity:after{border-radius:50%;border:5px solid #29d;-webkit-transform:rotate(60deg);-moz-transform:rotate(60deg);-o-transform:rotate(60deg);transform:rotate(60deg)}.pace .pace-activity:before{border-radius:50%;border:5px solid #29d;-webkit-transform:rotate(120deg);-moz-transform:rotate(120deg);-o-transform:rotate(120deg);transform:rotate(120deg)}@-webkit-keyframes pace-theme-center-atom-spin{0%{-webkit-transform:rotate(0)}100%{-webkit-transform:rotate(359deg)}}@-moz-keyframes pace-theme-center-atom-spin{0%{-moz-transform:rotate(0)}100%{-moz-transform:rotate(359deg)}}@-o-keyframes pace-theme-center-atom-spin{0%{-o-transform:rotate(0)}100%{-o-transform:rotate(359deg)}}@keyframes pace-theme-center-atom-spin{0%{transform:rotate(0)}100%{transform:rotate(359deg)}} -------------------------------------------------------------------------------- /lib/pace/pace-theme-center-circle.min.css: -------------------------------------------------------------------------------- 1 | .pace,.pace .pace-progress{z-index:2000;left:0;top:0;height:6rem}.pace{-webkit-pointer-events:none;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;-webkit-perspective:12rem;-moz-perspective:12rem;-ms-perspective:12rem;-o-perspective:12rem;perspective:12rem;position:fixed;width:6rem;margin:auto;right:0;bottom:0}.pace.pace-inactive .pace-progress{display:none}.pace .pace-progress{display:block;position:absolute;width:6rem!important;line-height:6rem;font-size:2rem;border-radius:50%;background:rgba(34,153,221,.8);color:#fff;font-family:"Helvetica Neue",sans-serif;font-weight:100;text-align:center;-webkit-animation:pace-theme-center-circle-spin linear infinite 2s;-moz-animation:pace-theme-center-circle-spin linear infinite 2s;-ms-animation:pace-theme-center-circle-spin linear infinite 2s;-o-animation:pace-theme-center-circle-spin linear infinite 2s;animation:pace-theme-center-circle-spin linear infinite 2s;-webkit-transform-style:preserve-3d;-moz-transform-style:preserve-3d;-ms-transform-style:preserve-3d;-o-transform-style:preserve-3d;transform-style:preserve-3d}.pace .pace-progress:after{content:attr(data-progress-text);display:block}@-webkit-keyframes pace-theme-center-circle-spin{from{-webkit-transform:rotateY(0)}to{-webkit-transform:rotateY(360deg)}}@-moz-keyframes pace-theme-center-circle-spin{from{-moz-transform:rotateY(0)}to{-moz-transform:rotateY(360deg)}}@-ms-keyframes pace-theme-center-circle-spin{from{-ms-transform:rotateY(0)}to{-ms-transform:rotateY(360deg)}}@-o-keyframes pace-theme-center-circle-spin{from{-o-transform:rotateY(0)}to{-o-transform:rotateY(360deg)}}@keyframes pace-theme-center-circle-spin{from{transform:rotateY(0)}to{transform:rotateY(360deg)}} -------------------------------------------------------------------------------- /lib/pace/pace-theme-center-radar.min.css: -------------------------------------------------------------------------------- 1 | .pace,.pace .pace-activity{z-index:2000;height:90px;width:90px}.pace{-webkit-pointer-events:none;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;position:fixed;margin:auto;top:0;left:0;right:0;bottom:0}.pace.pace-inactive .pace-activity{display:none}.pace .pace-activity,.pace .pace-activity:before{position:absolute;display:block;border-color:#29d transparent transparent;border-radius:50%}.pace .pace-activity{left:-30px;top:-30px;border-width:30px;border-style:double;-webkit-animation:spin 1s linear infinite;-moz-animation:spin 1s linear infinite;-o-animation:spin 1s linear infinite;animation:spin 1s linear infinite}.pace .pace-activity:before{content:' ';top:10px;left:10px;height:50px;width:50px;border-width:10px;border-style:solid}@-webkit-keyframes spin{100%{-webkit-transform:rotate(359deg)}}@-moz-keyframes spin{100%{-moz-transform:rotate(359deg)}}@-o-keyframes spin{100%{-moz-transform:rotate(359deg)}}@keyframes spin{100%{transform:rotate(359deg)}} -------------------------------------------------------------------------------- /lib/pace/pace-theme-center-simple.min.css: -------------------------------------------------------------------------------- 1 | .pace{-webkit-pointer-events:none;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;z-index:2000;position:fixed;margin:auto;top:0;left:0;right:0;bottom:0;height:5px;width:200px;background:#fff;border:1px solid #29d;overflow:hidden}.pace .pace-progress{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;-o-box-sizing:border-box;box-sizing:border-box;-webkit-transform:translate3d(0,0,0);-moz-transform:translate3d(0,0,0);-ms-transform:translate3d(0,0,0);-o-transform:translate3d(0,0,0);transform:translate3d(0,0,0);max-width:200px;z-index:2000;display:block;position:absolute;top:0;right:100%;height:100%;width:100%;background:#29d}.pace.pace-inactive{display:none} -------------------------------------------------------------------------------- /lib/pace/pace-theme-corner-indicator.min.css: -------------------------------------------------------------------------------- 1 | .pace{-webkit-pointer-events:none;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.pace .pace-activity{display:block;position:fixed;z-index:2000;top:0;right:0;width:300px;height:300px;background:#29d;-webkit-transition:-webkit-transform .3s;transition:transform .3s;-webkit-transform:translateX(100%) translateY(-100%) rotate(45deg);transform:translateX(100%) translateY(-100%) rotate(45deg);pointer-events:none}.pace.pace-active .pace-activity{-webkit-transform:translateX(50%) translateY(-50%) rotate(45deg);transform:translateX(50%) translateY(-50%) rotate(45deg)}.pace .pace-activity::after,.pace .pace-activity::before{-moz-box-sizing:border-box;box-sizing:border-box;position:absolute;bottom:30px;left:50%;display:block;border:5px solid #fff;border-radius:50%;content:''}.pace .pace-activity::before{margin-left:-40px;width:80px;height:80px;border-right-color:rgba(0,0,0,.2);border-left-color:rgba(0,0,0,.2);-webkit-animation:pace-theme-corner-indicator-spin 3s linear infinite;animation:pace-theme-corner-indicator-spin 3s linear infinite}.pace .pace-activity::after{bottom:50px;margin-left:-20px;width:40px;height:40px;border-top-color:rgba(0,0,0,.2);border-bottom-color:rgba(0,0,0,.2);-webkit-animation:pace-theme-corner-indicator-spin 1s linear infinite;animation:pace-theme-corner-indicator-spin 1s linear infinite}@-webkit-keyframes pace-theme-corner-indicator-spin{0%{-webkit-transform:rotate(0)}100%{-webkit-transform:rotate(359deg)}}@keyframes pace-theme-corner-indicator-spin{0%{transform:rotate(0)}100%{transform:rotate(359deg)}} -------------------------------------------------------------------------------- /lib/pace/pace-theme-fill-left.min.css: -------------------------------------------------------------------------------- 1 | .pace{-webkit-pointer-events:none;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.pace-inactive{display:none}.pace .pace-progress{background-color:rgba(34,153,221,.19999999999999996);position:fixed;z-index:-1;top:0;right:100%;bottom:0;width:100%} -------------------------------------------------------------------------------- /lib/pace/pace-theme-flash.min.css: -------------------------------------------------------------------------------- 1 | .pace{-webkit-pointer-events:none;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.pace-inactive{display:none}.pace .pace-progress{background:#29d;position:fixed;z-index:2000;top:0;right:100%;width:100%;height:2px}.pace .pace-progress-inner{display:block;position:absolute;right:0;width:100px;height:100%;box-shadow:0 0 10px #29d,0 0 5px #29d;opacity:1;-webkit-transform:rotate(3deg) translate(0,-4px);-moz-transform:rotate(3deg) translate(0,-4px);-ms-transform:rotate(3deg) translate(0,-4px);-o-transform:rotate(3deg) translate(0,-4px);transform:rotate(3deg) translate(0,-4px)}.pace .pace-activity{display:block;position:fixed;z-index:2000;top:15px;right:15px;width:14px;height:14px;border:2px solid transparent;border-top-color:#29d;border-left-color:#29d;border-radius:10px;-webkit-animation:pace-spinner .4s linear infinite;-moz-animation:pace-spinner .4s linear infinite;-ms-animation:pace-spinner .4s linear infinite;-o-animation:pace-spinner .4s linear infinite;animation:pace-spinner .4s linear infinite}@-webkit-keyframes pace-spinner{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@-moz-keyframes pace-spinner{0%{-moz-transform:rotate(0);transform:rotate(0)}100%{-moz-transform:rotate(360deg);transform:rotate(360deg)}}@-o-keyframes pace-spinner{0%{-o-transform:rotate(0);transform:rotate(0)}100%{-o-transform:rotate(360deg);transform:rotate(360deg)}}@-ms-keyframes pace-spinner{0%{-ms-transform:rotate(0);transform:rotate(0)}100%{-ms-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes pace-spinner{0%{transform:rotate(0)}100%{transform:rotate(360deg)}} -------------------------------------------------------------------------------- /lib/pace/pace-theme-loading-bar.min.css: -------------------------------------------------------------------------------- 1 | .pace{-webkit-pointer-events:none;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;-o-box-sizing:border-box;box-sizing:border-box;-webkit-border-radius:10px;-moz-border-radius:10px;border-radius:10px;-webkit-background-clip:padding-box;-moz-background-clip:padding;background-clip:padding-box;z-index:2000;position:fixed;margin:auto;top:12px;left:0;right:0;bottom:0;width:200px;height:50px;overflow:hidden}.pace .pace-progress{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;-o-box-sizing:border-box;box-sizing:border-box;-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;-webkit-background-clip:padding-box;-moz-background-clip:padding;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0);display:block;position:absolute;right:100%;margin-right:-7px;width:93%;top:7px;height:14px;font-size:12px;background:#29d;color:#29d;line-height:60px;font-weight:700;font-family:Helvetica,Arial,"Lucida Grande",sans-serif;-webkit-box-shadow:120px 0 #fff,240px 0 #fff;-ms-box-shadow:120px 0 #fff,240px 0 #fff;box-shadow:120px 0 #fff,240px 0 #fff}.pace .pace-progress:after{content:attr(data-progress-text);display:inline-block;position:fixed;width:45px;text-align:right;right:0;padding-right:16px;top:4px}.pace .pace-progress[data-progress-text="0%"]:after{right:-200px}.pace .pace-progress[data-progress-text="1%"]:after{right:-198.14px}.pace .pace-progress[data-progress-text="2%"]:after{right:-196.28px}.pace .pace-progress[data-progress-text="3%"]:after{right:-194.42px}.pace .pace-progress[data-progress-text="4%"]:after{right:-192.56px}.pace .pace-progress[data-progress-text="5%"]:after{right:-190.7px}.pace .pace-progress[data-progress-text="6%"]:after{right:-188.84px}.pace .pace-progress[data-progress-text="7%"]:after{right:-186.98px}.pace .pace-progress[data-progress-text="8%"]:after{right:-185.12px}.pace .pace-progress[data-progress-text="9%"]:after{right:-183.26px}.pace .pace-progress[data-progress-text="10%"]:after{right:-181.4px}.pace .pace-progress[data-progress-text="11%"]:after{right:-179.54px}.pace .pace-progress[data-progress-text="12%"]:after{right:-177.68px}.pace .pace-progress[data-progress-text="13%"]:after{right:-175.82px}.pace .pace-progress[data-progress-text="14%"]:after{right:-173.96px}.pace .pace-progress[data-progress-text="15%"]:after{right:-172.1px}.pace .pace-progress[data-progress-text="16%"]:after{right:-170.24px}.pace .pace-progress[data-progress-text="17%"]:after{right:-168.38px}.pace .pace-progress[data-progress-text="18%"]:after{right:-166.52px}.pace .pace-progress[data-progress-text="19%"]:after{right:-164.66px}.pace .pace-progress[data-progress-text="20%"]:after{right:-162.8px}.pace .pace-progress[data-progress-text="21%"]:after{right:-160.94px}.pace .pace-progress[data-progress-text="22%"]:after{right:-159.08px}.pace .pace-progress[data-progress-text="23%"]:after{right:-157.22px}.pace .pace-progress[data-progress-text="24%"]:after{right:-155.36px}.pace .pace-progress[data-progress-text="25%"]:after{right:-153.5px}.pace .pace-progress[data-progress-text="26%"]:after{right:-151.64px}.pace .pace-progress[data-progress-text="27%"]:after{right:-149.78px}.pace .pace-progress[data-progress-text="28%"]:after{right:-147.92px}.pace .pace-progress[data-progress-text="29%"]:after{right:-146.06px}.pace .pace-progress[data-progress-text="30%"]:after{right:-144.2px}.pace .pace-progress[data-progress-text="31%"]:after{right:-142.34px}.pace .pace-progress[data-progress-text="32%"]:after{right:-140.48px}.pace .pace-progress[data-progress-text="33%"]:after{right:-138.62px}.pace .pace-progress[data-progress-text="34%"]:after{right:-136.76px}.pace .pace-progress[data-progress-text="35%"]:after{right:-134.9px}.pace .pace-progress[data-progress-text="36%"]:after{right:-133.04px}.pace .pace-progress[data-progress-text="37%"]:after{right:-131.18px}.pace .pace-progress[data-progress-text="38%"]:after{right:-129.32px}.pace .pace-progress[data-progress-text="39%"]:after{right:-127.46px}.pace .pace-progress[data-progress-text="40%"]:after{right:-125.6px}.pace .pace-progress[data-progress-text="41%"]:after{right:-123.74px}.pace .pace-progress[data-progress-text="42%"]:after{right:-121.88px}.pace .pace-progress[data-progress-text="43%"]:after{right:-120.02px}.pace .pace-progress[data-progress-text="44%"]:after{right:-118.16px}.pace .pace-progress[data-progress-text="45%"]:after{right:-116.3px}.pace .pace-progress[data-progress-text="46%"]:after{right:-114.44px}.pace .pace-progress[data-progress-text="47%"]:after{right:-112.58px}.pace .pace-progress[data-progress-text="48%"]:after{right:-110.72px}.pace .pace-progress[data-progress-text="49%"]:after{right:-108.86px}.pace .pace-progress[data-progress-text="50%"]:after{right:-107px}.pace .pace-progress[data-progress-text="51%"]:after{right:-105.14px}.pace .pace-progress[data-progress-text="52%"]:after{right:-103.28px}.pace .pace-progress[data-progress-text="53%"]:after{right:-101.42px}.pace .pace-progress[data-progress-text="54%"]:after{right:-99.56px}.pace .pace-progress[data-progress-text="55%"]:after{right:-97.7px}.pace .pace-progress[data-progress-text="56%"]:after{right:-95.84px}.pace .pace-progress[data-progress-text="57%"]:after{right:-93.98px}.pace .pace-progress[data-progress-text="58%"]:after{right:-92.12px}.pace .pace-progress[data-progress-text="59%"]:after{right:-90.26px}.pace .pace-progress[data-progress-text="60%"]:after{right:-88.4px}.pace .pace-progress[data-progress-text="61%"]:after{right:-86.54px}.pace .pace-progress[data-progress-text="62%"]:after{right:-84.68px}.pace .pace-progress[data-progress-text="63%"]:after{right:-82.82px}.pace .pace-progress[data-progress-text="64%"]:after{right:-80.96px}.pace .pace-progress[data-progress-text="65%"]:after{right:-79.1px}.pace .pace-progress[data-progress-text="66%"]:after{right:-77.24px}.pace .pace-progress[data-progress-text="67%"]:after{right:-75.38px}.pace .pace-progress[data-progress-text="68%"]:after{right:-73.52px}.pace .pace-progress[data-progress-text="69%"]:after{right:-71.66px}.pace .pace-progress[data-progress-text="70%"]:after{right:-69.8px}.pace .pace-progress[data-progress-text="71%"]:after{right:-67.94px}.pace .pace-progress[data-progress-text="72%"]:after{right:-66.08px}.pace .pace-progress[data-progress-text="73%"]:after{right:-64.22px}.pace .pace-progress[data-progress-text="74%"]:after{right:-62.36px}.pace .pace-progress[data-progress-text="75%"]:after{right:-60.5px}.pace .pace-progress[data-progress-text="76%"]:after{right:-58.64px}.pace .pace-progress[data-progress-text="77%"]:after{right:-56.78px}.pace .pace-progress[data-progress-text="78%"]:after{right:-54.92px}.pace .pace-progress[data-progress-text="79%"]:after{right:-53.06px}.pace .pace-progress[data-progress-text="80%"]:after{right:-51.2px}.pace .pace-progress[data-progress-text="81%"]:after{right:-49.34px}.pace .pace-progress[data-progress-text="82%"]:after{right:-47.48px}.pace .pace-progress[data-progress-text="83%"]:after{right:-45.62px}.pace .pace-progress[data-progress-text="84%"]:after{right:-43.76px}.pace .pace-progress[data-progress-text="85%"]:after{right:-41.9px}.pace .pace-progress[data-progress-text="86%"]:after{right:-40.04px}.pace .pace-progress[data-progress-text="87%"]:after{right:-38.18px}.pace .pace-progress[data-progress-text="88%"]:after{right:-36.32px}.pace .pace-progress[data-progress-text="89%"]:after{right:-34.46px}.pace .pace-progress[data-progress-text="90%"]:after{right:-32.6px}.pace .pace-progress[data-progress-text="91%"]:after{right:-30.74px}.pace .pace-progress[data-progress-text="92%"]:after{right:-28.88px}.pace .pace-progress[data-progress-text="93%"]:after{right:-27.02px}.pace .pace-progress[data-progress-text="94%"]:after{right:-25.16px}.pace .pace-progress[data-progress-text="95%"]:after{right:-23.3px}.pace .pace-progress[data-progress-text="96%"]:after{right:-21.44px}.pace .pace-progress[data-progress-text="97%"]:after{right:-19.58px}.pace .pace-progress[data-progress-text="98%"]:after{right:-17.72px}.pace .pace-progress[data-progress-text="99%"]:after{right:-15.86px}.pace .pace-progress[data-progress-text="100%"]:after{right:-14px}.pace .pace-activity{position:absolute;width:100%;height:28px;z-index:2001;box-shadow:inset 0 0 0 2px #29d,inset 0 0 0 7px #FFF;border-radius:10px}.pace.pace-inactive{display:none} -------------------------------------------------------------------------------- /lib/pace/pace-theme-mac-osx.min.css: -------------------------------------------------------------------------------- 1 | .pace,.pace .pace-progress{width:100%;height:12px;overflow:hidden}.pace,.pace .pace-activity{position:fixed;top:0;left:0}.pace{-webkit-pointer-events:none;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;z-index:2000;background:#fff}.pace-inactive{display:none}.pace .pace-progress{background-color:#0087E1;position:fixed;top:0;right:100%;-webkit-border-radius:0 0 4px;-moz-border-radius:0 0 4px;-o-border-radius:0 0 4px;border-radius:0 0 4px;-webkit-box-shadow:inset -1px 0 #00558F,inset 0 -1px #00558F,inset 0 2px rgba(255,255,255,.5),inset 0 6px rgba(255,255,255,.3);-moz-box-shadow:inset -1px 0 #00558F,inset 0 -1px #00558F,inset 0 2px rgba(255,255,255,.5),inset 0 6px rgba(255,255,255,.3);-o-box-shadow:inset -1px 0 #00558F,inset 0 -1px #00558F,inset 0 2px rgba(255,255,255,.5),inset 0 6px rgba(255,255,255,.3);box-shadow:inset -1px 0 #00558F,inset 0 -1px #00558F,inset 0 2px rgba(255,255,255,.5),inset 0 6px rgba(255,255,255,.3)}.pace .pace-activity{right:-28px;bottom:0;-webkit-background-image:radial-gradient(rgba(255,255,255,.65) 0,rgba(255,255,255,.15) 100%);-moz-background-image:radial-gradient(rgba(255,255,255,.65) 0,rgba(255,255,255,.15) 100%);-o-background-image:radial-gradient(rgba(255,255,255,.65) 0,rgba(255,255,255,.15) 100%);background-image:radial-gradient(rgba(255,255,255,.65) 0,rgba(255,255,255,.15) 100%);-webkit-background-size:28px 100%;-moz-background-size:28px 100%;-o-background-size:28px 100%;background-size:28px 100%;-webkit-animation:pace-theme-mac-osx-motion .5s linear infinite;-moz-animation:pace-theme-mac-osx-motion .5s linear infinite;-ms-animation:pace-theme-mac-osx-motion .5s linear infinite;-o-animation:pace-theme-mac-osx-motion .5s linear infinite;animation:pace-theme-mac-osx-motion .5s linear infinite}@-webkit-keyframes pace-theme-mac-osx-motion{0%{-webkit-transform:none;transform:none}100%{-webkit-transform:translate(-28px,0);transform:translate(-28px,0)}}@-moz-keyframes pace-theme-mac-osx-motion{0%{-moz-transform:none;transform:none}100%{-moz-transform:translate(-28px,0);transform:translate(-28px,0)}}@-o-keyframes pace-theme-mac-osx-motion{0%{-o-transform:none;transform:none}100%{-o-transform:translate(-28px,0);transform:translate(-28px,0)}}@-ms-keyframes pace-theme-mac-osx-motion{0%{-ms-transform:none;transform:none}100%{-ms-transform:translate(-28px,0);transform:translate(-28px,0)}}@keyframes pace-theme-mac-osx-motion{0%{transform:none}100%{transform:translate(-28px,0)}} -------------------------------------------------------------------------------- /lib/pace/pace-theme-minimal.min.css: -------------------------------------------------------------------------------- 1 | .pace{-webkit-pointer-events:none;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.pace-inactive{display:none}.pace .pace-progress{background:#29d;position:fixed;z-index:2000;top:0;right:100%;width:100%;height:2px} -------------------------------------------------------------------------------- /lib/ua-parser-js/dist/ua-parser.pack.js: -------------------------------------------------------------------------------- 1 | /** 2 | * UAParser.js v0.7.9 3 | * Lightweight JavaScript-based User-Agent string parser 4 | * https://github.com/faisalman/ua-parser-js 5 | * 6 | * Copyright © 2012-2015 Faisal Salman 7 | * Dual licensed under GPLv2 & MIT 8 | */ 9 | !function(i,e){"use strict";var s="0.7.9",o="",r="?",n="function",a="undefined",t="object",w="string",l="major",d="model",p="name",c="type",u="vendor",m="version",f="architecture",g="console",b="mobile",h="tablet",v="smarttv",x="wearable",k="embedded",y={extend:function(i,e){for(var s in e)-1!=="browser cpu device engine os".indexOf(s)&&e[s].length%2===0&&(i[s]=e[s].concat(i[s]));return i},has:function(i,e){return"string"==typeof i?-1!==e.toLowerCase().indexOf(i.toLowerCase()):!1},lowerize:function(i){return i.toLowerCase()},major:function(i){return typeof i===w?i.split(".")[0]:e}},A={rgx:function(){for(var i,s,o,r,w,l,d,p=0,c=arguments;p0?2==w.length?i[w[0]]=typeof w[1]==n?w[1].call(this,d):w[1]:3==w.length?i[w[0]]=typeof w[1]!==n||w[1].exec&&w[1].test?d?d.replace(w[1],w[2]):e:d?w[1].call(this,d,w[2]):e:4==w.length&&(i[w[0]]=d?w[3].call(this,d.replace(w[1],w[2])):e):i[w]=d?d:e;p+=2}return i},str:function(i,s){for(var o in s)if(typeof s[o]===t&&s[o].length>0){for(var n=0;n