├── .gitignore ├── 404.md ├── LICENSE ├── Makefile ├── README.md ├── config.json ├── default_config.json ├── favicon.ico ├── gulpfile.js ├── img ├── favicon.ico └── logo │ ├── silentor-log.png │ └── silentor-log.psb ├── index.html ├── p ├── Authors │ ├── a │ │ └── b │ │ │ └── index.md │ └── jayin.md ├── about.md ├── docs │ ├── getting-start │ │ ├── img │ │ │ ├── 1.png │ │ │ ├── 2.png │ │ │ ├── 3.gif │ │ │ └── 5.png │ │ └── main.md │ ├── markdown-useage.md │ ├── readme.md │ ├── use-disqus │ │ ├── create_website.png │ │ ├── install_1.png │ │ ├── install_2.png │ │ ├── install_3.png │ │ └── main.md │ └── use-duoshuo │ │ └── main.md ├── footer.md ├── home.md ├── profession.md ├── projects │ ├── ETips.md │ └── index.md └── sidebar.md ├── package.json ├── src ├── blog.css ├── blog.js └── extension │ ├── disqus-visibility │ ├── README.md │ └── main.js │ ├── load-progress │ ├── Makefile │ ├── README.md │ ├── dist │ │ ├── main.css │ │ └── main.js │ ├── gif2.gif │ ├── gulpfile.js │ └── src │ │ ├── custom.css │ │ ├── index.js │ │ ├── nprogress.css │ │ └── nprogress.js │ └── sidebar-background │ ├── 1.png │ ├── README.md │ ├── main.css │ └── main.js └── vendor ├── blog.css ├── core.css ├── core.js ├── extension ├── content-fadeIn │ ├── gif2.gif │ ├── main.css │ └── readme.md ├── disqus-visibility │ ├── README.md │ └── main.js ├── img-animation │ ├── gif2.gif │ ├── img-animation.css │ └── readme.md ├── load-progress │ ├── README.md │ ├── dist │ │ ├── main.css │ │ └── main.js │ ├── gif2.gif │ ├── gulpfile.js │ └── src │ │ ├── custom.css │ │ ├── index.js │ │ ├── nprogress.css │ │ └── nprogress.js ├── sidebar-background │ ├── 1.png │ ├── README.md │ ├── main.css │ └── main.js └── sidebar-item │ ├── gif2.gif │ ├── main.css │ └── readme.md ├── github-markdown.css ├── github.css ├── highlight ├── LICENSE ├── README.md ├── highlight.pack.js └── styles │ └── main.css ├── marked-0.3.5.min.js └── zepto-1.1.6.min.js /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules -------------------------------------------------------------------------------- /404.md: -------------------------------------------------------------------------------- 1 | Notice! 2 | === 3 | Page is not found. -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "{}" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright {yyyy} {name of copyright owner} 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | 203 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | main: 2 | gulp 3 | 4 | dev: 5 | DEV=true gulp 6 | 7 | serve: 8 | # see https://github.com/tj/serve 9 | node_modules/.bin/serve ../ -p 3000 10 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ![logo](./img/favicon.ico) 2 | 3 | [silentor](https://github.com/Jayin/silentor), a friendly fork of [silent](https://github.com/fritx/silent) 4 | ======== 5 | > Be a silentor, focus on writting your words down. 6 | 7 | 特点 8 | ---- 9 | * 开箱即用(Fork 本项目立马可以使用) 10 | * markdown only ,让你专注文章本身 11 | * 友好的移动端支持 12 | * 灵活的样式扩展,[Extension](./vendor/extension/) 13 | 14 | [文档 & DEMO](http://jayin.github.io/silentor/) 15 | 16 | [🚀教程:1分钟快速构建你的silentor博客](http://jayin.github.io/silentor/?docs/getting-start/main.md) 17 | 18 | Developement 19 | ------------ 20 | 21 | ``` 22 | npm install 23 | make serve 24 | make dev 25 | ``` 26 | 27 | License 28 | === 29 | 30 | MIT 31 | -------------------------------------------------------------------------------- /config.json: -------------------------------------------------------------------------------- 1 | { 2 | "app_name": "silentor", 3 | "description":"基于Markdown,约定优于配置,极简主义的博客" 4 | } 5 | -------------------------------------------------------------------------------- /default_config.json: -------------------------------------------------------------------------------- 1 | { 2 | "app_name": "silentor", 3 | "img_root" : "img", 4 | "markdown_root":"p" , 5 | "description":"基于Markdown,约定优于配置,极简主义的博客" 6 | } 7 | -------------------------------------------------------------------------------- /favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Jayin/silentor/9398f66734daff52e5e372747e4207984c6d8808/favicon.ico -------------------------------------------------------------------------------- /gulpfile.js: -------------------------------------------------------------------------------- 1 | var gulp = require('gulp') 2 | var minifyCss = require('gulp-minify-css') 3 | var uglify = require('gulp-uglify') 4 | var concat = require('gulp-concat') 5 | var header = require('gulp-header') 6 | var gulpif = require('gulp-if') 7 | var path = require('path') 8 | 9 | const DEST = 'vendor' 10 | const IS_DEV = process.env.DEV || false 11 | 12 | var pkg = require('./package.json') 13 | var banner = ['/**', 14 | ' * <%= pkg.name %> - <%= pkg.description %>', 15 | ' * @version v<%= pkg.version %>', 16 | ' * @link <%= pkg.homepage %>', 17 | ' * @license <%= pkg.license %>', 18 | ' */', 19 | ''].join('\n') 20 | 21 | gulp.task('copy', function () { 22 | gulp.src('src/**/*.+(md|gif|png|jpg)') 23 | .pipe(gulp.dest(DEST)) 24 | }) 25 | 26 | gulp.task('minify-css', function () { 27 | gulp.src('src/**/*.css') 28 | .pipe(gulpif(!IS_DEV, minifyCss())) 29 | .pipe(gulp.dest(DEST)) 30 | 31 | }) 32 | 33 | gulp.task('compress-extension', function () { 34 | gulp.src('src/extension/**/*.js') 35 | .pipe(gulpif(!IS_DEV, uglify())) 36 | .pipe(gulp.dest(path.join(DEST, 'extension'))) 37 | 38 | }) 39 | 40 | gulp.task('concat-js', ['compress-extension'], function () { 41 | gulp.src(['vendor/highlight/highlight.pack.js', 42 | 'vendor/marked-0.3.5.min.js', 43 | 'src/blog.js']) 44 | .pipe(concat('core.js')) 45 | .pipe(gulpif(!IS_DEV, uglify())) 46 | .pipe(header(banner, { pkg: pkg })) 47 | .pipe(gulp.dest(DEST)) 48 | }) 49 | 50 | gulp.task('concat-css', ['minify-css'], function () { 51 | gulp.src(['vendor/highlight/styles/main.css', 52 | 'vendor/github-markdown.css', 53 | 'vendor/blog.css']) 54 | .pipe(concat('core.css')) 55 | .pipe(header(banner, { pkg: pkg })) 56 | .pipe(gulp.dest(DEST)) 57 | }) 58 | 59 | gulp.task('build', ['concat-css', 'concat-js', 'copy']) 60 | 61 | gulp.task('watch', ['build'], function () { 62 | gulp.watch('src/**/*', ['build']) 63 | }) 64 | 65 | gulp.task('default', ['watch']) 66 | -------------------------------------------------------------------------------- /img/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Jayin/silentor/9398f66734daff52e5e372747e4207984c6d8808/img/favicon.ico -------------------------------------------------------------------------------- /img/logo/silentor-log.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Jayin/silentor/9398f66734daff52e5e372747e4207984c6d8808/img/logo/silentor-log.png -------------------------------------------------------------------------------- /img/logo/silentor-log.psb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Jayin/silentor/9398f66734daff52e5e372747e4207984c6d8808/img/logo/silentor-log.psb -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Silentor 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 24 | 25 | 26 |
27 |
28 | 29 |
30 | 31 | 32 |
33 | 44 | 45 | 46 | 47 | 48 | 49 |
50 |
51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | -------------------------------------------------------------------------------- /p/Authors/a/b/index.md: -------------------------------------------------------------------------------- 1 | test 2 | 3 | [Go docs](../../../docs/markdown-useage.md) -------------------------------------------------------------------------------- /p/Authors/jayin.md: -------------------------------------------------------------------------------- 1 | jayin 2 | ------- 3 | 4 | #### projects 5 | 6 | - [ETips](__P__/projects/ETips.md) -------------------------------------------------------------------------------- /p/about.md: -------------------------------------------------------------------------------- 1 | About Silentor 2 | === 3 | ![Meizhuo logo|left](__IMG__/favicon.ico) 4 | ![Meizhuo logo](__IMG__/favicon.ico) 5 | ![Meizhuo logo|right](__IMG__/favicon.ico) 6 | 7 | > "Be a silentor, focus on writting your words down" 8 | 9 | 10 | **Github** [@meizhuo](https://github.com/Jayin/silentor) -------------------------------------------------------------------------------- /p/docs/getting-start/img/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Jayin/silentor/9398f66734daff52e5e372747e4207984c6d8808/p/docs/getting-start/img/1.png -------------------------------------------------------------------------------- /p/docs/getting-start/img/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Jayin/silentor/9398f66734daff52e5e372747e4207984c6d8808/p/docs/getting-start/img/2.png -------------------------------------------------------------------------------- /p/docs/getting-start/img/3.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Jayin/silentor/9398f66734daff52e5e372747e4207984c6d8808/p/docs/getting-start/img/3.gif -------------------------------------------------------------------------------- /p/docs/getting-start/img/5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Jayin/silentor/9398f66734daff52e5e372747e4207984c6d8808/p/docs/getting-start/img/5.png -------------------------------------------------------------------------------- /p/docs/getting-start/main.md: -------------------------------------------------------------------------------- 1 | ## 1分钟快速构建你的博客 2 | 3 | ### 第一步:Fork [silentor](https://github.com/Jayin/silentor)到自己的仓库 4 | ![1](./img/1.png) 5 | 6 | ### 第二步:编辑一次,触发提交 7 | 8 | GitHub需要你对仓库又一次push操作,才会把gh-pages分支上的内容托管到他的静态服务器上。为了演示,我们选择修改`README.md`,不修改核心文件(`vendor/`目录)就OK 9 | 10 | ![2](./img/2.png) 11 | 12 | ### 第三步: 在网页上直接编辑修改`README.md`,并提交 13 | 14 | ![3](./img/3.gif) 15 | 16 | ### 第四步: 访问`http://{你的github名}.github.io/silentor/` 即可 17 | 18 | `{你的github名}`替换成你的github名,例如我的机器人GitHub ID是[JayinRobot](https://github.com/JayinRobot) 19 | 则访问:http://jayinrobot.github.io/silentor/ 20 | 21 | ![5](./img/5.png) -------------------------------------------------------------------------------- /p/docs/markdown-useage.md: -------------------------------------------------------------------------------- 1 | Markdown语法 2 | === 3 | > 参考: 4 | >* [GitHub Flavored Markdown](https://help.github.com/articles/github-flavored-markdown/) 5 | >* [Markdown: Syntax](http://daringfireball.net/projects/markdown/syntax) 6 | 7 | ## 标题 8 | 输入 9 | ``` 10 | # 一级标题 11 | ## 二级标题 12 | ### 三级标题 13 | #### 四级标题 14 | ##### 五级标题 15 | ###### 六级标题 16 | ``` 17 | 18 | 效果: 19 | 20 | # 一级标题 21 | ## 二级标题 22 | ### 三级标题 23 | #### 四级标题 24 | ##### 五级标题 25 | 26 | ## 加入超链接 27 | 输入 28 | ``` 29 | [超链接标题](https://github.com/Meizhuo) 30 | ``` 31 | 效果 32 | [超链接标题](https://github.com/Meizhuo) 33 | 34 | 35 | ## 加入图片 36 | 输入 37 | ``` 38 | ![这里填写图片标题,可以为空](这里放置图片链接) 39 | 40 | //例如 41 | ![Meizhuo Logo](https://avatars1.githubusercontent.com/u/6211725?v=2&s=200) 42 | ``` 43 | 效果: 44 | ![Meizhuo Logo](https://avatars1.githubusercontent.com/u/6211725?v=2&s=200) 45 | 46 | **注意** 47 | 在silentor中,图片均放在blog/img/目录下(例如有一张bg.jpg在img/目录下) 48 | 那么应该这么写 49 | ``` 50 | ![图片名](__IMG__/jpg) 51 | ``` 52 | 53 | 如果我的图片bg.jpg放在`img/`的子目录`img/mypic/`咋办?那也容易 54 | ``` 55 | ![图片名](__IMG__/mypic/bg.jpg) 56 | ``` 57 | 58 | 59 | ## 列表 60 | ``` 61 | //第一种风格,记得*号后空一格 62 | 63 | * 列表写法1 64 | * 列表写法1 65 | * 列表写法1 66 | 67 | //第二种风格 记得-号后空一格 68 | 69 | - 列表写法1 70 | - 列表写法1 71 | - 列表写法1 72 | ``` 73 | 74 | 第二种风格效果 75 | 76 | * 列表写法1 77 | * 列表写法1 78 | * 列表写法1 79 | 80 | 第二种风格效果 81 | 82 | - 列表写法1 83 | - 列表写法1 84 | - 列表写法1 85 | 86 | 如果还有子列表咋办? 87 | ``` 88 | //子目录只需要多打一个TAB键(or 4个空格) 89 | - 列表目录1 90 | - 列表子目录1 91 | - 列表子目录2 92 | - 列表子目录3 93 | ``` 94 | 效果: 95 | 96 | - 列表目录1 97 | - 列表子目录1 98 | - 列表子目录2 99 | - 列表子目录3 100 | 101 | 102 | 103 | ## 字体加粗 104 | 输入 105 | ``` 106 | **这是加粗的内容** 107 | ``` 108 | 效果: 109 | **这是加粗的内容** 110 | 111 | 112 | 113 | ## 斜体 114 | 输入 115 | ``` 116 | _这是斜体_ 117 | ``` 118 | 效果: 119 | _这是斜体_ 120 | 121 | 122 | ## 删除线 123 | 输入 124 | ``` 125 | ~~这是删除线~~ 126 | ``` 127 | 效果: 128 | ~~这是删除线~~ 129 | 130 | 131 | 132 | ## 引用 133 | 输入 134 | ``` 135 | >人生自古谁无死? 136 | ``` 137 | 效果: 138 | >人生自古谁无死? 139 | 140 | 141 | 142 | ## 表格 143 | 输入 144 | ``` 145 | 表格标题1 |表格标题2 | 表格标题3 146 | ------------ | -------------| ------------- 147 | nickname | 用户昵称 | Y 148 | email | 邮箱 | Y 149 | psw | 密码 | Y 150 | ``` 151 | 效果: 152 | 153 | 表格标题1 |表格标题2 | 表格标题3 154 | ------------ | -------------| ------------- 155 | nickname | 用户昵称 | Y 156 | email | 邮箱 | Y 157 | psw | 密码 | Y 158 | -------------------------------------------------------------------------------- /p/docs/readme.md: -------------------------------------------------------------------------------- 1 | Documentation 2 | ============ 3 | 4 | * 评论框 5 | * [Disqus评论](./use-disqus/main.md) 6 | * [多说评论框](./use-duoshuo/main.md) 7 | -------------------------------------------------------------------------------- /p/docs/use-disqus/create_website.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Jayin/silentor/9398f66734daff52e5e372747e4207984c6d8808/p/docs/use-disqus/create_website.png -------------------------------------------------------------------------------- /p/docs/use-disqus/install_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Jayin/silentor/9398f66734daff52e5e372747e4207984c6d8808/p/docs/use-disqus/install_1.png -------------------------------------------------------------------------------- /p/docs/use-disqus/install_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Jayin/silentor/9398f66734daff52e5e372747e4207984c6d8808/p/docs/use-disqus/install_2.png -------------------------------------------------------------------------------- /p/docs/use-disqus/install_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Jayin/silentor/9398f66734daff52e5e372747e4207984c6d8808/p/docs/use-disqus/install_3.png -------------------------------------------------------------------------------- /p/docs/use-disqus/main.md: -------------------------------------------------------------------------------- 1 | 加入Disqus评论 2 | ------------ 3 | 4 | #### 1. 创建账号,访问[disqus.com](https://disqus.com/) 5 | 6 | #### 2. 按提示,[创建一个website](https://disqus.com/admin/create/) 7 | 8 | ![create_website.png](./create_website.png) 9 | 10 | #### 3. 获取安装代码 11 | 12 | ![step 1](./install_1.png) 13 | ![step 2](./install_2.png) 14 | ![step 3](./install_3.png) 15 | 16 | #### 4. 部署代码 17 | 18 | 把代码复制到`主内容`和底部之间 19 | 20 | ```html 21 | 22 |
23 |
24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |
32 |
33 | ``` 34 | 35 | #### NOTE 36 | 37 | √ silentor自v1.5.4已经默认集成Disqus评论 38 | -------------------------------------------------------------------------------- /p/docs/use-duoshuo/main.md: -------------------------------------------------------------------------------- 1 | ### 加入多说评论框 2 | 3 | 首先到`http://duoshuo.com/` 申请有账号 4 | 然后进入后台获得通用评论框代码,放到index.html的`#main-page下` 5 | 6 | e.g: 7 | ```html 8 | 9 |
10 |
11 |
12 |
13 | 14 |
15 | 16 | 17 | 30 | 31 |
32 | ``` 33 | 34 | **如果想在网站首页不显示评论,如何做?** 35 | ```javascript 36 | //blog.js 37 | function init() { 38 | read_config(function() { 39 | load('#sidebar-page', 'sidebar.md', true); 40 | 41 | if (cur_md_path === '') { 42 | load('#main-page', 'home.md'); 43 | console.log("load main~"); 44 | //多说评论,若想不在首页显示评论框 那么:取消这一句注释 45 | //$('.ds-thread').removeClass('ds-thread'); 46 | } 47 | }); 48 | } 49 | ``` 50 | -------------------------------------------------------------------------------- /p/footer.md: -------------------------------------------------------------------------------- 1 | [Weibo](http://weibo.com/tjy273942569/) | [Zhihu](http://www.zhihu.com/people/jayinton) | [GitHub](https://github.com/Jayin) 2 | © 2012-2015 [Jayin Ton](http://jayin.github.io/blog/?about.md) Powered By [silentor](http://www.github.com/Jayin/silentor) -------------------------------------------------------------------------------- /p/home.md: -------------------------------------------------------------------------------- 1 | [silentor](https://github.com/Jayin/silentor), a friendly fork of [silent](https://github.com/fritx/silent) 2 | ======== 3 | >Be a silentor, focus on writting your words down. 4 | 5 | 6 | ### ==>[1分钟快速构建你的博客](./docs/getting-start/main.md) 7 | 8 | 特点 9 | ---- 10 | * 开箱即用(Fork 本项目立马可以使用) 11 | * markdown only ,让你专注文章本身 12 | * 友好的移动端支持 13 | * 灵活的样式扩展 14 | 15 | 教程目录 16 | --- 17 | 18 | - 适用人群 19 | - 目录结构 20 | - 使用指南 21 | - 开箱即用 22 | - 配置config.json 23 | - 创建gh-pages分支并 上传到Github 24 | - 设置图片 25 | - 文章的图片位置问题 26 | - 在本文中引用其他目录的文章 27 | - 404: 根目录下的404.md就是找不页面时显示的内容 28 | - footer.md: 全局的底部信息 29 | - 开发指南 30 | - 自定义样式 31 | - 更换语法高亮css 32 | - 网站标题 33 | - 网站分析 34 | - 大小写 35 | - 配置评论框 36 | - Disqus设置指南 37 | - 多说设置指南 38 | 39 | ----- 40 | 41 | 适用人群 42 | ------ 43 | 44 | * 会使用git, 推荐[廖雪峰Git教程](http://www.liaoxuefeng.com/wiki/0013739516305929606dd18361248578c67b8067c8c017b000/) 45 | * 会使用Markdown, [Markdown语法简介](markdown-useage.md) 46 | 47 | 目录结构 48 | -------- 49 | ``` 50 | ---silentor 51 | |---img //图片根目录 52 | |---p //文章(markdown)根目录 53 | |---home.md //页面主页 54 | |---sidebar.md //页面侧栏 55 | |---footer.md //页面底部 56 | |---vendor // 库目录 57 | |---404.md //404页 58 | |---config.json //配置 59 | |---default_config.json // 默认配置,用于参考 60 | |---index.html //博客入口 61 | 62 | ``` 63 | 64 | # 使用指南 65 | 66 | ### 开箱即用 67 | 68 | 1. Fork 本项目(可以忽略下面的第一、二步) 69 | 2. clone 本项目 70 | 71 | 72 | ### 第一步:配置根目录的config.json 73 | ```json 74 | { 75 | "app_name": "{输入你的项目名}" 76 | } 77 | 78 | ``` 79 | 80 | 以`silentor`为例,此处应填写silentor 81 | 82 | ### 第二部步:创建gh-pages分支并 上传到Github 83 | ```shell 84 | git init 85 | git checkout -b gh-pages 86 | git add --all 87 | git commit -m 'my website' 88 | git push origin gh-pages 89 | //然后输入你的github账号,密码 90 | ``` 91 | 92 | see [Demo](http://meizhuo.github.io/silentor/) 93 | 94 | ### 设置图片 95 | 我们约定在根目录下的`img`下放置所有图片文件 96 | 97 | 当然,你也可以在`config.json`配置: 98 | ```json 99 | { 100 | ..... 101 | "img_root" : "{you_img_root}" 102 | } 103 | ``` 104 | 105 | 若markdown需要用到图片: 106 | ```markdown 107 | ![图片说明](__IMG__/xxx.jpg) 108 | ``` 109 | 110 | **注意: `__IMG__`就是指代你配置的图片根目录** 111 | 112 | #### 文章的图片位置问题 113 | 114 | 默认是:图片居中,如果想图片居左: 115 | ```markdown 116 | ![图片说明|left](__IMG__/xxx.jpg) 117 | ``` 118 | 119 | 居右 120 | ```markdown 121 | ![图片说明|right](__IMG__/xxx.jpg) 122 | ``` 123 | 124 | ### 在本文中引用其他目录的文章 125 | 126 | 详情:参考这个[issue#1](https://github.com/Jayin/silentor/issues/1) 127 | 128 | 自v1.5.2新增了一个常量`__P__`来表示markdown文件的根目录,默认是`p`,同样地,你也可以在`config.json`配置: 129 | 130 | ```json 131 | "markdown_root":"p" 132 | ``` 133 | 134 | 例子: 135 | ```markdown 136 | 137 | //引用当前目录下的other.md 138 | [其他目录文章标题](other.md) //推荐 139 | [其他目录文章标题](./other.md) 140 | 141 | //引用上一级目录App目录下的other.md 142 | [其他目录文章标题](../App/other.md) 143 | 144 | PS:支持多次上级操作,你可以自由地使用相对路径 145 | [其他目录文章标题](../..//App/other.md) 146 | 147 | //引用任意目录下other.md 148 | [其他目录文章标题](__P__/path/to/file/other.md) //推荐 149 | 150 | ``` 151 | 152 | ### 404: 根目录下的404.md就是找不页面时显示的内容 153 | 154 | 若有需要,可以改写里面的内容 155 | 156 | ### footer.md: 全局的底部信息 157 | 158 | 我们知道有sidebar(侧栏),main page(主页),可是有时候我们需要一个网站底部一些关于信息 ,这个`footer.md`就是干这事情,建议在p/目录下建立footer.md 文件来添加底部信息 159 | 160 | 161 | # 开发指南 162 | 163 | ### 自定义样式 164 | 165 | silentor提供了简单的样式,如果你不满足,可以自己添加/修改。 166 | 167 | 注意: 并不推荐你直接修改核心部分的样式,而是推荐: 168 | 169 | 1. 在目录`vendor`新建一个文件夹`custom/css` 170 | 2. 在`vendor/custom/css`新建一个`my.css` 171 | 3. 在`index.html`中引入 172 | ```html 173 | 174 | ``` 175 | 176 | ### 更换语法高亮css 177 | 178 | 在[highlightjs.org](https://highlightjs.org/)中下载对应的css,然后替换`vendor/highlight/styles/main.css`的内容 179 | 180 | ### 网站标题 181 | 182 | 首先网站只有2部分,一个Sidebar,左侧的菜单栏,另外一个是右侧,主页栏 183 | 网站标题默认是右侧内容页的第一行标题 184 | 185 | 186 | ### 网站分析 187 | 188 | 你可以在`index.html`中嵌入你的google analytics、百度分析 189 | 190 | 191 | ### 大小写 192 | 193 | github pages、linux下都是大小写敏感,开发时约定都使用小写 194 | 195 | 196 | ### 配置评论框 197 | 198 | - [Disqus设置指南](./docs/use-disqus/index.md) 199 | - [多说设置指南](./docs/use-duoshuo/index.md) 200 | 201 | 202 | License 203 | === 204 | Copyright 2014 Jayin Ton 205 | Copyright 2014 Fritx 206 | 207 | Licensed under the Apache License, Version 2.0 (the "License"); 208 | you may not use this file except in compliance with the License. 209 | You may obtain a copy of the License at 210 | 211 | http://www.apache.org/licenses/LICENSE-2.0 212 | 213 | Unless required by applicable law or agreed to in writing, software 214 | distributed under the License is distributed on an "AS IS" BASIS, 215 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 216 | See the License for the specific language governing permissions and 217 | limitations under the License. 218 | -------------------------------------------------------------------------------- /p/profession.md: -------------------------------------------------------------------------------- 1 | 专业 2 | === 3 | 4 | ## 编写网络开发 5 | >建站组。在这里,我们有一支建站优秀队伍,擅长多种网络编程语言和网络开发技术。需要程序员的时候,我们在这里;需要技术人员的时候,我们在这里;当你需要我们的时候,我们亦在这里。 6 | 7 | ## 安卓软件开发 8 | > 安卓组。在这里,我们拥有一支安卓软件开发精英队伍,已深入了解多种软件内部程序,擅长多种软件编程语言,多次拿得大赛奖项。众所周知,安卓是目前两大主流手机软件系统之一。这也得到我们的重视。有软件创作的IDEA吗?想让我们为你量身定做一套属于自己的软件吗?欢迎咨询。 9 | 10 | ## 电子商务 11 | >电子商务(ELECTRONIC COMMERCE,简称EC),是一门新型新生行业,近年来,更是发展迅速。电子商务亦是一个不断发展的概念。它是利用计算机技术、网络技术和远程通信技术,实现电子化、数字化和网络化,商务化的整个商务过程。 12 | 13 | ## 美图美化 14 | >美工组。在这里,我们有一支美工杰出队伍,精通网站设计、平面设计、网店设计。还在为制作图标、宣传画、宣传单,设计图标,美化图片等等问题而困扰吗?有什么图片问题不清楚吗?可以找我们。 -------------------------------------------------------------------------------- /p/projects/ETips.md: -------------------------------------------------------------------------------- 1 | ETips 2 | ---- 3 | 4 | - see [Authors](../Authors/jayin.md) 5 | - see [other apps](index.md) 6 | 7 | 8 | ![logo](../../img/favicon.ico) 9 | 10 | [Go Back](./index.md) 11 | [Go Home](../home.md) 12 | [Go Author](../Authors/jayin.md) 13 | [Go Deep](../Authors/a/b/index.md) -------------------------------------------------------------------------------- /p/projects/index.md: -------------------------------------------------------------------------------- 1 | # Projects 2 | 3 | 4 | ## [ETips](./ETips.md) 5 | >五邑大学校园生活助手应用!对接学生子系统,一键导入课程表,轻松查成绩算绩点;对接邑大图书馆,查个人借阅信息,图书检索/收藏;校园资讯模块,校内信息动态掌握在手;对接校园服务,查空课室/电费,看邑大新闻超级方便;内置个人便签,记录生活点滴/学习笔记 6 | 7 | 8 | ## 邑大购购网 9 | >给你温馨小家的感觉!主打校内交易,方便快捷,省时省力,妈妈再也不用担心咱去拿快递的繁琐啦!这是一个属于我们五大学生自己的商城,在这里,你总能淘到自己钟意的!你可以以物换物,你可以出售闲置、3秒攒钱,你可以淘到实惠货~你更可以自己当店主,掌握一门生意经! 10 | 11 | ## 五邑高数网 12 | >邑大高数网是罗老师提出,学院支持,为方便广大师生教学工作而建设的一个实用网站。还在为你的高数有疑难而无处询问而担忧吗?邑大高数网替你解围!在这里,你可以了解新闻时事、与老师同学交流,更有在线测试、视频教学、答疑频道等供你学习。我们师资队伍强大,只要你用心,付出一点时间精力,在这里将收获多多。PASS是小事,高分才是我们共同的目标。进入邑大高数网,让我们共同进步吧! 13 | 14 | ## 国际贸易实务 15 | >这是一门主要研究国际商品交换具体过程的学科,也是一门具有涉外活动特点、实践性很强的综合性应用科学,凡国际经济与贸易类专业都把本课程作为一门必修的专业课程。课程的目的和任务是让学生了解国际货物贸易交易的一般程序、做法,掌握国际贸易交易磋商、合同订立和履行的基本知识和技能;熟悉通行的与进出口有关的规则与惯例. -------------------------------------------------------------------------------- /p/sidebar.md: -------------------------------------------------------------------------------- 1 | ![Meizhuo logo](../img/favicon.ico) 2 | 3 | # [silentor](.) 4 | 5 | > Be a silentor, focus on writting your words down 6 | 7 | - [项目](projects/index.md) 8 | - [文档](docs/readme.md) 9 | - [专业](profession.md) 10 | - [关于](about.md) 11 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "silentor", 3 | "version": "1.7.0", 4 | "description": "Markdown base, convention over configuration and minimalism blog", 5 | "main": "gulpfile.js", 6 | "dependencies": {}, 7 | "devDependencies": { 8 | "gulp": "^3.9.0", 9 | "gulp-concat": "^2.5.2", 10 | "gulp-header": "^1.8.7", 11 | "gulp-if": "^2.0.1", 12 | "gulp-minify-css": "^1.1.6", 13 | "gulp-rename": "^1.2.2", 14 | "gulp-uglify": "^1.2.0", 15 | "serve": "^1.4.0" 16 | }, 17 | "scripts": { 18 | "test": "echo \"Error: no test specified\" && exit 1" 19 | }, 20 | "repository": { 21 | "type": "git", 22 | "url": "https://github.com/Jayin/silentor.git" 23 | }, 24 | "author": "Jayin Ton", 25 | "license": "MIT", 26 | "bugs": { 27 | "url": "https://github.com/Jayin/silentor/issues" 28 | }, 29 | "homepage": "https://github.com/Jayin/silentor" 30 | } 31 | -------------------------------------------------------------------------------- /src/blog.css: -------------------------------------------------------------------------------- 1 | html, 2 | body { 3 | margin: 0; 4 | padding: 0; 5 | line-height: 1.5; 6 | font-size: 106%; 7 | font-family: "Microsoft YaHei", sans-serif; 8 | background-color: #fff; 9 | } 10 | 11 | img { 12 | max-width: 100%; 13 | height: auto; 14 | } 15 | /* learnt from github */ 16 | 17 | pre, 18 | code { 19 | font-family: Consolas, "Liberation Mono", Courier, monospace, sans-serif; 20 | background-color: #f8f8f8; 21 | border: 1px solid #ddd; 22 | border-radius: 3px; 23 | } 24 | 25 | pre { 26 | padding: 6px 10px; 27 | overflow: auto; 28 | font-size: 60%; 29 | line-height: 160%; 30 | } 31 | 32 | code { 33 | padding: 2px 5px; 34 | margin: 0 2px; 35 | } 36 | 37 | pre > code { 38 | border: none; 39 | background-color: inherit; 40 | padding: 0; 41 | margin: 0; 42 | } 43 | 44 | table { 45 | font-size: 80%; 46 | width: 100%; 47 | overflow: auto; 48 | display: block; 49 | margin: 15px 0; 50 | border-collapse: collapse; 51 | border-spacing: 0; 52 | } 53 | 54 | table th, 55 | table td { 56 | border: 1px solid #ddd; 57 | padding: 6px 13px; 58 | min-width: 4em; 59 | } 60 | 61 | table tr { 62 | border-top: 1px solid #ccc; 63 | background-color: #fff; 64 | } 65 | 66 | table tr:nth-child(2n) { 67 | background-color: #f8f8f8; 68 | } 69 | 70 | blockquote { 71 | margin: 15px 0; 72 | border-left: 4px solid #DDD; 73 | padding: 0 15px; 74 | color: #777; 75 | } 76 | 77 | .sidebar { 78 | color: #fff; 79 | background-color: #2a2a2a; 80 | box-shadow: 0 4px 5px 0 rgba(0,0,0,.14),0 1px 10px 0 rgba(0,0,0,.12),0 2px 4px -1px rgba(0,0,0,.2); 81 | } 82 | 83 | .sidebar-inner { 84 | height: 100%; 85 | padding: 2% 5%; 86 | } 87 | 88 | .sidebar-inner a { 89 | text-decoration: none; 90 | } 91 | 92 | .sidebar-inner li { 93 | padding-top: 12px; 94 | } 95 | 96 | .sidebar a { 97 | color: #fff; 98 | } 99 | 100 | .sidebar h1 a { 101 | text-decoration: none; 102 | } 103 | 104 | .sidebar blockquote { 105 | color: #FFF; 106 | } 107 | 108 | .sidebar img { 109 | margin-left: 10% 110 | } 111 | 112 | .main-inner { 113 | padding: 2% 5% 3%; 114 | } 115 | 116 | .main-page { 117 | padding-bottom: 3%; 118 | min-height: 620px; 119 | } 120 | 121 | .img-holder { 122 | position: absolute; 123 | top: -9999px; 124 | left: -9999px; 125 | } 126 | 127 | #main-page-footer { 128 | text-align: center; 129 | margin-top: 40px; 130 | padding-top: 20px; 131 | padding-bottom: 4px; 132 | border-top: 1px solid #eee; 133 | color: #777; 134 | font-size: 14px; 135 | min-height: 0px; 136 | } 137 | 138 | .img-left { 139 | display: block; 140 | margin: 15px auto 15px 0px; 141 | } 142 | 143 | .img-center { 144 | display: block; 145 | margin: 15px auto 15px auto; 146 | } 147 | 148 | .img-right { 149 | display: block; 150 | margin: 15px 0px 15px auto; 151 | } 152 | 153 | .avatar { 154 | border-radius: 50%; 155 | padding: 3px; 156 | width: 50%; 157 | } 158 | 159 | @media (max-width: 480px) { 160 | .sidebar-inner li { 161 | display: inline-block; 162 | margin-left: 1em; 163 | } 164 | } 165 | 166 | @media (max-width: 640px) { 167 | pre { 168 | font-size: 80%; 169 | } 170 | table { 171 | font-size: 100%; 172 | } 173 | .sidebar-inner { 174 | padding: 2% 10%; 175 | height: 50%; 176 | } 177 | .main-inner { 178 | padding-left: 5%; 179 | padding-right: 5%; 180 | } 181 | .sidebar img { 182 | display: none 183 | } 184 | } 185 | 186 | @media (min-width: 990px) { 187 | .sidebar { 188 | position: fixed; 189 | top: 0; 190 | bottom: 0; 191 | left: 0; 192 | width: 20%; 193 | } 194 | .sidebar-inner { 195 | padding: 15%; 196 | } 197 | .main { 198 | margin-left: 25%; 199 | width: 75%; 200 | } 201 | } -------------------------------------------------------------------------------- /src/blog.js: -------------------------------------------------------------------------------- 1 | /** 2 | * blog.js - the core of silentor 3 | * author: Jayin Ton 4 | * version: 1.5.4 5 | * License:Apache 2.0 6 | */ 7 | (function($) { 8 | 'use strict'; 9 | var app_name = ''; 10 | var blog_base = ''; 11 | var img_root = 'img'; 12 | var markdown_root = 'p'; 13 | //当前请求的markdown文件 14 | var cur_md_path = ''; 15 | /*是否是http:// 如果是,那么这是资源文件,如果否,说明这是要处理的a标签*/ 16 | function isAbsolute(url) { 17 | return url.indexOf('//') !== -1; 18 | } 19 | /*获得相对目录*/ 20 | function getPageBase(url) { 21 | return url.slice(0, url.lastIndexOf('/') + 1); 22 | } 23 | /*判断加载的路径是否是markdown文件*/ 24 | function isMarkdownFile(url) { 25 | return url.toLowerCase().indexOf('.md') !== -1 || url.toLowerCase().indexOf('.markdown') !== -1; 26 | } 27 | //获得markdown的文件名,用作标题 28 | function getMarkdownTitle(file_path) { 29 | if (!isMarkdownFile(file_path)) { 30 | return app_name; 31 | } else { 32 | var real_file_name = file_path; 33 | if (hasFolder(file_path)) { 34 | real_file_name = file_path.slice(file_path.lastIndexOf('/') + 1, file_path.length); 35 | } 36 | return real_file_name.split('.')[0]; 37 | } 38 | } 39 | //Event Hook 40 | function hook(hook_name, data){ 41 | $(window).trigger(hook_name, data); 42 | } 43 | // resolve 路径 44 | function resolvePath(from, to) { 45 | if (from[from.length - 1] == '/') { 46 | from = from.substring(0, from.length - 1); 47 | } 48 | var froms = from.split('/'); 49 | var tos = to.split('/'); 50 | if (tos[0] == '.') { 51 | tos.splice(0, 1); 52 | } else if (tos[0] == '..') { 53 | froms.splice(froms.length - 1, 1); 54 | tos.splice(0, 1); 55 | } else if (tos[0].indexOf('http') != -1 || tos[0].indexOf('https') != -1) { 56 | return to; 57 | } else { 58 | return froms.join('/') + "/" + tos.join('/'); 59 | } 60 | return resolvePath(froms.join('/'), tos.join('/')); 61 | } 62 | /** 63 | * @param selector 选择器 64 | * @param file_path 文件路径 65 | * @param isSidebar 是否是左边导航栏 66 | * @param baseUrl 基准url 67 | */ 68 | function load(selector, file_path, isSidebar, baseUrl) { 69 | var baseUrl = baseUrl || blog_base; 70 | var isSidebar = isSidebar || false; 71 | 72 | var p_url = baseUrl + file_path; 73 | 74 | $.ajax({ 75 | type: 'GET', 76 | url: p_url, 77 | success: function(data){ 78 | marked.setOptions({ 79 | highlight: function(code) { 80 | return hljs.highlightAuto(code).value; 81 | } 82 | }); 83 | var _selector = $(selector); 84 | _selector.html(marked(data)); 85 | 86 | //处理所有href 87 | _selector.find('[href]').each(function() { 88 | var $element = $(this); 89 | var url = $element.attr('href'); 90 | 91 | if (isAbsolute(url)) { 92 | $element.attr('target', '_blank'); 93 | } 94 | 95 | // sidebar 96 | if (isSidebar && isMarkdownFile(url)) { 97 | $element.attr('href', '?p=' + url); 98 | 99 | } 100 | 101 | //main page 102 | if (!isAbsolute(url) && !isSidebar && isMarkdownFile(url)) { 103 | var new_url = getPageBase(cur_md_path); 104 | //上一级目录 105 | if (url.indexOf('../') == 0) { 106 | //处理相对路径 107 | new_url = resolvePath(getPageBase(cur_md_path), url); 108 | } else if (url.indexOf('__P__') == 0) { 109 | //文章根目录`p/`下 110 | new_url = url.replace('__P__/', ''); 111 | } else { 112 | //当前目录 113 | new_url = new_url + url.replace('./', ''); 114 | } 115 | $element.attr('href', '?p=' + new_url); 116 | } 117 | }); 118 | //main-page 119 | if (!isSidebar) { 120 | //change title 121 | var mainTitle = $('#main-page').find('h1, h2, h3, h4, h5, h6').first().text(); 122 | $('title').text(mainTitle); 123 | 124 | //图片位置 125 | $.each(_selector.find('img'), function(index, item) { 126 | var alt = $(item).attr('alt') || ''; 127 | if (alt.indexOf('|left') != -1) { 128 | $(item).addClass('img-left'); 129 | } else if (alt.indexOf('|right') != -1) { 130 | $(item).addClass('img-right'); 131 | } else { 132 | $(item).addClass('img-center'); 133 | } 134 | }); 135 | } 136 | //sidebar 137 | if (isSidebar) { 138 | //round avatar 139 | _selector.find('img').first().addClass('avatar'); 140 | //add animation in item 141 | $.each(_selector.find('li'), function(index, item) { 142 | $(item).addClass('sidebar-item'); 143 | }); 144 | } 145 | //处理图片链接 146 | $.each(_selector.find('img'), function(index, item) { 147 | var $e = $(item); 148 | if ($e.attr('src').indexOf('__IMG__') == 0) { 149 | $e.attr('src', $e.attr('src').replace('__IMG__', img_root)); 150 | } else { 151 | //适配相对路径 152 | var path = resolvePath(getPageBase(p_url), $e.attr('src')); 153 | $e.attr('src', path); 154 | } 155 | }); 156 | 157 | if (selector == '#sidebar-page'){ 158 | hook('loaded-sidebar-page'); 159 | }else if (selector == '#main-page'){ 160 | hook('loaded-main-page'); 161 | }else if (selector == '#main-page-footer'){ 162 | hook('loaded-main-page-footer') 163 | } 164 | }, 165 | error:function(err) { 166 | if (err.status === 404) { 167 | if (file_path === 'footer.md') { 168 | console.log('没有找到footer.md! 建议在p/目录下建立footer.md 文件来添加底部信息!'); 169 | return; 170 | } 171 | load('#main-page', '404.md', false, '/' + app_name + '/'); 172 | hook('page-not-found', { 173 | selector: selector, 174 | path: file_path 175 | }) 176 | } 177 | } 178 | }) 179 | } 180 | 181 | function read_config(callback) { 182 | $.ajax({ 183 | method: 'GET', 184 | url: 'config.json', 185 | success: function(data) { 186 | app_name = data.app_name || app_name; 187 | img_root = data.img_root || img_root; 188 | var description = data.description || ""; 189 | 190 | markdown_root = data.markdown_root || markdown_root; 191 | blog_base = '/' + app_name + '/' + markdown_root + '/'; 192 | 193 | $('meta[name=description]').first().attr('content', description); 194 | callback(); 195 | }, 196 | error: function(err) { 197 | alert('读取配置有误'); 198 | } 199 | }) 200 | } 201 | 202 | 203 | function urlparser(url) { 204 | var a = document.createElement('a'); 205 | a.href = url; 206 | 207 | var search = function(search) { 208 | if(!search) return {}; 209 | 210 | var ret = {}; 211 | search = search.slice(1).split('&'); 212 | for(var i = 0, arr; i < search.length; i++) { 213 | arr = search[i].split('='); 214 | var key = arr[0], value = arr[1]; 215 | if(/\[\]$/.test(key)) { 216 | ret[key] = ret[key] || []; 217 | ret[key].push(value); 218 | } else { 219 | ret[key] = value; 220 | } 221 | } 222 | return ret; 223 | }; 224 | 225 | return { 226 | protocol: a.protocol, 227 | host: a.host, 228 | hostname: a.hostname, 229 | pathname: a.pathname, 230 | search: search(a.search), 231 | hash: a.hash 232 | } 233 | }; 234 | 235 | function main() { 236 | read_config(function() { 237 | //加载侧边菜单栏 238 | hook('before-load-sidebar-page'); 239 | load('#sidebar-page', 'sidebar.md', true); 240 | //加载内容页页脚 241 | hook('before-load-main-page-footer'); 242 | load('#main-page-footer', 'footer.md'); 243 | //加载主内容页 244 | var urlobject = urlparser(window.location.href); 245 | cur_md_path = urlobject.search['p'] || ''; 246 | //部分服务器会在后面追加'/',例如:?a/b/cxx.md/ 247 | if (cur_md_path.charAt(cur_md_path.length - 1) === '/') { 248 | cur_md_path = cur_md_path.slice(0, location.search.length - 2); 249 | } 250 | if (cur_md_path === '' || !isMarkdownFile(cur_md_path)) { 251 | hook('before-load-main-page'); 252 | load('#main-page', 'home.md'); 253 | } else { 254 | hook('before-load-main-page'); 255 | load('#main-page', cur_md_path); 256 | } 257 | }); 258 | } 259 | 260 | main(); 261 | 262 | })(Zepto); 263 | -------------------------------------------------------------------------------- /src/extension/disqus-visibility/README.md: -------------------------------------------------------------------------------- 1 | dispus-visibility 2 | ================= 3 | > 控制评论框在什么时候显示 4 | 5 | 目前: 评论框不会在下列情况下不显示 6 | 7 | 1. 在形如`*index.md` 或 `*index.markdown` (不区分大小写),为索引页没有必要显示\ 8 | 2. 匹配白名单 9 | 10 | 11 | ### 使用 12 | 13 | 14 | ``` 15 | 16 | 17 | 18 | 19 | 20 | ``` 21 | 22 | ### 设置白名单 23 | 24 | 白名单下均不会显示评论框,默认: 25 | 26 | 支持正则表达式 27 | 28 | ```javascript 29 | var white_list = [ //默认大小写不敏感,也就是HOME.md也是白名单内 30 | '', //首页 31 | 'home.md', 32 | 'about.md', 33 | 'README.md' 34 | ] 35 | ``` 36 | 37 | 然后 38 | 39 | ```bash 40 | cd path/to/{you project} 41 | make 42 | ``` 43 | -------------------------------------------------------------------------------- /src/extension/disqus-visibility/main.js: -------------------------------------------------------------------------------- 1 | ;(function($) { 2 | 'use strict'; 3 | //白名单 ,在名单下的均不会显示评论 4 | var white_list = [ 5 | '', //首页 6 | 'home.md', 7 | 'about.md', 8 | 'README.md' 9 | ] 10 | 11 | var isIndexPage = function(){ 12 | var search = window.location.search; 13 | //判断index page的规则 14 | //含有index.md or index.markdown的均认为是index page 15 | if (/index\./gi.test(search) && (search.endsWith('md') || search.endsWith('markdown'))){ 16 | return true; 17 | } 18 | return false; 19 | }; 20 | 21 | var isInWhiteList = function(){ 22 | var search = window.location.search; 23 | for (var index in white_list){ 24 | // new RegExp('about.md').test(window.location.search) 25 | if ((white_list[index] != '' && new RegExp(white_list[index], 'ig').test(search)) 26 | || search == white_list[index]){ 27 | return true; 28 | } 29 | } 30 | return false; 31 | } 32 | 33 | $(window).on('loaded-sidebar-page', function() { 34 | // console.log('loaded-sidebar-page') 35 | }); 36 | $(window).on('loaded-main-page', function() { 37 | if (isIndexPage() || isInWhiteList()){ 38 | $('#disqus_thread').css('display','none'); 39 | }else{ 40 | $('#disqus_thread').css('display','block'); 41 | } 42 | }); 43 | $(window).on('loaded-main-page-footer', function() { 44 | // console.log('loaded-main-page-footer') 45 | }); 46 | 47 | $(window).on('page-not-found', function(evt, data){ 48 | // console.log('page-not-found') 49 | }); 50 | 51 | $(window).on('before-load-sidebar-page', function(evt, data){ 52 | // console.log('before-load-sidebar-page') 53 | }); 54 | $(window).on('before-load-main-page', function(evt, data){ 55 | // console.log('before-load-main-page') 56 | }); 57 | $(window).on('before-load-main-page-footer', function(evt, data){ 58 | // console.log('before-load-main-page-footer') 59 | }); 60 | })(Zepto); 61 | -------------------------------------------------------------------------------- /src/extension/load-progress/Makefile: -------------------------------------------------------------------------------- 1 | main: 2 | gulp 3 | 4 | dev: 5 | DEV=true gulp 6 | -------------------------------------------------------------------------------- /src/extension/load-progress/README.md: -------------------------------------------------------------------------------- 1 | load-progress 2 | ============= 3 | >bring loading state to silentor 4 | 5 | ![gif](gif2.gif) 6 | 7 | ### 使用 8 | 9 | * 加入对应的js/css 10 | 11 | ```html 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | ``` 22 | 23 | ### 自定义 24 | 25 | 自定义颜色,进度条宽度等,修改`extensions/load-progress/src/custom.css` 26 | 27 | 然后 28 | ``` 29 | cd path/to/silentor/src/extensions/load-progress 30 | make 31 | ``` 32 | -------------------------------------------------------------------------------- /src/extension/load-progress/dist/main.css: -------------------------------------------------------------------------------- 1 | #nprogress{pointer-events:none}#nprogress .bar{position:fixed;z-index:1031;top:0;left:0;width:100%}#nprogress .peg{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);-ms-transform:rotate(3deg) translate(0,-4px);transform:rotate(3deg) translate(0,-4px)}#nprogress .spinner{display:block;position:fixed;z-index:1031;top:15px;right:15px}.nprogress-custom-parent{overflow:hidden;position:relative}.nprogress-custom-parent #nprogress .bar,.nprogress-custom-parent #nprogress .spinner{position:absolute}@-webkit-keyframes nprogress-spinner{0%{-webkit-transform:rotate(0)}100%{-webkit-transform:rotate(360deg)}}@keyframes nprogress-spinner{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}#nprogress .bar{background:#29d;height:3px}#nprogress .spinner-icon{width:18px;height:18px;box-sizing:border-box;border:2px solid transparent;border-top-color:#29d;border-left-color:#29d;border-radius:50%;-webkit-animation:nprogress-spinner .4s linear infinite;animation:nprogress-spinner .4s linear infinite} -------------------------------------------------------------------------------- /src/extension/load-progress/dist/main.js: -------------------------------------------------------------------------------- 1 | !function(n,e){"function"==typeof define&&define.amd?define(e):"object"==typeof exports?module.exports=e():n.NProgress=e()}(this,function(){function n(n,e,t){return e>n?e:n>t?t:n}function e(n){return 100*(-1+n)}function t(n,t,r){var i;return i="translate3d"===c.positionUsing?{transform:"translate3d("+e(n)+"%,0,0)"}:"translate"===c.positionUsing?{transform:"translate("+e(n)+"%,0)"}:{"margin-left":e(n)+"%"},i.transition="all "+t+"ms "+r,i}function r(n,e){var t="string"==typeof n?n:s(n);return t.indexOf(" "+e+" ")>=0}function i(n,e){var t=s(n),i=t+e;r(t,e)||(n.className=i.substring(1))}function o(n,e){var t,i=s(n);r(n,e)&&(t=i.replace(" "+e+" "," "),n.className=t.substring(1,t.length-1))}function s(n){return(" "+(n.className||"")+" ").replace(/\s+/gi," ")}function a(n){n&&n.parentNode&&n.parentNode.removeChild(n)}var u={};u.version="0.2.0";var c=u.settings={minimum:.08,easing:"ease",positionUsing:"",speed:200,trickle:!0,trickleRate:.02,trickleSpeed:800,showSpinner:!0,barSelector:'[role="bar"]',spinnerSelector:'[role="spinner"]',parent:"body",template:'
'};u.configure=function(n){var e,t;for(e in n)t=n[e],void 0!==t&&n.hasOwnProperty(e)&&(c[e]=t);return this},u.status=null,u.set=function(e){var r=u.isStarted();e=n(e,c.minimum,1),u.status=1===e?null:e;var i=u.render(!r),o=i.querySelector(c.barSelector),s=c.speed,a=c.easing;return i.offsetWidth,l(function(n){""===c.positionUsing&&(c.positionUsing=u.getPositioningCSS()),f(o,t(e,s,a)),1===e?(f(i,{transition:"none",opacity:1}),i.offsetWidth,setTimeout(function(){f(i,{transition:"all "+s+"ms linear",opacity:0}),setTimeout(function(){u.remove(),n()},s)},s)):setTimeout(n,s)}),this},u.isStarted=function(){return"number"==typeof u.status},u.start=function(){u.status||u.set(0);var n=function(){setTimeout(function(){u.status&&(u.trickle(),n())},c.trickleSpeed)};return c.trickle&&n(),this},u.done=function(n){return n||u.status?u.inc(.3+.5*Math.random()).set(1):this},u.inc=function(e){var t=u.status;return t?("number"!=typeof e&&(e=(1-t)*n(Math.random()*t,.1,.95)),t=n(t+e,0,.994),u.set(t)):u.start()},u.trickle=function(){return u.inc(Math.random()*c.trickleRate)},function(){var n=0,e=0;u.promise=function(t){return t&&"resolved"!==t.state()?(0===e&&u.start(),n++,e++,t.always(function(){e--,0===e?(n=0,u.done()):u.set((n-e)/n)}),this):this}}(),u.render=function(n){if(u.isRendered())return document.getElementById("nprogress");i(document.documentElement,"nprogress-busy");var t=document.createElement("div");t.id="nprogress",t.innerHTML=c.template;var r,o=t.querySelector(c.barSelector),s=n?"-100":e(u.status||0),l=document.querySelector(c.parent);return f(o,{transition:"all 0 linear",transform:"translate3d("+s+"%,0,0)"}),c.showSpinner||(r=t.querySelector(c.spinnerSelector),r&&a(r)),l!=document.body&&i(l,"nprogress-custom-parent"),l.appendChild(t),t},u.remove=function(){o(document.documentElement,"nprogress-busy"),o(document.querySelector(c.parent),"nprogress-custom-parent");var n=document.getElementById("nprogress");n&&a(n)},u.isRendered=function(){return!!document.getElementById("nprogress")},u.getPositioningCSS=function(){var n=document.body.style,e="WebkitTransform"in n?"Webkit":"MozTransform"in n?"Moz":"msTransform"in n?"ms":"OTransform"in n?"O":"";return e+"Perspective"in n?"translate3d":e+"Transform"in n?"translate":"margin"};var l=function(){function n(){var t=e.shift();t&&t(n)}var e=[];return function(t){e.push(t),1==e.length&&n()}}(),f=function(){function n(n){return n.replace(/^-ms-/,"ms-").replace(/-([\da-z])/gi,function(n,e){return e.toUpperCase()})}function e(n){var e=document.body.style;if(n in e)return n;for(var t,r=i.length,o=n.charAt(0).toUpperCase()+n.slice(1);r--;)if(t=i[r]+o,t in e)return t;return n}function t(t){return t=n(t),o[t]||(o[t]=e(t))}function r(n,e,r){e=t(e),n.style[e]=r}var i=["Webkit","O","Moz","ms"],o={};return function(n,e){var t,i,o=arguments;if(2==o.length)for(t in e)i=e[t],void 0!==i&&e.hasOwnProperty(t)&&r(n,t,i);else r(n,o[1],o[2])}}();return u}),function(n,e){"use strict";n(window).on("before-load-main-page",function(n,t){e.start()}),n(window).on("loaded-main-page",function(){e.done()})}(Zepto,NProgress); -------------------------------------------------------------------------------- /src/extension/load-progress/gif2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Jayin/silentor/9398f66734daff52e5e372747e4207984c6d8808/src/extension/load-progress/gif2.gif -------------------------------------------------------------------------------- /src/extension/load-progress/gulpfile.js: -------------------------------------------------------------------------------- 1 | var gulp = require('gulp'); 2 | var minifyCss = require('gulp-minify-css'); 3 | var uglify = require('gulp-uglify'); 4 | var concat = require('gulp-concat'); 5 | var rename = require('gulp-rename') 6 | 7 | var DEST = './dist/'; 8 | var IS_DEV = process.env.DEV || false; 9 | 10 | // gulp.task('minify-css', function() { 11 | // if (IS_DEV) { 12 | // gulp.src('src/nprogress.css') 13 | // .pipe(rename('main.css')) 14 | // .pipe(gulp.dest(DEST)); 15 | // } else { 16 | // gulp.src('src/nprogress.css') 17 | // .pipe(minifyCss()) 18 | // .pipe(rename('main.css')) 19 | // .pipe(gulp.dest(DEST)); 20 | // } 21 | // }); 22 | 23 | 24 | gulp.task('concat', function() { 25 | if (IS_DEV) { 26 | gulp.src(['src/nprogress.js', 'src/index.js']) 27 | .pipe(concat('main.js')) 28 | .pipe(gulp.dest(DEST)); 29 | 30 | gulp.src(['src/nprogress.css', 'src/custom.css']) 31 | .pipe(concat('main.css')) 32 | .pipe(gulp.dest(DEST)) 33 | } else { 34 | gulp.src(['src/nprogress.js', 'src/index.js']) 35 | .pipe(concat('main.js')) 36 | .pipe(uglify()) 37 | .pipe(gulp.dest(DEST)); 38 | 39 | gulp.src(['src/nprogress.css', 'src/custom.css']) 40 | .pipe(concat('main.css')) 41 | .pipe(minifyCss()) 42 | .pipe(gulp.dest(DEST)) 43 | } 44 | 45 | }); 46 | 47 | 48 | gulp.task('build', ['concat']); 49 | 50 | gulp.task('watch', ['build'], function() { 51 | gulp.watch('./src/**/*', ['build']) 52 | }); 53 | 54 | gulp.task('default', ['watch']) -------------------------------------------------------------------------------- /src/extension/load-progress/src/custom.css: -------------------------------------------------------------------------------- 1 | /*进度条*/ 2 | #nprogress .bar { 3 | background: #29d; 4 | height: 3px; 5 | } 6 | /*旋转进度条*/ 7 | #nprogress .spinner-icon { 8 | width: 18px; 9 | height: 18px; 10 | box-sizing: border-box; 11 | 12 | border: solid 2px transparent; 13 | border-top-color: #29d; 14 | border-left-color: #29d; 15 | border-radius: 50%; 16 | 17 | -webkit-animation: nprogress-spinner 400ms linear infinite; 18 | animation: nprogress-spinner 400ms linear infinite; 19 | } -------------------------------------------------------------------------------- /src/extension/load-progress/src/index.js: -------------------------------------------------------------------------------- 1 | ;(function($, NProgress) { 2 | 'use strict'; 3 | 4 | $(window).on('before-load-main-page', function(evt, data) { 5 | NProgress.start(); 6 | }); 7 | 8 | $(window).on('loaded-main-page', function() { 9 | NProgress.done(); 10 | }); 11 | 12 | 13 | })(Zepto, NProgress); -------------------------------------------------------------------------------- /src/extension/load-progress/src/nprogress.css: -------------------------------------------------------------------------------- 1 | /* Make clicks pass-through */ 2 | #nprogress { 3 | pointer-events: none; 4 | } 5 | 6 | #nprogress .bar { 7 | background: #29d; 8 | 9 | position: fixed; 10 | z-index: 1031; 11 | top: 0; 12 | left: 0; 13 | 14 | width: 100%; 15 | height: 2px; 16 | } 17 | 18 | /* Fancy blur effect */ 19 | #nprogress .peg { 20 | display: block; 21 | position: absolute; 22 | right: 0px; 23 | width: 100px; 24 | height: 100%; 25 | box-shadow: 0 0 10px #29d, 0 0 5px #29d; 26 | opacity: 1.0; 27 | 28 | -webkit-transform: rotate(3deg) translate(0px, -4px); 29 | -ms-transform: rotate(3deg) translate(0px, -4px); 30 | transform: rotate(3deg) translate(0px, -4px); 31 | } 32 | 33 | /* Remove these to get rid of the spinner */ 34 | #nprogress .spinner { 35 | display: block; 36 | position: fixed; 37 | z-index: 1031; 38 | top: 15px; 39 | right: 15px; 40 | } 41 | 42 | #nprogress .spinner-icon { 43 | width: 18px; 44 | height: 18px; 45 | box-sizing: border-box; 46 | 47 | border: solid 2px transparent; 48 | border-top-color: #29d; 49 | border-left-color: #29d; 50 | border-radius: 50%; 51 | 52 | -webkit-animation: nprogress-spinner 400ms linear infinite; 53 | animation: nprogress-spinner 400ms linear infinite; 54 | } 55 | 56 | .nprogress-custom-parent { 57 | overflow: hidden; 58 | position: relative; 59 | } 60 | 61 | .nprogress-custom-parent #nprogress .spinner, 62 | .nprogress-custom-parent #nprogress .bar { 63 | position: absolute; 64 | } 65 | 66 | @-webkit-keyframes nprogress-spinner { 67 | 0% { -webkit-transform: rotate(0deg); } 68 | 100% { -webkit-transform: rotate(360deg); } 69 | } 70 | @keyframes nprogress-spinner { 71 | 0% { transform: rotate(0deg); } 72 | 100% { transform: rotate(360deg); } 73 | } -------------------------------------------------------------------------------- /src/extension/load-progress/src/nprogress.js: -------------------------------------------------------------------------------- 1 | /* NProgress, (c) 2013, 2014 Rico Sta. Cruz - http://ricostacruz.com/nprogress 2 | * @license MIT */ 3 | 4 | ;(function(root, factory) { 5 | 6 | if (typeof define === 'function' && define.amd) { 7 | define(factory); 8 | } else if (typeof exports === 'object') { 9 | module.exports = factory(); 10 | } else { 11 | root.NProgress = factory(); 12 | } 13 | 14 | })(this, function() { 15 | var NProgress = {}; 16 | 17 | NProgress.version = '0.2.0'; 18 | 19 | var Settings = NProgress.settings = { 20 | minimum: 0.08, 21 | easing: 'ease', 22 | positionUsing: '', 23 | speed: 200, 24 | trickle: true, 25 | trickleRate: 0.02, 26 | trickleSpeed: 800, 27 | showSpinner: true, 28 | barSelector: '[role="bar"]', 29 | spinnerSelector: '[role="spinner"]', 30 | parent: 'body', 31 | template: '
' 32 | }; 33 | 34 | /** 35 | * Updates configuration. 36 | * 37 | * NProgress.configure({ 38 | * minimum: 0.1 39 | * }); 40 | */ 41 | NProgress.configure = function(options) { 42 | var key, value; 43 | for (key in options) { 44 | value = options[key]; 45 | if (value !== undefined && options.hasOwnProperty(key)) Settings[key] = value; 46 | } 47 | 48 | return this; 49 | }; 50 | 51 | /** 52 | * Last number. 53 | */ 54 | 55 | NProgress.status = null; 56 | 57 | /** 58 | * Sets the progress bar status, where `n` is a number from `0.0` to `1.0`. 59 | * 60 | * NProgress.set(0.4); 61 | * NProgress.set(1.0); 62 | */ 63 | 64 | NProgress.set = function(n) { 65 | var started = NProgress.isStarted(); 66 | 67 | n = clamp(n, Settings.minimum, 1); 68 | NProgress.status = (n === 1 ? null : n); 69 | 70 | var progress = NProgress.render(!started), 71 | bar = progress.querySelector(Settings.barSelector), 72 | speed = Settings.speed, 73 | ease = Settings.easing; 74 | 75 | progress.offsetWidth; /* Repaint */ 76 | 77 | queue(function(next) { 78 | // Set positionUsing if it hasn't already been set 79 | if (Settings.positionUsing === '') Settings.positionUsing = NProgress.getPositioningCSS(); 80 | 81 | // Add transition 82 | css(bar, barPositionCSS(n, speed, ease)); 83 | 84 | if (n === 1) { 85 | // Fade out 86 | css(progress, { 87 | transition: 'none', 88 | opacity: 1 89 | }); 90 | progress.offsetWidth; /* Repaint */ 91 | 92 | setTimeout(function() { 93 | css(progress, { 94 | transition: 'all ' + speed + 'ms linear', 95 | opacity: 0 96 | }); 97 | setTimeout(function() { 98 | NProgress.remove(); 99 | next(); 100 | }, speed); 101 | }, speed); 102 | } else { 103 | setTimeout(next, speed); 104 | } 105 | }); 106 | 107 | return this; 108 | }; 109 | 110 | NProgress.isStarted = function() { 111 | return typeof NProgress.status === 'number'; 112 | }; 113 | 114 | /** 115 | * Shows the progress bar. 116 | * This is the same as setting the status to 0%, except that it doesn't go backwards. 117 | * 118 | * NProgress.start(); 119 | * 120 | */ 121 | NProgress.start = function() { 122 | if (!NProgress.status) NProgress.set(0); 123 | 124 | var work = function() { 125 | setTimeout(function() { 126 | if (!NProgress.status) return; 127 | NProgress.trickle(); 128 | work(); 129 | }, Settings.trickleSpeed); 130 | }; 131 | 132 | if (Settings.trickle) work(); 133 | 134 | return this; 135 | }; 136 | 137 | /** 138 | * Hides the progress bar. 139 | * This is the *sort of* the same as setting the status to 100%, with the 140 | * difference being `done()` makes some placebo effect of some realistic motion. 141 | * 142 | * NProgress.done(); 143 | * 144 | * If `true` is passed, it will show the progress bar even if its hidden. 145 | * 146 | * NProgress.done(true); 147 | */ 148 | 149 | NProgress.done = function(force) { 150 | if (!force && !NProgress.status) return this; 151 | 152 | return NProgress.inc(0.3 + 0.5 * Math.random()).set(1); 153 | }; 154 | 155 | /** 156 | * Increments by a random amount. 157 | */ 158 | 159 | NProgress.inc = function(amount) { 160 | var n = NProgress.status; 161 | 162 | if (!n) { 163 | return NProgress.start(); 164 | } else { 165 | if (typeof amount !== 'number') { 166 | amount = (1 - n) * clamp(Math.random() * n, 0.1, 0.95); 167 | } 168 | 169 | n = clamp(n + amount, 0, 0.994); 170 | return NProgress.set(n); 171 | } 172 | }; 173 | 174 | NProgress.trickle = function() { 175 | return NProgress.inc(Math.random() * Settings.trickleRate); 176 | }; 177 | 178 | /** 179 | * Waits for all supplied jQuery promises and 180 | * increases the progress as the promises resolve. 181 | * 182 | * @param $promise jQUery Promise 183 | */ 184 | (function() { 185 | var initial = 0, current = 0; 186 | 187 | NProgress.promise = function($promise) { 188 | if (!$promise || $promise.state() === "resolved") { 189 | return this; 190 | } 191 | 192 | if (current === 0) { 193 | NProgress.start(); 194 | } 195 | 196 | initial++; 197 | current++; 198 | 199 | $promise.always(function() { 200 | current--; 201 | if (current === 0) { 202 | initial = 0; 203 | NProgress.done(); 204 | } else { 205 | NProgress.set((initial - current) / initial); 206 | } 207 | }); 208 | 209 | return this; 210 | }; 211 | 212 | })(); 213 | 214 | /** 215 | * (Internal) renders the progress bar markup based on the `template` 216 | * setting. 217 | */ 218 | 219 | NProgress.render = function(fromStart) { 220 | if (NProgress.isRendered()) return document.getElementById('nprogress'); 221 | 222 | addClass(document.documentElement, 'nprogress-busy'); 223 | 224 | var progress = document.createElement('div'); 225 | progress.id = 'nprogress'; 226 | progress.innerHTML = Settings.template; 227 | 228 | var bar = progress.querySelector(Settings.barSelector), 229 | perc = fromStart ? '-100' : toBarPerc(NProgress.status || 0), 230 | parent = document.querySelector(Settings.parent), 231 | spinner; 232 | 233 | css(bar, { 234 | transition: 'all 0 linear', 235 | transform: 'translate3d(' + perc + '%,0,0)' 236 | }); 237 | 238 | if (!Settings.showSpinner) { 239 | spinner = progress.querySelector(Settings.spinnerSelector); 240 | spinner && removeElement(spinner); 241 | } 242 | 243 | if (parent != document.body) { 244 | addClass(parent, 'nprogress-custom-parent'); 245 | } 246 | 247 | parent.appendChild(progress); 248 | return progress; 249 | }; 250 | 251 | /** 252 | * Removes the element. Opposite of render(). 253 | */ 254 | 255 | NProgress.remove = function() { 256 | removeClass(document.documentElement, 'nprogress-busy'); 257 | removeClass(document.querySelector(Settings.parent), 'nprogress-custom-parent'); 258 | var progress = document.getElementById('nprogress'); 259 | progress && removeElement(progress); 260 | }; 261 | 262 | /** 263 | * Checks if the progress bar is rendered. 264 | */ 265 | 266 | NProgress.isRendered = function() { 267 | return !!document.getElementById('nprogress'); 268 | }; 269 | 270 | /** 271 | * Determine which positioning CSS rule to use. 272 | */ 273 | 274 | NProgress.getPositioningCSS = function() { 275 | // Sniff on document.body.style 276 | var bodyStyle = document.body.style; 277 | 278 | // Sniff prefixes 279 | var vendorPrefix = ('WebkitTransform' in bodyStyle) ? 'Webkit' : 280 | ('MozTransform' in bodyStyle) ? 'Moz' : 281 | ('msTransform' in bodyStyle) ? 'ms' : 282 | ('OTransform' in bodyStyle) ? 'O' : ''; 283 | 284 | if (vendorPrefix + 'Perspective' in bodyStyle) { 285 | // Modern browsers with 3D support, e.g. Webkit, IE10 286 | return 'translate3d'; 287 | } else if (vendorPrefix + 'Transform' in bodyStyle) { 288 | // Browsers without 3D support, e.g. IE9 289 | return 'translate'; 290 | } else { 291 | // Browsers without translate() support, e.g. IE7-8 292 | return 'margin'; 293 | } 294 | }; 295 | 296 | /** 297 | * Helpers 298 | */ 299 | 300 | function clamp(n, min, max) { 301 | if (n < min) return min; 302 | if (n > max) return max; 303 | return n; 304 | } 305 | 306 | /** 307 | * (Internal) converts a percentage (`0..1`) to a bar translateX 308 | * percentage (`-100%..0%`). 309 | */ 310 | 311 | function toBarPerc(n) { 312 | return (-1 + n) * 100; 313 | } 314 | 315 | 316 | /** 317 | * (Internal) returns the correct CSS for changing the bar's 318 | * position given an n percentage, and speed and ease from Settings 319 | */ 320 | 321 | function barPositionCSS(n, speed, ease) { 322 | var barCSS; 323 | 324 | if (Settings.positionUsing === 'translate3d') { 325 | barCSS = { transform: 'translate3d('+toBarPerc(n)+'%,0,0)' }; 326 | } else if (Settings.positionUsing === 'translate') { 327 | barCSS = { transform: 'translate('+toBarPerc(n)+'%,0)' }; 328 | } else { 329 | barCSS = { 'margin-left': toBarPerc(n)+'%' }; 330 | } 331 | 332 | barCSS.transition = 'all '+speed+'ms '+ease; 333 | 334 | return barCSS; 335 | } 336 | 337 | /** 338 | * (Internal) Queues a function to be executed. 339 | */ 340 | 341 | var queue = (function() { 342 | var pending = []; 343 | 344 | function next() { 345 | var fn = pending.shift(); 346 | if (fn) { 347 | fn(next); 348 | } 349 | } 350 | 351 | return function(fn) { 352 | pending.push(fn); 353 | if (pending.length == 1) next(); 354 | }; 355 | })(); 356 | 357 | /** 358 | * (Internal) Applies css properties to an element, similar to the jQuery 359 | * css method. 360 | * 361 | * While this helper does assist with vendor prefixed property names, it 362 | * does not perform any manipulation of values prior to setting styles. 363 | */ 364 | 365 | var css = (function() { 366 | var cssPrefixes = [ 'Webkit', 'O', 'Moz', 'ms' ], 367 | cssProps = {}; 368 | 369 | function camelCase(string) { 370 | return string.replace(/^-ms-/, 'ms-').replace(/-([\da-z])/gi, function(match, letter) { 371 | return letter.toUpperCase(); 372 | }); 373 | } 374 | 375 | function getVendorProp(name) { 376 | var style = document.body.style; 377 | if (name in style) return name; 378 | 379 | var i = cssPrefixes.length, 380 | capName = name.charAt(0).toUpperCase() + name.slice(1), 381 | vendorName; 382 | while (i--) { 383 | vendorName = cssPrefixes[i] + capName; 384 | if (vendorName in style) return vendorName; 385 | } 386 | 387 | return name; 388 | } 389 | 390 | function getStyleProp(name) { 391 | name = camelCase(name); 392 | return cssProps[name] || (cssProps[name] = getVendorProp(name)); 393 | } 394 | 395 | function applyCss(element, prop, value) { 396 | prop = getStyleProp(prop); 397 | element.style[prop] = value; 398 | } 399 | 400 | return function(element, properties) { 401 | var args = arguments, 402 | prop, 403 | value; 404 | 405 | if (args.length == 2) { 406 | for (prop in properties) { 407 | value = properties[prop]; 408 | if (value !== undefined && properties.hasOwnProperty(prop)) applyCss(element, prop, value); 409 | } 410 | } else { 411 | applyCss(element, args[1], args[2]); 412 | } 413 | } 414 | })(); 415 | 416 | /** 417 | * (Internal) Determines if an element or space separated list of class names contains a class name. 418 | */ 419 | 420 | function hasClass(element, name) { 421 | var list = typeof element == 'string' ? element : classList(element); 422 | return list.indexOf(' ' + name + ' ') >= 0; 423 | } 424 | 425 | /** 426 | * (Internal) Adds a class to an element. 427 | */ 428 | 429 | function addClass(element, name) { 430 | var oldList = classList(element), 431 | newList = oldList + name; 432 | 433 | if (hasClass(oldList, name)) return; 434 | 435 | // Trim the opening space. 436 | element.className = newList.substring(1); 437 | } 438 | 439 | /** 440 | * (Internal) Removes a class from an element. 441 | */ 442 | 443 | function removeClass(element, name) { 444 | var oldList = classList(element), 445 | newList; 446 | 447 | if (!hasClass(element, name)) return; 448 | 449 | // Replace the class name. 450 | newList = oldList.replace(' ' + name + ' ', ' '); 451 | 452 | // Trim the opening and closing spaces. 453 | element.className = newList.substring(1, newList.length - 1); 454 | } 455 | 456 | /** 457 | * (Internal) Gets a space separated list of the class names on the element. 458 | * The list is wrapped with a single space on each end to facilitate finding 459 | * matches within the list. 460 | */ 461 | 462 | function classList(element) { 463 | return (' ' + (element.className || '') + ' ').replace(/\s+/gi, ' '); 464 | } 465 | 466 | /** 467 | * (Internal) Removes an element from the DOM. 468 | */ 469 | 470 | function removeElement(element) { 471 | element && element.parentNode && element.parentNode.removeChild(element); 472 | } 473 | 474 | return NProgress; 475 | }); 476 | 477 | -------------------------------------------------------------------------------- /src/extension/sidebar-background/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Jayin/silentor/9398f66734daff52e5e372747e4207984c6d8808/src/extension/sidebar-background/1.png -------------------------------------------------------------------------------- /src/extension/sidebar-background/README.md: -------------------------------------------------------------------------------- 1 | sidebar-background 2 | ================== 3 | 4 | 侧栏随机背景图 5 | 6 | ![img](1.png) 7 | 8 | ### 使用 9 | 10 | ```html 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | ``` -------------------------------------------------------------------------------- /src/extension/sidebar-background/main.css: -------------------------------------------------------------------------------- 1 | .sidebar { 2 | background-size: cover; 3 | background-position: 50% 50%; 4 | background-repeat: no-repeat; 5 | } 6 | 7 | .sidebar-inner { 8 | background-color: rgba(0, 0, 0, 0.48); 9 | } 10 | 11 | -------------------------------------------------------------------------------- /src/extension/sidebar-background/main.js: -------------------------------------------------------------------------------- 1 | ;(function($) { 2 | 'use strict'; 3 | $(window).on('loaded-sidebar-page', function() { 4 | var $sidebar = $('.sidebar'); 5 | $sidebar.css('background-image', "url('https://unsplash.it/{w}/{h}/?random&gravity=center')".replace('{w}', $sidebar.width()).replace('{h}', $sidebar.height())); 6 | }); 7 | })(Zepto); -------------------------------------------------------------------------------- /vendor/blog.css: -------------------------------------------------------------------------------- 1 | pre,table{overflow:auto}.sidebar h1 a,.sidebar-inner a{text-decoration:none}.img-center,.img-left,.img-right,table{display:block}body,html{margin:0;padding:0;line-height:1.5;font-size:106%;font-family:"Microsoft YaHei",sans-serif;background-color:#fff}img{max-width:100%;height:auto}code,pre{font-family:Consolas,"Liberation Mono",Courier,monospace,sans-serif;background-color:#f8f8f8;border:1px solid #ddd;border-radius:3px}pre{padding:6px 10px;font-size:60%;line-height:160%}code{padding:2px 5px;margin:0 2px}pre>code{border:none;background-color:inherit;padding:0;margin:0}table{font-size:80%;width:100%;margin:15px 0;border-collapse:collapse;border-spacing:0}table td,table th{border:1px solid #ddd;padding:6px 13px;min-width:4em}table tr{border-top:1px solid #ccc;background-color:#fff}table tr:nth-child(2n){background-color:#f8f8f8}blockquote{margin:15px 0;border-left:4px solid #DDD;padding:0 15px;color:#777}.sidebar,.sidebar a{color:#fff}.sidebar{background-color:#2a2a2a;box-shadow:0 4px 5px 0 rgba(0,0,0,.14),0 1px 10px 0 rgba(0,0,0,.12),0 2px 4px -1px rgba(0,0,0,.2)}.sidebar-inner{height:100%;padding:2% 5%}.sidebar-inner li{padding-top:12px}.sidebar blockquote{color:#FFF}.sidebar img{margin-left:10%}.main-inner{padding:2% 5% 3%}.main-page{padding-bottom:3%;min-height:620px}.img-holder{position:absolute;top:-9999px;left:-9999px}#main-page-footer{text-align:center;margin-top:40px;padding-top:20px;padding-bottom:4px;border-top:1px solid #eee;color:#777;font-size:14px;min-height:0}.img-left{margin:15px auto 15px 0}.img-center{margin:15px auto}.img-right{margin:15px 0 15px auto}.avatar{border-radius:50%;padding:3px;width:50%}@media (max-width:480px){.sidebar-inner li{display:inline-block;margin-left:1em}}@media (max-width:640px){pre{font-size:80%}table{font-size:100%}.sidebar-inner{padding:2% 10%;height:50%}.main-inner{padding-left:5%;padding-right:5%}.sidebar img{display:none}}@media (min-width:990px){.sidebar{position:fixed;top:0;bottom:0;left:0;width:20%}.sidebar-inner{padding:15%}.main{margin-left:25%;width:75%}} -------------------------------------------------------------------------------- /vendor/core.css: -------------------------------------------------------------------------------- 1 | /** 2 | * silentor - Markdown base, convention over configuration and minimalism blog 3 | * @version v1.7.0 4 | * @link https://github.com/Jayin/silentor 5 | * @license MIT 6 | */ 7 | .hljs{display:block;overflow-x:auto;padding:.5em;color:#333;background:#f8f8f8;-webkit-text-size-adjust:none}.hljs-comment,.hljs-template_comment,.diff .hljs-header,.hljs-javadoc{color:#998;font-style:italic}.hljs-keyword,.css .rule .hljs-keyword,.hljs-winutils,.javascript .hljs-title,.nginx .hljs-title,.hljs-subst,.hljs-request,.hljs-status{color:#333;font-weight:bold}.hljs-number,.hljs-hexcolor,.ruby .hljs-constant{color:#008080}.hljs-string,.hljs-tag .hljs-value,.hljs-phpdoc,.hljs-dartdoc,.tex .hljs-formula{color:#d14}.hljs-title,.hljs-id,.scss .hljs-preprocessor{color:#900;font-weight:bold}.javascript .hljs-title,.hljs-list .hljs-keyword,.hljs-subst{font-weight:normal}.hljs-class .hljs-title,.hljs-type,.vhdl .hljs-literal,.tex .hljs-command{color:#458;font-weight:bold}.hljs-tag,.hljs-tag .hljs-title,.hljs-rules .hljs-property,.django .hljs-tag .hljs-keyword{color:#000080;font-weight:normal}.hljs-attribute,.hljs-variable,.lisp .hljs-body{color:#008080}.hljs-regexp{color:#009926}.hljs-symbol,.ruby .hljs-symbol .hljs-string,.lisp .hljs-keyword,.clojure .hljs-keyword,.scheme .hljs-keyword,.tex .hljs-special,.hljs-prompt{color:#990073}.hljs-built_in{color:#0086b3}.hljs-preprocessor,.hljs-pragma,.hljs-pi,.hljs-doctype,.hljs-shebang,.hljs-cdata{color:#999;font-weight:bold}.hljs-deletion{background:#fdd}.hljs-addition{background:#dfd}.diff .hljs-change{background:#0086b3}.hljs-chunk{color:#aaa} 8 | .markdown-body hr:after,.markdown-body hr:before{display:table;content:""}.markdown-body ol,.markdown-body td,.markdown-body th,.markdown-body ul{padding:0}.markdown-body .anchor:focus,.markdown-body a:active,.markdown-body a:hover{outline:0}@font-face{font-family:octicons-anchor;src:url(data:font/woff;charset=utf-8;base64,d09GRgABAAAAAAYcAA0AAAAACjQAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABGRlRNAAABMAAAABwAAAAca8vGTk9TLzIAAAFMAAAARAAAAFZG1VHVY21hcAAAAZAAAAA+AAABQgAP9AdjdnQgAAAB0AAAAAQAAAAEACICiGdhc3AAAAHUAAAACAAAAAj//wADZ2x5ZgAAAdwAAADRAAABEKyikaNoZWFkAAACsAAAAC0AAAA2AtXoA2hoZWEAAALgAAAAHAAAACQHngNFaG10eAAAAvwAAAAQAAAAEAwAACJsb2NhAAADDAAAAAoAAAAKALIAVG1heHAAAAMYAAAAHwAAACABEAB2bmFtZQAAAzgAAALBAAAFu3I9x/Nwb3N0AAAF/AAAAB0AAAAvaoFvbwAAAAEAAAAAzBdyYwAAAADP2IQvAAAAAM/bz7t4nGNgZGFgnMDAysDB1Ml0hoGBoR9CM75mMGLkYGBgYmBlZsAKAtJcUxgcPsR8iGF2+O/AEMPsznAYKMwIkgMA5REMOXicY2BgYGaAYBkGRgYQsAHyGMF8FgYFIM0ChED+h5j//yEk/3KoSgZGNgYYk4GRCUgwMaACRoZhDwCs7QgGAAAAIgKIAAAAAf//AAJ4nHWMMQrCQBBF/0zWrCCIKUQsTDCL2EXMohYGSSmorScInsRGL2DOYJe0Ntp7BK+gJ1BxF1stZvjz/v8DRghQzEc4kIgKwiAppcA9LtzKLSkdNhKFY3HF4lK69ExKslx7Xa+vPRVS43G98vG1DnkDMIBUgFN0MDXflU8tbaZOUkXUH0+U27RoRpOIyCKjbMCVejwypzJJG4jIwb43rfl6wbwanocrJm9XFYfskuVC5K/TPyczNU7b84CXcbxks1Un6H6tLH9vf2LRnn8Ax7A5WQAAAHicY2BkYGAA4teL1+yI57f5ysDNwgAC529f0kOmWRiYVgEpDgYmEA8AUzEKsQAAAHicY2BkYGB2+O/AEMPCAAJAkpEBFbAAADgKAe0EAAAiAAAAAAQAAAAEAAAAAAAAKgAqACoAiAAAeJxjYGRgYGBhsGFgYgABEMkFhAwM/xn0QAIAD6YBhwB4nI1Ty07cMBS9QwKlQapQW3VXySvEqDCZGbGaHULiIQ1FKgjWMxknMfLEke2A+IJu+wntrt/QbVf9gG75jK577Lg8K1qQPCfnnnt8fX1NRC/pmjrk/zprC+8D7tBy9DHgBXoWfQ44Av8t4Bj4Z8CLtBL9CniJluPXASf0Lm4CXqFX8Q84dOLnMB17N4c7tBo1AS/Qi+hTwBH4rwHHwN8DXqQ30XXAS7QaLwSc0Gn8NuAVWou/gFmnjLrEaEh9GmDdDGgL3B4JsrRPDU2hTOiMSuJUIdKQQayiAth69r6akSSFqIJuA19TrzCIaY8sIoxyrNIrL//pw7A2iMygkX5vDj+G+kuoLdX4GlGK/8Lnlz6/h9MpmoO9rafrz7ILXEHHaAx95s9lsI7AHNMBWEZHULnfAXwG9/ZqdzLI08iuwRloXE8kfhXYAvE23+23DU3t626rbs8/8adv+9DWknsHp3E17oCf+Z48rvEQNZ78paYM38qfk3v/u3l3u3GXN2Dmvmvpf1Srwk3pB/VSsp512bA/GG5i2WJ7wu430yQ5K3nFGiOqgtmSB5pJVSizwaacmUZzZhXLlZTq8qGGFY2YcSkqbth6aW1tRmlaCFs2016m5qn36SbJrqosG4uMV4aP2PHBmB3tjtmgN2izkGQyLWprekbIntJFing32a5rKWCN/SdSoga45EJykyQ7asZvHQ8PTm6cslIpwyeyjbVltNikc2HTR7YKh9LBl9DADC0U/jLcBZDKrMhUBfQBvXRzLtFtjU9eNHKin0x5InTqb8lNpfKv1s1xHzTXRqgKzek/mb7nB8RZTCDhGEX3kK/8Q75AmUM/eLkfA+0Hi908Kx4eNsMgudg5GLdRD7a84npi+YxNr5i5KIbW5izXas7cHXIMAau1OueZhfj+cOcP3P8MNIWLyYOBuxL6DRylJ4cAAAB4nGNgYoAALjDJyIAOWMCiTIxMLDmZedkABtIBygAAAA==) format('woff')}.markdown-body{-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%;color:#333;overflow:hidden;font-family:"Helvetica Neue",Helvetica,"Segoe UI",Arial,freesans,sans-serif;font-size:16px;line-height:1.6;word-wrap:break-word}.markdown-body strong{font-weight:700}.markdown-body h1{margin:.67em 0}.markdown-body img{border:0}.markdown-body hr{-moz-box-sizing:content-box;box-sizing:content-box;overflow:hidden;background:0 0}.markdown-body input{color:inherit;margin:0;line-height:normal;font:13px/1.4 Helvetica,arial,freesans,clean,sans-serif,"Segoe UI Emoji","Segoe UI Symbol"}.markdown-body code,.markdown-body pre{font:12px Consolas,"Liberation Mono",Menlo,Courier,monospace}.markdown-body html input[disabled]{cursor:default}.markdown-body input[type=checkbox]{-moz-box-sizing:border-box;box-sizing:border-box;padding:0}.markdown-body *{-moz-box-sizing:border-box;box-sizing:border-box}.markdown-body a{background:0 0;color:#4183c4;text-decoration:none}.markdown-body a:active,.markdown-body a:focus,.markdown-body a:hover{text-decoration:underline}.markdown-body hr:after{clear:both}.markdown-body blockquote{margin:0}.markdown-body ol ol,.markdown-body ul ol{list-style-type:lower-roman}.markdown-body ol ol ol,.markdown-body ol ul ol,.markdown-body ul ol ol,.markdown-body ul ul ol{list-style-type:lower-alpha}.markdown-body dd{margin-left:0}.markdown-body pre{word-wrap:normal}.markdown-body kbd{background-color:#e7e7e7;background-image:-webkit-linear-gradient(#fefefe,#e7e7e7);background-image:linear-gradient(#fefefe,#e7e7e7);background-repeat:repeat-x;border-radius:2px;border:1px solid #cfcfcf;color:#000;padding:3px 5px;line-height:10px;font:11px Consolas,"Liberation Mono",Menlo,Courier,monospace;display:inline-block}.markdown-body .highlight .cs,.markdown-body .highlight .ge,.markdown-body dl dt{font-style:italic}.markdown-body h1,.markdown-body h2{padding-bottom:.3em;border-bottom:1px solid #eee}.markdown-body>:first-child{margin-top:0!important}.markdown-body>:last-child{margin-bottom:0!important}.markdown-body .anchor{position:absolute;top:0;bottom:0;left:0;display:block;padding-right:6px;padding-left:30px;margin-left:-30px}.markdown-body h1,.markdown-body h2,.markdown-body h3,.markdown-body h4,.markdown-body h5,.markdown-body h6{position:relative;margin-top:1em;margin-bottom:16px;font-weight:700;line-height:1.4}.markdown-body h1 .octicon-link,.markdown-body h2 .octicon-link,.markdown-body h3 .octicon-link,.markdown-body h4 .octicon-link,.markdown-body h5 .octicon-link,.markdown-body h6 .octicon-link{display:none;color:#000;vertical-align:middle}.markdown-body h1:hover .anchor,.markdown-body h2:hover .anchor,.markdown-body h3:hover .anchor,.markdown-body h4:hover .anchor,.markdown-body h5:hover .anchor,.markdown-body h6:hover .anchor{height:1em;padding-left:8px;margin-left:-30px;line-height:1;text-decoration:none}.markdown-body h1:hover .anchor .octicon-link,.markdown-body h2:hover .anchor .octicon-link,.markdown-body h3:hover .anchor .octicon-link,.markdown-body h4:hover .anchor .octicon-link,.markdown-body h5:hover .anchor .octicon-link,.markdown-body h6:hover .anchor .octicon-link{display:inline-block}.markdown-body h1{font-size:2.25em;line-height:1.2}.markdown-body h2{font-size:1.75em;line-height:1.225}.markdown-body h3{font-size:1.5em;line-height:1.43}.markdown-body h4{font-size:1.25em}.markdown-body h5{font-size:1em}.markdown-body h6{font-size:1em;color:#777}.markdown-body blockquote,.markdown-body dl,.markdown-body ol,.markdown-body p,.markdown-body pre,.markdown-body table,.markdown-body ul{margin-top:0;margin-bottom:16px}.markdown-body hr{height:4px;padding:0;margin:16px 0;background-color:#e7e7e7;border:0}.markdown-body ol,.markdown-body ul{padding-left:2em}.markdown-body ol ol,.markdown-body ol ul,.markdown-body ul ol,.markdown-body ul ul{margin-top:0;margin-bottom:0}.markdown-body li>p{margin-top:16px}.markdown-body dl{padding:0}.markdown-body dl dt{padding:0;margin-top:16px;font-size:1em;font-weight:700}.markdown-body dl dd{padding:0 16px;margin-bottom:16px}.markdown-body blockquote{padding:0 15px;color:#777;border-left:4px solid #ddd}.markdown-body blockquote>:first-child{margin-top:0}.markdown-body blockquote>:last-child{margin-bottom:0}.markdown-body table{border-collapse:collapse;border-spacing:0;display:block;width:100%;overflow:auto;word-break:normal;word-break:keep-all}.markdown-body table th{font-weight:700}.markdown-body table td,.markdown-body table th{padding:6px 13px;border:1px solid #ddd}.markdown-body table tr{background-color:#fff;border-top:1px solid #ccc}.markdown-body table tr:nth-child(2n){background-color:#f8f8f8}.markdown-body img{max-width:100%;-moz-box-sizing:border-box;box-sizing:border-box}.markdown-body code{padding:.2em 0;margin:0;font-size:85%;background-color:rgba(0,0,0,.04);border-radius:3px}.markdown-body code:after,.markdown-body code:before{letter-spacing:-.2em;content:"\00a0"}.markdown-body pre>code{padding:0;margin:0;font-size:100%;word-break:normal;white-space:pre;background:0 0;border:0}.markdown-body .highlight{margin-bottom:16px}.markdown-body .highlight pre,.markdown-body pre{padding:16px;overflow:auto;font-size:85%;line-height:1.45;background-color:#f7f7f7;border-radius:3px}.markdown-body .highlight pre{margin-bottom:0;word-break:normal}.markdown-body pre code{display:inline;max-width:initial;padding:0;margin:0;overflow:initial;line-height:inherit;word-wrap:normal;background-color:transparent;border:0}.markdown-body pre code:after,.markdown-body pre code:before{content:normal}.markdown-body .highlight{background:#fff}.markdown-body .highlight .il,.markdown-body .highlight .m,.markdown-body .highlight .mf,.markdown-body .highlight .mh,.markdown-body .highlight .mi,.markdown-body .highlight .mo{color:#945277}.markdown-body .highlight .s,.markdown-body .highlight .s1,.markdown-body .highlight .s2,.markdown-body .highlight .sb,.markdown-body .highlight .sc,.markdown-body .highlight .sd,.markdown-body .highlight .se,.markdown-body .highlight .sh,.markdown-body .highlight .si,.markdown-body .highlight .sx{color:#df5000}.markdown-body .highlight .k,.markdown-body .highlight .kc,.markdown-body .highlight .kd,.markdown-body .highlight .kn,.markdown-body .highlight .kp,.markdown-body .highlight .kr,.markdown-body .highlight .kt,.markdown-body .highlight .o{font-weight:700}.markdown-body .highlight .kt{color:#458}.markdown-body .highlight .c,.markdown-body .highlight .c1,.markdown-body .highlight .cm{color:#998;font-style:italic}.markdown-body .highlight .cp,.markdown-body .highlight .cs{color:#999;font-weight:700}.markdown-body .highlight .n{color:#333}.markdown-body .highlight .na,.markdown-body .highlight .nv,.markdown-body .highlight .vc,.markdown-body .highlight .vg,.markdown-body .highlight .vi{color:teal}.markdown-body .highlight .nb{color:#0086B3}.markdown-body .highlight .nc{color:#458;font-weight:700}.markdown-body .highlight .no{color:#094e99}.markdown-body .highlight .ni{color:purple}.markdown-body .highlight .ne{color:#900;font-weight:700}.markdown-body .highlight .nf{color:#945277;font-weight:700}.markdown-body .highlight .nn{color:#555}.markdown-body .highlight .nt{color:navy}.markdown-body .highlight .err{color:#a61717;background-color:#e3d2d2}.markdown-body .highlight .gd{color:#000;background-color:#fdd}.markdown-body .highlight .gd .x{color:#000;background-color:#faa}.markdown-body .highlight .gr{color:#a00}.markdown-body .highlight .gh{color:#999}.markdown-body .highlight .gi{color:#000;background-color:#dfd}.markdown-body .highlight .gi .x{color:#000;background-color:#afa}.markdown-body .highlight .go{color:#888}.markdown-body .highlight .gp{color:#555}.markdown-body .highlight .gs{font-weight:700}.markdown-body .highlight .gu{color:purple;font-weight:700}.markdown-body .highlight .gt{color:#a00}.markdown-body .highlight .ow{font-weight:700}.markdown-body .highlight .w{color:#bbb}.markdown-body .highlight .sr{color:#017936}.markdown-body .highlight .ss{color:#8b467f}.markdown-body .highlight .bp{color:#999}.markdown-body .highlight .gc{color:#999;background-color:#EAF2F5}.markdown-body .octicon{font:normal normal 16px octicons-anchor;line-height:1;display:inline-block;text-decoration:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.markdown-body .octicon-link:before{content:'\f05c'}.markdown-body .task-list-item{list-style-type:none}.markdown-body .task-list-item+.task-list-item{margin-top:3px}.markdown-body .task-list-item input{float:left;margin:.3em 0 .25em -1.6em;vertical-align:middle} 9 | pre,table{overflow:auto}.sidebar h1 a,.sidebar-inner a{text-decoration:none}.img-center,.img-left,.img-right,table{display:block}body,html{margin:0;padding:0;line-height:1.5;font-size:106%;font-family:"Microsoft YaHei",sans-serif;background-color:#fff}img{max-width:100%;height:auto}code,pre{font-family:Consolas,"Liberation Mono",Courier,monospace,sans-serif;background-color:#f8f8f8;border:1px solid #ddd;border-radius:3px}pre{padding:6px 10px;font-size:60%;line-height:160%}code{padding:2px 5px;margin:0 2px}pre>code{border:none;background-color:inherit;padding:0;margin:0}table{font-size:80%;width:100%;margin:15px 0;border-collapse:collapse;border-spacing:0}table td,table th{border:1px solid #ddd;padding:6px 13px;min-width:4em}table tr{border-top:1px solid #ccc;background-color:#fff}table tr:nth-child(2n){background-color:#f8f8f8}blockquote{margin:15px 0;border-left:4px solid #DDD;padding:0 15px;color:#777}.sidebar,.sidebar a{color:#fff}.sidebar{background-color:#2a2a2a;box-shadow:0 4px 5px 0 rgba(0,0,0,.14),0 1px 10px 0 rgba(0,0,0,.12),0 2px 4px -1px rgba(0,0,0,.2)}.sidebar-inner{height:100%;padding:2% 5%}.sidebar-inner li{padding-top:12px}.sidebar blockquote{color:#FFF}.sidebar img{margin-left:10%}.main-inner{padding:2% 5% 3%}.main-page{padding-bottom:3%;min-height:620px}.img-holder{position:absolute;top:-9999px;left:-9999px}#main-page-footer{text-align:center;margin-top:40px;padding-top:20px;padding-bottom:4px;border-top:1px solid #eee;color:#777;font-size:14px;min-height:0}.img-left{margin:15px auto 15px 0}.img-center{margin:15px auto}.img-right{margin:15px 0 15px auto}.avatar{border-radius:50%;padding:3px;width:50%}@media (max-width:480px){.sidebar-inner li{display:inline-block;margin-left:1em}}@media (max-width:640px){pre{font-size:80%}table{font-size:100%}.sidebar-inner{padding:2% 10%;height:50%}.main-inner{padding-left:5%;padding-right:5%}.sidebar img{display:none}}@media (min-width:990px){.sidebar{position:fixed;top:0;bottom:0;left:0;width:20%}.sidebar-inner{padding:15%}.main{margin-left:25%;width:75%}} -------------------------------------------------------------------------------- /vendor/extension/content-fadeIn/gif2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Jayin/silentor/9398f66734daff52e5e372747e4207984c6d8808/vendor/extension/content-fadeIn/gif2.gif -------------------------------------------------------------------------------- /vendor/extension/content-fadeIn/main.css: -------------------------------------------------------------------------------- 1 | .main-page.markdown-body { 2 | animation-duration: 3.8s; 3 | animation-name: fadein; 4 | } 5 | 6 | @keyframes fadein { 7 | from { 8 | opacity: 0; 9 | } 10 | to { 11 | opacity: 1; 12 | } 13 | } -------------------------------------------------------------------------------- /vendor/extension/content-fadeIn/readme.md: -------------------------------------------------------------------------------- 1 | 内容页FadeIn 2 | 3 | ![gif](./gif2.gif) 4 | 5 | ### Usage 6 | 7 | 把下面的内容添加到`index.html` 8 | ``` 9 | 10 | ``` -------------------------------------------------------------------------------- /vendor/extension/disqus-visibility/README.md: -------------------------------------------------------------------------------- 1 | dispus-visibility 2 | ================= 3 | > 控制评论框在什么时候显示 4 | 5 | 目前: 评论框不会在下列情况下不显示 6 | 7 | 1. 在形如`*index.md` 或 `*index.markdown` (不区分大小写),为索引页没有必要显示\ 8 | 2. 匹配白名单 9 | 10 | 11 | ### 使用 12 | 13 | 14 | ``` 15 | 16 | 17 | 18 | 19 | 20 | ``` 21 | 22 | ### 设置白名单 23 | 24 | 白名单下均不会显示评论框,默认: 25 | 26 | 支持正则表达式 27 | 28 | ```javascript 29 | var white_list = [ //默认大小写不敏感,也就是HOME.md也是白名单内 30 | '', //首页 31 | 'home.md', 32 | 'about.md', 33 | 'README.md' 34 | ] 35 | ``` 36 | 37 | 然后 38 | 39 | ```bash 40 | cd path/to/{you project} 41 | make 42 | ``` 43 | -------------------------------------------------------------------------------- /vendor/extension/disqus-visibility/main.js: -------------------------------------------------------------------------------- 1 | !function(n){"use strict";var o=["","home.md","about.md","README.md"],i=function(){var n=window.location.search;return/index\./gi.test(n)&&(n.endsWith("md")||n.endsWith("markdown"))?!0:!1},e=function(){var n=window.location.search;for(var i in o)if(""!=o[i]&&new RegExp(o[i],"ig").test(n)||n==o[i])return!0;return!1};n(window).on("loaded-sidebar-page",function(){}),n(window).on("loaded-main-page",function(){i()||e()?n("#disqus_thread").css("display","none"):n("#disqus_thread").css("display","block")}),n(window).on("loaded-main-page-footer",function(){}),n(window).on("page-not-found",function(n,o){}),n(window).on("before-load-sidebar-page",function(n,o){}),n(window).on("before-load-main-page",function(n,o){}),n(window).on("before-load-main-page-footer",function(n,o){})}(Zepto); -------------------------------------------------------------------------------- /vendor/extension/img-animation/gif2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Jayin/silentor/9398f66734daff52e5e372747e4207984c6d8808/vendor/extension/img-animation/gif2.gif -------------------------------------------------------------------------------- /vendor/extension/img-animation/img-animation.css: -------------------------------------------------------------------------------- 1 | img:hover { 2 | -webkit-transform: translate(0, -5px); 3 | -moz-transform: translate(0, -5px); 4 | -ms-transform: translate(0, -5px); 5 | -o-transform: translate(0, -5px); 6 | transform: translate(0, -5px); 7 | -webkit-box-shadow: 0 0 10px rgba(34, 34, 34, 0.2); 8 | -moz-box-shadow: 0 0 10px rgba(34, 34, 34, 0.2); 9 | box-shadow: 0 0 10px rgba(34, 34, 34, 0.2); 10 | } 11 | img { 12 | -webkit-transform: translate(0, 0); 13 | -moz-transform: translate(0, 0); 14 | -ms-transform: translate(0, 0); 15 | -o-transform: translate(0, 0); 16 | transform: translate(0, 0); 17 | -webkit-transition-duration: .25s; 18 | -moz-transition-duration: .25s; 19 | -o-transition-duration: .25s; 20 | } -------------------------------------------------------------------------------- /vendor/extension/img-animation/readme.md: -------------------------------------------------------------------------------- 1 | img-animation 2 | ------------- 3 | >图片动画拓展 4 | 5 | 6 | Description 7 | ----------- 8 | 9 | 一个hover效果,鼠标移动到图片会有上浮并带有阴影 10 | 11 | ![avater](./gif2.gif) 12 | 13 | 14 | Install 15 | ------- 16 | 17 | 在`index.html`中引入 18 | ```html 19 | 20 | ``` -------------------------------------------------------------------------------- /vendor/extension/load-progress/README.md: -------------------------------------------------------------------------------- 1 | load-progress 2 | ============= 3 | >bring loading state to silentor 4 | 5 | ![gif](gif2.gif) 6 | 7 | ### 使用 8 | 9 | * 加入对应的js/css 10 | 11 | ```html 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | ``` 22 | 23 | ### 自定义 24 | 25 | 自定义颜色,进度条宽度等,修改`extensions/load-progress/src/custom.css` 26 | 27 | 然后 28 | ``` 29 | cd path/to/silentor/src/extensions/load-progress 30 | make 31 | ``` 32 | -------------------------------------------------------------------------------- /vendor/extension/load-progress/dist/main.css: -------------------------------------------------------------------------------- 1 | #nprogress{pointer-events:none}#nprogress .bar{position:fixed;z-index:1031;top:0;left:0;width:100%}#nprogress .peg{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);-ms-transform:rotate(3deg) translate(0,-4px);transform:rotate(3deg) translate(0,-4px)}#nprogress .spinner{display:block;position:fixed;z-index:1031;top:15px;right:15px}.nprogress-custom-parent{overflow:hidden;position:relative}.nprogress-custom-parent #nprogress .bar,.nprogress-custom-parent #nprogress .spinner{position:absolute}@-webkit-keyframes nprogress-spinner{0%{-webkit-transform:rotate(0)}100%{-webkit-transform:rotate(360deg)}}@keyframes nprogress-spinner{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}#nprogress .bar{background:#29d;height:3px}#nprogress .spinner-icon{width:18px;height:18px;box-sizing:border-box;border:2px solid transparent;border-top-color:#29d;border-left-color:#29d;border-radius:50%;-webkit-animation:nprogress-spinner .4s linear infinite;animation:nprogress-spinner .4s linear infinite} -------------------------------------------------------------------------------- /vendor/extension/load-progress/dist/main.js: -------------------------------------------------------------------------------- 1 | !function(n,e){"function"==typeof define&&define.amd?define(e):"object"==typeof exports?module.exports=e():n.NProgress=e()}(this,function(){function n(n,e,t){return e>n?e:n>t?t:n}function e(n){return 100*(-1+n)}function t(n,t,r){var i;return i="translate3d"===c.positionUsing?{transform:"translate3d("+e(n)+"%,0,0)"}:"translate"===c.positionUsing?{transform:"translate("+e(n)+"%,0)"}:{"margin-left":e(n)+"%"},i.transition="all "+t+"ms "+r,i}function r(n,e){var t="string"==typeof n?n:s(n);return t.indexOf(" "+e+" ")>=0}function i(n,e){var t=s(n),i=t+e;r(t,e)||(n.className=i.substring(1))}function o(n,e){var t,i=s(n);r(n,e)&&(t=i.replace(" "+e+" "," "),n.className=t.substring(1,t.length-1))}function s(n){return(" "+(n.className||"")+" ").replace(/\s+/gi," ")}function a(n){n&&n.parentNode&&n.parentNode.removeChild(n)}var u={};u.version="0.2.0";var c=u.settings={minimum:.08,easing:"ease",positionUsing:"",speed:200,trickle:!0,trickleRate:.02,trickleSpeed:800,showSpinner:!0,barSelector:'[role="bar"]',spinnerSelector:'[role="spinner"]',parent:"body",template:'
'};u.configure=function(n){var e,t;for(e in n)t=n[e],void 0!==t&&n.hasOwnProperty(e)&&(c[e]=t);return this},u.status=null,u.set=function(e){var r=u.isStarted();e=n(e,c.minimum,1),u.status=1===e?null:e;var i=u.render(!r),o=i.querySelector(c.barSelector),s=c.speed,a=c.easing;return i.offsetWidth,l(function(n){""===c.positionUsing&&(c.positionUsing=u.getPositioningCSS()),f(o,t(e,s,a)),1===e?(f(i,{transition:"none",opacity:1}),i.offsetWidth,setTimeout(function(){f(i,{transition:"all "+s+"ms linear",opacity:0}),setTimeout(function(){u.remove(),n()},s)},s)):setTimeout(n,s)}),this},u.isStarted=function(){return"number"==typeof u.status},u.start=function(){u.status||u.set(0);var n=function(){setTimeout(function(){u.status&&(u.trickle(),n())},c.trickleSpeed)};return c.trickle&&n(),this},u.done=function(n){return n||u.status?u.inc(.3+.5*Math.random()).set(1):this},u.inc=function(e){var t=u.status;return t?("number"!=typeof e&&(e=(1-t)*n(Math.random()*t,.1,.95)),t=n(t+e,0,.994),u.set(t)):u.start()},u.trickle=function(){return u.inc(Math.random()*c.trickleRate)},function(){var n=0,e=0;u.promise=function(t){return t&&"resolved"!==t.state()?(0===e&&u.start(),n++,e++,t.always(function(){e--,0===e?(n=0,u.done()):u.set((n-e)/n)}),this):this}}(),u.render=function(n){if(u.isRendered())return document.getElementById("nprogress");i(document.documentElement,"nprogress-busy");var t=document.createElement("div");t.id="nprogress",t.innerHTML=c.template;var r,o=t.querySelector(c.barSelector),s=n?"-100":e(u.status||0),l=document.querySelector(c.parent);return f(o,{transition:"all 0 linear",transform:"translate3d("+s+"%,0,0)"}),c.showSpinner||(r=t.querySelector(c.spinnerSelector),r&&a(r)),l!=document.body&&i(l,"nprogress-custom-parent"),l.appendChild(t),t},u.remove=function(){o(document.documentElement,"nprogress-busy"),o(document.querySelector(c.parent),"nprogress-custom-parent");var n=document.getElementById("nprogress");n&&a(n)},u.isRendered=function(){return!!document.getElementById("nprogress")},u.getPositioningCSS=function(){var n=document.body.style,e="WebkitTransform"in n?"Webkit":"MozTransform"in n?"Moz":"msTransform"in n?"ms":"OTransform"in n?"O":"";return e+"Perspective"in n?"translate3d":e+"Transform"in n?"translate":"margin"};var l=function(){function n(){var t=e.shift();t&&t(n)}var e=[];return function(t){e.push(t),1==e.length&&n()}}(),f=function(){function n(n){return n.replace(/^-ms-/,"ms-").replace(/-([\da-z])/gi,function(n,e){return e.toUpperCase()})}function e(n){var e=document.body.style;if(n in e)return n;for(var t,r=i.length,o=n.charAt(0).toUpperCase()+n.slice(1);r--;)if(t=i[r]+o,t in e)return t;return n}function t(t){return t=n(t),o[t]||(o[t]=e(t))}function r(n,e,r){e=t(e),n.style[e]=r}var i=["Webkit","O","Moz","ms"],o={};return function(n,e){var t,i,o=arguments;if(2==o.length)for(t in e)i=e[t],void 0!==i&&e.hasOwnProperty(t)&&r(n,t,i);else r(n,o[1],o[2])}}();return u}),function(n,e){"use strict";n(window).on("before-load-main-page",function(n,t){e.start()}),n(window).on("loaded-main-page",function(){e.done()})}(Zepto,NProgress); -------------------------------------------------------------------------------- /vendor/extension/load-progress/gif2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Jayin/silentor/9398f66734daff52e5e372747e4207984c6d8808/vendor/extension/load-progress/gif2.gif -------------------------------------------------------------------------------- /vendor/extension/load-progress/gulpfile.js: -------------------------------------------------------------------------------- 1 | var gulp=require("gulp"),minifyCss=require("gulp-minify-css"),uglify=require("gulp-uglify"),concat=require("gulp-concat"),rename=require("gulp-rename"),DEST="./dist/",IS_DEV=process.env.DEV||!1;gulp.task("concat",function(){IS_DEV?(gulp.src(["src/nprogress.js","src/index.js"]).pipe(concat("main.js")).pipe(gulp.dest(DEST)),gulp.src(["src/nprogress.css","src/custom.css"]).pipe(concat("main.css")).pipe(gulp.dest(DEST))):(gulp.src(["src/nprogress.js","src/index.js"]).pipe(concat("main.js")).pipe(uglify()).pipe(gulp.dest(DEST)),gulp.src(["src/nprogress.css","src/custom.css"]).pipe(concat("main.css")).pipe(minifyCss()).pipe(gulp.dest(DEST)))}),gulp.task("build",["concat"]),gulp.task("watch",["build"],function(){gulp.watch("./src/**/*",["build"])}),gulp.task("default",["watch"]); -------------------------------------------------------------------------------- /vendor/extension/load-progress/src/custom.css: -------------------------------------------------------------------------------- 1 | #nprogress .bar{background:#29d;height:3px}#nprogress .spinner-icon{width:18px;height:18px;box-sizing:border-box;border:2px solid transparent;border-top-color:#29d;border-left-color:#29d;border-radius:50%;-webkit-animation:nprogress-spinner .4s linear infinite;animation:nprogress-spinner .4s linear infinite} -------------------------------------------------------------------------------- /vendor/extension/load-progress/src/index.js: -------------------------------------------------------------------------------- 1 | !function(n,o){"use strict";n(window).on("before-load-main-page",function(n,e){o.start()}),n(window).on("loaded-main-page",function(){o.done()})}(Zepto,NProgress); -------------------------------------------------------------------------------- /vendor/extension/load-progress/src/nprogress.css: -------------------------------------------------------------------------------- 1 | #nprogress{pointer-events:none}#nprogress .bar{background:#29d;position:fixed;z-index:1031;top:0;left:0;width:100%;height:2px}#nprogress .peg{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);-ms-transform:rotate(3deg) translate(0,-4px);transform:rotate(3deg) translate(0,-4px)}#nprogress .spinner{display:block;position:fixed;z-index:1031;top:15px;right:15px}#nprogress .spinner-icon{width:18px;height:18px;box-sizing:border-box;border:2px solid transparent;border-top-color:#29d;border-left-color:#29d;border-radius:50%;-webkit-animation:nprogress-spinner .4s linear infinite;animation:nprogress-spinner .4s linear infinite}.nprogress-custom-parent{overflow:hidden;position:relative}.nprogress-custom-parent #nprogress .bar,.nprogress-custom-parent #nprogress .spinner{position:absolute}@-webkit-keyframes nprogress-spinner{0%{-webkit-transform:rotate(0)}100%{-webkit-transform:rotate(360deg)}}@keyframes nprogress-spinner{0%{transform:rotate(0)}100%{transform:rotate(360deg)}} -------------------------------------------------------------------------------- /vendor/extension/load-progress/src/nprogress.js: -------------------------------------------------------------------------------- 1 | !function(n,e){"function"==typeof define&&define.amd?define(e):"object"==typeof exports?module.exports=e():n.NProgress=e()}(this,function(){function n(n,e,t){return e>n?e:n>t?t:n}function e(n){return 100*(-1+n)}function t(n,t,r){var i;return i="translate3d"===c.positionUsing?{transform:"translate3d("+e(n)+"%,0,0)"}:"translate"===c.positionUsing?{transform:"translate("+e(n)+"%,0)"}:{"margin-left":e(n)+"%"},i.transition="all "+t+"ms "+r,i}function r(n,e){var t="string"==typeof n?n:o(n);return t.indexOf(" "+e+" ")>=0}function i(n,e){var t=o(n),i=t+e;r(t,e)||(n.className=i.substring(1))}function s(n,e){var t,i=o(n);r(n,e)&&(t=i.replace(" "+e+" "," "),n.className=t.substring(1,t.length-1))}function o(n){return(" "+(n.className||"")+" ").replace(/\s+/gi," ")}function a(n){n&&n.parentNode&&n.parentNode.removeChild(n)}var u={};u.version="0.2.0";var c=u.settings={minimum:.08,easing:"ease",positionUsing:"",speed:200,trickle:!0,trickleRate:.02,trickleSpeed:800,showSpinner:!0,barSelector:'[role="bar"]',spinnerSelector:'[role="spinner"]',parent:"body",template:'
'};u.configure=function(n){var e,t;for(e in n)t=n[e],void 0!==t&&n.hasOwnProperty(e)&&(c[e]=t);return this},u.status=null,u.set=function(e){var r=u.isStarted();e=n(e,c.minimum,1),u.status=1===e?null:e;var i=u.render(!r),s=i.querySelector(c.barSelector),o=c.speed,a=c.easing;return i.offsetWidth,l(function(n){""===c.positionUsing&&(c.positionUsing=u.getPositioningCSS()),f(s,t(e,o,a)),1===e?(f(i,{transition:"none",opacity:1}),i.offsetWidth,setTimeout(function(){f(i,{transition:"all "+o+"ms linear",opacity:0}),setTimeout(function(){u.remove(),n()},o)},o)):setTimeout(n,o)}),this},u.isStarted=function(){return"number"==typeof u.status},u.start=function(){u.status||u.set(0);var n=function(){setTimeout(function(){u.status&&(u.trickle(),n())},c.trickleSpeed)};return c.trickle&&n(),this},u.done=function(n){return n||u.status?u.inc(.3+.5*Math.random()).set(1):this},u.inc=function(e){var t=u.status;return t?("number"!=typeof e&&(e=(1-t)*n(Math.random()*t,.1,.95)),t=n(t+e,0,.994),u.set(t)):u.start()},u.trickle=function(){return u.inc(Math.random()*c.trickleRate)},function(){var n=0,e=0;u.promise=function(t){return t&&"resolved"!==t.state()?(0===e&&u.start(),n++,e++,t.always(function(){e--,0===e?(n=0,u.done()):u.set((n-e)/n)}),this):this}}(),u.render=function(n){if(u.isRendered())return document.getElementById("nprogress");i(document.documentElement,"nprogress-busy");var t=document.createElement("div");t.id="nprogress",t.innerHTML=c.template;var r,s=t.querySelector(c.barSelector),o=n?"-100":e(u.status||0),l=document.querySelector(c.parent);return f(s,{transition:"all 0 linear",transform:"translate3d("+o+"%,0,0)"}),c.showSpinner||(r=t.querySelector(c.spinnerSelector),r&&a(r)),l!=document.body&&i(l,"nprogress-custom-parent"),l.appendChild(t),t},u.remove=function(){s(document.documentElement,"nprogress-busy"),s(document.querySelector(c.parent),"nprogress-custom-parent");var n=document.getElementById("nprogress");n&&a(n)},u.isRendered=function(){return!!document.getElementById("nprogress")},u.getPositioningCSS=function(){var n=document.body.style,e="WebkitTransform"in n?"Webkit":"MozTransform"in n?"Moz":"msTransform"in n?"ms":"OTransform"in n?"O":"";return e+"Perspective"in n?"translate3d":e+"Transform"in n?"translate":"margin"};var l=function(){function n(){var t=e.shift();t&&t(n)}var e=[];return function(t){e.push(t),1==e.length&&n()}}(),f=function(){function n(n){return n.replace(/^-ms-/,"ms-").replace(/-([\da-z])/gi,function(n,e){return e.toUpperCase()})}function e(n){var e=document.body.style;if(n in e)return n;for(var t,r=i.length,s=n.charAt(0).toUpperCase()+n.slice(1);r--;)if(t=i[r]+s,t in e)return t;return n}function t(t){return t=n(t),s[t]||(s[t]=e(t))}function r(n,e,r){e=t(e),n.style[e]=r}var i=["Webkit","O","Moz","ms"],s={};return function(n,e){var t,i,s=arguments;if(2==s.length)for(t in e)i=e[t],void 0!==i&&e.hasOwnProperty(t)&&r(n,t,i);else r(n,s[1],s[2])}}();return u}); -------------------------------------------------------------------------------- /vendor/extension/sidebar-background/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Jayin/silentor/9398f66734daff52e5e372747e4207984c6d8808/vendor/extension/sidebar-background/1.png -------------------------------------------------------------------------------- /vendor/extension/sidebar-background/README.md: -------------------------------------------------------------------------------- 1 | sidebar-background 2 | ================== 3 | 4 | 侧栏随机背景图 5 | 6 | ![img](1.png) 7 | 8 | ### 使用 9 | 10 | ```html 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | ``` -------------------------------------------------------------------------------- /vendor/extension/sidebar-background/main.css: -------------------------------------------------------------------------------- 1 | .sidebar{background-size:cover;background-position:50% 50%;background-repeat:no-repeat}.sidebar-inner{background-color:rgba(0,0,0,.48)} -------------------------------------------------------------------------------- /vendor/extension/sidebar-background/main.js: -------------------------------------------------------------------------------- 1 | !function(e){"use strict";e(window).on("loaded-sidebar-page",function(){var a=e(".sidebar");a.css("background-image","url('https://unsplash.it/{w}/{h}/?random&gravity=center')".replace("{w}",a.width()).replace("{h}",a.height()))})}(Zepto); -------------------------------------------------------------------------------- /vendor/extension/sidebar-item/gif2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Jayin/silentor/9398f66734daff52e5e372747e4207984c6d8808/vendor/extension/sidebar-item/gif2.gif -------------------------------------------------------------------------------- /vendor/extension/sidebar-item/main.css: -------------------------------------------------------------------------------- 1 | .sidebar-item { 2 | transition: margin-left 0.5s; 3 | -moz-transition: margin-left 0.5s; 4 | -webkit-transition: margin-left 0.5s; 5 | -o-transition: margin-left 0.5s; 6 | } 7 | 8 | .sidebar-item:hover { 9 | margin-left: 13px; 10 | } -------------------------------------------------------------------------------- /vendor/extension/sidebar-item/readme.md: -------------------------------------------------------------------------------- 1 | ### sidebar list item animate 2 | 3 | ![gif2.gif](./gif2.gif) 4 | 5 | ### Usage 6 | 7 | 把下面的内容添加到`index.html` 8 | ``` 9 | 10 | ``` -------------------------------------------------------------------------------- /vendor/github-markdown.css: -------------------------------------------------------------------------------- 1 | .markdown-body hr:after,.markdown-body hr:before{display:table;content:""}.markdown-body ol,.markdown-body td,.markdown-body th,.markdown-body ul{padding:0}.markdown-body .anchor:focus,.markdown-body a:active,.markdown-body a:hover{outline:0}@font-face{font-family:octicons-anchor;src:url(data:font/woff;charset=utf-8;base64,d09GRgABAAAAAAYcAA0AAAAACjQAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABGRlRNAAABMAAAABwAAAAca8vGTk9TLzIAAAFMAAAARAAAAFZG1VHVY21hcAAAAZAAAAA+AAABQgAP9AdjdnQgAAAB0AAAAAQAAAAEACICiGdhc3AAAAHUAAAACAAAAAj//wADZ2x5ZgAAAdwAAADRAAABEKyikaNoZWFkAAACsAAAAC0AAAA2AtXoA2hoZWEAAALgAAAAHAAAACQHngNFaG10eAAAAvwAAAAQAAAAEAwAACJsb2NhAAADDAAAAAoAAAAKALIAVG1heHAAAAMYAAAAHwAAACABEAB2bmFtZQAAAzgAAALBAAAFu3I9x/Nwb3N0AAAF/AAAAB0AAAAvaoFvbwAAAAEAAAAAzBdyYwAAAADP2IQvAAAAAM/bz7t4nGNgZGFgnMDAysDB1Ml0hoGBoR9CM75mMGLkYGBgYmBlZsAKAtJcUxgcPsR8iGF2+O/AEMPsznAYKMwIkgMA5REMOXicY2BgYGaAYBkGRgYQsAHyGMF8FgYFIM0ChED+h5j//yEk/3KoSgZGNgYYk4GRCUgwMaACRoZhDwCs7QgGAAAAIgKIAAAAAf//AAJ4nHWMMQrCQBBF/0zWrCCIKUQsTDCL2EXMohYGSSmorScInsRGL2DOYJe0Ntp7BK+gJ1BxF1stZvjz/v8DRghQzEc4kIgKwiAppcA9LtzKLSkdNhKFY3HF4lK69ExKslx7Xa+vPRVS43G98vG1DnkDMIBUgFN0MDXflU8tbaZOUkXUH0+U27RoRpOIyCKjbMCVejwypzJJG4jIwb43rfl6wbwanocrJm9XFYfskuVC5K/TPyczNU7b84CXcbxks1Un6H6tLH9vf2LRnn8Ax7A5WQAAAHicY2BkYGAA4teL1+yI57f5ysDNwgAC529f0kOmWRiYVgEpDgYmEA8AUzEKsQAAAHicY2BkYGB2+O/AEMPCAAJAkpEBFbAAADgKAe0EAAAiAAAAAAQAAAAEAAAAAAAAKgAqACoAiAAAeJxjYGRgYGBhsGFgYgABEMkFhAwM/xn0QAIAD6YBhwB4nI1Ty07cMBS9QwKlQapQW3VXySvEqDCZGbGaHULiIQ1FKgjWMxknMfLEke2A+IJu+wntrt/QbVf9gG75jK577Lg8K1qQPCfnnnt8fX1NRC/pmjrk/zprC+8D7tBy9DHgBXoWfQ44Av8t4Bj4Z8CLtBL9CniJluPXASf0Lm4CXqFX8Q84dOLnMB17N4c7tBo1AS/Qi+hTwBH4rwHHwN8DXqQ30XXAS7QaLwSc0Gn8NuAVWou/gFmnjLrEaEh9GmDdDGgL3B4JsrRPDU2hTOiMSuJUIdKQQayiAth69r6akSSFqIJuA19TrzCIaY8sIoxyrNIrL//pw7A2iMygkX5vDj+G+kuoLdX4GlGK/8Lnlz6/h9MpmoO9rafrz7ILXEHHaAx95s9lsI7AHNMBWEZHULnfAXwG9/ZqdzLI08iuwRloXE8kfhXYAvE23+23DU3t626rbs8/8adv+9DWknsHp3E17oCf+Z48rvEQNZ78paYM38qfk3v/u3l3u3GXN2Dmvmvpf1Srwk3pB/VSsp512bA/GG5i2WJ7wu430yQ5K3nFGiOqgtmSB5pJVSizwaacmUZzZhXLlZTq8qGGFY2YcSkqbth6aW1tRmlaCFs2016m5qn36SbJrqosG4uMV4aP2PHBmB3tjtmgN2izkGQyLWprekbIntJFing32a5rKWCN/SdSoga45EJykyQ7asZvHQ8PTm6cslIpwyeyjbVltNikc2HTR7YKh9LBl9DADC0U/jLcBZDKrMhUBfQBvXRzLtFtjU9eNHKin0x5InTqb8lNpfKv1s1xHzTXRqgKzek/mb7nB8RZTCDhGEX3kK/8Q75AmUM/eLkfA+0Hi908Kx4eNsMgudg5GLdRD7a84npi+YxNr5i5KIbW5izXas7cHXIMAau1OueZhfj+cOcP3P8MNIWLyYOBuxL6DRylJ4cAAAB4nGNgYoAALjDJyIAOWMCiTIxMLDmZedkABtIBygAAAA==) format('woff')}.markdown-body{-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%;color:#333;overflow:hidden;font-family:"Helvetica Neue",Helvetica,"Segoe UI",Arial,freesans,sans-serif;font-size:16px;line-height:1.6;word-wrap:break-word}.markdown-body strong{font-weight:700}.markdown-body h1{margin:.67em 0}.markdown-body img{border:0}.markdown-body hr{-moz-box-sizing:content-box;box-sizing:content-box;overflow:hidden;background:0 0}.markdown-body input{color:inherit;margin:0;line-height:normal;font:13px/1.4 Helvetica,arial,freesans,clean,sans-serif,"Segoe UI Emoji","Segoe UI Symbol"}.markdown-body code,.markdown-body pre{font:12px Consolas,"Liberation Mono",Menlo,Courier,monospace}.markdown-body html input[disabled]{cursor:default}.markdown-body input[type=checkbox]{-moz-box-sizing:border-box;box-sizing:border-box;padding:0}.markdown-body *{-moz-box-sizing:border-box;box-sizing:border-box}.markdown-body a{background:0 0;color:#4183c4;text-decoration:none}.markdown-body a:active,.markdown-body a:focus,.markdown-body a:hover{text-decoration:underline}.markdown-body hr:after{clear:both}.markdown-body blockquote{margin:0}.markdown-body ol ol,.markdown-body ul ol{list-style-type:lower-roman}.markdown-body ol ol ol,.markdown-body ol ul ol,.markdown-body ul ol ol,.markdown-body ul ul ol{list-style-type:lower-alpha}.markdown-body dd{margin-left:0}.markdown-body pre{word-wrap:normal}.markdown-body kbd{background-color:#e7e7e7;background-image:-webkit-linear-gradient(#fefefe,#e7e7e7);background-image:linear-gradient(#fefefe,#e7e7e7);background-repeat:repeat-x;border-radius:2px;border:1px solid #cfcfcf;color:#000;padding:3px 5px;line-height:10px;font:11px Consolas,"Liberation Mono",Menlo,Courier,monospace;display:inline-block}.markdown-body .highlight .cs,.markdown-body .highlight .ge,.markdown-body dl dt{font-style:italic}.markdown-body h1,.markdown-body h2{padding-bottom:.3em;border-bottom:1px solid #eee}.markdown-body>:first-child{margin-top:0!important}.markdown-body>:last-child{margin-bottom:0!important}.markdown-body .anchor{position:absolute;top:0;bottom:0;left:0;display:block;padding-right:6px;padding-left:30px;margin-left:-30px}.markdown-body h1,.markdown-body h2,.markdown-body h3,.markdown-body h4,.markdown-body h5,.markdown-body h6{position:relative;margin-top:1em;margin-bottom:16px;font-weight:700;line-height:1.4}.markdown-body h1 .octicon-link,.markdown-body h2 .octicon-link,.markdown-body h3 .octicon-link,.markdown-body h4 .octicon-link,.markdown-body h5 .octicon-link,.markdown-body h6 .octicon-link{display:none;color:#000;vertical-align:middle}.markdown-body h1:hover .anchor,.markdown-body h2:hover .anchor,.markdown-body h3:hover .anchor,.markdown-body h4:hover .anchor,.markdown-body h5:hover .anchor,.markdown-body h6:hover .anchor{height:1em;padding-left:8px;margin-left:-30px;line-height:1;text-decoration:none}.markdown-body h1:hover .anchor .octicon-link,.markdown-body h2:hover .anchor .octicon-link,.markdown-body h3:hover .anchor .octicon-link,.markdown-body h4:hover .anchor .octicon-link,.markdown-body h5:hover .anchor .octicon-link,.markdown-body h6:hover .anchor .octicon-link{display:inline-block}.markdown-body h1{font-size:2.25em;line-height:1.2}.markdown-body h2{font-size:1.75em;line-height:1.225}.markdown-body h3{font-size:1.5em;line-height:1.43}.markdown-body h4{font-size:1.25em}.markdown-body h5{font-size:1em}.markdown-body h6{font-size:1em;color:#777}.markdown-body blockquote,.markdown-body dl,.markdown-body ol,.markdown-body p,.markdown-body pre,.markdown-body table,.markdown-body ul{margin-top:0;margin-bottom:16px}.markdown-body hr{height:4px;padding:0;margin:16px 0;background-color:#e7e7e7;border:0}.markdown-body ol,.markdown-body ul{padding-left:2em}.markdown-body ol ol,.markdown-body ol ul,.markdown-body ul ol,.markdown-body ul ul{margin-top:0;margin-bottom:0}.markdown-body li>p{margin-top:16px}.markdown-body dl{padding:0}.markdown-body dl dt{padding:0;margin-top:16px;font-size:1em;font-weight:700}.markdown-body dl dd{padding:0 16px;margin-bottom:16px}.markdown-body blockquote{padding:0 15px;color:#777;border-left:4px solid #ddd}.markdown-body blockquote>:first-child{margin-top:0}.markdown-body blockquote>:last-child{margin-bottom:0}.markdown-body table{border-collapse:collapse;border-spacing:0;display:block;width:100%;overflow:auto;word-break:normal;word-break:keep-all}.markdown-body table th{font-weight:700}.markdown-body table td,.markdown-body table th{padding:6px 13px;border:1px solid #ddd}.markdown-body table tr{background-color:#fff;border-top:1px solid #ccc}.markdown-body table tr:nth-child(2n){background-color:#f8f8f8}.markdown-body img{max-width:100%;-moz-box-sizing:border-box;box-sizing:border-box}.markdown-body code{padding:.2em 0;margin:0;font-size:85%;background-color:rgba(0,0,0,.04);border-radius:3px}.markdown-body code:after,.markdown-body code:before{letter-spacing:-.2em;content:"\00a0"}.markdown-body pre>code{padding:0;margin:0;font-size:100%;word-break:normal;white-space:pre;background:0 0;border:0}.markdown-body .highlight{margin-bottom:16px}.markdown-body .highlight pre,.markdown-body pre{padding:16px;overflow:auto;font-size:85%;line-height:1.45;background-color:#f7f7f7;border-radius:3px}.markdown-body .highlight pre{margin-bottom:0;word-break:normal}.markdown-body pre code{display:inline;max-width:initial;padding:0;margin:0;overflow:initial;line-height:inherit;word-wrap:normal;background-color:transparent;border:0}.markdown-body pre code:after,.markdown-body pre code:before{content:normal}.markdown-body .highlight{background:#fff}.markdown-body .highlight .il,.markdown-body .highlight .m,.markdown-body .highlight .mf,.markdown-body .highlight .mh,.markdown-body .highlight .mi,.markdown-body .highlight .mo{color:#945277}.markdown-body .highlight .s,.markdown-body .highlight .s1,.markdown-body .highlight .s2,.markdown-body .highlight .sb,.markdown-body .highlight .sc,.markdown-body .highlight .sd,.markdown-body .highlight .se,.markdown-body .highlight .sh,.markdown-body .highlight .si,.markdown-body .highlight .sx{color:#df5000}.markdown-body .highlight .k,.markdown-body .highlight .kc,.markdown-body .highlight .kd,.markdown-body .highlight .kn,.markdown-body .highlight .kp,.markdown-body .highlight .kr,.markdown-body .highlight .kt,.markdown-body .highlight .o{font-weight:700}.markdown-body .highlight .kt{color:#458}.markdown-body .highlight .c,.markdown-body .highlight .c1,.markdown-body .highlight .cm{color:#998;font-style:italic}.markdown-body .highlight .cp,.markdown-body .highlight .cs{color:#999;font-weight:700}.markdown-body .highlight .n{color:#333}.markdown-body .highlight .na,.markdown-body .highlight .nv,.markdown-body .highlight .vc,.markdown-body .highlight .vg,.markdown-body .highlight .vi{color:teal}.markdown-body .highlight .nb{color:#0086B3}.markdown-body .highlight .nc{color:#458;font-weight:700}.markdown-body .highlight .no{color:#094e99}.markdown-body .highlight .ni{color:purple}.markdown-body .highlight .ne{color:#900;font-weight:700}.markdown-body .highlight .nf{color:#945277;font-weight:700}.markdown-body .highlight .nn{color:#555}.markdown-body .highlight .nt{color:navy}.markdown-body .highlight .err{color:#a61717;background-color:#e3d2d2}.markdown-body .highlight .gd{color:#000;background-color:#fdd}.markdown-body .highlight .gd .x{color:#000;background-color:#faa}.markdown-body .highlight .gr{color:#a00}.markdown-body .highlight .gh{color:#999}.markdown-body .highlight .gi{color:#000;background-color:#dfd}.markdown-body .highlight .gi .x{color:#000;background-color:#afa}.markdown-body .highlight .go{color:#888}.markdown-body .highlight .gp{color:#555}.markdown-body .highlight .gs{font-weight:700}.markdown-body .highlight .gu{color:purple;font-weight:700}.markdown-body .highlight .gt{color:#a00}.markdown-body .highlight .ow{font-weight:700}.markdown-body .highlight .w{color:#bbb}.markdown-body .highlight .sr{color:#017936}.markdown-body .highlight .ss{color:#8b467f}.markdown-body .highlight .bp{color:#999}.markdown-body .highlight .gc{color:#999;background-color:#EAF2F5}.markdown-body .octicon{font:normal normal 16px octicons-anchor;line-height:1;display:inline-block;text-decoration:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.markdown-body .octicon-link:before{content:'\f05c'}.markdown-body .task-list-item{list-style-type:none}.markdown-body .task-list-item+.task-list-item{margin-top:3px}.markdown-body .task-list-item input{float:left;margin:.3em 0 .25em -1.6em;vertical-align:middle} -------------------------------------------------------------------------------- /vendor/github.css: -------------------------------------------------------------------------------- 1 | .hljs{display:block;overflow-x:auto;padding:.5em;color:#333;background:#f8f8f8;-webkit-text-size-adjust:none}.diff .hljs-header,.hljs-comment,.hljs-javadoc,.hljs-template_comment{color:#998;font-style:italic}.css .rule .hljs-keyword,.hljs-keyword,.hljs-request,.hljs-status,.hljs-subst,.hljs-winutils,.javascript .hljs-title,.nginx .hljs-title{color:#333;font-weight:700}.hljs-hexcolor,.hljs-number,.ruby .hljs-constant{color:teal}.hljs-dartdoc,.hljs-phpdoc,.hljs-string,.hljs-tag .hljs-value,.tex .hljs-formula{color:#d14}.hljs-id,.hljs-title,.scss .hljs-preprocessor{color:#900;font-weight:700}.hljs-list .hljs-keyword,.hljs-subst,.javascript .hljs-title{font-weight:400}.hljs-class .hljs-title,.hljs-type,.tex .hljs-command,.vhdl .hljs-literal{color:#458;font-weight:700}.django .hljs-tag .hljs-keyword,.hljs-rules .hljs-property,.hljs-tag,.hljs-tag .hljs-title{color:navy;font-weight:400}.hljs-attribute,.hljs-variable,.lisp .hljs-body{color:teal}.hljs-regexp{color:#009926}.clojure .hljs-keyword,.hljs-prompt,.hljs-symbol,.lisp .hljs-keyword,.ruby .hljs-symbol .hljs-string,.scheme .hljs-keyword,.tex .hljs-special{color:#990073}.hljs-built_in{color:#0086b3}.hljs-cdata,.hljs-doctype,.hljs-pi,.hljs-pragma,.hljs-preprocessor,.hljs-shebang{color:#999;font-weight:700}.hljs-deletion{background:#fdd}.hljs-addition{background:#dfd}.diff .hljs-change{background:#0086b3}.hljs-chunk{color:#aaa} -------------------------------------------------------------------------------- /vendor/highlight/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2006, Ivan Sagalaev 2 | All rights reserved. 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions are met: 5 | 6 | * Redistributions of source code must retain the above copyright 7 | notice, this list of conditions and the following disclaimer. 8 | * Redistributions in binary form must reproduce the above copyright 9 | notice, this list of conditions and the following disclaimer in the 10 | documentation and/or other materials provided with the distribution. 11 | * Neither the name of highlight.js nor the names of its contributors 12 | may be used to endorse or promote products derived from this software 13 | without specific prior written permission. 14 | 15 | THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ANY 16 | EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18 | DISCLAIMED. IN NO EVENT SHALL THE REGENTS AND CONTRIBUTORS BE LIABLE FOR ANY 19 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 | -------------------------------------------------------------------------------- /vendor/highlight/README.md: -------------------------------------------------------------------------------- 1 | # Highlight.js 2 | 3 | [![Build Status](https://travis-ci.org/isagalaev/highlight.js.svg?branch=master)](https://travis-ci.org/isagalaev/highlight.js) 4 | 5 | Highlight.js is a syntax highlighter written in JavaScript. It works in the 6 | browser as well as on the server. It works with pretty much any markup, 7 | doesn't depend on any framework and has automatic language detection. 8 | 9 | 10 | ## Getting Started 11 | 12 | The bare minimum for using highlight.js on a web page is linking to the library 13 | along with one of the styles and calling [`initHighlightingOnLoad`][1]: 14 | 15 | ```html 16 | 17 | 18 | 19 | ``` 20 | 21 | This will find and highlight code inside of `
` tags trying to detect
 22 | the language automatically. If automatic detection doesn't work for you, you can
 23 | specify the language in the class attribute:
 24 | 
 25 | ```html
 26 | 
...
27 | ``` 28 | 29 | The list of supported language classes is available in the [class reference][8]. 30 | Classes can also be prefixed with either `language-` or `lang-`. 31 | 32 | To disable highlighting altogether use the `nohighlight` class: 33 | 34 | ```html 35 |
...
36 | ``` 37 | 38 | ## Custom Initialization 39 | 40 | When you need a bit more control over the initialization of 41 | highlight.js, you can use the [`highlightBlock`][2] and [`configure`][3] 42 | functions. This allows you to control *what* to highlight and *when*. 43 | 44 | Here's an equivalent way to calling [`initHighlightingOnLoad`][1] using jQuery: 45 | 46 | ```javascript 47 | $(document).ready(function() { 48 | $('pre code').each(function(i, block) { 49 | hljs.highlightBlock(block); 50 | }); 51 | }); 52 | ``` 53 | 54 | You can use any tags instead of `
` to mark up your code. If you don't
 55 | use a container that preserve line breaks you will need to configure
 56 | highlight.js to use the `
` tag: 57 | 58 | ```javascript 59 | hljs.configure({useBR: true}); 60 | 61 | $('div.code').each(function(i, block) { 62 | hljs.highlightBlock(block); 63 | }); 64 | ``` 65 | 66 | For other options refer to the documentation for [`configure`][3]. 67 | 68 | 69 | ## Getting the Library 70 | 71 | You can get highlight.js as a hosted or custom-build browser script or as a 72 | server module. Head over to the [download page][4] for all the options. 73 | 74 | Note, that the library is not supposed to work straight from the source on 75 | GitHub, it requires building. If none of the pre-packaged options work for you 76 | refer to the [building documentation][5]. 77 | 78 | 79 | ## License 80 | 81 | Highlight.js is released under the BSD License. See [LICENSE][10] file for 82 | details. 83 | 84 | 85 | ## Links 86 | 87 | The official site for the library is at . 88 | 89 | Further in-depth documentation for the API and other topics is at 90 | . 91 | 92 | Authors and contributors are listed in the [AUTHORS.en.txt][9] file. 93 | 94 | [1]: http://highlightjs.readthedocs.org/en/latest/api.html#inithighlightingonload 95 | [2]: http://highlightjs.readthedocs.org/en/latest/api.html#highlightblock-block 96 | [3]: http://highlightjs.readthedocs.org/en/latest/api.html#configure-options 97 | [4]: https://highlightjs.org/download/ 98 | [5]: http://highlightjs.readthedocs.org/en/latest/building-testing.html 99 | [8]: http://highlightjs.readthedocs.org/en/latest/css-classes-reference.html 100 | [9]: https://github.com/isagalaev/highlight.js/blob/master/AUTHORS.en.txt 101 | [10]: https://github.com/isagalaev/highlight.js/blob/master/LICENSE 102 | -------------------------------------------------------------------------------- /vendor/highlight/highlight.pack.js: -------------------------------------------------------------------------------- 1 | var hljs=new function(){function e(e){return e.replace(/&/gm,"&").replace(//gm,">")}function t(e){return e.nodeName.toLowerCase()}function n(e,t){var n=e&&e.exec(t);return n&&0==n.index}function r(e){var t=(e.className+" "+(e.parentNode?e.parentNode.className:"")).split(/\s+/);return t=t.map(function(e){return e.replace(/^lang(uage)?-/,"")}),t.filter(function(e){return m(e)||/no(-?)highlight/.test(e)})[0]}function i(e,t){var n={};for(var r in e)n[r]=e[r];if(t)for(var r in t)n[r]=t[r];return n}function a(e){var n=[];return function r(e,i){for(var a=e.firstChild;a;a=a.nextSibling)3==a.nodeType?i+=a.nodeValue.length:1==a.nodeType&&(n.push({event:"start",offset:i,node:a}),i=r(a,i),t(a).match(/br|hr|img|input/)||n.push({event:"stop",offset:i,node:a}));return i}(e,0),n}function s(n,r,i){function a(){return n.length&&r.length?n[0].offset!=r[0].offset?n[0].offset"}function o(e){l+=""}function c(e){("start"==e.event?s:o)(e.node)}for(var u=0,l="",f=[];n.length||r.length;){var h=a();if(l+=e(i.substr(u,h[0].offset-u)),u=h[0].offset,h==n){f.reverse().forEach(o);do c(h.splice(0,1)[0]),h=a();while(h==n&&h.length&&h[0].offset==u);f.reverse().forEach(s)}else"start"==h[0].event?f.push(h[0].node):f.pop(),c(h.splice(0,1)[0])}return l+e(i.substr(u))}function o(e){function t(e){return e&&e.source||e}function n(n,r){return RegExp(t(n),"m"+(e.cI?"i":"")+(r?"g":""))}function r(a,s){if(!a.compiled){if(a.compiled=!0,a.k=a.k||a.bK,a.k){var o={},c=function(t,n){e.cI&&(n=n.toLowerCase()),n.split(" ").forEach(function(e){var n=e.split("|");o[n[0]]=[t,n[1]?Number(n[1]):1]})};"string"==typeof a.k?c("keyword",a.k):Object.keys(a.k).forEach(function(e){c(e,a.k[e])}),a.k=o}a.lR=n(a.l||/\b[A-Za-z0-9_]+\b/,!0),s&&(a.bK&&(a.b="\\b("+a.bK.split(" ").join("|")+")\\b"),a.b||(a.b=/\B|\b/),a.bR=n(a.b),a.e||a.eW||(a.e=/\B|\b/),a.e&&(a.eR=n(a.e)),a.tE=t(a.e)||"",a.eW&&s.tE&&(a.tE+=(a.e?"|":"")+s.tE)),a.i&&(a.iR=n(a.i)),void 0===a.r&&(a.r=1),a.c||(a.c=[]);var u=[];a.c.forEach(function(e){e.v?e.v.forEach(function(t){u.push(i(e,t))}):u.push("self"==e?a:e)}),a.c=u,a.c.forEach(function(e){r(e,a)}),a.starts&&r(a.starts,s);var l=a.c.map(function(e){return e.bK?"\\.?("+e.b+")\\.?":e.b}).concat([a.tE,a.i]).map(t).filter(Boolean);a.t=l.length?n(l.join("|"),!0):{exec:function(){return null}}}}r(e)}function c(t,r,i,a){function s(e,t){for(var r=0;r";return a+=e+'">',a+t+s}function p(){if(!w.k)return e(B);var t="",n=0;w.lR.lastIndex=0;for(var r=w.lR.exec(B);r;){t+=e(B.substr(n,r.index-n));var i=h(w,r);i?(y+=i[1],t+=g(i[0],e(r[0]))):t+=e(r[0]),n=w.lR.lastIndex,r=w.lR.exec(B)}return t+e(B.substr(n))}function v(){if(w.sL&&!E[w.sL])return e(B);var t=w.sL?c(w.sL,B,!0,L[w.sL]):u(B);return w.r>0&&(y+=t.r),"continuous"==w.subLanguageMode&&(L[w.sL]=t.top),g(t.language,t.value,!1,!0)}function b(){return void 0!==w.sL?v():p()}function d(t,n){var r=t.cN?g(t.cN,"",!0):"";t.rB?(M+=r,B=""):t.eB?(M+=e(n)+r,B=""):(M+=r,B=n),w=Object.create(t,{parent:{value:w}})}function R(t,n){if(B+=t,void 0===n)return M+=b(),0;var r=s(n,w);if(r)return M+=b(),d(r,n),r.rB?0:n.length;var i=l(w,n);if(i){var a=w;a.rE||a.eE||(B+=n),M+=b();do w.cN&&(M+=""),y+=w.r,w=w.parent;while(w!=i.parent);return a.eE&&(M+=e(n)),B="",i.starts&&d(i.starts,""),a.rE?0:n.length}if(f(n,w))throw new Error('Illegal lexeme "'+n+'" for mode "'+(w.cN||"")+'"');return B+=n,n.length||1}var x=m(t);if(!x)throw new Error('Unknown language: "'+t+'"');o(x);for(var w=a||x,L={},M="",k=w;k!=x;k=k.parent)k.cN&&(M=g(k.cN,"",!0)+M);var B="",y=0;try{for(var C,I,j=0;;){if(w.t.lastIndex=j,C=w.t.exec(r),!C)break;I=R(r.substr(j,C.index-j),C[0]),j=C.index+I}R(r.substr(j));for(var k=w;k.parent;k=k.parent)k.cN&&(M+="");return{r:y,value:M,language:t,top:w}}catch(A){if(-1!=A.message.indexOf("Illegal"))return{r:0,value:e(r)};throw A}}function u(t,n){n=n||N.languages||Object.keys(E);var r={r:0,value:e(t)},i=r;return n.forEach(function(e){if(m(e)){var n=c(e,t,!1);n.language=e,n.r>i.r&&(i=n),n.r>r.r&&(i=r,r=n)}}),i.language&&(r.second_best=i),r}function l(e){return N.tabReplace&&(e=e.replace(/^((<[^>]+>|\t)+)/gm,function(e,t){return t.replace(/\t/g,N.tabReplace)})),N.useBR&&(e=e.replace(/\n/g,"
")),e}function f(e,t,n){var r=t?R[t]:n,i=[e.trim()];return e.match(/(\s|^)hljs(\s|$)/)||i.push("hljs"),r&&i.push(r),i.join(" ").trim()}function h(e){var t=r(e);if(!/no(-?)highlight/.test(t)){var n;N.useBR?(n=document.createElementNS("http://www.w3.org/1999/xhtml","div"),n.innerHTML=e.innerHTML.replace(/\n/g,"").replace(//g,"\n")):n=e;var i=n.textContent,o=t?c(t,i,!0):u(i),h=a(n);if(h.length){var g=document.createElementNS("http://www.w3.org/1999/xhtml","div");g.innerHTML=o.value,o.value=s(h,a(g),i)}o.value=l(o.value),e.innerHTML=o.value,e.className=f(e.className,t,o.language),e.result={language:o.language,re:o.r},o.second_best&&(e.second_best={language:o.second_best.language,re:o.second_best.r})}}function g(e){N=i(N,e)}function p(){if(!p.called){p.called=!0;var e=document.querySelectorAll("pre code");Array.prototype.forEach.call(e,h)}}function v(){addEventListener("DOMContentLoaded",p,!1),addEventListener("load",p,!1)}function b(e,t){var n=E[e]=t(this);n.aliases&&n.aliases.forEach(function(t){R[t]=e})}function d(){return Object.keys(E)}function m(e){return E[e]||E[R[e]]}var N={classPrefix:"hljs-",tabReplace:null,useBR:!1,languages:void 0},E={},R={};this.highlight=c,this.highlightAuto=u,this.fixMarkup=l,this.highlightBlock=h,this.configure=g,this.initHighlighting=p,this.initHighlightingOnLoad=v,this.registerLanguage=b,this.listLanguages=d,this.getLanguage=m,this.inherit=i,this.IR="[a-zA-Z][a-zA-Z0-9_]*",this.UIR="[a-zA-Z_][a-zA-Z0-9_]*",this.NR="\\b\\d+(\\.\\d+)?",this.CNR="(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",this.BNR="\\b(0b[01]+)",this.RSR="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",this.BE={b:"\\\\[\\s\\S]",r:0},this.ASM={cN:"string",b:"'",e:"'",i:"\\n",c:[this.BE]},this.QSM={cN:"string",b:'"',e:'"',i:"\\n",c:[this.BE]},this.PWM={b:/\b(a|an|the|are|I|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such)\b/},this.CLCM={cN:"comment",b:"//",e:"$",c:[this.PWM]},this.CBCM={cN:"comment",b:"/\\*",e:"\\*/",c:[this.PWM]},this.HCM={cN:"comment",b:"#",e:"$",c:[this.PWM]},this.NM={cN:"number",b:this.NR,r:0},this.CNM={cN:"number",b:this.CNR,r:0},this.BNM={cN:"number",b:this.BNR,r:0},this.CSSNM={cN:"number",b:this.NR+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",r:0},this.RM={cN:"regexp",b:/\//,e:/\/[gimuy]*/,i:/\n/,c:[this.BE,{b:/\[/,e:/\]/,r:0,c:[this.BE]}]},this.TM={cN:"title",b:this.IR,r:0},this.UTM={cN:"title",b:this.UIR,r:0}};hljs.registerLanguage("javascript",function(r){return{aliases:["js"],k:{keyword:"in if for while finally var new function do return void else break catch instanceof with throw case default try this switch continue typeof delete let yield const class",literal:"true false null undefined NaN Infinity",built_in:"eval isFinite isNaN parseFloat parseInt decodeURI decodeURIComponent encodeURI encodeURIComponent escape unescape Object Function Boolean Error EvalError InternalError RangeError ReferenceError StopIteration SyntaxError TypeError URIError Number Math Date String RegExp Array Float32Array Float64Array Int16Array Int32Array Int8Array Uint16Array Uint32Array Uint8Array Uint8ClampedArray ArrayBuffer DataView JSON Intl arguments require module console window document"},c:[{cN:"pi",b:/^\s*('|")use strict('|")/,r:10},r.ASM,r.QSM,r.CLCM,r.CBCM,r.CNM,{b:"("+r.RSR+"|\\b(case|return|throw)\\b)\\s*",k:"return throw case",c:[r.CLCM,r.CBCM,r.RM,{b:/;/,r:0,sL:"xml"}],r:0},{cN:"function",bK:"function",e:/\{/,eE:!0,c:[r.inherit(r.TM,{b:/[A-Za-z$_][0-9A-Za-z$_]*/}),{cN:"params",b:/\(/,e:/\)/,c:[r.CLCM,r.CBCM],i:/["'\(]/}],i:/\[|%/},{b:/\$[(.]/},{b:"\\."+r.IR,r:0}]}});hljs.registerLanguage("sql",function(e){var t={cN:"comment",b:"--",e:"$"};return{cI:!0,i:/[<>]/,c:[{cN:"operator",bK:"begin end start commit rollback savepoint lock alter create drop rename call delete do handler insert load replace select truncate update set show pragma grant merge describe use explain help declare prepare execute deallocate savepoint release unlock purge reset change stop analyze cache flush optimize repair kill install uninstall checksum restore check backup",e:/;/,eW:!0,k:{keyword:"abs absolute acos action add adddate addtime aes_decrypt aes_encrypt after aggregate all allocate alter analyze and any are as asc ascii asin assertion at atan atan2 atn2 authorization authors avg backup before begin benchmark between bin binlog bit_and bit_count bit_length bit_or bit_xor both by cache call cascade cascaded case cast catalog ceil ceiling chain change changed char_length character_length charindex charset check checksum checksum_agg choose close coalesce coercibility collate collation collationproperty column columns columns_updated commit compress concat concat_ws concurrent connect connection connection_id consistent constraint constraints continue contributors conv convert convert_tz corresponding cos cot count count_big crc32 create cross cume_dist curdate current current_date current_time current_timestamp current_user cursor curtime data database databases datalength date_add date_format date_sub dateadd datediff datefromparts datename datepart datetime2fromparts datetimeoffsetfromparts day dayname dayofmonth dayofweek dayofyear deallocate declare decode default deferrable deferred degrees delayed delete des_decrypt des_encrypt des_key_file desc describe descriptor diagnostics difference disconnect distinct distinctrow div do domain double drop dumpfile each else elt enclosed encode encrypt end end-exec engine engines eomonth errors escape escaped event eventdata events except exception exec execute exists exp explain export_set extended external extract fast fetch field fields find_in_set first first_value floor flush for force foreign format found found_rows from from_base64 from_days from_unixtime full function get get_format get_lock getdate getutcdate global go goto grant grants greatest group group_concat grouping grouping_id gtid_subset gtid_subtract handler having help hex high_priority hosts hour ident_current ident_incr ident_seed identified identity if ifnull ignore iif ilike immediate in index indicator inet6_aton inet6_ntoa inet_aton inet_ntoa infile initially inner innodb input insert install instr intersect into is is_free_lock is_ipv4 is_ipv4_compat is_ipv4_mapped is_not is_not_null is_used_lock isdate isnull isolation join key kill language last last_day last_insert_id last_value lcase lead leading least leaves left len lenght level like limit lines ln load load_file local localtime localtimestamp locate lock log log10 log2 logfile logs low_priority lower lpad ltrim make_set makedate maketime master master_pos_wait match matched max md5 medium merge microsecond mid min minute mod mode module month monthname mutex name_const names national natural nchar next no no_write_to_binlog not now nullif nvarchar oct octet_length of old_password on only open optimize option optionally or ord order outer outfile output pad parse partial partition password patindex percent_rank percentile_cont percentile_disc period_add period_diff pi plugin position pow power pragma precision prepare preserve primary prior privileges procedure procedure_analyze processlist profile profiles public publishingservername purge quarter query quick quote quotename radians rand read references regexp relative relaylog release release_lock rename repair repeat replace replicate reset restore restrict return returns reverse revoke right rlike rollback rollup round row row_count rows rpad rtrim savepoint schema scroll sec_to_time second section select serializable server session session_user set sha sha1 sha2 share show sign sin size slave sleep smalldatetimefromparts snapshot some soname soundex sounds_like space sql sql_big_result sql_buffer_result sql_cache sql_calc_found_rows sql_no_cache sql_small_result sql_variant_property sqlstate sqrt square start starting status std stddev stddev_pop stddev_samp stdev stdevp stop str str_to_date straight_join strcmp string stuff subdate substr substring subtime subtring_index sum switchoffset sysdate sysdatetime sysdatetimeoffset system_user sysutcdatetime table tables tablespace tan temporary terminated tertiary_weights then time time_format time_to_sec timediff timefromparts timestamp timestampadd timestampdiff timezone_hour timezone_minute to to_base64 to_days to_seconds todatetimeoffset trailing transaction translation trigger trigger_nestlevel triggers trim truncate try_cast try_convert try_parse ucase uncompress uncompressed_length unhex unicode uninstall union unique unix_timestamp unknown unlock update upgrade upped upper usage use user user_resources using utc_date utc_time utc_timestamp uuid uuid_short validate_password_strength value values var var_pop var_samp variables variance varp version view warnings week weekday weekofyear weight_string when whenever where with work write xml xor year yearweek zon",literal:"true false null",built_in:"array bigint binary bit blob boolean char character date dec decimal float int integer interval number numeric real serial smallint varchar varying int8 serial8 text"},c:[{cN:"string",b:"'",e:"'",c:[e.BE,{b:"''"}]},{cN:"string",b:'"',e:'"',c:[e.BE,{b:'""'}]},{cN:"string",b:"`",e:"`",c:[e.BE]},e.CNM,e.CBCM,t]},e.CBCM,t]}});hljs.registerLanguage("python",function(e){var r={cN:"prompt",b:/^(>>>|\.\.\.) /},b={cN:"string",c:[e.BE],v:[{b:/(u|b)?r?'''/,e:/'''/,c:[r],r:10},{b:/(u|b)?r?"""/,e:/"""/,c:[r],r:10},{b:/(u|r|ur)'/,e:/'/,r:10},{b:/(u|r|ur)"/,e:/"/,r:10},{b:/(b|br)'/,e:/'/},{b:/(b|br)"/,e:/"/},e.ASM,e.QSM]},i={cN:"number",r:0,v:[{b:e.BNR+"[lLjJ]?"},{b:"\\b(0o[0-7]+)[lLjJ]?"},{b:e.CNR+"[lLjJ]?"}]},l={cN:"params",b:/\(/,e:/\)/,c:["self",r,i,b]},n={e:/:/,i:/[${=;\n]/,c:[e.UTM,l]};return{aliases:["py","gyp"],k:{keyword:"and elif is global as in if from raise for except finally print import pass return exec else break not with class assert yield try while continue del or def lambda nonlocal|10 None True False",built_in:"Ellipsis NotImplemented"},i:/(<\/|->|\?)/,c:[r,i,b,e.HCM,e.inherit(n,{cN:"function",bK:"def",r:10}),e.inherit(n,{cN:"class",bK:"class"}),{cN:"decorator",b:/@/,e:/$/},{b:/\b(print|exec)\(/}]}});hljs.registerLanguage("perl",function(e){var t="getpwent getservent quotemeta msgrcv scalar kill dbmclose undef lc ma syswrite tr send umask sysopen shmwrite vec qx utime local oct semctl localtime readpipe do return format read sprintf dbmopen pop getpgrp not getpwnam rewinddir qqfileno qw endprotoent wait sethostent bless s|0 opendir continue each sleep endgrent shutdown dump chomp connect getsockname die socketpair close flock exists index shmgetsub for endpwent redo lstat msgctl setpgrp abs exit select print ref gethostbyaddr unshift fcntl syscall goto getnetbyaddr join gmtime symlink semget splice x|0 getpeername recv log setsockopt cos last reverse gethostbyname getgrnam study formline endhostent times chop length gethostent getnetent pack getprotoent getservbyname rand mkdir pos chmod y|0 substr endnetent printf next open msgsnd readdir use unlink getsockopt getpriority rindex wantarray hex system getservbyport endservent int chr untie rmdir prototype tell listen fork shmread ucfirst setprotoent else sysseek link getgrgid shmctl waitpid unpack getnetbyname reset chdir grep split require caller lcfirst until warn while values shift telldir getpwuid my getprotobynumber delete and sort uc defined srand accept package seekdir getprotobyname semop our rename seek if q|0 chroot sysread setpwent no crypt getc chown sqrt write setnetent setpriority foreach tie sin msgget map stat getlogin unless elsif truncate exec keys glob tied closedirioctl socket readlink eval xor readline binmode setservent eof ord bind alarm pipe atan2 getgrent exp time push setgrent gt lt or ne m|0 break given say state when",r={cN:"subst",b:"[$@]\\{",e:"\\}",k:t},s={b:"->{",e:"}"},n={cN:"variable",v:[{b:/\$\d/},{b:/[\$\%\@](\^\w\b|#\w+(\:\:\w+)*|{\w+}|\w+(\:\:\w*)*)/},{b:/[\$\%\@][^\s\w{]/,r:0}]},o={cN:"comment",b:"^(__END__|__DATA__)",e:"\\n$",r:5},i=[e.BE,r,n],c=[n,e.HCM,o,{cN:"comment",b:"^\\=\\w",e:"\\=cut",eW:!0},s,{cN:"string",c:i,v:[{b:"q[qwxr]?\\s*\\(",e:"\\)",r:5},{b:"q[qwxr]?\\s*\\[",e:"\\]",r:5},{b:"q[qwxr]?\\s*\\{",e:"\\}",r:5},{b:"q[qwxr]?\\s*\\|",e:"\\|",r:5},{b:"q[qwxr]?\\s*\\<",e:"\\>",r:5},{b:"qw\\s+q",e:"q",r:5},{b:"'",e:"'",c:[e.BE]},{b:'"',e:'"'},{b:"`",e:"`",c:[e.BE]},{b:"{\\w+}",c:[],r:0},{b:"-?\\w+\\s*\\=\\>",c:[],r:0}]},{cN:"number",b:"(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b",r:0},{b:"(\\/\\/|"+e.RSR+"|\\b(split|return|print|reverse|grep)\\b)\\s*",k:"split return print reverse grep",r:0,c:[e.HCM,o,{cN:"regexp",b:"(s|tr|y)/(\\\\.|[^/])*/(\\\\.|[^/])*/[a-z]*",r:10},{cN:"regexp",b:"(m|qr)?/",e:"/[a-z]*",c:[e.BE],r:0}]},{cN:"sub",bK:"sub",e:"(\\s*\\(.*?\\))?[;{]",r:5},{cN:"operator",b:"-\\w\\b",r:0}];return r.c=c,s.c=c,{aliases:["pl"],k:t,c:c}});hljs.registerLanguage("apache",function(e){var r={cN:"number",b:"[\\$%]\\d+"};return{aliases:["apacheconf"],cI:!0,c:[e.HCM,{cN:"tag",b:""},{cN:"keyword",b:/\w+/,r:0,k:{common:"order deny allow setenv rewriterule rewriteengine rewritecond documentroot sethandler errordocument loadmodule options header listen serverroot servername"},starts:{e:/$/,r:0,k:{literal:"on off all"},c:[{cN:"sqbracket",b:"\\s\\[",e:"\\]$"},{cN:"cbracket",b:"[\\$%]\\{",e:"\\}",c:["self",r]},r,e.QSM]}}],i:/\S/}});hljs.registerLanguage("xml",function(){var t="[A-Za-z0-9\\._:-]+",e={b:/<\?(php)?(?!\w)/,e:/\?>/,sL:"php",subLanguageMode:"continuous"},c={eW:!0,i:/]+/}]}]}]};return{aliases:["html","xhtml","rss","atom","xsl","plist"],cI:!0,c:[{cN:"doctype",b:"",r:10,c:[{b:"\\[",e:"\\]"}]},{cN:"comment",b:"",r:10},{cN:"cdata",b:"<\\!\\[CDATA\\[",e:"\\]\\]>",r:10},{cN:"tag",b:"|$)",e:">",k:{title:"style"},c:[c],starts:{e:"",rE:!0,sL:"css"}},{cN:"tag",b:"|$)",e:">",k:{title:"script"},c:[c],starts:{e:"",rE:!0,sL:"javascript"}},e,{cN:"pi",b:/<\?\w+/,e:/\?>/,r:10},{cN:"tag",b:"",c:[{cN:"title",b:/[^ \/><\n\t]+/,r:0},c]}]}});hljs.registerLanguage("css",function(e){var c="[a-zA-Z-][a-zA-Z0-9_-]*",a={cN:"function",b:c+"\\(",rB:!0,eE:!0,e:"\\("};return{cI:!0,i:"[=/|']",c:[e.CBCM,{cN:"id",b:"\\#[A-Za-z0-9_-]+"},{cN:"class",b:"\\.[A-Za-z0-9_-]+",r:0},{cN:"attr_selector",b:"\\[",e:"\\]",i:"$"},{cN:"pseudo",b:":(:)?[a-zA-Z0-9\\_\\-\\+\\(\\)\\\"\\']+"},{cN:"at_rule",b:"@(font-face|page)",l:"[a-z-]+",k:"font-face page"},{cN:"at_rule",b:"@",e:"[{;]",c:[{cN:"keyword",b:/\S+/},{b:/\s/,eW:!0,eE:!0,r:0,c:[a,e.ASM,e.QSM,e.CSSNM]}]},{cN:"tag",b:c,r:0},{cN:"rules",b:"{",e:"}",i:"[^\\s]",r:0,c:[e.CBCM,{cN:"rule",b:"[^\\s]",rB:!0,e:";",eW:!0,c:[{cN:"attribute",b:"[A-Z\\_\\.\\-]+",e:":",eE:!0,i:"[^\\s]",starts:{cN:"value",eW:!0,eE:!0,c:[a,e.CSSNM,e.QSM,e.ASM,e.CBCM,{cN:"hexcolor",b:"#[0-9A-Fa-f]+"},{cN:"important",b:"!important"}]}}]}]}]}});hljs.registerLanguage("cpp",function(t){var e={keyword:"false int float while private char catch export virtual operator sizeof dynamic_cast|10 typedef const_cast|10 const struct for static_cast|10 union namespace unsigned long throw volatile static protected bool template mutable if public friend do return goto auto void enum else break new extern using true class asm case typeid short reinterpret_cast|10 default double register explicit signed typename try this switch continue wchar_t inline delete alignof char16_t char32_t constexpr decltype noexcept nullptr static_assert thread_local restrict _Bool complex _Complex _Imaginary",built_in:"std string cin cout cerr clog stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap array shared_ptr abort abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf"};return{aliases:["c","h","c++","h++"],k:e,i:""]',k:"include",i:"\\n"},t.CLCM]},{cN:"stl_container",b:"\\b(deque|list|queue|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array)\\s*<",e:">",k:e,c:["self"]},{b:t.IR+"::"}]}});hljs.registerLanguage("json",function(e){var t={literal:"true false null"},i=[e.QSM,e.CNM],l={cN:"value",e:",",eW:!0,eE:!0,c:i,k:t},c={b:"{",e:"}",c:[{cN:"attribute",b:'\\s*"',e:'"\\s*:\\s*',eB:!0,eE:!0,c:[e.BE],i:"\\n",starts:l}],i:"\\S"},n={b:"\\[",e:"\\]",c:[e.inherit(l,{cN:null})],i:"\\S"};return i.splice(i.length,0,c,n),{c:i,k:t,i:"\\S"}});hljs.registerLanguage("coffeescript",function(e){var c={keyword:"in if for while finally new do return else break catch instanceof throw try this switch continue typeof delete debugger super then unless until loop of by when and or is isnt not",literal:"true false null undefined yes no on off",reserved:"case default function var void with const let enum export import native __hasProp __extends __slice __bind __indexOf",built_in:"npm require console print module global window document"},n="[A-Za-z$_][0-9A-Za-z$_]*",t={cN:"subst",b:/#\{/,e:/}/,k:c},r=[e.BNM,e.inherit(e.CNM,{starts:{e:"(\\s*/)?",r:0}}),{cN:"string",v:[{b:/'''/,e:/'''/,c:[e.BE]},{b:/'/,e:/'/,c:[e.BE]},{b:/"""/,e:/"""/,c:[e.BE,t]},{b:/"/,e:/"/,c:[e.BE,t]}]},{cN:"regexp",v:[{b:"///",e:"///",c:[t,e.HCM]},{b:"//[gim]*",r:0},{b:/\/(?![ *])(\\\/|.)*?\/[gim]*(?=\W|$)/}]},{cN:"property",b:"@"+n},{b:"`",e:"`",eB:!0,eE:!0,sL:"javascript"}];t.c=r;var i=e.inherit(e.TM,{b:n}),s="(\\(.*\\))?\\s*\\B[-=]>",o={cN:"params",b:"\\([^\\(]",rB:!0,c:[{b:/\(/,e:/\)/,k:c,c:["self"].concat(r)}]};return{aliases:["coffee","cson","iced"],k:c,i:/\/\*/,c:r.concat([{cN:"comment",b:"###",e:"###",c:[e.PWM]},e.HCM,{cN:"function",b:"^\\s*"+n+"\\s*=\\s*"+s,e:"[-=]>",rB:!0,c:[i,o]},{b:/[:\(,=]\s*/,r:0,c:[{cN:"function",b:s,e:"[-=]>",rB:!0,c:[o]}]},{cN:"class",bK:"class",e:"$",i:/[:="\[\]]/,c:[{bK:"extends",eW:!0,i:/[:="\[\]]/,c:[i]},i]},{cN:"attribute",b:n+":",e:":",rB:!0,rE:!0,r:0}])}});hljs.registerLanguage("php",function(e){var c={cN:"variable",b:"\\$+[a-zA-Z_-ÿ][a-zA-Z0-9_-ÿ]*"},i={cN:"preprocessor",b:/<\?(php)?|\?>/},a={cN:"string",c:[e.BE,i],v:[{b:'b"',e:'"'},{b:"b'",e:"'"},e.inherit(e.ASM,{i:null}),e.inherit(e.QSM,{i:null})]},n={v:[e.BNM,e.CNM]};return{aliases:["php3","php4","php5","php6"],cI:!0,k:"and include_once list abstract global private echo interface as static endswitch array null if endwhile or const for endforeach self var while isset public protected exit foreach throw elseif include __FILE__ empty require_once do xor return parent clone use __CLASS__ __LINE__ else break print eval new catch __METHOD__ case exception default die require __FUNCTION__ enddeclare final try switch continue endfor endif declare unset true false trait goto instanceof insteadof __DIR__ __NAMESPACE__ yield finally",c:[e.CLCM,e.HCM,{cN:"comment",b:"/\\*",e:"\\*/",c:[{cN:"phpdoc",b:"\\s@[A-Za-z]+"},i]},{cN:"comment",b:"__halt_compiler.+?;",eW:!0,k:"__halt_compiler",l:e.UIR},{cN:"string",b:"<<<['\"]?\\w+['\"]?$",e:"^\\w+;",c:[e.BE]},i,c,{b:/->+[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/},{cN:"function",bK:"function",e:/[;{]/,eE:!0,i:"\\$|\\[|%",c:[e.UTM,{cN:"params",b:"\\(",e:"\\)",c:["self",c,e.CBCM,a,n]}]},{cN:"class",bK:"class interface",e:"{",eE:!0,i:/[:\(\$"]/,c:[{bK:"extends implements"},e.UTM]},{bK:"namespace",e:";",i:/[\.']/,c:[e.UTM]},{bK:"use",e:";",c:[e.UTM]},{b:"=>"},a,n]}});hljs.registerLanguage("nginx",function(e){var r={cN:"variable",v:[{b:/\$\d+/},{b:/\$\{/,e:/}/},{b:"[\\$\\@]"+e.UIR}]},b={eW:!0,l:"[a-z/_]+",k:{built_in:"on off yes no true false none blocked debug info notice warn error crit select break last permanent redirect kqueue rtsig epoll poll /dev/poll"},r:0,i:"=>",c:[e.HCM,{cN:"string",c:[e.BE,r],v:[{b:/"/,e:/"/},{b:/'/,e:/'/}]},{cN:"url",b:"([a-z]+):/",e:"\\s",eW:!0,eE:!0,c:[r]},{cN:"regexp",c:[e.BE,r],v:[{b:"\\s\\^",e:"\\s|{|;",rE:!0},{b:"~\\*?\\s+",e:"\\s|{|;",rE:!0},{b:"\\*(\\.[a-z\\-]+)+"},{b:"([a-z\\-]+\\.)+\\*"}]},{cN:"number",b:"\\b\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}(:\\d{1,5})?\\b"},{cN:"number",b:"\\b\\d+[kKmMgGdshdwy]*\\b",r:0},r]};return{aliases:["nginxconf"],c:[e.HCM,{b:e.UIR+"\\s",e:";|{",rB:!0,c:[{cN:"title",b:e.UIR,starts:b}],r:0}],i:"[^\\s\\}]"}});hljs.registerLanguage("diff",function(){return{aliases:["patch"],c:[{cN:"chunk",r:10,v:[{b:/^\@\@ +\-\d+,\d+ +\+\d+,\d+ +\@\@$/},{b:/^\*\*\* +\d+,\d+ +\*\*\*\*$/},{b:/^\-\-\- +\d+,\d+ +\-\-\-\-$/}]},{cN:"header",v:[{b:/Index: /,e:/$/},{b:/=====/,e:/=====$/},{b:/^\-\-\-/,e:/$/},{b:/^\*{3} /,e:/$/},{b:/^\+\+\+/,e:/$/},{b:/\*{5}/,e:/\*{5}$/}]},{cN:"addition",b:"^\\+",e:"$"},{cN:"deletion",b:"^\\-",e:"$"},{cN:"change",b:"^\\!",e:"$"}]}});hljs.registerLanguage("objectivec",function(e){var t={keyword:"int float while char export sizeof typedef const struct for union unsigned long volatile static bool mutable if do return goto void enum else break extern asm case short default double register explicit signed typename this switch continue wchar_t inline readonly assign readwrite self @synchronized id typeof nonatomic super unichar IBOutlet IBAction strong weak copy in out inout bycopy byref oneway __strong __weak __block __autoreleasing @private @protected @public @try @property @end @throw @catch @finally @autoreleasepool @synthesize @dynamic @selector @optional @required",literal:"false true FALSE TRUE nil YES NO NULL",built_in:"NSString NSData NSDictionary CGRect CGPoint UIButton UILabel UITextView UIWebView MKMapView NSView NSViewController NSWindow NSWindowController NSSet NSUUID NSIndexSet UISegmentedControl NSObject UITableViewDelegate UITableViewDataSource NSThread UIActivityIndicator UITabbar UIToolBar UIBarButtonItem UIImageView NSAutoreleasePool UITableView BOOL NSInteger CGFloat NSException NSLog NSMutableString NSMutableArray NSMutableDictionary NSURL NSIndexPath CGSize UITableViewCell UIView UIViewController UINavigationBar UINavigationController UITabBarController UIPopoverController UIPopoverControllerDelegate UIImage NSNumber UISearchBar NSFetchedResultsController NSFetchedResultsChangeType UIScrollView UIScrollViewDelegate UIEdgeInsets UIColor UIFont UIApplication NSNotFound NSNotificationCenter NSNotification UILocalNotification NSBundle NSFileManager NSTimeInterval NSDate NSCalendar NSUserDefaults UIWindow NSRange NSArray NSError NSURLRequest NSURLConnection NSURLSession NSURLSessionDataTask NSURLSessionDownloadTask NSURLSessionUploadTask NSURLResponseUIInterfaceOrientation MPMoviePlayerController dispatch_once_t dispatch_queue_t dispatch_sync dispatch_async dispatch_once"},o=/[a-zA-Z@][a-zA-Z0-9_]*/,a="@interface @class @protocol @implementation";return{aliases:["m","mm","objc","obj-c"],k:t,l:o,i:""}]}]},{cN:"class",b:"("+a.split(" ").join("|")+")\\b",e:"({|$)",eE:!0,k:a,l:o,c:[e.UTM]},{cN:"variable",b:"\\."+e.UIR,r:0}]}});hljs.registerLanguage("makefile",function(e){var a={cN:"variable",b:/\$\(/,e:/\)/,c:[e.BE]};return{aliases:["mk","mak"],c:[e.HCM,{b:/^\w+\s*\W*=/,rB:!0,r:0,starts:{cN:"constant",e:/\s*\W*=/,eE:!0,starts:{e:/$/,r:0,c:[a]}}},{cN:"title",b:/^[\w]+:\s*$/},{cN:"phony",b:/^\.PHONY:/,e:/$/,k:".PHONY",l:/[\.\w]+/},{b:/^\t+/,e:/$/,r:0,c:[e.QSM,a]}]}});hljs.registerLanguage("ruby",function(e){var b="[a-zA-Z_]\\w*[!?=]?|[-+~]\\@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?",r="and false then defined module in return redo if BEGIN retry end for true self when next until do begin unless END rescue nil else break undef not super class case require yield alias while ensure elsif or include attr_reader attr_writer attr_accessor",c={cN:"yardoctag",b:"@[A-Za-z]+"},a={cN:"value",b:"#<",e:">"},s={cN:"comment",v:[{b:"#",e:"$",c:[c]},{b:"^\\=begin",e:"^\\=end",c:[c],r:10},{b:"^__END__",e:"\\n$"}]},n={cN:"subst",b:"#\\{",e:"}",k:r},t={cN:"string",c:[e.BE,n],v:[{b:/'/,e:/'/},{b:/"/,e:/"/},{b:/`/,e:/`/},{b:"%[qQwWx]?\\(",e:"\\)"},{b:"%[qQwWx]?\\[",e:"\\]"},{b:"%[qQwWx]?{",e:"}"},{b:"%[qQwWx]?<",e:">"},{b:"%[qQwWx]?/",e:"/"},{b:"%[qQwWx]?%",e:"%"},{b:"%[qQwWx]?-",e:"-"},{b:"%[qQwWx]?\\|",e:"\\|"},{b:/\B\?(\\\d{1,3}|\\x[A-Fa-f0-9]{1,2}|\\u[A-Fa-f0-9]{4}|\\?\S)\b/}]},i={cN:"params",b:"\\(",e:"\\)",k:r},l=[t,a,s,{cN:"class",bK:"class module",e:"$|;",i:/=/,c:[e.inherit(e.TM,{b:"[A-Za-z_]\\w*(::\\w+)*(\\?|\\!)?"}),{cN:"inheritance",b:"<\\s*",c:[{cN:"parent",b:"("+e.IR+"::)?"+e.IR}]},s]},{cN:"function",bK:"def",e:" |$|;",r:0,c:[e.inherit(e.TM,{b:b}),i,s]},{cN:"constant",b:"(::)?(\\b[A-Z]\\w*(::)?)+",r:0},{cN:"symbol",b:e.UIR+"(\\!|\\?)?:",r:0},{cN:"symbol",b:":",c:[t,{b:b}],r:0},{cN:"number",b:"(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b",r:0},{cN:"variable",b:"(\\$\\W)|((\\$|\\@\\@?)(\\w+))"},{b:"("+e.RSR+")\\s*",c:[a,s,{cN:"regexp",c:[e.BE,n],i:/\n/,v:[{b:"/",e:"/[a-z]*"},{b:"%r{",e:"}[a-z]*"},{b:"%r\\(",e:"\\)[a-z]*"},{b:"%r!",e:"![a-z]*"},{b:"%r\\[",e:"\\][a-z]*"}]}],r:0}];n.c=l,i.c=l;var u=[{b:/^\s*=>/,cN:"status",starts:{e:"$",c:l}},{cN:"prompt",b:/^\S[^=>\n]*>+/,starts:{e:"$",c:l}}];return{aliases:["rb","gemspec","podspec","thor","irb"],k:r,c:[s].concat(u).concat(l)}});hljs.registerLanguage("bash",function(e){var r={cN:"variable",v:[{b:/\$[\w\d#@][\w\d_]*/},{b:/\$\{(.*?)\}/}]},s={cN:"string",b:/"/,e:/"/,c:[e.BE,r,{cN:"variable",b:/\$\(/,e:/\)/,c:[e.BE]}]},t={cN:"string",b:/'/,e:/'/};return{aliases:["sh","zsh"],l:/-?[a-z\.]+/,k:{keyword:"if then else elif fi for break continue while in do done exit return set declare case esac export exec function",literal:"true false",built_in:"printf echo read cd pwd pushd popd dirs let eval unset typeset readonly getopts source shopt caller type hash bind help sudo",operator:"-ne -eq -lt -gt -f -d -e -s -l -a"},c:[{cN:"shebang",b:/^#![^\n]+sh\s*$/,r:10},{cN:"function",b:/\w[\w\d_]*\s*\(\s*\)\s*\{/,rB:!0,c:[e.inherit(e.TM,{b:/\w[\w\d_]*/})],r:0},e.HCM,e.NM,s,t,r]}});hljs.registerLanguage("cs",function(e){var r="abstract as base bool break byte case catch char checked const continue decimal default delegate do double else enum event explicit extern false finally fixed float for foreach goto if implicit in int interface internal is lock long new null object operator out override params private protected public readonly ref return sbyte sealed short sizeof stackalloc static string struct switch this throw true try typeof uint ulong unchecked unsafe ushort using virtual volatile void while async await protected public private internal ascending descending from get group into join let orderby partial select set value var where yield",t=e.IR+"(<"+e.IR+">)?";return{aliases:["csharp"],k:r,i:/::/,c:[{cN:"comment",b:"///",e:"$",rB:!0,c:[{cN:"xmlDocTag",v:[{b:"///",r:0},{b:""},{b:""}]}]},e.CLCM,e.CBCM,{cN:"preprocessor",b:"#",e:"$",k:"if else elif endif define undef warning error line region endregion pragma checksum"},{cN:"string",b:'@"',e:'"',c:[{b:'""'}]},e.ASM,e.QSM,e.CNM,{bK:"class namespace interface",e:/[{;=]/,i:/[^\s:]/,c:[e.TM,e.CLCM,e.CBCM]},{bK:"new",e:/\s/,r:0},{cN:"function",b:"("+t+"\\s+)+"+e.IR+"\\s*\\(",rB:!0,e:/[{;=]/,eE:!0,k:r,c:[{b:e.IR+"\\s*\\(",rB:!0,c:[e.TM]},{cN:"params",b:/\(/,e:/\)/,k:r,c:[e.ASM,e.QSM,e.CNM,e.CBCM]},e.CLCM,e.CBCM]}]}});hljs.registerLanguage("markdown",function(){return{aliases:["md","mkdown","mkd"],c:[{cN:"header",v:[{b:"^#{1,6}",e:"$"},{b:"^.+?\\n[=-]{2,}$"}]},{b:"<",e:">",sL:"xml",r:0},{cN:"bullet",b:"^([*+-]|(\\d+\\.))\\s+"},{cN:"strong",b:"[*_]{2}.+?[*_]{2}"},{cN:"emphasis",v:[{b:"\\*.+?\\*"},{b:"_.+?_",r:0}]},{cN:"blockquote",b:"^>\\s+",e:"$"},{cN:"code",v:[{b:"`.+?`"},{b:"^( {4}| )",e:"$",r:0}]},{cN:"horizontal_rule",b:"^[-\\*]{3,}",e:"$"},{b:"\\[.+?\\][\\(\\[].*?[\\)\\]]",rB:!0,c:[{cN:"link_label",b:"\\[",e:"\\]",eB:!0,rE:!0,r:0},{cN:"link_url",b:"\\]\\(",e:"\\)",eB:!0,eE:!0},{cN:"link_reference",b:"\\]\\[",e:"\\]",eB:!0,eE:!0}],r:10},{b:"^\\[.+\\]:",rB:!0,c:[{cN:"link_reference",b:"\\[",e:"\\]:",eB:!0,eE:!0,starts:{cN:"link_url",e:"$"}}]}]}});hljs.registerLanguage("ini",function(e){return{cI:!0,i:/\S/,c:[{cN:"comment",b:";",e:"$"},{cN:"title",b:"^\\[",e:"\\]"},{cN:"setting",b:"^[a-z0-9\\[\\]_-]+[ \\t]*=[ \\t]*",e:"$",c:[{cN:"value",eW:!0,k:"on off true false yes no",c:[e.QSM,e.NM],r:0}]}]}});hljs.registerLanguage("http",function(){return{i:"\\S",c:[{cN:"status",b:"^HTTP/[0-9\\.]+",e:"$",c:[{cN:"number",b:"\\b\\d{3}\\b"}]},{cN:"request",b:"^[A-Z]+ (.*?) HTTP/[0-9\\.]+$",rB:!0,e:"$",c:[{cN:"string",b:" ",e:" ",eB:!0,eE:!0}]},{cN:"attribute",b:"^\\w",e:": ",eE:!0,i:"\\n|\\s|=",starts:{cN:"string",e:"$"}},{b:"\\n\\n",starts:{sL:"",eW:!0}}]}});hljs.registerLanguage("java",function(e){var t=e.UIR+"(<"+e.UIR+">)?",a="false synchronized int abstract float private char boolean static null if const for true while long throw strictfp finally protected import native final return void enum else break transient new catch instanceof byte super volatile case assert short package default double public try this switch continue throws protected public private";return{aliases:["jsp"],k:a,i:/<\//,c:[{cN:"javadoc",b:"/\\*\\*",e:"\\*/",r:0,c:[{cN:"javadoctag",b:"(^|\\s)@[A-Za-z]+"}]},e.CLCM,e.CBCM,e.ASM,e.QSM,{cN:"class",bK:"class interface",e:/[{;=]/,eE:!0,k:"class interface",i:/[:"\[\]]/,c:[{bK:"extends implements"},e.UTM]},{bK:"new throw",e:/\s/,r:0},{cN:"function",b:"("+t+"\\s+)+"+e.UIR+"\\s*\\(",rB:!0,e:/[{;=]/,eE:!0,k:a,c:[{b:e.UIR+"\\s*\\(",rB:!0,c:[e.UTM]},{cN:"params",b:/\(/,e:/\)/,k:a,c:[e.ASM,e.QSM,e.CNM,e.CBCM]},e.CLCM,e.CBCM]},e.CNM,{cN:"annotation",b:"@[A-Za-z]+"}]}}); -------------------------------------------------------------------------------- /vendor/highlight/styles/main.css: -------------------------------------------------------------------------------- 1 | .hljs{display:block;overflow-x:auto;padding:.5em;color:#333;background:#f8f8f8;-webkit-text-size-adjust:none}.hljs-comment,.hljs-template_comment,.diff .hljs-header,.hljs-javadoc{color:#998;font-style:italic}.hljs-keyword,.css .rule .hljs-keyword,.hljs-winutils,.javascript .hljs-title,.nginx .hljs-title,.hljs-subst,.hljs-request,.hljs-status{color:#333;font-weight:bold}.hljs-number,.hljs-hexcolor,.ruby .hljs-constant{color:#008080}.hljs-string,.hljs-tag .hljs-value,.hljs-phpdoc,.hljs-dartdoc,.tex .hljs-formula{color:#d14}.hljs-title,.hljs-id,.scss .hljs-preprocessor{color:#900;font-weight:bold}.javascript .hljs-title,.hljs-list .hljs-keyword,.hljs-subst{font-weight:normal}.hljs-class .hljs-title,.hljs-type,.vhdl .hljs-literal,.tex .hljs-command{color:#458;font-weight:bold}.hljs-tag,.hljs-tag .hljs-title,.hljs-rules .hljs-property,.django .hljs-tag .hljs-keyword{color:#000080;font-weight:normal}.hljs-attribute,.hljs-variable,.lisp .hljs-body{color:#008080}.hljs-regexp{color:#009926}.hljs-symbol,.ruby .hljs-symbol .hljs-string,.lisp .hljs-keyword,.clojure .hljs-keyword,.scheme .hljs-keyword,.tex .hljs-special,.hljs-prompt{color:#990073}.hljs-built_in{color:#0086b3}.hljs-preprocessor,.hljs-pragma,.hljs-pi,.hljs-doctype,.hljs-shebang,.hljs-cdata{color:#999;font-weight:bold}.hljs-deletion{background:#fdd}.hljs-addition{background:#dfd}.diff .hljs-change{background:#0086b3}.hljs-chunk{color:#aaa} -------------------------------------------------------------------------------- /vendor/marked-0.3.5.min.js: -------------------------------------------------------------------------------- 1 | /** 2 | * marked - a markdown parser 3 | * Copyright (c) 2011-2014, Christopher Jeffrey. (MIT Licensed) 4 | * https://github.com/chjj/marked 5 | */ 6 | (function(){var block={newline:/^\n+/,code:/^( {4}[^\n]+\n*)+/,fences:noop,hr:/^( *[-*_]){3,} *(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *#* *(?:\n+|$)/,nptable:noop,lheading:/^([^\n]+)\n *(=|-){2,} *(?:\n+|$)/,blockquote:/^( *>[^\n]+(\n(?!def)[^\n]+)*\n*)+/,list:/^( *)(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:/^ *(?:comment *(?:\n|\s*$)|closed *(?:\n{2,}|\s*$)|closing *(?:\n{2,}|\s*$))/,def:/^ *\[([^\]]+)\]: *]+)>?(?: +["(]([^\n]+)[")])? *(?:\n+|$)/,table:noop,paragraph:/^((?:[^\n]+\n?(?!hr|heading|lheading|blockquote|tag|def))+)\n*/,text:/^[^\n]+/};block.bullet=/(?:[*+-]|\d+\.)/;block.item=/^( *)(bull) [^\n]*(?:\n(?!\1bull )[^\n]*)*/;block.item=replace(block.item,"gm")(/bull/g,block.bullet)();block.list=replace(block.list)(/bull/g,block.bullet)("hr","\\n+(?=\\1?(?:[-*_] *){3,}(?:\\n+|$))")("def","\\n+(?="+block.def.source+")")();block.blockquote=replace(block.blockquote)("def",block.def)();block._tag="(?!(?:"+"a|em|strong|small|s|cite|q|dfn|abbr|data|time|code"+"|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo"+"|span|br|wbr|ins|del|img)\\b)\\w+(?!:/|[^\\w\\s@]*@)\\b";block.html=replace(block.html)("comment",//)("closed",/<(tag)[\s\S]+?<\/\1>/)("closing",/])*?>/)(/tag/g,block._tag)();block.paragraph=replace(block.paragraph)("hr",block.hr)("heading",block.heading)("lheading",block.lheading)("blockquote",block.blockquote)("tag","<"+block._tag)("def",block.def)();block.normal=merge({},block);block.gfm=merge({},block.normal,{fences:/^ *(`{3,}|~{3,})[ \.]*(\S+)? *\n([\s\S]*?)\s*\1 *(?:\n+|$)/,paragraph:/^/,heading:/^ *(#{1,6}) +([^\n]+?) *#* *(?:\n+|$)/});block.gfm.paragraph=replace(block.paragraph)("(?!","(?!"+block.gfm.fences.source.replace("\\1","\\2")+"|"+block.list.source.replace("\\1","\\3")+"|")();block.tables=merge({},block.gfm,{nptable:/^ *(\S.*\|.*)\n *([-:]+ *\|[-| :]*)\n((?:.*\|.*(?:\n|$))*)\n*/,table:/^ *\|(.+)\n *\|( *[-:]+[-| :]*)\n((?: *\|.*(?:\n|$))*)\n*/});function Lexer(options){this.tokens=[];this.tokens.links={};this.options=options||marked.defaults;this.rules=block.normal;if(this.options.gfm){if(this.options.tables){this.rules=block.tables}else{this.rules=block.gfm}}}Lexer.rules=block;Lexer.lex=function(src,options){var lexer=new Lexer(options);return lexer.lex(src)};Lexer.prototype.lex=function(src){src=src.replace(/\r\n|\r/g,"\n").replace(/\t/g," ").replace(/\u00a0/g," ").replace(/\u2424/g,"\n");return this.token(src,true)};Lexer.prototype.token=function(src,top,bq){var src=src.replace(/^ +$/gm,""),next,loose,cap,bull,b,item,space,i,l;while(src){if(cap=this.rules.newline.exec(src)){src=src.substring(cap[0].length);if(cap[0].length>1){this.tokens.push({type:"space"})}}if(cap=this.rules.code.exec(src)){src=src.substring(cap[0].length);cap=cap[0].replace(/^ {4}/gm,"");this.tokens.push({type:"code",text:!this.options.pedantic?cap.replace(/\n+$/,""):cap});continue}if(cap=this.rules.fences.exec(src)){src=src.substring(cap[0].length);this.tokens.push({type:"code",lang:cap[2],text:cap[3]||""});continue}if(cap=this.rules.heading.exec(src)){src=src.substring(cap[0].length);this.tokens.push({type:"heading",depth:cap[1].length,text:cap[2]});continue}if(top&&(cap=this.rules.nptable.exec(src))){src=src.substring(cap[0].length);item={type:"table",header:cap[1].replace(/^ *| *\| *$/g,"").split(/ *\| */),align:cap[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:cap[3].replace(/\n$/,"").split("\n")};for(i=0;i ?/gm,"");this.token(cap,top,true);this.tokens.push({type:"blockquote_end"});continue}if(cap=this.rules.list.exec(src)){src=src.substring(cap[0].length);bull=cap[2];this.tokens.push({type:"list_start",ordered:bull.length>1});cap=cap[0].match(this.rules.item);next=false;l=cap.length;i=0;for(;i1&&b.length>1)){src=cap.slice(i+1).join("\n")+src;i=l-1}}loose=next||/\n\n(?!\s*$)/.test(item);if(i!==l-1){next=item.charAt(item.length-1)==="\n";if(!loose)loose=next}this.tokens.push({type:loose?"loose_item_start":"list_item_start"});this.token(item,false,bq);this.tokens.push({type:"list_item_end"})}this.tokens.push({type:"list_end"});continue}if(cap=this.rules.html.exec(src)){src=src.substring(cap[0].length);this.tokens.push({type:this.options.sanitize?"paragraph":"html",pre:!this.options.sanitizer&&(cap[1]==="pre"||cap[1]==="script"||cap[1]==="style"),text:cap[0]});continue}if(!bq&&top&&(cap=this.rules.def.exec(src))){src=src.substring(cap[0].length);this.tokens.links[cap[1].toLowerCase()]={href:cap[2],title:cap[3]};continue}if(top&&(cap=this.rules.table.exec(src))){src=src.substring(cap[0].length);item={type:"table",header:cap[1].replace(/^ *| *\| *$/g,"").split(/ *\| */),align:cap[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:cap[3].replace(/(?: *\| *)?\n$/,"").split("\n")};for(i=0;i])/,autolink:/^<([^ >]+(@|:\/)[^ >]+)>/,url:noop,tag:/^|^<\/?\w+(?:"[^"]*"|'[^']*'|[^'">])*?>/,link:/^!?\[(inside)\]\(href\)/,reflink:/^!?\[(inside)\]\s*\[([^\]]*)\]/,nolink:/^!?\[((?:\[[^\]]*\]|[^\[\]])*)\]/,strong:/^__([\s\S]+?)__(?!_)|^\*\*([\s\S]+?)\*\*(?!\*)/,em:/^\b_((?:[^_]|__)+?)_\b|^\*((?:\*\*|[\s\S])+?)\*(?!\*)/,code:/^(`+)\s*([\s\S]*?[^`])\s*\1(?!`)/,br:/^ {2,}\n(?!\s*$)/,del:noop,text:/^[\s\S]+?(?=[\\?(?:\s+['"]([\s\S]*?)['"])?\s*/;inline.link=replace(inline.link)("inside",inline._inside)("href",inline._href)();inline.reflink=replace(inline.reflink)("inside",inline._inside)();inline.normal=merge({},inline);inline.pedantic=merge({},inline.normal,{strong:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,em:/^_(?=\S)([\s\S]*?\S)_(?!_)|^\*(?=\S)([\s\S]*?\S)\*(?!\*)/});inline.gfm=merge({},inline.normal,{escape:replace(inline.escape)("])","~|])")(),url:/^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,del:/^~~(?=\S)([\s\S]*?\S)~~/,text:replace(inline.text)("]|","~]|")("|","|https?://|")()});inline.breaks=merge({},inline.gfm,{br:replace(inline.br)("{2,}","*")(),text:replace(inline.gfm.text)("{2,}","*")()});function InlineLexer(links,options){this.options=options||marked.defaults;this.links=links;this.rules=inline.normal;this.renderer=this.options.renderer||new Renderer;this.renderer.options=this.options;if(!this.links){throw new Error("Tokens array requires a `links` property.")}if(this.options.gfm){if(this.options.breaks){this.rules=inline.breaks}else{this.rules=inline.gfm}}else if(this.options.pedantic){this.rules=inline.pedantic}}InlineLexer.rules=inline;InlineLexer.output=function(src,links,options){var inline=new InlineLexer(links,options);return inline.output(src)};InlineLexer.prototype.output=function(src){var out="",link,text,href,cap;while(src){if(cap=this.rules.escape.exec(src)){src=src.substring(cap[0].length);out+=cap[1];continue}if(cap=this.rules.autolink.exec(src)){src=src.substring(cap[0].length);if(cap[2]==="@"){text=cap[1].charAt(6)===":"?this.mangle(cap[1].substring(7)):this.mangle(cap[1]);href=this.mangle("mailto:")+text}else{text=escape(cap[1]);href=text}out+=this.renderer.link(href,null,text);continue}if(!this.inLink&&(cap=this.rules.url.exec(src))){src=src.substring(cap[0].length);text=escape(cap[1]);href=text;out+=this.renderer.link(href,null,text);continue}if(cap=this.rules.tag.exec(src)){if(!this.inLink&&/^/i.test(cap[0])){this.inLink=false}src=src.substring(cap[0].length);out+=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(cap[0]):escape(cap[0]):cap[0];continue}if(cap=this.rules.link.exec(src)){src=src.substring(cap[0].length);this.inLink=true;out+=this.outputLink(cap,{href:cap[2],title:cap[3]});this.inLink=false;continue}if((cap=this.rules.reflink.exec(src))||(cap=this.rules.nolink.exec(src))){src=src.substring(cap[0].length);link=(cap[2]||cap[1]).replace(/\s+/g," ");link=this.links[link.toLowerCase()];if(!link||!link.href){out+=cap[0].charAt(0);src=cap[0].substring(1)+src;continue}this.inLink=true;out+=this.outputLink(cap,link);this.inLink=false;continue}if(cap=this.rules.strong.exec(src)){src=src.substring(cap[0].length);out+=this.renderer.strong(this.output(cap[2]||cap[1]));continue}if(cap=this.rules.em.exec(src)){src=src.substring(cap[0].length);out+=this.renderer.em(this.output(cap[2]||cap[1]));continue}if(cap=this.rules.code.exec(src)){src=src.substring(cap[0].length);out+=this.renderer.codespan(escape(cap[2],true));continue}if(cap=this.rules.br.exec(src)){src=src.substring(cap[0].length);out+=this.renderer.br();continue}if(cap=this.rules.del.exec(src)){src=src.substring(cap[0].length);out+=this.renderer.del(this.output(cap[1]));continue}if(cap=this.rules.text.exec(src)){src=src.substring(cap[0].length);out+=this.renderer.text(escape(this.smartypants(cap[0])));continue}if(src){throw new Error("Infinite loop on byte: "+src.charCodeAt(0))}}return out};InlineLexer.prototype.outputLink=function(cap,link){var href=escape(link.href),title=link.title?escape(link.title):null;return cap[0].charAt(0)!=="!"?this.renderer.link(href,title,this.output(cap[1])):this.renderer.image(href,title,escape(cap[1]))};InlineLexer.prototype.smartypants=function(text){if(!this.options.smartypants)return text;return text.replace(/---/g,"—").replace(/--/g,"–").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1‘").replace(/'/g,"’").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1“").replace(/"/g,"”").replace(/\.{3}/g,"…")};InlineLexer.prototype.mangle=function(text){if(!this.options.mangle)return text;var out="",l=text.length,i=0,ch;for(;i.5){ch="x"+ch.toString(16)}out+="&#"+ch+";"}return out};function Renderer(options){this.options=options||{}}Renderer.prototype.code=function(code,lang,escaped){if(this.options.highlight){var out=this.options.highlight(code,lang);if(out!=null&&out!==code){escaped=true;code=out}}if(!lang){return"
"+(escaped?code:escape(code,true))+"\n
"}return'
'+(escaped?code:escape(code,true))+"\n
\n"};Renderer.prototype.blockquote=function(quote){return"
\n"+quote+"
\n"};Renderer.prototype.html=function(html){return html};Renderer.prototype.heading=function(text,level,raw){return"'+text+"\n"};Renderer.prototype.hr=function(){return this.options.xhtml?"
\n":"
\n"};Renderer.prototype.list=function(body,ordered){var type=ordered?"ol":"ul";return"<"+type+">\n"+body+"\n"};Renderer.prototype.listitem=function(text){return"
  • "+text+"
  • \n"};Renderer.prototype.paragraph=function(text){return"

    "+text+"

    \n"};Renderer.prototype.table=function(header,body){return"\n"+"\n"+header+"\n"+"\n"+body+"\n"+"
    \n"};Renderer.prototype.tablerow=function(content){return"\n"+content+"\n"};Renderer.prototype.tablecell=function(content,flags){var type=flags.header?"th":"td";var tag=flags.align?"<"+type+' style="text-align:'+flags.align+'">':"<"+type+">";return tag+content+"\n"};Renderer.prototype.strong=function(text){return""+text+""};Renderer.prototype.em=function(text){return""+text+""};Renderer.prototype.codespan=function(text){return""+text+""};Renderer.prototype.br=function(){return this.options.xhtml?"
    ":"
    "};Renderer.prototype.del=function(text){return""+text+""};Renderer.prototype.link=function(href,title,text){if(this.options.sanitize){try{var prot=decodeURIComponent(unescape(href)).replace(/[^\w:]/g,"").toLowerCase()}catch(e){return""}if(prot.indexOf("javascript:")===0||prot.indexOf("vbscript:")===0){return""}}var out='
    ";return out};Renderer.prototype.image=function(href,title,text){var out=''+text+'":">";return out};Renderer.prototype.text=function(text){return text};function Parser(options){this.tokens=[];this.token=null;this.options=options||marked.defaults;this.options.renderer=this.options.renderer||new Renderer;this.renderer=this.options.renderer;this.renderer.options=this.options}Parser.parse=function(src,options,renderer){var parser=new Parser(options,renderer);return parser.parse(src)};Parser.prototype.parse=function(src){this.inline=new InlineLexer(src.links,this.options,this.renderer);this.tokens=src.reverse();var out="";while(this.next()){out+=this.tok()}return out};Parser.prototype.next=function(){return this.token=this.tokens.pop()};Parser.prototype.peek=function(){return this.tokens[this.tokens.length-1]||0};Parser.prototype.parseText=function(){var body=this.token.text;while(this.peek().type==="text"){body+="\n"+this.next().text}return this.inline.output(body)};Parser.prototype.tok=function(){switch(this.token.type){case"space":{return""}case"hr":{return this.renderer.hr()}case"heading":{return this.renderer.heading(this.inline.output(this.token.text),this.token.depth,this.token.text)}case"code":{return this.renderer.code(this.token.text,this.token.lang,this.token.escaped)}case"table":{var header="",body="",i,row,cell,flags,j;cell="";for(i=0;i/g,">").replace(/"/g,""").replace(/'/g,"'")}function unescape(html){return html.replace(/&([#\w]+);/g,function(_,n){n=n.toLowerCase();if(n==="colon")return":";if(n.charAt(0)==="#"){return n.charAt(1)==="x"?String.fromCharCode(parseInt(n.substring(2),16)):String.fromCharCode(+n.substring(1))}return""})}function replace(regex,opt){regex=regex.source;opt=opt||"";return function self(name,val){if(!name)return new RegExp(regex,opt);val=val.source||val;val=val.replace(/(^|[^\[])\^/g,"$1");regex=regex.replace(name,val);return self}}function noop(){}noop.exec=noop;function merge(obj){var i=1,target,key;for(;iAn error occured:

    "+escape(e.message+"",true)+"
    "}throw e}}marked.options=marked.setOptions=function(opt){merge(marked.defaults,opt);return marked};marked.defaults={gfm:true,tables:true,breaks:false,pedantic:false,sanitize:false,sanitizer:null,mangle:true,smartLists:false,silent:false,highlight:null,langPrefix:"lang-",smartypants:false,headerPrefix:"",renderer:new Renderer,xhtml:false};marked.Parser=Parser;marked.parser=Parser.parse;marked.Renderer=Renderer;marked.Lexer=Lexer;marked.lexer=Lexer.lex;marked.InlineLexer=InlineLexer;marked.inlineLexer=InlineLexer.output;marked.parse=marked;if(typeof module!=="undefined"&&typeof exports==="object"){module.exports=marked}else if(typeof define==="function"&&define.amd){define(function(){return marked})}else{this.marked=marked}}).call(function(){return this||(typeof window!=="undefined"?window:global)}()); -------------------------------------------------------------------------------- /vendor/zepto-1.1.6.min.js: -------------------------------------------------------------------------------- 1 | /*! Zepto 1.1.6 (generated with Zepto Builder) - zepto event ajax form detect data fx - zeptojs.com/license */ 2 | var Zepto=function(){function t(t){return null==t?String(t):U[J.call(t)]||"object"}function e(e){return"function"==t(e)}function n(t){return null!=t&&t==t.window}function i(t){return null!=t&&t.nodeType==t.DOCUMENT_NODE}function r(e){return"object"==t(e)}function o(t){return r(t)&&!n(t)&&Object.getPrototypeOf(t)==Object.prototype}function a(t){return"number"==typeof t.length}function s(t){return A.call(t,function(t){return null!=t})}function u(t){return t.length>0?j.fn.concat.apply([],t):t}function c(t){return t.replace(/::/g,"/").replace(/([A-Z]+)([A-Z][a-z])/g,"$1_$2").replace(/([a-z\d])([A-Z])/g,"$1_$2").replace(/_/g,"-").toLowerCase()}function l(t){return t in Z?Z[t]:Z[t]=new RegExp("(^|\\s)"+t+"(\\s|$)")}function f(t,e){return"number"!=typeof e||D[c(t)]?e:e+"px"}function h(t){var e,n;return M[t]||(e=L.createElement(t),L.body.appendChild(e),n=getComputedStyle(e,"").getPropertyValue("display"),e.parentNode.removeChild(e),"none"==n&&(n="block"),M[t]=n),M[t]}function p(t){return"children"in t?k.call(t.children):j.map(t.childNodes,function(t){return 1==t.nodeType?t:void 0})}function d(t,e){var n,i=t?t.length:0;for(n=0;i>n;n++)this[n]=t[n];this.length=i,this.selector=e||""}function m(t,e,n){for(T in e)n&&(o(e[T])||Q(e[T]))?(o(e[T])&&!o(t[T])&&(t[T]={}),Q(e[T])&&!Q(t[T])&&(t[T]=[]),m(t[T],e[T],n)):e[T]!==E&&(t[T]=e[T])}function v(t,e){return null==e?j(t):j(t).filter(e)}function g(t,n,i,r){return e(n)?n.call(t,i,r):n}function y(t,e,n){null==n?t.removeAttribute(e):t.setAttribute(e,n)}function b(t,e){var n=t.className||"",i=n&&n.baseVal!==E;return e===E?i?n.baseVal:n:void(i?n.baseVal=e:t.className=e)}function x(t){try{return t?"true"==t||("false"==t?!1:"null"==t?null:+t+""==t?+t:/^[\[\{]/.test(t)?j.parseJSON(t):t):t}catch(e){return t}}function w(t,e){e(t);for(var n=0,i=t.childNodes.length;i>n;n++)w(t.childNodes[n],e)}var E,T,j,S,C,P,O=[],N=O.concat,A=O.filter,k=O.slice,L=window.document,M={},Z={},D={"column-count":1,columns:1,"font-weight":1,"line-height":1,opacity:1,"z-index":1,zoom:1},$=/^\s*<(\w+|!)[^>]*>/,_=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,F=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,z=/^(?:body|html)$/i,R=/([A-Z])/g,B=["val","css","html","text","data","width","height","offset"],q=["after","prepend","before","append"],I=L.createElement("table"),V=L.createElement("tr"),H={tr:L.createElement("tbody"),tbody:I,thead:I,tfoot:I,td:V,th:V,"*":L.createElement("div")},W=/complete|loaded|interactive/,X=/^[\w-]*$/,U={},J=U.toString,Y={},K=L.createElement("div"),G={tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},Q=Array.isArray||function(t){return t instanceof Array};return Y.matches=function(t,e){if(!e||!t||1!==t.nodeType)return!1;var n=t.webkitMatchesSelector||t.mozMatchesSelector||t.oMatchesSelector||t.matchesSelector;if(n)return n.call(t,e);var i,r=t.parentNode,o=!r;return o&&(r=K).appendChild(t),i=~Y.qsa(r,e).indexOf(t),o&&K.removeChild(t),i},C=function(t){return t.replace(/-+(.)?/g,function(t,e){return e?e.toUpperCase():""})},P=function(t){return A.call(t,function(e,n){return t.indexOf(e)==n})},Y.fragment=function(t,e,n){var i,r,a;return _.test(t)&&(i=j(L.createElement(RegExp.$1))),i||(t.replace&&(t=t.replace(F,"<$1>")),e===E&&(e=$.test(t)&&RegExp.$1),e in H||(e="*"),a=H[e],a.innerHTML=""+t,i=j.each(k.call(a.childNodes),function(){a.removeChild(this)})),o(n)&&(r=j(i),j.each(n,function(t,e){B.indexOf(t)>-1?r[t](e):r.attr(t,e)})),i},Y.Z=function(t,e){return new d(t,e)},Y.isZ=function(t){return t instanceof Y.Z},Y.init=function(t,n){var i;if(!t)return Y.Z();if("string"==typeof t)if(t=t.trim(),"<"==t[0]&&$.test(t))i=Y.fragment(t,RegExp.$1,n),t=null;else{if(n!==E)return j(n).find(t);i=Y.qsa(L,t)}else{if(e(t))return j(L).ready(t);if(Y.isZ(t))return t;if(Q(t))i=s(t);else if(r(t))i=[t],t=null;else if($.test(t))i=Y.fragment(t.trim(),RegExp.$1,n),t=null;else{if(n!==E)return j(n).find(t);i=Y.qsa(L,t)}}return Y.Z(i,t)},j=function(t,e){return Y.init(t,e)},j.extend=function(t){var e,n=k.call(arguments,1);return"boolean"==typeof t&&(e=t,t=n.shift()),n.forEach(function(n){m(t,n,e)}),t},Y.qsa=function(t,e){var n,i="#"==e[0],r=!i&&"."==e[0],o=i||r?e.slice(1):e,a=X.test(o);return t.getElementById&&a&&i?(n=t.getElementById(o))?[n]:[]:1!==t.nodeType&&9!==t.nodeType&&11!==t.nodeType?[]:k.call(a&&!i&&t.getElementsByClassName?r?t.getElementsByClassName(o):t.getElementsByTagName(e):t.querySelectorAll(e))},j.contains=L.documentElement.contains?function(t,e){return t!==e&&t.contains(e)}:function(t,e){for(;e&&(e=e.parentNode);)if(e===t)return!0;return!1},j.type=t,j.isFunction=e,j.isWindow=n,j.isArray=Q,j.isPlainObject=o,j.isEmptyObject=function(t){var e;for(e in t)return!1;return!0},j.inArray=function(t,e,n){return O.indexOf.call(e,t,n)},j.camelCase=C,j.trim=function(t){return null==t?"":String.prototype.trim.call(t)},j.uuid=0,j.support={},j.expr={},j.noop=function(){},j.map=function(t,e){var n,i,r,o=[];if(a(t))for(i=0;i=0?t:t+this.length]},toArray:function(){return this.get()},size:function(){return this.length},remove:function(){return this.each(function(){null!=this.parentNode&&this.parentNode.removeChild(this)})},each:function(t){return O.every.call(this,function(e,n){return t.call(e,n,e)!==!1}),this},filter:function(t){return e(t)?this.not(this.not(t)):j(A.call(this,function(e){return Y.matches(e,t)}))},add:function(t,e){return j(P(this.concat(j(t,e))))},is:function(t){return this.length>0&&Y.matches(this[0],t)},not:function(t){var n=[];if(e(t)&&t.call!==E)this.each(function(e){t.call(this,e)||n.push(this)});else{var i="string"==typeof t?this.filter(t):a(t)&&e(t.item)?k.call(t):j(t);this.forEach(function(t){i.indexOf(t)<0&&n.push(t)})}return j(n)},has:function(t){return this.filter(function(){return r(t)?j.contains(this,t):j(this).find(t).size()})},eq:function(t){return-1===t?this.slice(t):this.slice(t,+t+1)},first:function(){var t=this[0];return t&&!r(t)?t:j(t)},last:function(){var t=this[this.length-1];return t&&!r(t)?t:j(t)},find:function(t){var e,n=this;return e=t?"object"==typeof t?j(t).filter(function(){var t=this;return O.some.call(n,function(e){return j.contains(e,t)})}):1==this.length?j(Y.qsa(this[0],t)):this.map(function(){return Y.qsa(this,t)}):j()},closest:function(t,e){var n=this[0],r=!1;for("object"==typeof t&&(r=j(t));n&&!(r?r.indexOf(n)>=0:Y.matches(n,t));)n=n!==e&&!i(n)&&n.parentNode;return j(n)},parents:function(t){for(var e=[],n=this;n.length>0;)n=j.map(n,function(t){return(t=t.parentNode)&&!i(t)&&e.indexOf(t)<0?(e.push(t),t):void 0});return v(e,t)},parent:function(t){return v(P(this.pluck("parentNode")),t)},children:function(t){return v(this.map(function(){return p(this)}),t)},contents:function(){return this.map(function(){return this.contentDocument||k.call(this.childNodes)})},siblings:function(t){return v(this.map(function(t,e){return A.call(p(e.parentNode),function(t){return t!==e})}),t)},empty:function(){return this.each(function(){this.innerHTML=""})},pluck:function(t){return j.map(this,function(e){return e[t]})},show:function(){return this.each(function(){"none"==this.style.display&&(this.style.display=""),"none"==getComputedStyle(this,"").getPropertyValue("display")&&(this.style.display=h(this.nodeName))})},replaceWith:function(t){return this.before(t).remove()},wrap:function(t){var n=e(t);if(this[0]&&!n)var i=j(t).get(0),r=i.parentNode||this.length>1;return this.each(function(e){j(this).wrapAll(n?t.call(this,e):r?i.cloneNode(!0):i)})},wrapAll:function(t){if(this[0]){j(this[0]).before(t=j(t));for(var e;(e=t.children()).length;)t=e.first();j(t).append(this)}return this},wrapInner:function(t){var n=e(t);return this.each(function(e){var i=j(this),r=i.contents(),o=n?t.call(this,e):t;r.length?r.wrapAll(o):i.append(o)})},unwrap:function(){return this.parent().each(function(){j(this).replaceWith(j(this).children())}),this},clone:function(){return this.map(function(){return this.cloneNode(!0)})},hide:function(){return this.css("display","none")},toggle:function(t){return this.each(function(){var e=j(this);(t===E?"none"==e.css("display"):t)?e.show():e.hide()})},prev:function(t){return j(this.pluck("previousElementSibling")).filter(t||"*")},next:function(t){return j(this.pluck("nextElementSibling")).filter(t||"*")},html:function(t){return 0 in arguments?this.each(function(e){var n=this.innerHTML;j(this).empty().append(g(this,t,e,n))}):0 in this?this[0].innerHTML:null},text:function(t){return 0 in arguments?this.each(function(e){var n=g(this,t,e,this.textContent);this.textContent=null==n?"":""+n}):0 in this?this.pluck("textContent").join(""):null},attr:function(t,e){var n;return"string"!=typeof t||1 in arguments?this.each(function(n){if(1===this.nodeType)if(r(t))for(T in t)y(this,T,t[T]);else y(this,t,g(this,e,n,this.getAttribute(t)))}):this.length&&1===this[0].nodeType?!(n=this[0].getAttribute(t))&&t in this[0]?this[0][t]:n:E},removeAttr:function(t){return this.each(function(){1===this.nodeType&&t.split(" ").forEach(function(t){y(this,t)},this)})},prop:function(t,e){return t=G[t]||t,1 in arguments?this.each(function(n){this[t]=g(this,e,n,this[t])}):this[0]&&this[0][t]},data:function(t,e){var n="data-"+t.replace(R,"-$1").toLowerCase(),i=1 in arguments?this.attr(n,e):this.attr(n);return null!==i?x(i):E},val:function(t){return 0 in arguments?this.each(function(e){this.value=g(this,t,e,this.value)}):this[0]&&(this[0].multiple?j(this[0]).find("option").filter(function(){return this.selected}).pluck("value"):this[0].value)},offset:function(t){if(t)return this.each(function(e){var n=j(this),i=g(this,t,e,n.offset()),r=n.offsetParent().offset(),o={top:i.top-r.top,left:i.left-r.left};"static"==n.css("position")&&(o.position="relative"),n.css(o)});if(!this.length)return null;if(!j.contains(L.documentElement,this[0]))return{top:0,left:0};var e=this[0].getBoundingClientRect();return{left:e.left+window.pageXOffset,top:e.top+window.pageYOffset,width:Math.round(e.width),height:Math.round(e.height)}},css:function(e,n){if(arguments.length<2){var i,r=this[0];if(!r)return;if(i=getComputedStyle(r,""),"string"==typeof e)return r.style[C(e)]||i.getPropertyValue(e);if(Q(e)){var o={};return j.each(e,function(t,e){o[e]=r.style[C(e)]||i.getPropertyValue(e)}),o}}var a="";if("string"==t(e))n||0===n?a=c(e)+":"+f(e,n):this.each(function(){this.style.removeProperty(c(e))});else for(T in e)e[T]||0===e[T]?a+=c(T)+":"+f(T,e[T])+";":this.each(function(){this.style.removeProperty(c(T))});return this.each(function(){this.style.cssText+=";"+a})},index:function(t){return t?this.indexOf(j(t)[0]):this.parent().children().indexOf(this[0])},hasClass:function(t){return t?O.some.call(this,function(t){return this.test(b(t))},l(t)):!1},addClass:function(t){return t?this.each(function(e){if("className"in this){S=[];var n=b(this),i=g(this,t,e,n);i.split(/\s+/g).forEach(function(t){j(this).hasClass(t)||S.push(t)},this),S.length&&b(this,n+(n?" ":"")+S.join(" "))}}):this},removeClass:function(t){return this.each(function(e){if("className"in this){if(t===E)return b(this,"");S=b(this),g(this,t,e,S).split(/\s+/g).forEach(function(t){S=S.replace(l(t)," ")}),b(this,S.trim())}})},toggleClass:function(t,e){return t?this.each(function(n){var i=j(this),r=g(this,t,n,b(this));r.split(/\s+/g).forEach(function(t){(e===E?!i.hasClass(t):e)?i.addClass(t):i.removeClass(t)})}):this},scrollTop:function(t){if(this.length){var e="scrollTop"in this[0];return t===E?e?this[0].scrollTop:this[0].pageYOffset:this.each(e?function(){this.scrollTop=t}:function(){this.scrollTo(this.scrollX,t)})}},scrollLeft:function(t){if(this.length){var e="scrollLeft"in this[0];return t===E?e?this[0].scrollLeft:this[0].pageXOffset:this.each(e?function(){this.scrollLeft=t}:function(){this.scrollTo(t,this.scrollY)})}},position:function(){if(this.length){var t=this[0],e=this.offsetParent(),n=this.offset(),i=z.test(e[0].nodeName)?{top:0,left:0}:e.offset();return n.top-=parseFloat(j(t).css("margin-top"))||0,n.left-=parseFloat(j(t).css("margin-left"))||0,i.top+=parseFloat(j(e[0]).css("border-top-width"))||0,i.left+=parseFloat(j(e[0]).css("border-left-width"))||0,{top:n.top-i.top,left:n.left-i.left}}},offsetParent:function(){return this.map(function(){for(var t=this.offsetParent||L.body;t&&!z.test(t.nodeName)&&"static"==j(t).css("position");)t=t.offsetParent;return t})}},j.fn.detach=j.fn.remove,["width","height"].forEach(function(t){var e=t.replace(/./,function(t){return t[0].toUpperCase()});j.fn[t]=function(r){var o,a=this[0];return r===E?n(a)?a["inner"+e]:i(a)?a.documentElement["scroll"+e]:(o=this.offset())&&o[t]:this.each(function(e){a=j(this),a.css(t,g(this,r,e,a[t]()))})}}),q.forEach(function(e,n){var i=n%2;j.fn[e]=function(){var e,r,o=j.map(arguments,function(n){return e=t(n),"object"==e||"array"==e||null==n?n:Y.fragment(n)}),a=this.length>1;return o.length<1?this:this.each(function(t,e){r=i?e:e.parentNode,e=0==n?e.nextSibling:1==n?e.firstChild:2==n?e:null;var s=j.contains(L.documentElement,r);o.forEach(function(t){if(a)t=t.cloneNode(!0);else if(!r)return j(t).remove();r.insertBefore(t,e),s&&w(t,function(t){null==t.nodeName||"SCRIPT"!==t.nodeName.toUpperCase()||t.type&&"text/javascript"!==t.type||t.src||window.eval.call(window,t.innerHTML)})})})},j.fn[i?e+"To":"insert"+(n?"Before":"After")]=function(t){return j(t)[e](this),this}}),Y.Z.prototype=d.prototype=j.fn,Y.uniq=P,Y.deserializeValue=x,j.zepto=Y,j}();window.Zepto=Zepto,void 0===window.$&&(window.$=Zepto),function(t){function e(e,n,i){var r=t.Event(n);return t(e).trigger(r,i),!r.isDefaultPrevented()}function n(t,n,i,r){return t.global?e(n||y,i,r):void 0}function i(e){e.global&&0===t.active++&&n(e,null,"ajaxStart")}function r(e){e.global&&!--t.active&&n(e,null,"ajaxStop")}function o(t,e){var i=e.context;return e.beforeSend.call(i,t,e)===!1||n(e,i,"ajaxBeforeSend",[t,e])===!1?!1:void n(e,i,"ajaxSend",[t,e])}function a(t,e,i,r){var o=i.context,a="success";i.success.call(o,t,a,e),r&&r.resolveWith(o,[t,a,e]),n(i,o,"ajaxSuccess",[e,i,t]),u(a,e,i)}function s(t,e,i,r,o){var a=r.context;r.error.call(a,i,e,t),o&&o.rejectWith(a,[i,e,t]),n(r,a,"ajaxError",[i,r,t||e]),u(e,i,r)}function u(t,e,i){var o=i.context;i.complete.call(o,e,t),n(i,o,"ajaxComplete",[e,i]),r(i)}function c(){}function l(t){return t&&(t=t.split(";",2)[0]),t&&(t==T?"html":t==E?"json":x.test(t)?"script":w.test(t)&&"xml")||"text"}function f(t,e){return""==e?t:(t+"&"+e).replace(/[&?]{1,2}/,"?")}function h(e){e.processData&&e.data&&"string"!=t.type(e.data)&&(e.data=t.param(e.data,e.traditional)),!e.data||e.type&&"GET"!=e.type.toUpperCase()||(e.url=f(e.url,e.data),e.data=void 0)}function p(e,n,i,r){return t.isFunction(n)&&(r=i,i=n,n=void 0),t.isFunction(i)||(r=i,i=void 0),{url:e,data:n,success:i,dataType:r}}function d(e,n,i,r){var o,a=t.isArray(n),s=t.isPlainObject(n);t.each(n,function(n,u){o=t.type(u),r&&(n=i?r:r+"["+(s||"object"==o||"array"==o?n:"")+"]"),!r&&a?e.add(u.name,u.value):"array"==o||!i&&"object"==o?d(e,u,i,n):e.add(n,u)})}var m,v,g=0,y=window.document,b=/)<[^<]*)*<\/script>/gi,x=/^(?:text|application)\/javascript/i,w=/^(?:text|application)\/xml/i,E="application/json",T="text/html",j=/^\s*$/,S=y.createElement("a");S.href=window.location.href,t.active=0,t.ajaxJSONP=function(e,n){if(!("type"in e))return t.ajax(e);var i,r,u=e.jsonpCallback,c=(t.isFunction(u)?u():u)||"jsonp"+ ++g,l=y.createElement("script"),f=window[c],h=function(e){t(l).triggerHandler("error",e||"abort")},p={abort:h};return n&&n.promise(p),t(l).on("load error",function(o,u){clearTimeout(r),t(l).off().remove(),"error"!=o.type&&i?a(i[0],p,e,n):s(null,u||"error",p,e,n),window[c]=f,i&&t.isFunction(f)&&f(i[0]),f=i=void 0}),o(p,e)===!1?(h("abort"),p):(window[c]=function(){i=arguments},l.src=e.url.replace(/\?(.+)=\?/,"?$1="+c),y.head.appendChild(l),e.timeout>0&&(r=setTimeout(function(){h("timeout")},e.timeout)),p)},t.ajaxSettings={type:"GET",beforeSend:c,success:c,error:c,complete:c,context:null,global:!0,xhr:function(){return new window.XMLHttpRequest},accepts:{script:"text/javascript, application/javascript, application/x-javascript",json:E,xml:"application/xml, text/xml",html:T,text:"text/plain"},crossDomain:!1,timeout:0,processData:!0,cache:!0},t.ajax=function(e){var n,r,u=t.extend({},e||{}),p=t.Deferred&&t.Deferred();for(m in t.ajaxSettings)void 0===u[m]&&(u[m]=t.ajaxSettings[m]);i(u),u.crossDomain||(n=y.createElement("a"),n.href=u.url,n.href=n.href,u.crossDomain=S.protocol+"//"+S.host!=n.protocol+"//"+n.host),u.url||(u.url=window.location.toString()),(r=u.url.indexOf("#"))>-1&&(u.url=u.url.slice(0,r)),h(u);var d=u.dataType,g=/\?.+=\?/.test(u.url);if(g&&(d="jsonp"),u.cache!==!1&&(e&&e.cache===!0||"script"!=d&&"jsonp"!=d)||(u.url=f(u.url,"_="+Date.now())),"jsonp"==d)return g||(u.url=f(u.url,u.jsonp?u.jsonp+"=?":u.jsonp===!1?"":"callback=?")),t.ajaxJSONP(u,p);var b,x=u.accepts[d],w={},E=function(t,e){w[t.toLowerCase()]=[t,e]},T=/^([\w-]+:)\/\//.test(u.url)?RegExp.$1:window.location.protocol,C=u.xhr(),P=C.setRequestHeader;if(p&&p.promise(C),u.crossDomain||E("X-Requested-With","XMLHttpRequest"),E("Accept",x||"*/*"),(x=u.mimeType||x)&&(x.indexOf(",")>-1&&(x=x.split(",",2)[0]),C.overrideMimeType&&C.overrideMimeType(x)),(u.contentType||u.contentType!==!1&&u.data&&"GET"!=u.type.toUpperCase())&&E("Content-Type",u.contentType||"application/x-www-form-urlencoded"),u.headers)for(v in u.headers)E(v,u.headers[v]);if(C.setRequestHeader=E,C.onreadystatechange=function(){if(4==C.readyState){C.onreadystatechange=c,clearTimeout(b);var e,n=!1;if(C.status>=200&&C.status<300||304==C.status||0==C.status&&"file:"==T){if(d=d||l(u.mimeType||C.getResponseHeader("content-type")),"arraybuffer"==C.responseType||"blob"==C.responseType)e=C.response;else{e=C.responseText;try{"script"==d?(1,eval)(e):"xml"==d?e=C.responseXML:"json"==d&&(e=j.test(e)?null:t.parseJSON(e))}catch(i){n=i}if(n)return s(n,"parsererror",C,u,p)}a(e,C,u,p)}else s(C.statusText||null,C.status?"error":"abort",C,u,p)}},o(C,u)===!1)return C.abort(),s(null,"abort",C,u,p),C;if(u.xhrFields)for(v in u.xhrFields)C[v]=u.xhrFields[v];var O="async"in u?u.async:!0;C.open(u.type,u.url,O,u.username,u.password);for(v in w)P.apply(C,w[v]);return u.timeout>0&&(b=setTimeout(function(){C.onreadystatechange=c,C.abort(),s(null,"timeout",C,u,p)},u.timeout)),C.send(u.data?u.data:null),C},t.get=function(){return t.ajax(p.apply(null,arguments))},t.post=function(){var e=p.apply(null,arguments);return e.type="POST",t.ajax(e)},t.getJSON=function(){var e=p.apply(null,arguments);return e.dataType="json",t.ajax(e)},t.fn.load=function(e,n,i){if(!this.length)return this;var r,o=this,a=e.split(/\s/),s=p(e,n,i),u=s.success;return a.length>1&&(s.url=a[0],r=a[1]),s.success=function(e){o.html(r?t("
    ").html(e.replace(b,"")).find(r):e),u&&u.apply(o,arguments)},t.ajax(s),this};var C=encodeURIComponent;t.param=function(e,n){var i=[];return i.add=function(e,n){t.isFunction(n)&&(n=n()),null==n&&(n=""),this.push(C(e)+"="+C(n))},d(i,e,n),i.join("&").replace(/%20/g,"+")}}(Zepto),function(t){function e(e,i){var u=e[s],c=u&&r[u];if(void 0===i)return c||n(e);if(c){if(i in c)return c[i];var l=a(i);if(l in c)return c[l]}return o.call(t(e),i)}function n(e,n,o){var u=e[s]||(e[s]=++t.uuid),c=r[u]||(r[u]=i(e));return void 0!==n&&(c[a(n)]=o),c}function i(e){var n={};return t.each(e.attributes||u,function(e,i){0==i.name.indexOf("data-")&&(n[a(i.name.replace("data-",""))]=t.zepto.deserializeValue(i.value))}),n}var r={},o=t.fn.data,a=t.camelCase,s=t.expando="Zepto"+ +new Date,u=[];t.fn.data=function(i,r){return void 0===r?t.isPlainObject(i)?this.each(function(e,r){t.each(i,function(t,e){n(r,t,e)})}):0 in this?e(this[0],i):void 0:this.each(function(){n(this,i,r)})},t.fn.removeData=function(e){return"string"==typeof e&&(e=e.split(/\s+/)),this.each(function(){var n=this[s],i=n&&r[n];i&&t.each(e||i,function(t){delete i[e?a(this):t]})})},["remove","empty"].forEach(function(e){var n=t.fn[e];t.fn[e]=function(){var t=this.find("*");return"remove"===e&&(t=t.add(this)),t.removeData(),n.call(this)}})}(Zepto),function(t){function e(t,e){var n=this.os={},i=this.browser={},r=t.match(/Web[kK]it[\/]{0,1}([\d.]+)/),o=t.match(/(Android);?[\s\/]+([\d.]+)?/),a=!!t.match(/\(Macintosh\; Intel /),s=t.match(/(iPad).*OS\s([\d_]+)/),u=t.match(/(iPod)(.*OS\s([\d_]+))?/),c=!s&&t.match(/(iPhone\sOS)\s([\d_]+)/),l=t.match(/(webOS|hpwOS)[\s\/]([\d.]+)/),f=/Win\d{2}|Windows/.test(e),h=t.match(/Windows Phone ([\d.]+)/),p=l&&t.match(/TouchPad/),d=t.match(/Kindle\/([\d.]+)/),m=t.match(/Silk\/([\d._]+)/),v=t.match(/(BlackBerry).*Version\/([\d.]+)/),g=t.match(/(BB10).*Version\/([\d.]+)/),y=t.match(/(RIM\sTablet\sOS)\s([\d.]+)/),b=t.match(/PlayBook/),x=t.match(/Chrome\/([\d.]+)/)||t.match(/CriOS\/([\d.]+)/),w=t.match(/Firefox\/([\d.]+)/),E=t.match(/\((?:Mobile|Tablet); rv:([\d.]+)\).*Firefox\/[\d.]+/),T=t.match(/MSIE\s([\d.]+)/)||t.match(/Trident\/[\d](?=[^\?]+).*rv:([0-9.].)/),j=!x&&t.match(/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/),S=j||t.match(/Version\/([\d.]+)([^S](Safari)|[^M]*(Mobile)[^S]*(Safari))/);(i.webkit=!!r)&&(i.version=r[1]),o&&(n.android=!0,n.version=o[2]),c&&!u&&(n.ios=n.iphone=!0,n.version=c[2].replace(/_/g,".")),s&&(n.ios=n.ipad=!0,n.version=s[2].replace(/_/g,".")),u&&(n.ios=n.ipod=!0,n.version=u[3]?u[3].replace(/_/g,"."):null),h&&(n.wp=!0,n.version=h[1]),l&&(n.webos=!0,n.version=l[2]),p&&(n.touchpad=!0),v&&(n.blackberry=!0,n.version=v[2]),g&&(n.bb10=!0,n.version=g[2]),y&&(n.rimtabletos=!0,n.version=y[2]),b&&(i.playbook=!0),d&&(n.kindle=!0,n.version=d[1]),m&&(i.silk=!0,i.version=m[1]),!m&&n.android&&t.match(/Kindle Fire/)&&(i.silk=!0),x&&(i.chrome=!0,i.version=x[1]),w&&(i.firefox=!0,i.version=w[1]),E&&(n.firefoxos=!0,n.version=E[1]),T&&(i.ie=!0,i.version=T[1]),S&&(a||n.ios||f)&&(i.safari=!0,n.ios||(i.version=S[1])),j&&(i.webview=!0),n.tablet=!!(s||b||o&&!t.match(/Mobile/)||w&&t.match(/Tablet/)||T&&!t.match(/Phone/)&&t.match(/Touch/)),n.phone=!(n.tablet||n.ipod||!(o||c||l||v||g||x&&t.match(/Android/)||x&&t.match(/CriOS\/([\d.]+)/)||w&&t.match(/Mobile/)||T&&t.match(/Touch/)))}e.call(t,navigator.userAgent,navigator.platform),t.__detect=e}(Zepto),function(t){function e(t){return t._zid||(t._zid=h++)}function n(t,n,o,a){if(n=i(n),n.ns)var s=r(n.ns);return(v[e(t)]||[]).filter(function(t){return t&&(!n.e||t.e==n.e)&&(!n.ns||s.test(t.ns))&&(!o||e(t.fn)===e(o))&&(!a||t.sel==a)})}function i(t){var e=(""+t).split(".");return{e:e[0],ns:e.slice(1).sort().join(" ")}}function r(t){return new RegExp("(?:^| )"+t.replace(" "," .* ?")+"(?: |$)")}function o(t,e){return t.del&&!y&&t.e in b||!!e}function a(t){return x[t]||y&&b[t]||t}function s(n,r,s,u,l,h,p){var d=e(n),m=v[d]||(v[d]=[]);r.split(/\s/).forEach(function(e){if("ready"==e)return t(document).ready(s);var r=i(e);r.fn=s,r.sel=l,r.e in x&&(s=function(e){var n=e.relatedTarget;return!n||n!==this&&!t.contains(this,n)?r.fn.apply(this,arguments):void 0}),r.del=h;var d=h||s;r.proxy=function(t){if(t=c(t),!t.isImmediatePropagationStopped()){t.data=u;var e=d.apply(n,t._args==f?[t]:[t].concat(t._args));return e===!1&&(t.preventDefault(),t.stopPropagation()),e}},r.i=m.length,m.push(r),"addEventListener"in n&&n.addEventListener(a(r.e),r.proxy,o(r,p))})}function u(t,i,r,s,u){var c=e(t);(i||"").split(/\s/).forEach(function(e){n(t,e,r,s).forEach(function(e){delete v[c][e.i],"removeEventListener"in t&&t.removeEventListener(a(e.e),e.proxy,o(e,u))})})}function c(e,n){return(n||!e.isDefaultPrevented)&&(n||(n=e),t.each(j,function(t,i){var r=n[t];e[t]=function(){return this[i]=w,r&&r.apply(n,arguments)},e[i]=E}),(n.defaultPrevented!==f?n.defaultPrevented:"returnValue"in n?n.returnValue===!1:n.getPreventDefault&&n.getPreventDefault())&&(e.isDefaultPrevented=w)),e}function l(t){var e,n={originalEvent:t};for(e in t)T.test(e)||t[e]===f||(n[e]=t[e]);return c(n,t)}var f,h=1,p=Array.prototype.slice,d=t.isFunction,m=function(t){return"string"==typeof t},v={},g={},y="onfocusin"in window,b={focus:"focusin",blur:"focusout"},x={mouseenter:"mouseover",mouseleave:"mouseout"};g.click=g.mousedown=g.mouseup=g.mousemove="MouseEvents",t.event={add:s,remove:u},t.proxy=function(n,i){var r=2 in arguments&&p.call(arguments,2);if(d(n)){var o=function(){return n.apply(i,r?r.concat(p.call(arguments)):arguments)};return o._zid=e(n),o}if(m(i))return r?(r.unshift(n[i],n),t.proxy.apply(null,r)):t.proxy(n[i],n);throw new TypeError("expected function")},t.fn.bind=function(t,e,n){return this.on(t,e,n)},t.fn.unbind=function(t,e){return this.off(t,e)},t.fn.one=function(t,e,n,i){return this.on(t,e,n,i,1)};var w=function(){return!0},E=function(){return!1},T=/^([A-Z]|returnValue$|layer[XY]$)/,j={preventDefault:"isDefaultPrevented",stopImmediatePropagation:"isImmediatePropagationStopped",stopPropagation:"isPropagationStopped"};t.fn.delegate=function(t,e,n){return this.on(e,t,n)},t.fn.undelegate=function(t,e,n){return this.off(e,t,n)},t.fn.live=function(e,n){return t(document.body).delegate(this.selector,e,n),this},t.fn.die=function(e,n){return t(document.body).undelegate(this.selector,e,n),this},t.fn.on=function(e,n,i,r,o){var a,c,h=this;return e&&!m(e)?(t.each(e,function(t,e){h.on(t,n,i,e,o)}),h):(m(n)||d(r)||r===!1||(r=i,i=n,n=f),(r===f||i===!1)&&(r=i,i=f),r===!1&&(r=E),h.each(function(f,h){o&&(a=function(t){return u(h,t.type,r),r.apply(this,arguments)}),n&&(c=function(e){var i,o=t(e.target).closest(n,h).get(0);return o&&o!==h?(i=t.extend(l(e),{currentTarget:o,liveFired:h}),(a||r).apply(o,[i].concat(p.call(arguments,1)))):void 0}),s(h,e,r,i,n,c||a)}))},t.fn.off=function(e,n,i){var r=this;return e&&!m(e)?(t.each(e,function(t,e){r.off(t,n,e)}),r):(m(n)||d(i)||i===!1||(i=n,n=f),i===!1&&(i=E),r.each(function(){u(this,e,i,n)}))},t.fn.trigger=function(e,n){return e=m(e)||t.isPlainObject(e)?t.Event(e):c(e),e._args=n,this.each(function(){e.type in b&&"function"==typeof this[e.type]?this[e.type]():"dispatchEvent"in this?this.dispatchEvent(e):t(this).triggerHandler(e,n)})},t.fn.triggerHandler=function(e,i){var r,o;return this.each(function(a,s){r=l(m(e)?t.Event(e):e),r._args=i,r.target=s,t.each(n(s,e.type||e),function(t,e){return o=e.proxy(r),r.isImmediatePropagationStopped()?!1:void 0})}),o},"focusin focusout focus blur load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select keydown keypress keyup error".split(" ").forEach(function(e){t.fn[e]=function(t){return 0 in arguments?this.bind(e,t):this.trigger(e)}}),t.Event=function(t,e){m(t)||(e=t,t=e.type);var n=document.createEvent(g[t]||"Events"),i=!0;if(e)for(var r in e)"bubbles"==r?i=!!e[r]:n[r]=e[r];return n.initEvent(t,i,!0),c(n)}}(Zepto),function(t){t.fn.serializeArray=function(){var e,n,i=[],r=function(t){return t.forEach?t.forEach(r):void i.push({name:e,value:t})};return this[0]&&t.each(this[0].elements,function(i,o){n=o.type,e=o.name,e&&"fieldset"!=o.nodeName.toLowerCase()&&!o.disabled&&"submit"!=n&&"reset"!=n&&"button"!=n&&"file"!=n&&("radio"!=n&&"checkbox"!=n||o.checked)&&r(t(o).val())}),i},t.fn.serialize=function(){var t=[];return this.serializeArray().forEach(function(e){t.push(encodeURIComponent(e.name)+"="+encodeURIComponent(e.value))}),t.join("&")},t.fn.submit=function(e){if(0 in arguments)this.bind("submit",e);else if(this.length){var n=t.Event("submit");this.eq(0).trigger(n),n.isDefaultPrevented()||this.get(0).submit()}return this}}(Zepto),function(t,e){function n(t){return t.replace(/([a-z])([A-Z])/,"$1-$2").toLowerCase()}function i(t){return r?r+t:t.toLowerCase()}var r,o,a,s,u,c,l,f,h,p,d="",m={Webkit:"webkit",Moz:"",O:"o"},v=document.createElement("div"),g=/^((translate|rotate|scale)(X|Y|Z|3d)?|matrix(3d)?|perspective|skew(X|Y)?)$/i,y={};t.each(m,function(t,n){return v.style[t+"TransitionProperty"]!==e?(d="-"+t.toLowerCase()+"-",r=n,!1):void 0}),o=d+"transform",y[a=d+"transition-property"]=y[s=d+"transition-duration"]=y[c=d+"transition-delay"]=y[u=d+"transition-timing-function"]=y[l=d+"animation-name"]=y[f=d+"animation-duration"]=y[p=d+"animation-delay"]=y[h=d+"animation-timing-function"]="",t.fx={off:r===e&&v.style.transitionProperty===e,speeds:{_default:400,fast:200,slow:600},cssPrefix:d,transitionEnd:i("TransitionEnd"),animationEnd:i("AnimationEnd")},t.fn.animate=function(n,i,r,o,a){return t.isFunction(i)&&(o=i,r=e,i=e),t.isFunction(r)&&(o=r,r=e),t.isPlainObject(i)&&(r=i.easing,o=i.complete,a=i.delay,i=i.duration),i&&(i=("number"==typeof i?i:t.fx.speeds[i]||t.fx.speeds._default)/1e3),a&&(a=parseFloat(a)/1e3),this.anim(n,i,r,o,a)},t.fn.anim=function(i,r,d,m,v){var b,x,w,E={},T="",j=this,S=t.fx.transitionEnd,C=!1;if(r===e&&(r=t.fx.speeds._default/1e3),v===e&&(v=0),t.fx.off&&(r=0),"string"==typeof i)E[l]=i,E[f]=r+"s",E[p]=v+"s",E[h]=d||"linear",S=t.fx.animationEnd;else{x=[];for(b in i)g.test(b)?T+=b+"("+i[b]+") ":(E[b]=i[b],x.push(n(b)));T&&(E[o]=T,x.push(o)),r>0&&"object"==typeof i&&(E[a]=x.join(", "),E[s]=r+"s",E[c]=v+"s",E[u]=d||"linear")}return w=function(e){if("undefined"!=typeof e){if(e.target!==e.currentTarget)return;t(e.target).unbind(S,w)}else t(this).unbind(S,w);C=!0,t(this).css(y),m&&m.call(this)},r>0&&(this.bind(S,w),setTimeout(function(){C||w.call(j)},1e3*(r+v)+25)),this.size()&&this.get(0).clientLeft,this.css(E),0>=r&&setTimeout(function(){j.each(function(){w.call(this)})},0),this},v=null}(Zepto); --------------------------------------------------------------------------------