├── .gitignore ├── Gruntfile.js ├── LICENSE ├── README.md ├── cron ├── README.md └── cron.js ├── json ├── info.json └── post.json ├── package.json ├── t ├── .eslintrc.yml ├── .gitignore ├── README ├── account.json.example ├── app.js ├── bin │ └── www.js ├── error_code.json ├── package.json ├── qiniu.js.example ├── routes │ └── index.js └── yarn.lock └── www ├── config.js ├── dest.html ├── index.html └── static ├── highlight ├── CHANGES.md ├── LICENSE ├── README.md ├── README.ru.md ├── highlight.pack.js └── styles │ ├── agate.css │ ├── androidstudio.css │ ├── arduino-light.css │ ├── arta.css │ ├── ascetic.css │ ├── atelier-cave-dark.css │ ├── atelier-cave-light.css │ ├── atelier-dune-dark.css │ ├── atelier-dune-light.css │ ├── atelier-estuary-dark.css │ ├── atelier-estuary-light.css │ ├── atelier-forest-dark.css │ ├── atelier-forest-light.css │ ├── atelier-heath-dark.css │ ├── atelier-heath-light.css │ ├── atelier-lakeside-dark.css │ ├── atelier-lakeside-light.css │ ├── atelier-plateau-dark.css │ ├── atelier-plateau-light.css │ ├── atelier-savanna-dark.css │ ├── atelier-savanna-light.css │ ├── atelier-seaside-dark.css │ ├── atelier-seaside-light.css │ ├── atelier-sulphurpool-dark.css │ ├── atelier-sulphurpool-light.css │ ├── atom-one-dark.css │ ├── atom-one-light.css │ ├── brown-paper.css │ ├── brown-papersq.png │ ├── codepen-embed.css │ ├── color-brewer.css │ ├── darcula.css │ ├── dark.css │ ├── darkula.css │ ├── default.css │ ├── docco.css │ ├── dracula.css │ ├── far.css │ ├── foundation.css │ ├── github-gist.css │ ├── github.css │ ├── googlecode.css │ ├── grayscale.css │ ├── gruvbox-dark.css │ ├── gruvbox-light.css │ ├── hopscotch.css │ ├── hybrid.css │ ├── idea.css │ ├── ir-black.css │ ├── kimbie.dark.css │ ├── kimbie.light.css │ ├── magula.css │ ├── mono-blue.css │ ├── monokai-sublime.css │ ├── monokai.css │ ├── obsidian.css │ ├── ocean.css │ ├── paraiso-dark.css │ ├── paraiso-light.css │ ├── pojoaque.css │ ├── pojoaque.jpg │ ├── purebasic.css │ ├── qtcreator_dark.css │ ├── qtcreator_light.css │ ├── railscasts.css │ ├── rainbow.css │ ├── school-book.css │ ├── school-book.png │ ├── solarized-dark.css │ ├── solarized-light.css │ ├── sunburst.css │ ├── tomorrow-night-blue.css │ ├── tomorrow-night-bright.css │ ├── tomorrow-night-eighties.css │ ├── tomorrow-night.css │ ├── tomorrow.css │ ├── vs.css │ ├── xcode.css │ ├── xt256.css │ └── zenburn.css ├── img └── bg.jpg ├── js ├── controller.js ├── itorr2.js ├── less.js ├── pagedown.converter.js ├── q.js ├── templet.js └── 获取模板-开发版.js ├── less ├── i.less ├── itorr.normalize.less ├── layout.less ├── step.less ├── view-article.less └── view-posts.less └── templet ├── article.templet ├── header.templet └── posts.templet /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | dest 3 | sess.txt 4 | pics.json 5 | cron/pics 6 | -------------------------------------------------------------------------------- /Gruntfile.js: -------------------------------------------------------------------------------- 1 | module.exports = function (grunt) { 2 | 3 | 4 | grunt.registerMultiTask('itemplet', '合并模板文件', function () { 5 | 6 | this.files.forEach(function (file) { 7 | 8 | var M={}; 9 | var key,value; 10 | 11 | var src = file.src.filter(function (filepath) { 12 | 13 | if (!grunt.file.exists(filepath)) { 14 | grunt.log.warn('Source file "' + filepath + '" not found.'); 15 | return false; 16 | }else if(filepath.match(/!/)){ 17 | grunt.log.writeln('跳过文件 ' + filepath); 18 | return false; 19 | } else { 20 | return true; 21 | } 22 | }).forEach(function (filepath) { 23 | 24 | key=filepath.match(/\/([^/]+?)\.(templet|view)$/); 25 | if(!key) 26 | return; 27 | 28 | key=key[1]; 29 | 30 | value=grunt.file.read(filepath) 31 | .replace(/\t+/g,'\t') 32 | .replace(//g,''); 33 | 34 | M[key]=value; 35 | }); 36 | 37 | 38 | 39 | M=JSON.stringify(M); 40 | 41 | var 42 | objs=file.dest.match(/\/([^/]+?)s?\.js$/); 43 | 44 | objs=objs[1].replace(/(\w)/,function(v){return v.toUpperCase()}); 45 | 46 | M='var get'+objs+'=function(M){return function(key){return M[key]}}('+M+')'; 47 | 48 | grunt.file.write(file.dest,M); 49 | 50 | grunt.log.writeln('文件 ' + file.dest + ' 生成成功'); 51 | }); 52 | }); 53 | 54 | grunt.registerMultiTask('suffixupdate', '版本号更新', function () { 55 | 56 | 57 | var 58 | suffix=Math.floor(+new Date()/1000).toString(36); 59 | 60 | this.files.forEach(function (file) { 61 | var src = file.src.forEach(function (filepath,b) { 62 | 63 | if (!grunt.file.exists(filepath)) { 64 | grunt.log.warn('文件 ' + filepath + ' 不存在'); 65 | return true; 66 | } 67 | 68 | text=grunt.file.read(filepath); 69 | 70 | text=text.replace(/suffix='\w{3,20}'/g,'suffix=\''+suffix+'\''); 71 | text=text.replace(/_r=\w{3,20}/g,'_r='+suffix); 72 | 73 | grunt.file.write(file.dest,text); 74 | 75 | grunt.log.writeln('文件 ' + filepath+ ' 版本号更新成功'); 76 | 77 | }); 78 | 79 | }); 80 | }); 81 | 82 | 83 | 84 | 85 | grunt.initConfig({ 86 | pkg: grunt.file.readJSON('package.json'), 87 | suffixupdate:{ 88 | build:{ 89 | files:{ 90 | 'dest/index.html':'www/dest.html' 91 | } 92 | } 93 | }, 94 | htmlmin: { 95 | build:{ 96 | options: { 97 | removeComments: true, 98 | removeCommentsFromCDATA: true, 99 | collapseWhitespace: true, 100 | collapseBooleanAttributes: true, 101 | removeAttributeQuotes: true, 102 | removeRedundantAttributes: true, 103 | useShortDoctype: true, 104 | removeEmptyAttributes: true, 105 | removeOptionalTags: true, 106 | minifyJS: 1 107 | }, 108 | files: { 109 | 'dest/index.html':'dest/index.html' 110 | } 111 | } 112 | }, 113 | itemplet: { 114 | build: { 115 | files: { 116 | 'dest/static/js/templets.js':'www/static/templet/*.templet' 117 | } 118 | }, 119 | }, 120 | less: { 121 | dynamic_mappings: { 122 | files: [{ 123 | cwd: './', 124 | src:[ 125 | 'www/static/less/i.less', 126 | ], 127 | dest: 'dest/static/css/index.css' 128 | }] 129 | }, 130 | }, 131 | concat: { 132 | js:{ 133 | options: { 134 | separator: ';' 135 | }, 136 | files: { 137 | 'dest/static/js/build.js':[ 138 | 'www/static/js/itorr2.js', 139 | 'www/static/js/q.js', 140 | 'www/static/js/templet.js', 141 | 'www/static/js/pagedown.converter.js', 142 | 'dest/static/js/templets.js', 143 | 'www/static/highlight/highlight.pack.js', 144 | 'www/config.js', 145 | 'www/static/js/controller.js', 146 | ] 147 | } 148 | }, 149 | css:{ 150 | files:{ 151 | 'dest/static/css/index.css':[ 152 | 'dest/static/css/index.css', 153 | 'www/static/highlight/styles/monokai-sublime.css' 154 | ] 155 | } 156 | } 157 | }, 158 | uglify: { 159 | build: { 160 | files: { 161 | 'dest/static/js/build.js':'dest/static/js/build.js' 162 | } 163 | } 164 | }, 165 | cssmin: { 166 | compress: { 167 | files: { 168 | 'dest/static/css/index.css':'dest/static/css/index.css', 169 | } 170 | } 171 | }, 172 | copy: { 173 | main: { 174 | files: [ 175 | { 176 | 'dest/static/img/bg.jpg':'www/static/img/bg.jpg' 177 | } 178 | ] 179 | }, 180 | }, 181 | clean: { 182 | dest: [ 183 | 'dest/*' 184 | ], 185 | templet: [ 186 | 'dest/static/js/views.js', 187 | 'dest/static/js/templets.js' 188 | ] 189 | }, 190 | }); 191 | grunt.loadNpmTasks('grunt-contrib-htmlmin'); 192 | grunt.loadNpmTasks('grunt-contrib-uglify'); 193 | grunt.loadNpmTasks('grunt-contrib-concat'); 194 | grunt.loadNpmTasks('grunt-contrib-less'); 195 | grunt.loadNpmTasks('grunt-contrib-cssmin'); 196 | grunt.loadNpmTasks('grunt-contrib-copy'); 197 | grunt.loadNpmTasks('grunt-contrib-clean'); 198 | 199 | 200 | 201 | 202 | // 默认任务 203 | grunt.registerTask('default', [ 204 | 'clean:dest', 205 | 'itemplet', 206 | 'suffixupdate', 207 | 'htmlmin', 208 | 'uglify', 209 | 'less', 210 | 'concat', 211 | 'cssmin', 212 | 'clean:templet', 213 | 'copy', 214 | ]); 215 | 216 | 217 | //,'gitcommit','gitpush' 218 | } -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ![锤子博客,基于锤子便签的博客程序。](http://ww4.sinaimg.cn/large/a15b4afegw1f8wp4958lcj20pj0fan2e) 2 | # 锤子博客 3 | 🔨博客,基于锤子便签的博客程序。 4 | 5 | ## 如何写文章? 6 | 7 | - 在 锤子便签应用 或 网页版 中写文章 8 | - 将 想要在博客展示的文章 添加 星标 9 | - 同步到欢喜云云端 10 | - 使用 HTTP API 或者 定时任务生成 JSON 11 | - 文章上线啦! 12 | 13 | ## 端部分说明 14 | 15 | 16 | ```bash 17 | npm i # 安装必要的 npm 包 18 | grunt # 生成前端线上版本 19 | ``` 20 | 21 | `www/config.js` 配置 API 地址 22 | 23 | 24 | 25 | ## HTTP 服务器形式 API 26 | 27 | [HTTP 服务器形式 API 说明文档](https://github.com/itorr/smartisanBlog/tree/master/t) 来自 @solarhell 28 | 29 | ## Cron 定时任务 静态 API 30 | 31 | [Cron 定时任务 静态 API 说明文档](https://github.com/itorr/smartisanBlog/tree/master/cron) 来自 @wsph123 32 | 33 | ## 马上会有 34 | - 类别(基于锤子便签后加的文件夹实现) 35 | 36 | ## 使用了这些开源项目 37 | - Templet.js 38 | - PageDown.js 39 | - Q.js 40 | - Highlight.js 41 | - iTorr.js 42 | 43 | ## 使用了这些服务 44 | - [锤子便签](https://cloud.smartisan.com/#/notes) 45 | - [微博图床](http://weibo.com) 46 | 47 | ## 演示 48 | 49 | [http://front.dog/smartisan/](http://front.dog/smartisan/) -------------------------------------------------------------------------------- /cron/README.md: -------------------------------------------------------------------------------- 1 | # 定时任务 静态 JSON API 2 | 3 | ## 抓取 4 | ```bash 5 | node cron/cron.js laoluo@t.tt woshinidie # 生成 JSON 数据,默认目录 `./json` 6 | ``` 7 | 8 | ## crontab 定时抓取 9 | 10 | ```bash 11 | crontab -e # 编辑定时任务 12 | ``` 13 | 在行尾添加 14 | 15 | ```bash 16 | */30 * * * * cd /home/git/smartisanBlog/;node cron/cron.js 账号 密码 17 | ``` 18 | 19 | ## 图床 20 | 最近图床抽风比较严重,抽风那就多重试几次 w 21 | -------------------------------------------------------------------------------- /cron/cron.js: -------------------------------------------------------------------------------- 1 | var 2 | request=require('request'), 3 | fs=require('fs'); 4 | 5 | 6 | 7 | 8 | 9 | 10 | var 11 | ARG=process.argv.slice(2); 12 | 13 | // console.log(ARG); 14 | 15 | var 16 | username=ARG[0], 17 | password=ARG[1]; 18 | 19 | 20 | 21 | var 22 | 用户临时凭证文件文件路径='cron/sess.txt', 23 | 图片缓存对应表文件路径='cron/pics.json', 24 | 文章数据文件路径='json/post.json', 25 | 用户数据文件路径='json/info.json', 26 | 文件配图文件夹路径='cron/pics/'; 27 | 28 | 29 | 30 | var 31 | 线上图片路径前缀='https://cloud.smartisan.com/apps/note/notesimage/'; 32 | 33 | /* 34 | curl 'https://account.smartisan.com/v2/session/?m=post' \ 35 | -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.143 Safari/537.36' \ 36 | -H 'Content-Type: application/x-www-form-urlencoded;charset=UTF-8' \ 37 | -H 'Referer: https://account.smartisan.com/' \ 38 | --data 'username=itorrrrrr@me.com&password=wsph123&extended_login=1' \ 39 | -i \ 40 | --compressed 41 | */ 42 | var 43 | SESS; 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | if(fs.existsSync(用户临时凭证文件文件路径)){ 52 | SESS=fs.readFileSync(用户临时凭证文件文件路径); 53 | } 54 | 55 | var 56 | PICS={}; 57 | 58 | 59 | 60 | if(fs.existsSync(图片缓存对应表文件路径)){ 61 | var 62 | _pics=fs.readFileSync(图片缓存对应表文件路径); 63 | 64 | try{ 65 | _pics=JSON.parse(_pics); 66 | 67 | if(_pics){ 68 | PICS=_pics; 69 | } 70 | }catch(e){ 71 | 72 | } 73 | } 74 | 75 | 76 | if(!fs.existsSync(文件配图文件夹路径)){ 77 | fs.mkdirSync(文件配图文件夹路径); 78 | } 79 | 80 | 81 | var 82 | 按顺序执行=function(items,step,end){ 83 | 84 | var 85 | next=function(){ 86 | item=items.shift(); 87 | if(!item){ 88 | if(end) 89 | end(); 90 | 91 | return; 92 | } 93 | 94 | step(item,next); 95 | }; 96 | 97 | next(); 98 | }, 99 | 上传图片到微博=function(file,返回图片唯一值){ 100 | request.post({ 101 | url:'http://x.mouto.org/wb/x.php?up', 102 | formData:{ 103 | file:fs.createReadStream(file) 104 | }, 105 | },function(e,res,body){ 106 | 107 | var 108 | pid=body.match(/\w{16,32}/i); 109 | 110 | pid=''+pid; 111 | 112 | if(e || body.match(/error|file_/) || !pid){ 113 | console.log(/上传失败/,body); 114 | 115 | return 返回图片唯一值(); 116 | } 117 | 118 | 119 | console.log(/上传完成一张图/,file,pid); 120 | 121 | 返回图片唯一值(pid); 122 | }); 123 | }, 124 | 下载图片=function(url,path,返回图片路径){ 125 | 126 | if(fs.existsSync(path)){ 127 | console.log(/文件已存在/,path); 128 | return 返回图片路径(path); 129 | } 130 | 131 | request(url,{ 132 | headers:{ 133 | 'User-Agent':'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.143 Safari/537.36', 134 | 'Accept': 'image/webp,image/*,*/*;q=0.8', 135 | 'Referer': 'https://cloud.smartisan.com/apps/note/', 136 | 'Cookie': 'SCA_SESS='+SESS+'; SCA_LOGIN=1' 137 | } 138 | },function(err,res,body){ 139 | if(err){ 140 | console.log(/图片下载失败。/,err); 141 | return func(); 142 | } 143 | 144 | console.log(/图片下载完成/,path); 145 | 146 | 147 | 返回图片路径(path); 148 | 149 | }).pipe(fs.createWriteStream(path)); 150 | }, 151 | 登录=function(返回登录凭证){ 152 | request.post('https://account.smartisan.com/v2/session/?m=post',{ 153 | headers:{ 154 | 'User-Agent':'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.143 Safari/537.36', 155 | 'Accept-Language': 'zh-CN,zh;q=0.8,en;q=0.6,ja;q=0.4', 156 | 'Accept-Encoding': 'gzip, deflate, br', 157 | 'Referer': 'https://account.smartisan.com/', 158 | }, 159 | form:{ 160 | username:username, 161 | password:password, 162 | extended_login:'1' 163 | } 164 | },function(err,res,body){ 165 | 166 | if(err){ 167 | return console.log(/登录失败/); 168 | } 169 | 170 | 171 | var 172 | sess=res.headers['set-cookie']; 173 | 174 | if(!sess){ 175 | return console.log(/获取 SESS 失败/); 176 | } 177 | 178 | if(!(sess=sess.join('').match(/SCA_SESS=([\w-_]+)/))){ 179 | return console.log(/获取 SESS 失败/); 180 | } 181 | 182 | SESS=sess[1]; 183 | 184 | 185 | fs.writeFileSync(用户临时凭证文件文件路径,SESS,{encoding:'utf8'}); 186 | console.log(/用户临时凭证保存成功/,SESS); 187 | 返回登录凭证(SESS); 188 | 189 | }); 190 | },获取用户数据=function(返回用户数据){ 191 | 192 | /* 193 | 194 | curl 'https://account.smartisan.com/v2/w/?m=get' \ 195 | -X POST \ 196 | -H 'Accept-Encoding: gzip, deflate, br' \ 197 | -H 'Accept-Language: zh-CN,zh;q=0.8,en;q=0.6,ja;q=0.4' \ 198 | -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.143 Safari/537.36' \ 199 | -H 'Content-Type: application/json;charset=utf-8' \ 200 | -H 'Accept: application/json, text/plain, *\/*' \ 201 | -H 'Referer: https://account.smartisan.com/' \ 202 | -H 'Cookie: SCA_SESS=qTI5XqrrmPHp12YeAHj3VqCD5Evm_jqr; SCA_LOGIN=1' \ 203 | -i 204 | --compressed 205 | 206 | */ 207 | if(!SESS) 208 | return 登录(function(){ 209 | 获取用户数据(返回用户数据); 210 | }); 211 | 212 | 213 | request.post('https://account.smartisan.com/v2/w/?m=get',{ 214 | headers:{ 215 | 'User-Agent':'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.143 Safari/537.36', 216 | 'Content-Type': 'application/json;charset=utf-8,', 217 | 'Referer': 'https://account.smartisan.com/', 218 | 'Cookie': 'SCA_SESS='+SESS+'; SCA_LOGIN=1' 219 | }, 220 | },function(err,res,body){ 221 | 222 | if(err){ 223 | return console.log(/获取用户信息失败/); 224 | } 225 | 226 | if(!body.match(/{"errno":0,/)){ 227 | 228 | return console.log(/获取用户信息失败,尝试重新登录/); 229 | return 登录(function(){ 230 | 获取用户数据(func); 231 | }); 232 | } 233 | 234 | 235 | var 236 | r=JSON.parse(body); 237 | 238 | r=r.data; 239 | 240 | var 241 | 用户信息={ 242 | avatar_url:r.avatar_url, 243 | nickname:r.nickname, 244 | uid:r.uid 245 | }; 246 | 247 | 248 | 249 | fs.writeFileSync(用户数据文件路径,JSON.stringify(用户信息),{encoding:'utf8'}); 250 | console.log(/用户信息保存成功/,用户信息); 251 | 252 | 返回用户数据(用户信息); 253 | 254 | }); 255 | },获取文章数据=function(返回文章数据){ 256 | 257 | request.get('https://cloud.smartisan.com/apps/note/index.php?r=v2/getList',{ 258 | headers:{ 259 | 'User-Agent':'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.143 Safari/537.36', 260 | 261 | 'Referer': 'https://cloud.smartisan.com/apps/note/', 262 | 'Cookie': 'SCA_SESS='+SESS+'; SCA_LOGIN=1' 263 | }, 264 | },function(err,res,body){ 265 | 266 | if(err){ 267 | return console.log(/获取用户信息失败/); 268 | } 269 | 270 | 271 | // console.log(res,body); 272 | // return; 273 | 274 | var 275 | r=JSON.parse(body); 276 | 277 | r=r.data; 278 | 279 | // console.log(r); 280 | var 281 | 文章数据=整理文章数据(r.note,整理文件夹数据(r.folder)); 282 | 283 | 文章数据=JSON.stringify(文章数据); 284 | 285 | 286 | 根据字符串取得图片下载到本地上传微博并替换(文章数据,function(文章数据){ 287 | 288 | fs.writeFileSync(文章数据文件路径,文章数据,{encoding:'utf8'}); 289 | console.log(/文章数据保存成功/); 290 | 291 | }); 292 | 293 | 294 | 返回文章数据(); 295 | }); 296 | },整理文件夹数据=function(_文件夹们){ 297 | 298 | 299 | var 300 | 文件夹们={}; 301 | 302 | if(!_文件夹们){ 303 | return 文件夹们; 304 | } 305 | 306 | _文件夹们.forEach(function(文件夹){ 307 | 文件夹们[文件夹.sync_id]=文件夹.title; 308 | }); 309 | 310 | 311 | return 文件夹们; 312 | },整理文章数据=function(文章们,文件夹们){ 313 | return 文章们.filter(function(文章){ 314 | if(!文章.favorite){ 315 | return false; 316 | } 317 | 318 | return true; 319 | }).map(function(文章){ 320 | 321 | return { 322 | pos:文章.pos, 323 | title:文章.title, 324 | detail:文章.detail, 325 | markdown:文章.markdown, 326 | cat:文件夹们[文章.folderId]||null, 327 | modify_time:文章.modify_time, 328 | }; 329 | }); 330 | 331 | }, 332 | 根据字符串取得图片下载到本地上传微博并替换=function(文章数据,返回文章数据){ 333 | var 334 | 图片们=文章数据.match(/Notes_\d+\.(png|jpeg|jpg|gif)/ig); 335 | 336 | 337 | 按顺序执行(图片们,function(图片,处理下一张图片){ 338 | 339 | if(PICS[图片]){ 340 | return 处理下一张图片(); 341 | } 342 | 343 | 下载图片(线上图片路径前缀+图片,文件配图文件夹路径+图片,function(path){ 344 | if(!path){ 345 | return 处理下一张图片(); 346 | } 347 | 348 | 上传图片到微博(path,function(pid){ 349 | 350 | 351 | if(!pid) 352 | return 处理下一张图片(); 353 | 354 | 355 | 356 | 存储到图片对应表(图片,pid); 357 | 358 | 处理下一张图片(); 359 | }) 360 | }); 361 | },function(){ 362 | console.log(/图片处理结束/); 363 | 364 | 文章数据=文章数据.replace(/Notes_\d+\.(png|jpeg|jpg|gif)/ig,function(all){ 365 | return PICS[all]||all; 366 | }); 367 | 368 | 返回文章数据(文章数据); 369 | 370 | }); 371 | }, 372 | 存储到图片对应表=function(图片,pid){ 373 | 374 | if(!图片||!pid){ 375 | return; 376 | } 377 | 378 | PICS[图片]=pid; 379 | 380 | fs.writeFileSync(图片缓存对应表文件路径,JSON.stringify(PICS),{encoding:'utf8'}); 381 | }; 382 | 383 | 384 | 385 | var 386 | 整理数据=function(){ 387 | 获取用户数据(function(){ 388 | 获取文章数据(function(){ 389 | console.log(/全部完成!/); 390 | }); 391 | }); 392 | }; 393 | 394 | 395 | 396 | 397 | 398 | 399 | 整理数据(); 400 | -------------------------------------------------------------------------------- /json/info.json: -------------------------------------------------------------------------------- 1 | {"avatar_url":"https://account.smartisan.com/files/00/19/fc/ae/avatar.png","nickname":"itorr","uid":1703086} -------------------------------------------------------------------------------- /json/post.json: -------------------------------------------------------------------------------- 1 | [{"pos":42,"title":"#大标题","detail":"#大标题\n##什么是 MarkDwon\n这就是 MarkDwon 你怎么什么都不明白\n什么鬼什么鬼\n##为什么你这么蠢\nMarkDown 格式不支持?\n","markdown":1,"cat":"测试","modify_time":1476783614750},{"pos":5,"title":"# 这个功能好强力卧槽有点牛","detail":"# 这个功能好强力卧槽有点牛\n\n- 列表模式也是可以用的?\n- 多行列表\n- 好卡\n- **粗体**\n\n> 引用一段文字\n> 好卡\n> 为什么这么卡\n[居中是什么鬼]\n\n","markdown":0,"cat":"测试","modify_time":1476783622899},{"pos":6,"title":"#如何使用","detail":"#如何使用\n加个星标先\n","markdown":1,"cat":null,"modify_time":1441706539185},{"pos":7,"title":"# 锤子博客生成工具","detail":"# 锤子博客生成工具\n这是一个将锤子便签变为锤子博客的托管服务。\n\n## 这里有\n- 前后端分离的载入方案\n- 完善的评论系统\n- 实时的文章同步\n- 无需后台的维护方案\n- MarkDown开关作为发布依据","markdown":0,"cat":null,"modify_time":1441688225000},{"pos":19,"title":"# 夏洛特","detail":"# 夏洛特\n```javascript\nalert('123131');\nvar \ni=4;\nwhile(i--){\n console.log(i);\n}\n```\n这是第一次用锤子博客写日记,感觉爽爽的!\n前晚看了夏洛特第10话,解开了大哥哥的包袱、依靠从哥哥眼里夺来的能力穿越回过去拯救了妹妹,紧接着就是满是疑团的第十一话预告。\n迷之新角色、OP中对应的浑身伤痕、这之后的三话到底会如何发展好期待!","markdown":1,"cat":null,"modify_time":1476423971203},{"pos":8,"title":"# 錘子便簽的 MarkDown 工具經常卡卡的!坑坑😊","detail":"# 錘子便簽的 MarkDown 工具經常卡卡的!坑坑😊\n😊不知道 Emoji 文字支持的怎麼樣,小小期待一下OwQ傳圖要是能方便一點就好啦\n","markdown":1,"cat":null,"modify_time":1441738568318},{"pos":41,"title":"# 雏形基本完成","detail":"# 雏形基本完成\n点击星标即可发布\n\n","markdown":0,"cat":null,"modify_time":1476788999000},{"pos":11,"title":"# 尝试写一段代码","detail":"# 尝试写一段代码\n\n```javascript\nMD=function(t,i,r,f,ff){\n\tif(!f||typeof r!='function'){\n\t\tff=f;\n\t\tf=r;\n\t\tr=function(i){return i};\n\t}\n\tt=getM(t);\n\tt=Mustache.render(t,r(i));\n\tif(f)\n\t\ttranH(t,f,ff);\n\treturn t;\n},\n```\n为什么没法成功加星。\n","markdown":0,"cat":null,"modify_time":1441739912117},{"pos":16,"title":"# 情绪并不稳定,昨晚睡的好晚","detail":"# 情绪并不稳定,昨晚睡的好晚\n小锤子到了!好大!塑料感十足,便签里面并不知道如何开启MarkDown功能","markdown":0,"cat":null,"modify_time":1441770029559},{"pos":20,"title":"# CLANNAD 主題隨筆","detail":"# CLANNAD 主題隨筆\n如果第二行直接是图片,那么这个便签就坑了T_T兩張草圖\n","markdown":0,"cat":null,"modify_time":1441792746824},{"pos":40,"title":"# 把锤子便签变成博客","detail":"# 把锤子便签变成博客\n## 一、在锤子便签中写文章、并添加星标## 二、同步到欢喜云云端## 三、服务端抓取便签信息## 四、发布完成 ww","markdown":1,"cat":null,"modify_time":1476791831000},{"pos":43,"title":"# 锤子博客","detail":"# 锤子博客\n🔨博客,基于锤子便签的博客程序。\n\n## 如何写文章?\n\n - 在 锤子便签应用 或 网页版 中写文章\n - 将 想要在博客展示的文章 添加 星标\n - 同步到欢喜云云端\n - 使用 HTTP API 或者 定时任务生成 JSON\n - 文章上线啦!\n\n## 端部分说明\n\n\n```bash\nnpm i # 安装必要的 npm 包\ngrunt # 生成前端线上版本\n```\n\n`www/config.js` 配置 API 地址\n\n\n\n## HTTP 服务器形式 API \n\n[HTTP 服务器形式 API 说明文档](https://github.com/itorr/smartisanBlog/tree/master/t) 来自 @solarhell\n\n## Cron 定时任务 静态 API\n\n[Cron 定时任务 静态 API 说明文档](https://github.com/itorr/smartisanBlog/tree/master/cron) 来自 @wsph123\n\n## 使用了这些开源项目\n - Templet.js\n - PageDown.js\n - Q.js\n - Highlight.js\n - iTorr.js\n\n## 使用了这些服务\n - [锤子便签](https://cloud.smartisan.com/#/notes)\n - [微博图床](http://weibo.com)\n\n## 演示\n\n[http://front.dog/smartisan/#/home](http://front.dog/smartisan/#/home)","markdown":0,"cat":null,"modify_time":1476791405568}] -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "smartisanBlog", 3 | "version": "1.0.0", 4 | "description": " 基于锤子便签的博客程序", 5 | "repository": { 6 | "type": "git", 7 | "url": "https://github.com/itorr/smartisanBlog.git" 8 | }, 9 | "keywords": [ 10 | "基于锤子便签的博客程序" 11 | ], 12 | "author": "itorrrrrr@me.com", 13 | "license": "Apache-2.0", 14 | "bugs": { 15 | "url": "https://github.com/itorr/smartisanBlog/issues" 16 | }, 17 | "homepage": "https://github.com/itorr/smartisanBlog", 18 | "dependencies": { 19 | "grunt": "^1.0.1", 20 | "grunt-contrib-clean": "^1.0.0", 21 | "grunt-contrib-concat": "^1.0.1", 22 | "grunt-contrib-copy": "^1.0.0", 23 | "grunt-contrib-cssmin": "^1.0.2", 24 | "grunt-contrib-htmlmin": "^2.0.0", 25 | "grunt-contrib-less": "^1.4.0", 26 | "grunt-contrib-uglify": "^2.0.0", 27 | "highlight.js": "^9.7.0", 28 | "request": "^2.75.0" 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /t/.eslintrc.yml: -------------------------------------------------------------------------------- 1 | extends: standard 2 | plugins: 3 | - standard 4 | - promise 5 | -------------------------------------------------------------------------------- /t/.gitignore: -------------------------------------------------------------------------------- 1 | .idea/ 2 | .DS_Store 3 | node_modules 4 | account.json 5 | qiniu.js 6 | output/ 7 | pics/ 8 | -------------------------------------------------------------------------------- /t/README: -------------------------------------------------------------------------------- 1 | ```bash 2 | cp account.json.example account.json 3 | mkdir pics 4 | mkdir output 5 | npm i 6 | node ./bin/www.js 7 | ``` 8 | 9 | 如果要使用七牛图床: 10 | ```bash 11 | cp config.js.example config.js 12 | ``` 13 | 编辑 `routes/index.js` 14 | 15 | 16 | 食用方法! 17 | 18 | 微博图床 19 | 20 | 1 http://localhost:3000/api/v1/info // 获取信息 21 | 2 http://localhost:3000/api/v1/post // 获取便签 22 | 3 http://localhost:3000/api/v1/t // 下载便签内的所有图片 23 | 4 http://localhost:3000/api/v1/itorr // 上传所有图片到微博 24 | 5 http://localhost:3000/api/v1/wb // 替换锤子图片为微博图床 25 | 26 | 27 | 七牛图床 28 | 29 | 1 http://localhost:3000/api/v1/info // 获取信息 30 | 2 http://localhost:3000/api/v1/post // 获取便签 31 | 3 http://localhost:3000/api/v1/t // 下载便签内的所有图片 32 | 4 http://localhost:3000/api/v1/pics // 上传所有图片到七牛 33 | 5 http://localhost:3000/api/v1/qiniu // 替换锤子图片为七牛图床 34 | 35 | 36 | 37 | `app.js` 内的 apiRateLimit 已经注释,需要部署可以考虑开启,防止请求过于频繁。 38 | 39 | TODO: 40 | 缓存! 41 | 正则替换!(目前使用sed) -------------------------------------------------------------------------------- /t/account.json.example: -------------------------------------------------------------------------------- 1 | { 2 | "username": "laoluo@t.tt", 3 | "password": "woshinidie", 4 | "extended_login": "1" 5 | } -------------------------------------------------------------------------------- /t/app.js: -------------------------------------------------------------------------------- 1 | const express = require('express') 2 | // const path = require('path') 3 | // const favicon = require('serve-favicon') 4 | const logger = require('morgan') 5 | // const cookieParser = require('cookie-parser') 6 | const bodyParser = require('body-parser') 7 | 8 | const routes = require('./routes/index') 9 | 10 | const app = express() 11 | const cors = require('cors') 12 | // const helmet = require('helmet') 13 | // const RateLimit = require('express-rate-limit') 14 | 15 | app.use(cors()) 16 | // app.use(helmet()) 17 | 18 | app.use((req, res, next) => { 19 | res.contentType('application/json') 20 | next() 21 | }) 22 | 23 | 24 | // app.enable('trust proxy') 25 | // only if you're behind a reverse proxy (Heroku, Bluemix, AWS if you use an ELB, custom Nginx setup, etc) 26 | 27 | // const apiLimiter = new RateLimit({ 28 | // windowMs: 60 * 60 * 1000, // 60 minutes 29 | // max: 5, 30 | // delayMs: 0 // disabled 31 | // }) 32 | // app.use('/api/v1', apiLimiter) 33 | 34 | // view engine setup 35 | // app.set('views', path.join(__dirname, 'views')) 36 | // app.set('view engine', 'ejs') 37 | 38 | // uncomment after placing your favicon in /public 39 | // app.use(favicon(path.join(__dirname, 'public', 'favicon.ico'))) 40 | app.use(logger('dev')) 41 | app.use(bodyParser.json()) 42 | app.use(bodyParser.urlencoded({ extended: false })) 43 | // app.use(cookieParser()); 44 | // app.use(express.static(path.join(__dirname, 'static'))) 45 | 46 | app.use('/api/v1', routes) 47 | 48 | // catch 404 and forward to error handler 49 | app.use((req, res, next) => { 50 | var err = new Error('Not Found') 51 | err.status = 404 52 | next(err) 53 | }) 54 | 55 | // error handlers 56 | 57 | // development error handler 58 | // will print stacktrace 59 | if (app.get('env') === 'development') { 60 | app.use((err, req, res) => { 61 | res.status(err.status || 500) 62 | res.json({ 63 | message: err.message, 64 | error: err 65 | }) 66 | }) 67 | } 68 | 69 | // production error handler 70 | // no stacktraces leaked to user 71 | app.use((err, req, res) => { 72 | res.status(err.status || 500) 73 | res.json({ 74 | message: err.message, 75 | error: {} 76 | }) 77 | }) 78 | 79 | module.exports = app 80 | -------------------------------------------------------------------------------- /t/bin/www.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | /** 4 | * Module dependencies. 5 | */ 6 | 7 | var app = require('../app') 8 | var debug = require('debug')('t:server') 9 | var http = require('http') 10 | 11 | /** 12 | * Get port from environment and store in Express. 13 | */ 14 | 15 | var port = normalizePort(process.env.PORT || '3000') 16 | app.set('port', port) 17 | 18 | /** 19 | * Create HTTP server. 20 | */ 21 | 22 | var server = http.createServer(app) 23 | 24 | /** 25 | * Listen on provided port, on all network interfaces. 26 | */ 27 | 28 | server.listen(port) 29 | server.on('error', onError) 30 | server.on('listening', onListening) 31 | 32 | /** 33 | * Normalize a port into a number, string, or false. 34 | */ 35 | 36 | function normalizePort (val) { 37 | var port = parseInt(val, 10) 38 | 39 | if (isNaN(port)) { 40 | // named pipe 41 | return val 42 | } 43 | 44 | if (port >= 0) { 45 | // port number 46 | return port 47 | } 48 | 49 | return false 50 | } 51 | 52 | /** 53 | * Event listener for HTTP server "error" event. 54 | */ 55 | 56 | function onError (error) { 57 | if (error.syscall !== 'listen') { 58 | throw error 59 | } 60 | 61 | var bind = typeof port === 'string' 62 | ? 'Pipe ' + port 63 | : 'Port ' + port 64 | 65 | // handle specific listen errors with friendly messages 66 | switch (error.code) { 67 | case 'EACCES': 68 | console.error(bind + ' requires elevated privileges') 69 | process.exit(1) 70 | break 71 | case 'EADDRINUSE': 72 | console.error(bind + ' is already in use') 73 | process.exit(1) 74 | break 75 | default: 76 | throw error 77 | } 78 | } 79 | 80 | /** 81 | * Event listener for HTTP server "listening" event. 82 | */ 83 | 84 | function onListening () { 85 | var addr = server.address() 86 | var bind = typeof addr === 'string' 87 | ? 'pipe ' + addr 88 | : 'port ' + addr.port 89 | debug('Listening on ' + bind) 90 | } 91 | -------------------------------------------------------------------------------- /t/error_code.json: -------------------------------------------------------------------------------- 1 | { 2 | "0": "OK", 3 | "1": "SYSTEM_MAINTENANCE", 4 | "2": "LOGIC_ERROR", 5 | "3": "FS_READ_ERROR", 6 | "4": "FS_WRITE_ERROR", 7 | "5": "DB_CONNECT_ERROR", 8 | "6": "DB_QUERY_ERROR", 9 | "7": "CACHE_CONNECT_ERROR", 10 | "8": "CACHE_QUERY_ERROR", 11 | "1002": "PARAMETER_ERROR", 12 | "1601": "ILLEGAL_TICKET", 13 | "1602": "INVALID_TICKET", 14 | "1101": "ILLEGAL_UID", 15 | "1102": "ILLEGAL_PASSWORD", 16 | "1103": "ILLEGAL_AVATAR", 17 | "1104": "ILLEGAL_SECQUES", 18 | "1105": "ILLEGAL_SECANS", 19 | "1106": "INVALID_UID", 20 | "1107": "INVALID_PASSWORD", 21 | "1108": "INVALID_SECANS", 22 | "1109": "ALIAS_REQUIRED", 23 | "1110": "PASSWORD_REQUIRED", 24 | "1201": "ILLEGAL_ALIAS", 25 | "1202": "INVALID_ALIAS", 26 | "1203": "REGISTERED_ALIAS", 27 | "1204": "ILLEGAL_CELLPHONE", 28 | "1205": "INVALID_CELLPHONE", 29 | "1206": "REGISTERED_CELLPHONE", 30 | "1207": "ILLEGAL_EMAIL", 31 | "1208": "INVALID_EMAIL", 32 | "1209": "REGISTERED_EMAIL", 33 | "1210": "INVALID_NICKNAME", 34 | "1211": "UNREGISTERED_NICKNAME", 35 | "1212": "REGISTERED_NICKNAME", 36 | "1213": "ILLEGAL_NICKNAME", 37 | "1301": "ILLEGAL_VCODE", 38 | "1302": "INVALID_VCODE", 39 | "1304": "VCODE_TOO_OFTEN", 40 | "1502": "CAPTCHA_REQUIRED", 41 | "1401": "ILLEGAL_TOKEN", 42 | "1402": "INVALID_TOKEN", 43 | "1701": "UNAUTHORIZED", 44 | "1303": "REFRECH_VCODE", 45 | "1501": "FAILED_LOGIN_LIMIT" 46 | } -------------------------------------------------------------------------------- /t/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "t", 3 | "version": "1.0.0", 4 | "scripts": { 5 | "start": "node ./bin/www" 6 | }, 7 | "license": "MIT", 8 | "dependencies": { 9 | "body-parser": "^1.15.2", 10 | "cors": "^2.8.1", 11 | "eventproxy": "^0.3.5", 12 | "express": "^4.14.0", 13 | "moment": "^2.15.1", 14 | "morgan": "^1.7.0", 15 | "qiniu": "^6.1.13", 16 | "shelljs": "^0.7.4", 17 | "superagent": "^2.3.0" 18 | }, 19 | "devDependencies": { 20 | "eslint": "^3.8.1", 21 | "eslint-config-standard": "^6.2.0", 22 | "eslint-plugin-promise": "^3.3.0", 23 | "eslint-plugin-standard": "^2.0.1" 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /t/qiniu.js.example: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | 'ACCESS_KEY': '你的ACCESS_KEY', 3 | 'SECRET_KEY': '你的SECRET_KEY', 4 | 'Bucket_Name': '你的Bucket_Name', 5 | 'Domain': '你的域名 http://a.com/ 注意带上结尾的slash' 6 | } 7 | -------------------------------------------------------------------------------- /t/routes/index.js: -------------------------------------------------------------------------------- 1 | const fs = require('fs') 2 | const express = require('express') 3 | const router = express.Router() 4 | const superagent = require('superagent') 5 | const Eventproxy = require('eventproxy') 6 | const moment = require('moment') 7 | require('shelljs/global') 8 | 9 | // 七牛相关逻辑,使用微博图床请注释 10 | // const qiniu = require('qiniu') 11 | // const config = require('../qiniu') 12 | // qiniu.conf.ACCESS_KEY = config.ACCESS_KEY 13 | // qiniu.conf.SECRET_KEY = config.SECRET_KEY 14 | 15 | const account = require('../account.json') 16 | 17 | const url = { 18 | getCookie: 'https://account.smartisan.com/v2/session/?m=post', 19 | getProfile: 'https://cloud.smartisan.com/index.php?r=account%2Flogin', 20 | getNote: 'https://cloud.smartisan.com/apps/note/index.php?r=v2%2FgetList', 21 | getImage: 'https://cloud.smartisan.com/notesimage/', 22 | itorr: 'http://x.mouto.org/wb/x.php?up' 23 | } 24 | 25 | const header = { 26 | 'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.59 Safari/537.36', 27 | 'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8' 28 | } 29 | 30 | let ep = new Eventproxy() 31 | 32 | var ticket = { 33 | value: null, 34 | expires: null, 35 | _outOfDate: function () { 36 | return this.expires < new Date() 37 | }, 38 | _init: function () { 39 | var that = this 40 | superagent 41 | .post(url.getCookie) 42 | .set(header) 43 | .set('Referer', 'https://account.smartisan.com/') 44 | .send(account) 45 | .redirects(0) 46 | .end((err, response) => { 47 | if (err || !response.ok) { 48 | console.log('出错了!') 49 | } else { 50 | console.log('成功获取了 uid: ' + JSON.stringify(response.body)) 51 | console.log(response.headers['set-cookie']) 52 | 53 | that.value = response.headers['set-cookie'] 54 | .join(',').match(/SCA_SESS=([\w\-]{16,64})/i)[1] 55 | moment.locale('zh-cn') 56 | const time = moment() 57 | const expires = time.add(7, 'days') 58 | that.expires = expires.format('YYYY-MM-DD HH:mm:ss') 59 | 60 | console.log('成功获取ticket: ' + that.value) 61 | console.log('将于 ' + that.expires + ' 过期') 62 | 63 | ep.emit('got_ticket', that.value) 64 | } 65 | }) 66 | } 67 | } 68 | 69 | let execute = (method, res) => { 70 | if (ticket._outOfDate()) { 71 | console.log('ticket 过期了!') 72 | ticket._init() 73 | ep.on('got_ticket', (_ticket) => { 74 | method(_ticket, res) 75 | }) 76 | } else { 77 | method(ticket.value, res) 78 | } 79 | } 80 | 81 | const getProfile = (ticket, res) => { 82 | superagent 83 | .get(url.getProfile) 84 | .set(header) 85 | .set('Referer', 'https://cloud.smartisan.com/') 86 | .set('Cookie', 'SCA_SESS=' + ticket + '-a; SCA_LOGIN=1') 87 | .end((err, response) => { 88 | if (err || !response.ok) { 89 | console.log('出错了') 90 | } else { 91 | console.log('成功获取个人信息: ' + JSON.stringify(response.body)) 92 | const payload = { 93 | 'uid': response.body['data']['uid'], 94 | 'nickname': response.body['data']['nickname'], 95 | 'avatar_url': response.body['data']['avatar_url'] 96 | } 97 | fs.writeFileSync('./output/info.json', JSON.stringify(payload, null, 2), 'utf-8') 98 | res.send(JSON.stringify(payload)) 99 | } 100 | }) 101 | } 102 | 103 | const getNote = (ticket, res) => { 104 | superagent 105 | .get(url.getNote) 106 | .set(header) 107 | .set('Referer', 'https://cloud.smartisan.com/apps/note/') 108 | .set('Cookie', 'SCA_SESS=' + ticket + '-a; SCA_LOGIN=1') 109 | .end((err, response) => { 110 | if (err || !response.ok) { 111 | console.log('出错了') 112 | } else { 113 | const length = JSON.stringify(response.body['data']['note'].length) 114 | console.log('成功获取' + length + '条便签:\r') 115 | console.log(JSON.stringify(response.body)) 116 | const payload = [] 117 | for (let offset = 0; offset < length; offset++) { 118 | if (JSON.stringify(response.body['data']['note'][offset]['favorite']) === '1') { 119 | payload.push(response.body['data']['note'][offset]) 120 | } 121 | } 122 | console.log('成功输出' + payload.length + '条便签:\r') 123 | console.log('输出是' + JSON.stringify(payload)) 124 | fs.writeFileSync('./output/post.json', JSON.stringify(payload, null, 2), 'utf-8') 125 | res.send(payload) 126 | } 127 | }) 128 | } 129 | 130 | let downCount = 0 131 | const downStatus = (totalCount, current) => { 132 | ++downCount 133 | console.log(current + '下载完成!') 134 | console.log('历史的进程: ' + downCount + '/' + totalCount) 135 | return totalCount === downCount 136 | } 137 | 138 | const getImage = (ticket, res) => { 139 | downCount = 0 140 | const post = fs.readFileSync('./output/post.json', 'utf-8') 141 | const 图片们 = post.match(/Notes_\w+\.(png|jpeg|jpg|gif)/ig) 142 | console.log(图片们) 143 | const 锤子数组 = [] 144 | for (let offset = 0; offset < 图片们.length; offset++) { 145 | 锤子数组.push(url.getImage + 图片们[offset]) 146 | } 147 | console.log(锤子数组) 148 | fs.writeFileSync('./output/t.json', JSON.stringify(锤子数组, null, 2), 'utf-8') 149 | for (let offset = 0; offset < 锤子数组.length; offset++) { 150 | console.log('我是第' + offset + '个' + 锤子数组[offset]) 151 | console.log('我是第' + offset + '个' + 图片们[offset]) 152 | 153 | superagent 154 | .get(锤子数组[offset]) 155 | .set(header) 156 | .set('Referer', 'https://cloud.smartisan.com/apps/note/') 157 | .set('Cookie', 'SCA_SESS=' + ticket + '-a; SCA_LOGIN=1') 158 | .end((err, response) => { 159 | if (err || !response.ok) { 160 | console.log('出错了!') 161 | } else { 162 | fs.writeFileSync('./pics/' + 图片们[offset], response.body) 163 | if (downStatus(图片们.length, 图片们[offset])) { 164 | res.send('所有图片下载完成!\r\n' + 图片们) 165 | } 166 | console.log(response.body) 167 | } 168 | }) 169 | } 170 | } 171 | 172 | router.get('/info', (req, res) => { 173 | execute(getProfile, res) 174 | }) 175 | 176 | router.get('/post', (req, res) => { 177 | execute(getNote, res) 178 | }) 179 | 180 | router.get('/t', (req, res) => { 181 | execute(getImage, res) 182 | }) 183 | 184 | // 上传到微博图床 185 | router.get('/itorr', (req, res) => { 186 | const post = fs.readFileSync('./output/post.json', 'utf-8') 187 | const 图片们 = post.match(/Notes_\w+\.(png|jpeg|jpg|gif)/ig) 188 | const payload = [] 189 | const ep = new Eventproxy() 190 | ep.after('upload_wb', 图片们.length, (payload) => { 191 | res.send('跟偷偷肉交易完毕!\r\n' + JSON.stringify(payload)) 192 | }) 193 | 194 | for (let offset = 0; offset < 图片们.length; offset++) { 195 | let file = fs.readFileSync('./pics/' + 图片们[offset]) 196 | superagent 197 | .post(url.itorr) 198 | .set('User-Agent', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.59 Safari/537.36') 199 | .set('Content-Type', 'multipart/form-data') 200 | .attach('file', file, './pics/' + 图片们[offset]) 201 | .end((err, response) => { 202 | if (err || !response.ok) { 203 | console.log('出错了!') 204 | } else { 205 | console.log('第' + (offset + 1) + '张图片' + 图片们[offset] + '上传成功! pid 是:' + response.body.pid) 206 | console.log('一共有' + 图片们.length + '张图片') 207 | 208 | const a = {} 209 | const key = 图片们[offset] 210 | const value = response.body.pid 211 | a[key] = value 212 | payload.push(a) 213 | console.log(payload) 214 | fs.writeFileSync('./output/pics.json', JSON.stringify(payload, null, 2), 'utf-8') 215 | ep.emit('upload_wb', [payload]) 216 | } 217 | }) 218 | } 219 | }) 220 | 221 | // 替换为微博图片链接 222 | router.get('/wb', (req, res) => { 223 | const itorr = JSON.parse(fs.readFileSync('./output/pics.json', 'utf-8')) 224 | const tobeReplaced = fs.readFileSync('./output/post.json', 'utf-8').match((/Notes_\w+\.(png|jpeg|jpg|gif)/ig)) 225 | for (let offset = 0; offset < tobeReplaced.length; offset++) { 226 | console.log(tobeReplaced[offset]) 227 | const searchPattern = new RegExp(tobeReplaced[offset]) 228 | console.log(searchPattern) 229 | const wb = itorr[offset][tobeReplaced[offset]] 230 | sed('-i', searchPattern, wb, './output/post.json') 231 | } 232 | res.send('替换完成!') 233 | }) 234 | 235 | // 上传到七牛 236 | // router.get('/pics', (req, res) => { 237 | // const post = fs.readFileSync('./output/post.json', 'utf-8') 238 | // const 图片们 = post.match(/Notes_\w+\.(png|jpeg|jpg|gif)/ig) 239 | // const ep = new Eventproxy() 240 | // ep.after('upload_qiniu', 图片们.length, () => { 241 | // res.send('上传到七牛完毕!\r\n' + '请替换post.json中的地址') 242 | // }) 243 | 244 | // for (let offset = 0; offset < 图片们.length; offset++) { 245 | // const bucket = config.Bucket_Name 246 | 247 | // const uptoken = (bucket, key) => { 248 | // let putPolicy = new qiniu.rs.PutPolicy(bucket + ':' + key) 249 | // return putPolicy.token() 250 | // } 251 | 252 | // const uploadToQiniu = (uptoken, key, localFile) => { 253 | // let extra = new qiniu.io.PutExtra() 254 | // qiniu.io.putFile(uptoken, key, localFile, extra, (err, response) => { 255 | // if (!err) { 256 | // console.log(response.key + '上传成功!') 257 | // } else { 258 | // console.log(err) 259 | // } 260 | // }) 261 | // } 262 | // let key = 图片们[offset] 263 | // let filePath = './pics/' + key 264 | // let token = uptoken(bucket, key) 265 | // uploadToQiniu(token, key, filePath) 266 | // ep.emit('upload_qiniu') 267 | // } 268 | // }) 269 | 270 | // 替换为七牛图片链接 271 | // router.get('/qiniu', (req, res) => { 272 | // const tobeReplaced = fs.readFileSync('./output/post.json', 'utf-8').match((/Notes_\w+\.(png|jpeg|jpg|gif)/ig)) 273 | // for (let offset = 0; offset < tobeReplaced.length; offset++) { 274 | // console.log(tobeReplaced[offset]) 275 | // const searchPattern = new RegExp(tobeReplaced[offset]) 276 | // console.log(searchPattern) 277 | // const qiniu = config.Domain + tobeReplaced[offset] 278 | // sed('-i', searchPattern, qiniu, './output/post.json') 279 | // } 280 | // res.send('替换完成!') 281 | // }) 282 | 283 | module.exports = router 284 | -------------------------------------------------------------------------------- /www/config.js: -------------------------------------------------------------------------------- 1 | var 2 | apiPath; 3 | 4 | apiPath='http://localhost:3000/api/v1/{key}'; /* 默认 API 形式服务器地址 */ 5 | 6 | apiPath='../json/{key}.json'; /* 本地测试用静态 JSON */ -------------------------------------------------------------------------------- /www/dest.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 锤子博客 4 | 5 | 6 | 7 | 8 |
9 |
10 |

锤子博客

11 |
12 |
13 | 16 |
17 |
18 | 19 | -------------------------------------------------------------------------------- /www/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 锤子博客 4 | 5 | 6 | 7 | 8 | 9 | 15 | 16 | 17 | 18 |
19 |
20 |

锤子博客

21 |
22 |
23 | 26 |
27 |
28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /www/static/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 | -------------------------------------------------------------------------------- /www/static/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 6 | the browser as well as on the server. It works with pretty much any 7 | markup, doesn’t depend on any framework and has automatic language 8 | detection. 9 | 10 | ## Getting Started 11 | 12 | The bare minimum for using highlight.js on a web page is linking to the 13 | library along with one of the styles and calling 14 | [`initHighlightingOnLoad`][1]: 15 | 16 | ```html 17 | 18 | 19 | 20 | ``` 21 | 22 | This will find and highlight code inside of `
` tags; it tries
 23 | to detect the language automatically. If automatic detection doesn’t
 24 | work for you, you can specify the language in the `class` attribute:
 25 | 
 26 | ```html
 27 | 
...
28 | ``` 29 | 30 | The list of supported language classes is available in the [class 31 | reference][2]. Classes can also be prefixed with either `language-` or 32 | `lang-`. 33 | 34 | To disable highlighting altogether use the `nohighlight` class: 35 | 36 | ```html 37 |
...
38 | ``` 39 | 40 | ## Custom Initialization 41 | 42 | When you need a bit more control over the initialization of 43 | highlight.js, you can use the [`highlightBlock`][3] and [`configure`][4] 44 | functions. This allows you to control *what* to highlight and *when*. 45 | 46 | Here’s an equivalent way to calling [`initHighlightingOnLoad`][1] using 47 | jQuery: 48 | 49 | ```javascript 50 | $(document).ready(function() { 51 | $('pre code').each(function(i, block) { 52 | hljs.highlightBlock(block); 53 | }); 54 | }); 55 | ``` 56 | 57 | You can use any tags instead of `
` to mark up your code. If
 58 | you don't use a container that preserve line breaks you will need to
 59 | configure highlight.js to use the `
` tag: 60 | 61 | ```javascript 62 | hljs.configure({useBR: true}); 63 | 64 | $('div.code').each(function(i, block) { 65 | hljs.highlightBlock(block); 66 | }); 67 | ``` 68 | 69 | For other options refer to the documentation for [`configure`][4]. 70 | 71 | 72 | ## Web Workers 73 | 74 | You can run highlighting inside a web worker to avoid freezing the browser 75 | window while dealing with very big chunks of code. 76 | 77 | In your main script: 78 | 79 | ```javascript 80 | addEventListener('load', function() { 81 | var code = document.querySelector('#code'); 82 | var worker = new Worker('worker.js'); 83 | worker.onmessage = function(event) { code.innerHTML = event.data; } 84 | worker.postMessage(code.textContent); 85 | }) 86 | ``` 87 | 88 | In worker.js: 89 | 90 | ```javascript 91 | onmessage = function(event) { 92 | importScripts('/highlight.pack.js'); 93 | var result = self.hljs.highlightAuto(event.data); 94 | postMessage(result.value); 95 | } 96 | ``` 97 | 98 | 99 | ## Getting the Library 100 | 101 | You can get highlight.js as a hosted, or custom-build, browser script or 102 | as a server module. Right out of the box the browser script supports 103 | both AMD and CommonJS, so if you wish you can use RequireJS or 104 | Browserify without having to build from source. The server module also 105 | works perfectly fine with Browserify, but there is the option to use a 106 | build specific to browsers rather than something meant for a server. 107 | Head over to the [download page][5] for all the options. 108 | 109 | **Don't link to GitHub directly.** The library is not supposed to work straight 110 | from the source, it requires building. If none of the pre-packaged options 111 | work for you refer to the [building documentation][6]. 112 | 113 | **The CDN-hosted package doesn't have all the languages.** Otherwise it'd be 114 | too big. If you don't see the language you need in the ["Common" section][5], 115 | it can be added manually: 116 | 117 | ```html 118 | 119 | ``` 120 | 121 | **On Almond.** You need to use the optimizer to give the module a name. For 122 | example: 123 | 124 | ``` 125 | r.js -o name=hljs paths.hljs=/path/to/highlight out=highlight.js 126 | ``` 127 | 128 | 129 | ## License 130 | 131 | Highlight.js is released under the BSD License. See [LICENSE][7] file 132 | for details. 133 | 134 | ## Links 135 | 136 | The official site for the library is at . 137 | 138 | Further in-depth documentation for the API and other topics is at 139 | . 140 | 141 | Authors and contributors are listed in the [AUTHORS.en.txt][8] file. 142 | 143 | [1]: http://highlightjs.readthedocs.io/en/latest/api.html#inithighlightingonload 144 | [2]: http://highlightjs.readthedocs.io/en/latest/css-classes-reference.html 145 | [3]: http://highlightjs.readthedocs.io/en/latest/api.html#highlightblock-block 146 | [4]: http://highlightjs.readthedocs.io/en/latest/api.html#configure-options 147 | [5]: https://highlightjs.org/download/ 148 | [6]: http://highlightjs.readthedocs.io/en/latest/building-testing.html 149 | [7]: https://github.com/isagalaev/highlight.js/blob/master/LICENSE 150 | [8]: https://github.com/isagalaev/highlight.js/blob/master/AUTHORS.en.txt 151 | -------------------------------------------------------------------------------- /www/static/highlight/README.ru.md: -------------------------------------------------------------------------------- 1 | # Highlight.js 2 | 3 | Highlight.js — это инструмент для подсветки синтаксиса, написанный на JavaScript. Он работает 4 | и в браузере, и на сервере. Он работает с практически любой HTML разметкой, не 5 | зависит от каких-либо фреймворков и умеет автоматически определять язык. 6 | 7 | 8 | ## Начало работы 9 | 10 | Минимум, что нужно сделать для использования highlight.js на веб-странице — это 11 | подключить библиотеку, CSS-стили и вызывать [`initHighlightingOnLoad`][1]: 12 | 13 | ```html 14 | 15 | 16 | 17 | ``` 18 | 19 | Библиотека найдёт и раскрасит код внутри тегов `
`, попытавшись
 20 | автоматически определить язык. Когда автоопределение не срабатывает, можно явно
 21 | указать язык в атрибуте class:
 22 | 
 23 | ```html
 24 | 
...
25 | ``` 26 | 27 | Список поддерживаемых классов языков доступен в [справочнике по классам][2]. 28 | Класс также можно предварить префиксами `language-` или `lang-`. 29 | 30 | Чтобы отключить подсветку для какого-то блока, используйте класс `nohighlight`: 31 | 32 | ```html 33 |
...
34 | ``` 35 | 36 | ## Инициализация вручную 37 | 38 | Чтобы иметь чуть больше контроля за инициализацией подсветки, вы можете 39 | использовать функции [`highlightBlock`][3] и [`configure`][4]. Таким образом 40 | можно управлять тем, *что* и *когда* подсвечивать. 41 | 42 | Вот пример инициализации, эквивалентной вызову [`initHighlightingOnLoad`][1], но 43 | с использованием jQuery: 44 | 45 | ```javascript 46 | $(document).ready(function() { 47 | $('pre code').each(function(i, block) { 48 | hljs.highlightBlock(block); 49 | }); 50 | }); 51 | ``` 52 | 53 | Вы можете использовать любые теги разметки вместо `
`. Если
 54 | используете контейнер, не сохраняющий переводы строк, вам нужно сказать
 55 | highlight.js использовать для них тег `
`: 56 | 57 | ```javascript 58 | hljs.configure({useBR: true}); 59 | 60 | $('div.code').each(function(i, block) { 61 | hljs.highlightBlock(block); 62 | }); 63 | ``` 64 | 65 | Другие опции можно найти в документации функции [`configure`][4]. 66 | 67 | 68 | ## Web Workers 69 | 70 | Подсветку можно запустить внутри web worker'а, чтобы окно 71 | браузера не подтормаживало при работе с большими кусками кода. 72 | 73 | В основном скрипте: 74 | 75 | ```javascript 76 | addEventListener('load', function() { 77 | var code = document.querySelector('#code'); 78 | var worker = new Worker('worker.js'); 79 | worker.onmessage = function(event) { code.innerHTML = event.data; } 80 | worker.postMessage(code.textContent); 81 | }) 82 | ``` 83 | 84 | В worker.js: 85 | 86 | ```javascript 87 | onmessage = function(event) { 88 | importScripts('/highlight.pack.js'); 89 | var result = self.hljs.highlightAuto(event.data); 90 | postMessage(result.value); 91 | } 92 | ``` 93 | 94 | 95 | ## Установка библиотеки 96 | 97 | Highlight.js можно использовать в браузере прямо с CDN хостинга или скачать 98 | индивидуальную сборку, а также установив модуль на сервере. На 99 | [странице загрузки][5] подробно описаны все варианты. 100 | 101 | **Не подключайте GitHub напрямую.** Библиотека не предназначена для 102 | использования в виде исходного кода, а требует отдельной сборки. Если вам не 103 | подходит ни один из готовых вариантов, читайте [документацию по сборке][6]. 104 | 105 | **Файл на CDN содержит не все языки.** Иначе он будет слишком большого размера. 106 | Если нужного вам языка нет в [категории "Common"][5], можно дообавить его 107 | вручную: 108 | 109 | ```html 110 | 111 | ``` 112 | 113 | **Про Almond.** Нужно задать имя модуля в оптимизаторе, например: 114 | 115 | ``` 116 | r.js -o name=hljs paths.hljs=/path/to/highlight out=highlight.js 117 | ``` 118 | 119 | 120 | ## Лицензия 121 | 122 | Highlight.js распространяется под лицензией BSD. Подробнее читайте файл 123 | [LICENSE][7]. 124 | 125 | 126 | ## Ссылки 127 | 128 | Официальный сайт билиотеки расположен по адресу . 129 | 130 | Более подробная документация по API и другим темам расположена на 131 | . 132 | 133 | Авторы и контрибьюторы перечислены в файле [AUTHORS.ru.txt][8] file. 134 | 135 | [1]: http://highlightjs.readthedocs.io/en/latest/api.html#inithighlightingonload 136 | [2]: http://highlightjs.readthedocs.io/en/latest/css-classes-reference.html 137 | [3]: http://highlightjs.readthedocs.io/en/latest/api.html#highlightblock-block 138 | [4]: http://highlightjs.readthedocs.io/en/latest/api.html#configure-options 139 | [5]: https://highlightjs.org/download/ 140 | [6]: http://highlightjs.readthedocs.io/en/latest/building-testing.html 141 | [7]: https://github.com/isagalaev/highlight.js/blob/master/LICENSE 142 | [8]: https://github.com/isagalaev/highlight.js/blob/master/AUTHORS.ru.txt 143 | -------------------------------------------------------------------------------- /www/static/highlight/styles/agate.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * Agate by Taufik Nurrohman 3 | * ---------------------------------------------------- 4 | * 5 | * #ade5fc 6 | * #a2fca2 7 | * #c6b4f0 8 | * #d36363 9 | * #fcc28c 10 | * #fc9b9b 11 | * #ffa 12 | * #fff 13 | * #333 14 | * #62c8f3 15 | * #888 16 | * 17 | */ 18 | 19 | .hljs { 20 | display: block; 21 | overflow-x: auto; 22 | padding: 0.5em; 23 | background: #333; 24 | color: white; 25 | } 26 | 27 | .hljs-name, 28 | .hljs-strong { 29 | font-weight: bold; 30 | } 31 | 32 | .hljs-code, 33 | .hljs-emphasis { 34 | font-style: italic; 35 | } 36 | 37 | .hljs-tag { 38 | color: #62c8f3; 39 | } 40 | 41 | .hljs-variable, 42 | .hljs-template-variable, 43 | .hljs-selector-id, 44 | .hljs-selector-class { 45 | color: #ade5fc; 46 | } 47 | 48 | .hljs-string, 49 | .hljs-bullet { 50 | color: #a2fca2; 51 | } 52 | 53 | .hljs-type, 54 | .hljs-title, 55 | .hljs-section, 56 | .hljs-attribute, 57 | .hljs-quote, 58 | .hljs-built_in, 59 | .hljs-builtin-name { 60 | color: #ffa; 61 | } 62 | 63 | .hljs-number, 64 | .hljs-symbol, 65 | .hljs-bullet { 66 | color: #d36363; 67 | } 68 | 69 | .hljs-keyword, 70 | .hljs-selector-tag, 71 | .hljs-literal { 72 | color: #fcc28c; 73 | } 74 | 75 | .hljs-comment, 76 | .hljs-deletion, 77 | .hljs-code { 78 | color: #888; 79 | } 80 | 81 | .hljs-regexp, 82 | .hljs-link { 83 | color: #c6b4f0; 84 | } 85 | 86 | .hljs-meta { 87 | color: #fc9b9b; 88 | } 89 | 90 | .hljs-deletion { 91 | background-color: #fc9b9b; 92 | color: #333; 93 | } 94 | 95 | .hljs-addition { 96 | background-color: #a2fca2; 97 | color: #333; 98 | } 99 | 100 | .hljs a { 101 | color: inherit; 102 | } 103 | 104 | .hljs a:focus, 105 | .hljs a:hover { 106 | color: inherit; 107 | text-decoration: underline; 108 | } 109 | -------------------------------------------------------------------------------- /www/static/highlight/styles/androidstudio.css: -------------------------------------------------------------------------------- 1 | /* 2 | Date: 24 Fev 2015 3 | Author: Pedro Oliveira 4 | */ 5 | 6 | .hljs { 7 | color: #a9b7c6; 8 | background: #282b2e; 9 | display: block; 10 | overflow-x: auto; 11 | padding: 0.5em; 12 | } 13 | 14 | .hljs-number, 15 | .hljs-literal, 16 | .hljs-symbol, 17 | .hljs-bullet { 18 | color: #6897BB; 19 | } 20 | 21 | .hljs-keyword, 22 | .hljs-selector-tag, 23 | .hljs-deletion { 24 | color: #cc7832; 25 | } 26 | 27 | .hljs-variable, 28 | .hljs-template-variable, 29 | .hljs-link { 30 | color: #629755; 31 | } 32 | 33 | .hljs-comment, 34 | .hljs-quote { 35 | color: #808080; 36 | } 37 | 38 | .hljs-meta { 39 | color: #bbb529; 40 | } 41 | 42 | .hljs-string, 43 | .hljs-attribute, 44 | .hljs-addition { 45 | color: #6A8759; 46 | } 47 | 48 | .hljs-section, 49 | .hljs-title, 50 | .hljs-type { 51 | color: #ffc66d; 52 | } 53 | 54 | .hljs-name, 55 | .hljs-selector-id, 56 | .hljs-selector-class { 57 | color: #e8bf6a; 58 | } 59 | 60 | .hljs-emphasis { 61 | font-style: italic; 62 | } 63 | 64 | .hljs-strong { 65 | font-weight: bold; 66 | } 67 | -------------------------------------------------------------------------------- /www/static/highlight/styles/arduino-light.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Arduino® Light Theme - Stefania Mellai 4 | 5 | */ 6 | 7 | .hljs { 8 | display: block; 9 | overflow-x: auto; 10 | padding: 0.5em; 11 | background: #FFFFFF; 12 | } 13 | 14 | .hljs, 15 | .hljs-subst { 16 | color: #434f54; 17 | } 18 | 19 | .hljs-keyword, 20 | .hljs-attribute, 21 | .hljs-selector-tag, 22 | .hljs-doctag, 23 | .hljs-name { 24 | color: #00979D; 25 | } 26 | 27 | .hljs-built_in, 28 | .hljs-literal, 29 | .hljs-bullet, 30 | .hljs-code, 31 | .hljs-addition { 32 | color: #D35400; 33 | } 34 | 35 | .hljs-regexp, 36 | .hljs-symbol, 37 | .hljs-variable, 38 | .hljs-template-variable, 39 | .hljs-link, 40 | .hljs-selector-attr, 41 | .hljs-selector-pseudo { 42 | color: #00979D; 43 | } 44 | 45 | .hljs-type, 46 | .hljs-string, 47 | .hljs-selector-id, 48 | .hljs-selector-class, 49 | .hljs-quote, 50 | .hljs-template-tag, 51 | .hljs-deletion { 52 | color: #005C5F; 53 | } 54 | 55 | .hljs-title, 56 | .hljs-section { 57 | color: #880000; 58 | font-weight: bold; 59 | } 60 | 61 | .hljs-comment { 62 | color: rgba(149,165,166,.8); 63 | } 64 | 65 | .hljs-meta-keyword { 66 | color: #728E00; 67 | } 68 | 69 | .hljs-meta { 70 | color: #728E00; 71 | color: #434f54; 72 | } 73 | 74 | .hljs-emphasis { 75 | font-style: italic; 76 | } 77 | 78 | .hljs-strong { 79 | font-weight: bold; 80 | } 81 | 82 | .hljs-function { 83 | color: #728E00; 84 | } 85 | 86 | .hljs-number { 87 | color: #8A7B52; 88 | } 89 | -------------------------------------------------------------------------------- /www/static/highlight/styles/arta.css: -------------------------------------------------------------------------------- 1 | /* 2 | Date: 17.V.2011 3 | Author: pumbur 4 | */ 5 | 6 | .hljs { 7 | display: block; 8 | overflow-x: auto; 9 | padding: 0.5em; 10 | background: #222; 11 | } 12 | 13 | .hljs, 14 | .hljs-subst { 15 | color: #aaa; 16 | } 17 | 18 | .hljs-section { 19 | color: #fff; 20 | } 21 | 22 | .hljs-comment, 23 | .hljs-quote, 24 | .hljs-meta { 25 | color: #444; 26 | } 27 | 28 | .hljs-string, 29 | .hljs-symbol, 30 | .hljs-bullet, 31 | .hljs-regexp { 32 | color: #ffcc33; 33 | } 34 | 35 | .hljs-number, 36 | .hljs-addition { 37 | color: #00cc66; 38 | } 39 | 40 | .hljs-built_in, 41 | .hljs-builtin-name, 42 | .hljs-literal, 43 | .hljs-type, 44 | .hljs-template-variable, 45 | .hljs-attribute, 46 | .hljs-link { 47 | color: #32aaee; 48 | } 49 | 50 | .hljs-keyword, 51 | .hljs-selector-tag, 52 | .hljs-name, 53 | .hljs-selector-id, 54 | .hljs-selector-class { 55 | color: #6644aa; 56 | } 57 | 58 | .hljs-title, 59 | .hljs-variable, 60 | .hljs-deletion, 61 | .hljs-template-tag { 62 | color: #bb1166; 63 | } 64 | 65 | .hljs-section, 66 | .hljs-doctag, 67 | .hljs-strong { 68 | font-weight: bold; 69 | } 70 | 71 | .hljs-emphasis { 72 | font-style: italic; 73 | } 74 | -------------------------------------------------------------------------------- /www/static/highlight/styles/ascetic.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Original style from softwaremaniacs.org (c) Ivan Sagalaev 4 | 5 | */ 6 | 7 | .hljs { 8 | display: block; 9 | overflow-x: auto; 10 | padding: 0.5em; 11 | background: white; 12 | color: black; 13 | } 14 | 15 | .hljs-string, 16 | .hljs-variable, 17 | .hljs-template-variable, 18 | .hljs-symbol, 19 | .hljs-bullet, 20 | .hljs-section, 21 | .hljs-addition, 22 | .hljs-attribute, 23 | .hljs-link { 24 | color: #888; 25 | } 26 | 27 | .hljs-comment, 28 | .hljs-quote, 29 | .hljs-meta, 30 | .hljs-deletion { 31 | color: #ccc; 32 | } 33 | 34 | .hljs-keyword, 35 | .hljs-selector-tag, 36 | .hljs-section, 37 | .hljs-name, 38 | .hljs-type, 39 | .hljs-strong { 40 | font-weight: bold; 41 | } 42 | 43 | .hljs-emphasis { 44 | font-style: italic; 45 | } 46 | -------------------------------------------------------------------------------- /www/static/highlight/styles/atelier-cave-dark.css: -------------------------------------------------------------------------------- 1 | /* Base16 Atelier Cave Dark - Theme */ 2 | /* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/cave) */ 3 | /* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ 4 | 5 | /* Atelier-Cave Comment */ 6 | .hljs-comment, 7 | .hljs-quote { 8 | color: #7e7887; 9 | } 10 | 11 | /* Atelier-Cave Red */ 12 | .hljs-variable, 13 | .hljs-template-variable, 14 | .hljs-attribute, 15 | .hljs-regexp, 16 | .hljs-link, 17 | .hljs-tag, 18 | .hljs-name, 19 | .hljs-selector-id, 20 | .hljs-selector-class { 21 | color: #be4678; 22 | } 23 | 24 | /* Atelier-Cave Orange */ 25 | .hljs-number, 26 | .hljs-meta, 27 | .hljs-built_in, 28 | .hljs-builtin-name, 29 | .hljs-literal, 30 | .hljs-type, 31 | .hljs-params { 32 | color: #aa573c; 33 | } 34 | 35 | /* Atelier-Cave Green */ 36 | .hljs-string, 37 | .hljs-symbol, 38 | .hljs-bullet { 39 | color: #2a9292; 40 | } 41 | 42 | /* Atelier-Cave Blue */ 43 | .hljs-title, 44 | .hljs-section { 45 | color: #576ddb; 46 | } 47 | 48 | /* Atelier-Cave Purple */ 49 | .hljs-keyword, 50 | .hljs-selector-tag { 51 | color: #955ae7; 52 | } 53 | 54 | .hljs-deletion, 55 | .hljs-addition { 56 | color: #19171c; 57 | display: inline-block; 58 | width: 100%; 59 | } 60 | 61 | .hljs-deletion { 62 | background-color: #be4678; 63 | } 64 | 65 | .hljs-addition { 66 | background-color: #2a9292; 67 | } 68 | 69 | .hljs { 70 | display: block; 71 | overflow-x: auto; 72 | background: #19171c; 73 | color: #8b8792; 74 | padding: 0.5em; 75 | } 76 | 77 | .hljs-emphasis { 78 | font-style: italic; 79 | } 80 | 81 | .hljs-strong { 82 | font-weight: bold; 83 | } 84 | -------------------------------------------------------------------------------- /www/static/highlight/styles/atelier-cave-light.css: -------------------------------------------------------------------------------- 1 | /* Base16 Atelier Cave Light - Theme */ 2 | /* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/cave) */ 3 | /* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ 4 | 5 | /* Atelier-Cave Comment */ 6 | .hljs-comment, 7 | .hljs-quote { 8 | color: #655f6d; 9 | } 10 | 11 | /* Atelier-Cave Red */ 12 | .hljs-variable, 13 | .hljs-template-variable, 14 | .hljs-attribute, 15 | .hljs-tag, 16 | .hljs-name, 17 | .hljs-regexp, 18 | .hljs-link, 19 | .hljs-name, 20 | .hljs-name, 21 | .hljs-selector-id, 22 | .hljs-selector-class { 23 | color: #be4678; 24 | } 25 | 26 | /* Atelier-Cave Orange */ 27 | .hljs-number, 28 | .hljs-meta, 29 | .hljs-built_in, 30 | .hljs-builtin-name, 31 | .hljs-literal, 32 | .hljs-type, 33 | .hljs-params { 34 | color: #aa573c; 35 | } 36 | 37 | /* Atelier-Cave Green */ 38 | .hljs-string, 39 | .hljs-symbol, 40 | .hljs-bullet { 41 | color: #2a9292; 42 | } 43 | 44 | /* Atelier-Cave Blue */ 45 | .hljs-title, 46 | .hljs-section { 47 | color: #576ddb; 48 | } 49 | 50 | /* Atelier-Cave Purple */ 51 | .hljs-keyword, 52 | .hljs-selector-tag { 53 | color: #955ae7; 54 | } 55 | 56 | .hljs-deletion, 57 | .hljs-addition { 58 | color: #19171c; 59 | display: inline-block; 60 | width: 100%; 61 | } 62 | 63 | .hljs-deletion { 64 | background-color: #be4678; 65 | } 66 | 67 | .hljs-addition { 68 | background-color: #2a9292; 69 | } 70 | 71 | .hljs { 72 | display: block; 73 | overflow-x: auto; 74 | background: #efecf4; 75 | color: #585260; 76 | padding: 0.5em; 77 | } 78 | 79 | .hljs-emphasis { 80 | font-style: italic; 81 | } 82 | 83 | .hljs-strong { 84 | font-weight: bold; 85 | } 86 | -------------------------------------------------------------------------------- /www/static/highlight/styles/atelier-dune-dark.css: -------------------------------------------------------------------------------- 1 | /* Base16 Atelier Dune Dark - Theme */ 2 | /* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/dune) */ 3 | /* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ 4 | 5 | /* Atelier-Dune Comment */ 6 | .hljs-comment, 7 | .hljs-quote { 8 | color: #999580; 9 | } 10 | 11 | /* Atelier-Dune Red */ 12 | .hljs-variable, 13 | .hljs-template-variable, 14 | .hljs-attribute, 15 | .hljs-tag, 16 | .hljs-name, 17 | .hljs-regexp, 18 | .hljs-link, 19 | .hljs-name, 20 | .hljs-selector-id, 21 | .hljs-selector-class { 22 | color: #d73737; 23 | } 24 | 25 | /* Atelier-Dune Orange */ 26 | .hljs-number, 27 | .hljs-meta, 28 | .hljs-built_in, 29 | .hljs-builtin-name, 30 | .hljs-literal, 31 | .hljs-type, 32 | .hljs-params { 33 | color: #b65611; 34 | } 35 | 36 | /* Atelier-Dune Green */ 37 | .hljs-string, 38 | .hljs-symbol, 39 | .hljs-bullet { 40 | color: #60ac39; 41 | } 42 | 43 | /* Atelier-Dune Blue */ 44 | .hljs-title, 45 | .hljs-section { 46 | color: #6684e1; 47 | } 48 | 49 | /* Atelier-Dune Purple */ 50 | .hljs-keyword, 51 | .hljs-selector-tag { 52 | color: #b854d4; 53 | } 54 | 55 | .hljs { 56 | display: block; 57 | overflow-x: auto; 58 | background: #20201d; 59 | color: #a6a28c; 60 | padding: 0.5em; 61 | } 62 | 63 | .hljs-emphasis { 64 | font-style: italic; 65 | } 66 | 67 | .hljs-strong { 68 | font-weight: bold; 69 | } 70 | -------------------------------------------------------------------------------- /www/static/highlight/styles/atelier-dune-light.css: -------------------------------------------------------------------------------- 1 | /* Base16 Atelier Dune Light - Theme */ 2 | /* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/dune) */ 3 | /* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ 4 | 5 | /* Atelier-Dune Comment */ 6 | .hljs-comment, 7 | .hljs-quote { 8 | color: #7d7a68; 9 | } 10 | 11 | /* Atelier-Dune Red */ 12 | .hljs-variable, 13 | .hljs-template-variable, 14 | .hljs-attribute, 15 | .hljs-tag, 16 | .hljs-name, 17 | .hljs-regexp, 18 | .hljs-link, 19 | .hljs-name, 20 | .hljs-selector-id, 21 | .hljs-selector-class { 22 | color: #d73737; 23 | } 24 | 25 | /* Atelier-Dune Orange */ 26 | .hljs-number, 27 | .hljs-meta, 28 | .hljs-built_in, 29 | .hljs-builtin-name, 30 | .hljs-literal, 31 | .hljs-type, 32 | .hljs-params { 33 | color: #b65611; 34 | } 35 | 36 | /* Atelier-Dune Green */ 37 | .hljs-string, 38 | .hljs-symbol, 39 | .hljs-bullet { 40 | color: #60ac39; 41 | } 42 | 43 | /* Atelier-Dune Blue */ 44 | .hljs-title, 45 | .hljs-section { 46 | color: #6684e1; 47 | } 48 | 49 | /* Atelier-Dune Purple */ 50 | .hljs-keyword, 51 | .hljs-selector-tag { 52 | color: #b854d4; 53 | } 54 | 55 | .hljs { 56 | display: block; 57 | overflow-x: auto; 58 | background: #fefbec; 59 | color: #6e6b5e; 60 | padding: 0.5em; 61 | } 62 | 63 | .hljs-emphasis { 64 | font-style: italic; 65 | } 66 | 67 | .hljs-strong { 68 | font-weight: bold; 69 | } 70 | -------------------------------------------------------------------------------- /www/static/highlight/styles/atelier-estuary-dark.css: -------------------------------------------------------------------------------- 1 | /* Base16 Atelier Estuary Dark - Theme */ 2 | /* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/estuary) */ 3 | /* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ 4 | 5 | /* Atelier-Estuary Comment */ 6 | .hljs-comment, 7 | .hljs-quote { 8 | color: #878573; 9 | } 10 | 11 | /* Atelier-Estuary Red */ 12 | .hljs-variable, 13 | .hljs-template-variable, 14 | .hljs-attribute, 15 | .hljs-tag, 16 | .hljs-name, 17 | .hljs-regexp, 18 | .hljs-link, 19 | .hljs-name, 20 | .hljs-selector-id, 21 | .hljs-selector-class { 22 | color: #ba6236; 23 | } 24 | 25 | /* Atelier-Estuary Orange */ 26 | .hljs-number, 27 | .hljs-meta, 28 | .hljs-built_in, 29 | .hljs-builtin-name, 30 | .hljs-literal, 31 | .hljs-type, 32 | .hljs-params { 33 | color: #ae7313; 34 | } 35 | 36 | /* Atelier-Estuary Green */ 37 | .hljs-string, 38 | .hljs-symbol, 39 | .hljs-bullet { 40 | color: #7d9726; 41 | } 42 | 43 | /* Atelier-Estuary Blue */ 44 | .hljs-title, 45 | .hljs-section { 46 | color: #36a166; 47 | } 48 | 49 | /* Atelier-Estuary Purple */ 50 | .hljs-keyword, 51 | .hljs-selector-tag { 52 | color: #5f9182; 53 | } 54 | 55 | .hljs-deletion, 56 | .hljs-addition { 57 | color: #22221b; 58 | display: inline-block; 59 | width: 100%; 60 | } 61 | 62 | .hljs-deletion { 63 | background-color: #ba6236; 64 | } 65 | 66 | .hljs-addition { 67 | background-color: #7d9726; 68 | } 69 | 70 | .hljs { 71 | display: block; 72 | overflow-x: auto; 73 | background: #22221b; 74 | color: #929181; 75 | padding: 0.5em; 76 | } 77 | 78 | .hljs-emphasis { 79 | font-style: italic; 80 | } 81 | 82 | .hljs-strong { 83 | font-weight: bold; 84 | } 85 | -------------------------------------------------------------------------------- /www/static/highlight/styles/atelier-estuary-light.css: -------------------------------------------------------------------------------- 1 | /* Base16 Atelier Estuary Light - Theme */ 2 | /* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/estuary) */ 3 | /* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ 4 | 5 | /* Atelier-Estuary Comment */ 6 | .hljs-comment, 7 | .hljs-quote { 8 | color: #6c6b5a; 9 | } 10 | 11 | /* Atelier-Estuary Red */ 12 | .hljs-variable, 13 | .hljs-template-variable, 14 | .hljs-attribute, 15 | .hljs-tag, 16 | .hljs-name, 17 | .hljs-regexp, 18 | .hljs-link, 19 | .hljs-name, 20 | .hljs-selector-id, 21 | .hljs-selector-class { 22 | color: #ba6236; 23 | } 24 | 25 | /* Atelier-Estuary Orange */ 26 | .hljs-number, 27 | .hljs-meta, 28 | .hljs-built_in, 29 | .hljs-builtin-name, 30 | .hljs-literal, 31 | .hljs-type, 32 | .hljs-params { 33 | color: #ae7313; 34 | } 35 | 36 | /* Atelier-Estuary Green */ 37 | .hljs-string, 38 | .hljs-symbol, 39 | .hljs-bullet { 40 | color: #7d9726; 41 | } 42 | 43 | /* Atelier-Estuary Blue */ 44 | .hljs-title, 45 | .hljs-section { 46 | color: #36a166; 47 | } 48 | 49 | /* Atelier-Estuary Purple */ 50 | .hljs-keyword, 51 | .hljs-selector-tag { 52 | color: #5f9182; 53 | } 54 | 55 | .hljs-deletion, 56 | .hljs-addition { 57 | color: #22221b; 58 | display: inline-block; 59 | width: 100%; 60 | } 61 | 62 | .hljs-deletion { 63 | background-color: #ba6236; 64 | } 65 | 66 | .hljs-addition { 67 | background-color: #7d9726; 68 | } 69 | 70 | .hljs { 71 | display: block; 72 | overflow-x: auto; 73 | background: #f4f3ec; 74 | color: #5f5e4e; 75 | padding: 0.5em; 76 | } 77 | 78 | .hljs-emphasis { 79 | font-style: italic; 80 | } 81 | 82 | .hljs-strong { 83 | font-weight: bold; 84 | } 85 | -------------------------------------------------------------------------------- /www/static/highlight/styles/atelier-forest-dark.css: -------------------------------------------------------------------------------- 1 | /* Base16 Atelier Forest Dark - Theme */ 2 | /* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/forest) */ 3 | /* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ 4 | 5 | /* Atelier-Forest Comment */ 6 | .hljs-comment, 7 | .hljs-quote { 8 | color: #9c9491; 9 | } 10 | 11 | /* Atelier-Forest Red */ 12 | .hljs-variable, 13 | .hljs-template-variable, 14 | .hljs-attribute, 15 | .hljs-tag, 16 | .hljs-name, 17 | .hljs-regexp, 18 | .hljs-link, 19 | .hljs-name, 20 | .hljs-selector-id, 21 | .hljs-selector-class { 22 | color: #f22c40; 23 | } 24 | 25 | /* Atelier-Forest Orange */ 26 | .hljs-number, 27 | .hljs-meta, 28 | .hljs-built_in, 29 | .hljs-builtin-name, 30 | .hljs-literal, 31 | .hljs-type, 32 | .hljs-params { 33 | color: #df5320; 34 | } 35 | 36 | /* Atelier-Forest Green */ 37 | .hljs-string, 38 | .hljs-symbol, 39 | .hljs-bullet { 40 | color: #7b9726; 41 | } 42 | 43 | /* Atelier-Forest Blue */ 44 | .hljs-title, 45 | .hljs-section { 46 | color: #407ee7; 47 | } 48 | 49 | /* Atelier-Forest Purple */ 50 | .hljs-keyword, 51 | .hljs-selector-tag { 52 | color: #6666ea; 53 | } 54 | 55 | .hljs { 56 | display: block; 57 | overflow-x: auto; 58 | background: #1b1918; 59 | color: #a8a19f; 60 | padding: 0.5em; 61 | } 62 | 63 | .hljs-emphasis { 64 | font-style: italic; 65 | } 66 | 67 | .hljs-strong { 68 | font-weight: bold; 69 | } 70 | -------------------------------------------------------------------------------- /www/static/highlight/styles/atelier-forest-light.css: -------------------------------------------------------------------------------- 1 | /* Base16 Atelier Forest Light - Theme */ 2 | /* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/forest) */ 3 | /* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ 4 | 5 | /* Atelier-Forest Comment */ 6 | .hljs-comment, 7 | .hljs-quote { 8 | color: #766e6b; 9 | } 10 | 11 | /* Atelier-Forest Red */ 12 | .hljs-variable, 13 | .hljs-template-variable, 14 | .hljs-attribute, 15 | .hljs-tag, 16 | .hljs-name, 17 | .hljs-regexp, 18 | .hljs-link, 19 | .hljs-name, 20 | .hljs-selector-id, 21 | .hljs-selector-class { 22 | color: #f22c40; 23 | } 24 | 25 | /* Atelier-Forest Orange */ 26 | .hljs-number, 27 | .hljs-meta, 28 | .hljs-built_in, 29 | .hljs-builtin-name, 30 | .hljs-literal, 31 | .hljs-type, 32 | .hljs-params { 33 | color: #df5320; 34 | } 35 | 36 | /* Atelier-Forest Green */ 37 | .hljs-string, 38 | .hljs-symbol, 39 | .hljs-bullet { 40 | color: #7b9726; 41 | } 42 | 43 | /* Atelier-Forest Blue */ 44 | .hljs-title, 45 | .hljs-section { 46 | color: #407ee7; 47 | } 48 | 49 | /* Atelier-Forest Purple */ 50 | .hljs-keyword, 51 | .hljs-selector-tag { 52 | color: #6666ea; 53 | } 54 | 55 | .hljs { 56 | display: block; 57 | overflow-x: auto; 58 | background: #f1efee; 59 | color: #68615e; 60 | padding: 0.5em; 61 | } 62 | 63 | .hljs-emphasis { 64 | font-style: italic; 65 | } 66 | 67 | .hljs-strong { 68 | font-weight: bold; 69 | } 70 | -------------------------------------------------------------------------------- /www/static/highlight/styles/atelier-heath-dark.css: -------------------------------------------------------------------------------- 1 | /* Base16 Atelier Heath Dark - Theme */ 2 | /* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/heath) */ 3 | /* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ 4 | 5 | /* Atelier-Heath Comment */ 6 | .hljs-comment, 7 | .hljs-quote { 8 | color: #9e8f9e; 9 | } 10 | 11 | /* Atelier-Heath Red */ 12 | .hljs-variable, 13 | .hljs-template-variable, 14 | .hljs-attribute, 15 | .hljs-tag, 16 | .hljs-name, 17 | .hljs-regexp, 18 | .hljs-link, 19 | .hljs-name, 20 | .hljs-selector-id, 21 | .hljs-selector-class { 22 | color: #ca402b; 23 | } 24 | 25 | /* Atelier-Heath Orange */ 26 | .hljs-number, 27 | .hljs-meta, 28 | .hljs-built_in, 29 | .hljs-builtin-name, 30 | .hljs-literal, 31 | .hljs-type, 32 | .hljs-params { 33 | color: #a65926; 34 | } 35 | 36 | /* Atelier-Heath Green */ 37 | .hljs-string, 38 | .hljs-symbol, 39 | .hljs-bullet { 40 | color: #918b3b; 41 | } 42 | 43 | /* Atelier-Heath Blue */ 44 | .hljs-title, 45 | .hljs-section { 46 | color: #516aec; 47 | } 48 | 49 | /* Atelier-Heath Purple */ 50 | .hljs-keyword, 51 | .hljs-selector-tag { 52 | color: #7b59c0; 53 | } 54 | 55 | .hljs { 56 | display: block; 57 | overflow-x: auto; 58 | background: #1b181b; 59 | color: #ab9bab; 60 | padding: 0.5em; 61 | } 62 | 63 | .hljs-emphasis { 64 | font-style: italic; 65 | } 66 | 67 | .hljs-strong { 68 | font-weight: bold; 69 | } 70 | -------------------------------------------------------------------------------- /www/static/highlight/styles/atelier-heath-light.css: -------------------------------------------------------------------------------- 1 | /* Base16 Atelier Heath Light - Theme */ 2 | /* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/heath) */ 3 | /* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ 4 | 5 | /* Atelier-Heath Comment */ 6 | .hljs-comment, 7 | .hljs-quote { 8 | color: #776977; 9 | } 10 | 11 | /* Atelier-Heath Red */ 12 | .hljs-variable, 13 | .hljs-template-variable, 14 | .hljs-attribute, 15 | .hljs-tag, 16 | .hljs-name, 17 | .hljs-regexp, 18 | .hljs-link, 19 | .hljs-name, 20 | .hljs-selector-id, 21 | .hljs-selector-class { 22 | color: #ca402b; 23 | } 24 | 25 | /* Atelier-Heath Orange */ 26 | .hljs-number, 27 | .hljs-meta, 28 | .hljs-built_in, 29 | .hljs-builtin-name, 30 | .hljs-literal, 31 | .hljs-type, 32 | .hljs-params { 33 | color: #a65926; 34 | } 35 | 36 | /* Atelier-Heath Green */ 37 | .hljs-string, 38 | .hljs-symbol, 39 | .hljs-bullet { 40 | color: #918b3b; 41 | } 42 | 43 | /* Atelier-Heath Blue */ 44 | .hljs-title, 45 | .hljs-section { 46 | color: #516aec; 47 | } 48 | 49 | /* Atelier-Heath Purple */ 50 | .hljs-keyword, 51 | .hljs-selector-tag { 52 | color: #7b59c0; 53 | } 54 | 55 | .hljs { 56 | display: block; 57 | overflow-x: auto; 58 | background: #f7f3f7; 59 | color: #695d69; 60 | padding: 0.5em; 61 | } 62 | 63 | .hljs-emphasis { 64 | font-style: italic; 65 | } 66 | 67 | .hljs-strong { 68 | font-weight: bold; 69 | } 70 | -------------------------------------------------------------------------------- /www/static/highlight/styles/atelier-lakeside-dark.css: -------------------------------------------------------------------------------- 1 | /* Base16 Atelier Lakeside Dark - Theme */ 2 | /* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/lakeside) */ 3 | /* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ 4 | 5 | /* Atelier-Lakeside Comment */ 6 | .hljs-comment, 7 | .hljs-quote { 8 | color: #7195a8; 9 | } 10 | 11 | /* Atelier-Lakeside Red */ 12 | .hljs-variable, 13 | .hljs-template-variable, 14 | .hljs-attribute, 15 | .hljs-tag, 16 | .hljs-name, 17 | .hljs-regexp, 18 | .hljs-link, 19 | .hljs-name, 20 | .hljs-selector-id, 21 | .hljs-selector-class { 22 | color: #d22d72; 23 | } 24 | 25 | /* Atelier-Lakeside Orange */ 26 | .hljs-number, 27 | .hljs-meta, 28 | .hljs-built_in, 29 | .hljs-builtin-name, 30 | .hljs-literal, 31 | .hljs-type, 32 | .hljs-params { 33 | color: #935c25; 34 | } 35 | 36 | /* Atelier-Lakeside Green */ 37 | .hljs-string, 38 | .hljs-symbol, 39 | .hljs-bullet { 40 | color: #568c3b; 41 | } 42 | 43 | /* Atelier-Lakeside Blue */ 44 | .hljs-title, 45 | .hljs-section { 46 | color: #257fad; 47 | } 48 | 49 | /* Atelier-Lakeside Purple */ 50 | .hljs-keyword, 51 | .hljs-selector-tag { 52 | color: #6b6bb8; 53 | } 54 | 55 | .hljs { 56 | display: block; 57 | overflow-x: auto; 58 | background: #161b1d; 59 | color: #7ea2b4; 60 | padding: 0.5em; 61 | } 62 | 63 | .hljs-emphasis { 64 | font-style: italic; 65 | } 66 | 67 | .hljs-strong { 68 | font-weight: bold; 69 | } 70 | -------------------------------------------------------------------------------- /www/static/highlight/styles/atelier-lakeside-light.css: -------------------------------------------------------------------------------- 1 | /* Base16 Atelier Lakeside Light - Theme */ 2 | /* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/lakeside) */ 3 | /* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ 4 | 5 | /* Atelier-Lakeside Comment */ 6 | .hljs-comment, 7 | .hljs-quote { 8 | color: #5a7b8c; 9 | } 10 | 11 | /* Atelier-Lakeside Red */ 12 | .hljs-variable, 13 | .hljs-template-variable, 14 | .hljs-attribute, 15 | .hljs-tag, 16 | .hljs-name, 17 | .hljs-regexp, 18 | .hljs-link, 19 | .hljs-name, 20 | .hljs-selector-id, 21 | .hljs-selector-class { 22 | color: #d22d72; 23 | } 24 | 25 | /* Atelier-Lakeside Orange */ 26 | .hljs-number, 27 | .hljs-meta, 28 | .hljs-built_in, 29 | .hljs-builtin-name, 30 | .hljs-literal, 31 | .hljs-type, 32 | .hljs-params { 33 | color: #935c25; 34 | } 35 | 36 | /* Atelier-Lakeside Green */ 37 | .hljs-string, 38 | .hljs-symbol, 39 | .hljs-bullet { 40 | color: #568c3b; 41 | } 42 | 43 | /* Atelier-Lakeside Blue */ 44 | .hljs-title, 45 | .hljs-section { 46 | color: #257fad; 47 | } 48 | 49 | /* Atelier-Lakeside Purple */ 50 | .hljs-keyword, 51 | .hljs-selector-tag { 52 | color: #6b6bb8; 53 | } 54 | 55 | .hljs { 56 | display: block; 57 | overflow-x: auto; 58 | background: #ebf8ff; 59 | color: #516d7b; 60 | padding: 0.5em; 61 | } 62 | 63 | .hljs-emphasis { 64 | font-style: italic; 65 | } 66 | 67 | .hljs-strong { 68 | font-weight: bold; 69 | } 70 | -------------------------------------------------------------------------------- /www/static/highlight/styles/atelier-plateau-dark.css: -------------------------------------------------------------------------------- 1 | /* Base16 Atelier Plateau Dark - Theme */ 2 | /* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/plateau) */ 3 | /* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ 4 | 5 | /* Atelier-Plateau Comment */ 6 | .hljs-comment, 7 | .hljs-quote { 8 | color: #7e7777; 9 | } 10 | 11 | /* Atelier-Plateau Red */ 12 | .hljs-variable, 13 | .hljs-template-variable, 14 | .hljs-attribute, 15 | .hljs-tag, 16 | .hljs-name, 17 | .hljs-regexp, 18 | .hljs-link, 19 | .hljs-name, 20 | .hljs-selector-id, 21 | .hljs-selector-class { 22 | color: #ca4949; 23 | } 24 | 25 | /* Atelier-Plateau Orange */ 26 | .hljs-number, 27 | .hljs-meta, 28 | .hljs-built_in, 29 | .hljs-builtin-name, 30 | .hljs-literal, 31 | .hljs-type, 32 | .hljs-params { 33 | color: #b45a3c; 34 | } 35 | 36 | /* Atelier-Plateau Green */ 37 | .hljs-string, 38 | .hljs-symbol, 39 | .hljs-bullet { 40 | color: #4b8b8b; 41 | } 42 | 43 | /* Atelier-Plateau Blue */ 44 | .hljs-title, 45 | .hljs-section { 46 | color: #7272ca; 47 | } 48 | 49 | /* Atelier-Plateau Purple */ 50 | .hljs-keyword, 51 | .hljs-selector-tag { 52 | color: #8464c4; 53 | } 54 | 55 | .hljs-deletion, 56 | .hljs-addition { 57 | color: #1b1818; 58 | display: inline-block; 59 | width: 100%; 60 | } 61 | 62 | .hljs-deletion { 63 | background-color: #ca4949; 64 | } 65 | 66 | .hljs-addition { 67 | background-color: #4b8b8b; 68 | } 69 | 70 | .hljs { 71 | display: block; 72 | overflow-x: auto; 73 | background: #1b1818; 74 | color: #8a8585; 75 | padding: 0.5em; 76 | } 77 | 78 | .hljs-emphasis { 79 | font-style: italic; 80 | } 81 | 82 | .hljs-strong { 83 | font-weight: bold; 84 | } 85 | -------------------------------------------------------------------------------- /www/static/highlight/styles/atelier-plateau-light.css: -------------------------------------------------------------------------------- 1 | /* Base16 Atelier Plateau Light - Theme */ 2 | /* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/plateau) */ 3 | /* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ 4 | 5 | /* Atelier-Plateau Comment */ 6 | .hljs-comment, 7 | .hljs-quote { 8 | color: #655d5d; 9 | } 10 | 11 | /* Atelier-Plateau Red */ 12 | .hljs-variable, 13 | .hljs-template-variable, 14 | .hljs-attribute, 15 | .hljs-tag, 16 | .hljs-name, 17 | .hljs-regexp, 18 | .hljs-link, 19 | .hljs-name, 20 | .hljs-selector-id, 21 | .hljs-selector-class { 22 | color: #ca4949; 23 | } 24 | 25 | /* Atelier-Plateau Orange */ 26 | .hljs-number, 27 | .hljs-meta, 28 | .hljs-built_in, 29 | .hljs-builtin-name, 30 | .hljs-literal, 31 | .hljs-type, 32 | .hljs-params { 33 | color: #b45a3c; 34 | } 35 | 36 | /* Atelier-Plateau Green */ 37 | .hljs-string, 38 | .hljs-symbol, 39 | .hljs-bullet { 40 | color: #4b8b8b; 41 | } 42 | 43 | /* Atelier-Plateau Blue */ 44 | .hljs-title, 45 | .hljs-section { 46 | color: #7272ca; 47 | } 48 | 49 | /* Atelier-Plateau Purple */ 50 | .hljs-keyword, 51 | .hljs-selector-tag { 52 | color: #8464c4; 53 | } 54 | 55 | .hljs-deletion, 56 | .hljs-addition { 57 | color: #1b1818; 58 | display: inline-block; 59 | width: 100%; 60 | } 61 | 62 | .hljs-deletion { 63 | background-color: #ca4949; 64 | } 65 | 66 | .hljs-addition { 67 | background-color: #4b8b8b; 68 | } 69 | 70 | .hljs { 71 | display: block; 72 | overflow-x: auto; 73 | background: #f4ecec; 74 | color: #585050; 75 | padding: 0.5em; 76 | } 77 | 78 | .hljs-emphasis { 79 | font-style: italic; 80 | } 81 | 82 | .hljs-strong { 83 | font-weight: bold; 84 | } 85 | -------------------------------------------------------------------------------- /www/static/highlight/styles/atelier-savanna-dark.css: -------------------------------------------------------------------------------- 1 | /* Base16 Atelier Savanna Dark - Theme */ 2 | /* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/savanna) */ 3 | /* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ 4 | 5 | /* Atelier-Savanna Comment */ 6 | .hljs-comment, 7 | .hljs-quote { 8 | color: #78877d; 9 | } 10 | 11 | /* Atelier-Savanna Red */ 12 | .hljs-variable, 13 | .hljs-template-variable, 14 | .hljs-attribute, 15 | .hljs-tag, 16 | .hljs-name, 17 | .hljs-regexp, 18 | .hljs-link, 19 | .hljs-name, 20 | .hljs-selector-id, 21 | .hljs-selector-class { 22 | color: #b16139; 23 | } 24 | 25 | /* Atelier-Savanna Orange */ 26 | .hljs-number, 27 | .hljs-meta, 28 | .hljs-built_in, 29 | .hljs-builtin-name, 30 | .hljs-literal, 31 | .hljs-type, 32 | .hljs-params { 33 | color: #9f713c; 34 | } 35 | 36 | /* Atelier-Savanna Green */ 37 | .hljs-string, 38 | .hljs-symbol, 39 | .hljs-bullet { 40 | color: #489963; 41 | } 42 | 43 | /* Atelier-Savanna Blue */ 44 | .hljs-title, 45 | .hljs-section { 46 | color: #478c90; 47 | } 48 | 49 | /* Atelier-Savanna Purple */ 50 | .hljs-keyword, 51 | .hljs-selector-tag { 52 | color: #55859b; 53 | } 54 | 55 | .hljs-deletion, 56 | .hljs-addition { 57 | color: #171c19; 58 | display: inline-block; 59 | width: 100%; 60 | } 61 | 62 | .hljs-deletion { 63 | background-color: #b16139; 64 | } 65 | 66 | .hljs-addition { 67 | background-color: #489963; 68 | } 69 | 70 | .hljs { 71 | display: block; 72 | overflow-x: auto; 73 | background: #171c19; 74 | color: #87928a; 75 | padding: 0.5em; 76 | } 77 | 78 | .hljs-emphasis { 79 | font-style: italic; 80 | } 81 | 82 | .hljs-strong { 83 | font-weight: bold; 84 | } 85 | -------------------------------------------------------------------------------- /www/static/highlight/styles/atelier-savanna-light.css: -------------------------------------------------------------------------------- 1 | /* Base16 Atelier Savanna Light - Theme */ 2 | /* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/savanna) */ 3 | /* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ 4 | 5 | /* Atelier-Savanna Comment */ 6 | .hljs-comment, 7 | .hljs-quote { 8 | color: #5f6d64; 9 | } 10 | 11 | /* Atelier-Savanna Red */ 12 | .hljs-variable, 13 | .hljs-template-variable, 14 | .hljs-attribute, 15 | .hljs-tag, 16 | .hljs-name, 17 | .hljs-regexp, 18 | .hljs-link, 19 | .hljs-name, 20 | .hljs-selector-id, 21 | .hljs-selector-class { 22 | color: #b16139; 23 | } 24 | 25 | /* Atelier-Savanna Orange */ 26 | .hljs-number, 27 | .hljs-meta, 28 | .hljs-built_in, 29 | .hljs-builtin-name, 30 | .hljs-literal, 31 | .hljs-type, 32 | .hljs-params { 33 | color: #9f713c; 34 | } 35 | 36 | /* Atelier-Savanna Green */ 37 | .hljs-string, 38 | .hljs-symbol, 39 | .hljs-bullet { 40 | color: #489963; 41 | } 42 | 43 | /* Atelier-Savanna Blue */ 44 | .hljs-title, 45 | .hljs-section { 46 | color: #478c90; 47 | } 48 | 49 | /* Atelier-Savanna Purple */ 50 | .hljs-keyword, 51 | .hljs-selector-tag { 52 | color: #55859b; 53 | } 54 | 55 | .hljs-deletion, 56 | .hljs-addition { 57 | color: #171c19; 58 | display: inline-block; 59 | width: 100%; 60 | } 61 | 62 | .hljs-deletion { 63 | background-color: #b16139; 64 | } 65 | 66 | .hljs-addition { 67 | background-color: #489963; 68 | } 69 | 70 | .hljs { 71 | display: block; 72 | overflow-x: auto; 73 | background: #ecf4ee; 74 | color: #526057; 75 | padding: 0.5em; 76 | } 77 | 78 | .hljs-emphasis { 79 | font-style: italic; 80 | } 81 | 82 | .hljs-strong { 83 | font-weight: bold; 84 | } 85 | -------------------------------------------------------------------------------- /www/static/highlight/styles/atelier-seaside-dark.css: -------------------------------------------------------------------------------- 1 | /* Base16 Atelier Seaside Dark - Theme */ 2 | /* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/seaside) */ 3 | /* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ 4 | 5 | /* Atelier-Seaside Comment */ 6 | .hljs-comment, 7 | .hljs-quote { 8 | color: #809980; 9 | } 10 | 11 | /* Atelier-Seaside Red */ 12 | .hljs-variable, 13 | .hljs-template-variable, 14 | .hljs-attribute, 15 | .hljs-tag, 16 | .hljs-name, 17 | .hljs-regexp, 18 | .hljs-link, 19 | .hljs-name, 20 | .hljs-selector-id, 21 | .hljs-selector-class { 22 | color: #e6193c; 23 | } 24 | 25 | /* Atelier-Seaside Orange */ 26 | .hljs-number, 27 | .hljs-meta, 28 | .hljs-built_in, 29 | .hljs-builtin-name, 30 | .hljs-literal, 31 | .hljs-type, 32 | .hljs-params { 33 | color: #87711d; 34 | } 35 | 36 | /* Atelier-Seaside Green */ 37 | .hljs-string, 38 | .hljs-symbol, 39 | .hljs-bullet { 40 | color: #29a329; 41 | } 42 | 43 | /* Atelier-Seaside Blue */ 44 | .hljs-title, 45 | .hljs-section { 46 | color: #3d62f5; 47 | } 48 | 49 | /* Atelier-Seaside Purple */ 50 | .hljs-keyword, 51 | .hljs-selector-tag { 52 | color: #ad2bee; 53 | } 54 | 55 | .hljs { 56 | display: block; 57 | overflow-x: auto; 58 | background: #131513; 59 | color: #8ca68c; 60 | padding: 0.5em; 61 | } 62 | 63 | .hljs-emphasis { 64 | font-style: italic; 65 | } 66 | 67 | .hljs-strong { 68 | font-weight: bold; 69 | } 70 | -------------------------------------------------------------------------------- /www/static/highlight/styles/atelier-seaside-light.css: -------------------------------------------------------------------------------- 1 | /* Base16 Atelier Seaside Light - Theme */ 2 | /* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/seaside) */ 3 | /* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ 4 | 5 | /* Atelier-Seaside Comment */ 6 | .hljs-comment, 7 | .hljs-quote { 8 | color: #687d68; 9 | } 10 | 11 | /* Atelier-Seaside Red */ 12 | .hljs-variable, 13 | .hljs-template-variable, 14 | .hljs-attribute, 15 | .hljs-tag, 16 | .hljs-name, 17 | .hljs-regexp, 18 | .hljs-link, 19 | .hljs-name, 20 | .hljs-selector-id, 21 | .hljs-selector-class { 22 | color: #e6193c; 23 | } 24 | 25 | /* Atelier-Seaside Orange */ 26 | .hljs-number, 27 | .hljs-meta, 28 | .hljs-built_in, 29 | .hljs-builtin-name, 30 | .hljs-literal, 31 | .hljs-type, 32 | .hljs-params { 33 | color: #87711d; 34 | } 35 | 36 | /* Atelier-Seaside Green */ 37 | .hljs-string, 38 | .hljs-symbol, 39 | .hljs-bullet { 40 | color: #29a329; 41 | } 42 | 43 | /* Atelier-Seaside Blue */ 44 | .hljs-title, 45 | .hljs-section { 46 | color: #3d62f5; 47 | } 48 | 49 | /* Atelier-Seaside Purple */ 50 | .hljs-keyword, 51 | .hljs-selector-tag { 52 | color: #ad2bee; 53 | } 54 | 55 | .hljs { 56 | display: block; 57 | overflow-x: auto; 58 | background: #f4fbf4; 59 | color: #5e6e5e; 60 | padding: 0.5em; 61 | } 62 | 63 | .hljs-emphasis { 64 | font-style: italic; 65 | } 66 | 67 | .hljs-strong { 68 | font-weight: bold; 69 | } 70 | -------------------------------------------------------------------------------- /www/static/highlight/styles/atelier-sulphurpool-dark.css: -------------------------------------------------------------------------------- 1 | /* Base16 Atelier Sulphurpool Dark - Theme */ 2 | /* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/sulphurpool) */ 3 | /* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ 4 | 5 | /* Atelier-Sulphurpool Comment */ 6 | .hljs-comment, 7 | .hljs-quote { 8 | color: #898ea4; 9 | } 10 | 11 | /* Atelier-Sulphurpool Red */ 12 | .hljs-variable, 13 | .hljs-template-variable, 14 | .hljs-attribute, 15 | .hljs-tag, 16 | .hljs-name, 17 | .hljs-regexp, 18 | .hljs-link, 19 | .hljs-name, 20 | .hljs-selector-id, 21 | .hljs-selector-class { 22 | color: #c94922; 23 | } 24 | 25 | /* Atelier-Sulphurpool Orange */ 26 | .hljs-number, 27 | .hljs-meta, 28 | .hljs-built_in, 29 | .hljs-builtin-name, 30 | .hljs-literal, 31 | .hljs-type, 32 | .hljs-params { 33 | color: #c76b29; 34 | } 35 | 36 | /* Atelier-Sulphurpool Green */ 37 | .hljs-string, 38 | .hljs-symbol, 39 | .hljs-bullet { 40 | color: #ac9739; 41 | } 42 | 43 | /* Atelier-Sulphurpool Blue */ 44 | .hljs-title, 45 | .hljs-section { 46 | color: #3d8fd1; 47 | } 48 | 49 | /* Atelier-Sulphurpool Purple */ 50 | .hljs-keyword, 51 | .hljs-selector-tag { 52 | color: #6679cc; 53 | } 54 | 55 | .hljs { 56 | display: block; 57 | overflow-x: auto; 58 | background: #202746; 59 | color: #979db4; 60 | padding: 0.5em; 61 | } 62 | 63 | .hljs-emphasis { 64 | font-style: italic; 65 | } 66 | 67 | .hljs-strong { 68 | font-weight: bold; 69 | } 70 | -------------------------------------------------------------------------------- /www/static/highlight/styles/atelier-sulphurpool-light.css: -------------------------------------------------------------------------------- 1 | /* Base16 Atelier Sulphurpool Light - Theme */ 2 | /* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/sulphurpool) */ 3 | /* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ 4 | 5 | /* Atelier-Sulphurpool Comment */ 6 | .hljs-comment, 7 | .hljs-quote { 8 | color: #6b7394; 9 | } 10 | 11 | /* Atelier-Sulphurpool Red */ 12 | .hljs-variable, 13 | .hljs-template-variable, 14 | .hljs-attribute, 15 | .hljs-tag, 16 | .hljs-name, 17 | .hljs-regexp, 18 | .hljs-link, 19 | .hljs-name, 20 | .hljs-selector-id, 21 | .hljs-selector-class { 22 | color: #c94922; 23 | } 24 | 25 | /* Atelier-Sulphurpool Orange */ 26 | .hljs-number, 27 | .hljs-meta, 28 | .hljs-built_in, 29 | .hljs-builtin-name, 30 | .hljs-literal, 31 | .hljs-type, 32 | .hljs-params { 33 | color: #c76b29; 34 | } 35 | 36 | /* Atelier-Sulphurpool Green */ 37 | .hljs-string, 38 | .hljs-symbol, 39 | .hljs-bullet { 40 | color: #ac9739; 41 | } 42 | 43 | /* Atelier-Sulphurpool Blue */ 44 | .hljs-title, 45 | .hljs-section { 46 | color: #3d8fd1; 47 | } 48 | 49 | /* Atelier-Sulphurpool Purple */ 50 | .hljs-keyword, 51 | .hljs-selector-tag { 52 | color: #6679cc; 53 | } 54 | 55 | .hljs { 56 | display: block; 57 | overflow-x: auto; 58 | background: #f5f7ff; 59 | color: #5e6687; 60 | padding: 0.5em; 61 | } 62 | 63 | .hljs-emphasis { 64 | font-style: italic; 65 | } 66 | 67 | .hljs-strong { 68 | font-weight: bold; 69 | } 70 | -------------------------------------------------------------------------------- /www/static/highlight/styles/atom-one-dark.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Atom One Dark by Daniel Gamage 4 | Original One Dark Syntax theme from https://github.com/atom/one-dark-syntax 5 | 6 | base: #282c34 7 | mono-1: #abb2bf 8 | mono-2: #818896 9 | mono-3: #5c6370 10 | hue-1: #56b6c2 11 | hue-2: #61aeee 12 | hue-3: #c678dd 13 | hue-4: #98c379 14 | hue-5: #e06c75 15 | hue-5-2: #be5046 16 | hue-6: #d19a66 17 | hue-6-2: #e6c07b 18 | 19 | */ 20 | 21 | .hljs { 22 | display: block; 23 | overflow-x: auto; 24 | padding: 0.5em; 25 | color: #abb2bf; 26 | background: #282c34; 27 | } 28 | 29 | .hljs-comment, 30 | .hljs-quote { 31 | color: #5c6370; 32 | font-style: italic; 33 | } 34 | 35 | .hljs-doctag, 36 | .hljs-keyword, 37 | .hljs-formula { 38 | color: #c678dd; 39 | } 40 | 41 | .hljs-section, 42 | .hljs-name, 43 | .hljs-selector-tag, 44 | .hljs-deletion, 45 | .hljs-subst { 46 | color: #e06c75; 47 | } 48 | 49 | .hljs-literal { 50 | color: #56b6c2; 51 | } 52 | 53 | .hljs-string, 54 | .hljs-regexp, 55 | .hljs-addition, 56 | .hljs-attribute, 57 | .hljs-meta-string { 58 | color: #98c379; 59 | } 60 | 61 | .hljs-built_in, 62 | .hljs-class .hljs-title { 63 | color: #e6c07b; 64 | } 65 | 66 | .hljs-attr, 67 | .hljs-variable, 68 | .hljs-template-variable, 69 | .hljs-type, 70 | .hljs-selector-class, 71 | .hljs-selector-attr, 72 | .hljs-selector-pseudo, 73 | .hljs-number { 74 | color: #d19a66; 75 | } 76 | 77 | .hljs-symbol, 78 | .hljs-bullet, 79 | .hljs-link, 80 | .hljs-meta, 81 | .hljs-selector-id, 82 | .hljs-title { 83 | color: #61aeee; 84 | } 85 | 86 | .hljs-emphasis { 87 | font-style: italic; 88 | } 89 | 90 | .hljs-strong { 91 | font-weight: bold; 92 | } 93 | 94 | .hljs-link { 95 | text-decoration: underline; 96 | } 97 | -------------------------------------------------------------------------------- /www/static/highlight/styles/atom-one-light.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Atom One Light by Daniel Gamage 4 | Original One Light Syntax theme from https://github.com/atom/one-light-syntax 5 | 6 | base: #fafafa 7 | mono-1: #383a42 8 | mono-2: #686b77 9 | mono-3: #a0a1a7 10 | hue-1: #0184bb 11 | hue-2: #4078f2 12 | hue-3: #a626a4 13 | hue-4: #50a14f 14 | hue-5: #e45649 15 | hue-5-2: #c91243 16 | hue-6: #986801 17 | hue-6-2: #c18401 18 | 19 | */ 20 | 21 | .hljs { 22 | display: block; 23 | overflow-x: auto; 24 | padding: 0.5em; 25 | color: #383a42; 26 | background: #fafafa; 27 | } 28 | 29 | .hljs-comment, 30 | .hljs-quote { 31 | color: #a0a1a7; 32 | font-style: italic; 33 | } 34 | 35 | .hljs-doctag, 36 | .hljs-keyword, 37 | .hljs-formula { 38 | color: #a626a4; 39 | } 40 | 41 | .hljs-section, 42 | .hljs-name, 43 | .hljs-selector-tag, 44 | .hljs-deletion, 45 | .hljs-subst { 46 | color: #e45649; 47 | } 48 | 49 | .hljs-literal { 50 | color: #0184bb; 51 | } 52 | 53 | .hljs-string, 54 | .hljs-regexp, 55 | .hljs-addition, 56 | .hljs-attribute, 57 | .hljs-meta-string { 58 | color: #50a14f; 59 | } 60 | 61 | .hljs-built_in, 62 | .hljs-class .hljs-title { 63 | color: #c18401; 64 | } 65 | 66 | .hljs-attr, 67 | .hljs-variable, 68 | .hljs-template-variable, 69 | .hljs-type, 70 | .hljs-selector-class, 71 | .hljs-selector-attr, 72 | .hljs-selector-pseudo, 73 | .hljs-number { 74 | color: #986801; 75 | } 76 | 77 | .hljs-symbol, 78 | .hljs-bullet, 79 | .hljs-link, 80 | .hljs-meta, 81 | .hljs-selector-id, 82 | .hljs-title { 83 | color: #4078f2; 84 | } 85 | 86 | .hljs-emphasis { 87 | font-style: italic; 88 | } 89 | 90 | .hljs-strong { 91 | font-weight: bold; 92 | } 93 | 94 | .hljs-link { 95 | text-decoration: underline; 96 | } 97 | -------------------------------------------------------------------------------- /www/static/highlight/styles/brown-paper.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Brown Paper style from goldblog.com.ua (c) Zaripov Yura 4 | 5 | */ 6 | 7 | .hljs { 8 | display: block; 9 | overflow-x: auto; 10 | padding: 0.5em; 11 | background:#b7a68e url(./brown-papersq.png); 12 | } 13 | 14 | .hljs-keyword, 15 | .hljs-selector-tag, 16 | .hljs-literal { 17 | color:#005599; 18 | font-weight:bold; 19 | } 20 | 21 | .hljs, 22 | .hljs-subst { 23 | color: #363c69; 24 | } 25 | 26 | .hljs-string, 27 | .hljs-title, 28 | .hljs-section, 29 | .hljs-type, 30 | .hljs-attribute, 31 | .hljs-symbol, 32 | .hljs-bullet, 33 | .hljs-built_in, 34 | .hljs-addition, 35 | .hljs-variable, 36 | .hljs-template-tag, 37 | .hljs-template-variable, 38 | .hljs-link, 39 | .hljs-name { 40 | color: #2c009f; 41 | } 42 | 43 | .hljs-comment, 44 | .hljs-quote, 45 | .hljs-meta, 46 | .hljs-deletion { 47 | color: #802022; 48 | } 49 | 50 | .hljs-keyword, 51 | .hljs-selector-tag, 52 | .hljs-literal, 53 | .hljs-doctag, 54 | .hljs-title, 55 | .hljs-section, 56 | .hljs-type, 57 | .hljs-name, 58 | .hljs-strong { 59 | font-weight: bold; 60 | } 61 | 62 | .hljs-emphasis { 63 | font-style: italic; 64 | } 65 | -------------------------------------------------------------------------------- /www/static/highlight/styles/brown-papersq.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itorr/smartisanBlog/0e132b5e16c4b08b327ef1dc83f0966e7e6bf5d7/www/static/highlight/styles/brown-papersq.png -------------------------------------------------------------------------------- /www/static/highlight/styles/codepen-embed.css: -------------------------------------------------------------------------------- 1 | /* 2 | codepen.io Embed Theme 3 | Author: Justin Perry 4 | Original theme - https://github.com/chriskempson/tomorrow-theme 5 | */ 6 | 7 | .hljs { 8 | display: block; 9 | overflow-x: auto; 10 | padding: 0.5em; 11 | background: #222; 12 | color: #fff; 13 | } 14 | 15 | .hljs-comment, 16 | .hljs-quote { 17 | color: #777; 18 | } 19 | 20 | .hljs-variable, 21 | .hljs-template-variable, 22 | .hljs-tag, 23 | .hljs-regexp, 24 | .hljs-meta, 25 | .hljs-number, 26 | .hljs-built_in, 27 | .hljs-builtin-name, 28 | .hljs-literal, 29 | .hljs-params, 30 | .hljs-symbol, 31 | .hljs-bullet, 32 | .hljs-link, 33 | .hljs-deletion { 34 | color: #ab875d; 35 | } 36 | 37 | .hljs-section, 38 | .hljs-title, 39 | .hljs-name, 40 | .hljs-selector-id, 41 | .hljs-selector-class, 42 | .hljs-type, 43 | .hljs-attribute { 44 | color: #9b869b; 45 | } 46 | 47 | .hljs-string, 48 | .hljs-keyword, 49 | .hljs-selector-tag, 50 | .hljs-addition { 51 | color: #8f9c6c; 52 | } 53 | 54 | .hljs-emphasis { 55 | font-style: italic; 56 | } 57 | 58 | .hljs-strong { 59 | font-weight: bold; 60 | } 61 | -------------------------------------------------------------------------------- /www/static/highlight/styles/color-brewer.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Colorbrewer theme 4 | Original: https://github.com/mbostock/colorbrewer-theme (c) Mike Bostock 5 | Ported by Fabrício Tavares de Oliveira 6 | 7 | */ 8 | 9 | .hljs { 10 | display: block; 11 | overflow-x: auto; 12 | padding: 0.5em; 13 | background: #fff; 14 | } 15 | 16 | .hljs, 17 | .hljs-subst { 18 | color: #000; 19 | } 20 | 21 | .hljs-string, 22 | .hljs-meta, 23 | .hljs-symbol, 24 | .hljs-template-tag, 25 | .hljs-template-variable, 26 | .hljs-addition { 27 | color: #756bb1; 28 | } 29 | 30 | .hljs-comment, 31 | .hljs-quote { 32 | color: #636363; 33 | } 34 | 35 | .hljs-number, 36 | .hljs-regexp, 37 | .hljs-literal, 38 | .hljs-bullet, 39 | .hljs-link { 40 | color: #31a354; 41 | } 42 | 43 | .hljs-deletion, 44 | .hljs-variable { 45 | color: #88f; 46 | } 47 | 48 | 49 | 50 | .hljs-keyword, 51 | .hljs-selector-tag, 52 | .hljs-title, 53 | .hljs-section, 54 | .hljs-built_in, 55 | .hljs-doctag, 56 | .hljs-type, 57 | .hljs-tag, 58 | .hljs-name, 59 | .hljs-selector-id, 60 | .hljs-selector-class, 61 | .hljs-strong { 62 | color: #3182bd; 63 | } 64 | 65 | .hljs-emphasis { 66 | font-style: italic; 67 | } 68 | 69 | .hljs-attribute { 70 | color: #e6550d; 71 | } 72 | -------------------------------------------------------------------------------- /www/static/highlight/styles/darcula.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Darcula color scheme from the JetBrains family of IDEs 4 | 5 | */ 6 | 7 | 8 | .hljs { 9 | display: block; 10 | overflow-x: auto; 11 | padding: 0.5em; 12 | background: #2b2b2b; 13 | } 14 | 15 | .hljs { 16 | color: #bababa; 17 | } 18 | 19 | .hljs-strong, 20 | .hljs-emphasis { 21 | color: #a8a8a2; 22 | } 23 | 24 | .hljs-bullet, 25 | .hljs-quote, 26 | .hljs-link, 27 | .hljs-number, 28 | .hljs-regexp, 29 | .hljs-literal { 30 | color: #6896ba; 31 | } 32 | 33 | .hljs-code, 34 | .hljs-selector-class { 35 | color: #a6e22e; 36 | } 37 | 38 | .hljs-emphasis { 39 | font-style: italic; 40 | } 41 | 42 | .hljs-keyword, 43 | .hljs-selector-tag, 44 | .hljs-section, 45 | .hljs-attribute, 46 | .hljs-name, 47 | .hljs-variable { 48 | color: #cb7832; 49 | } 50 | 51 | .hljs-params { 52 | color: #b9b9b9; 53 | } 54 | 55 | .hljs-string { 56 | color: #6a8759; 57 | } 58 | 59 | .hljs-subst, 60 | .hljs-type, 61 | .hljs-built_in, 62 | .hljs-builtin-name, 63 | .hljs-symbol, 64 | .hljs-selector-id, 65 | .hljs-selector-attr, 66 | .hljs-selector-pseudo, 67 | .hljs-template-tag, 68 | .hljs-template-variable, 69 | .hljs-addition { 70 | color: #e0c46c; 71 | } 72 | 73 | .hljs-comment, 74 | .hljs-deletion, 75 | .hljs-meta { 76 | color: #7f7f7f; 77 | } 78 | -------------------------------------------------------------------------------- /www/static/highlight/styles/dark.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Dark style from softwaremaniacs.org (c) Ivan Sagalaev 4 | 5 | */ 6 | 7 | .hljs { 8 | display: block; 9 | overflow-x: auto; 10 | padding: 0.5em; 11 | background: #444; 12 | } 13 | 14 | .hljs-keyword, 15 | .hljs-selector-tag, 16 | .hljs-literal, 17 | .hljs-section, 18 | .hljs-link { 19 | color: white; 20 | } 21 | 22 | .hljs, 23 | .hljs-subst { 24 | color: #ddd; 25 | } 26 | 27 | .hljs-string, 28 | .hljs-title, 29 | .hljs-name, 30 | .hljs-type, 31 | .hljs-attribute, 32 | .hljs-symbol, 33 | .hljs-bullet, 34 | .hljs-built_in, 35 | .hljs-addition, 36 | .hljs-variable, 37 | .hljs-template-tag, 38 | .hljs-template-variable { 39 | color: #d88; 40 | } 41 | 42 | .hljs-comment, 43 | .hljs-quote, 44 | .hljs-deletion, 45 | .hljs-meta { 46 | color: #777; 47 | } 48 | 49 | .hljs-keyword, 50 | .hljs-selector-tag, 51 | .hljs-literal, 52 | .hljs-title, 53 | .hljs-section, 54 | .hljs-doctag, 55 | .hljs-type, 56 | .hljs-name, 57 | .hljs-strong { 58 | font-weight: bold; 59 | } 60 | 61 | .hljs-emphasis { 62 | font-style: italic; 63 | } 64 | -------------------------------------------------------------------------------- /www/static/highlight/styles/darkula.css: -------------------------------------------------------------------------------- 1 | /* 2 | Deprecated due to a typo in the name and left here for compatibility purpose only. 3 | Please use darcula.css instead. 4 | */ 5 | 6 | @import url('darcula.css'); 7 | -------------------------------------------------------------------------------- /www/static/highlight/styles/default.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Original highlight.js style (c) Ivan Sagalaev 4 | 5 | */ 6 | 7 | .hljs { 8 | display: block; 9 | overflow-x: auto; 10 | padding: 0.5em; 11 | background: #F0F0F0; 12 | } 13 | 14 | 15 | /* Base color: saturation 0; */ 16 | 17 | .hljs, 18 | .hljs-subst { 19 | color: #444; 20 | } 21 | 22 | .hljs-comment { 23 | color: #888888; 24 | } 25 | 26 | .hljs-keyword, 27 | .hljs-attribute, 28 | .hljs-selector-tag, 29 | .hljs-meta-keyword, 30 | .hljs-doctag, 31 | .hljs-name { 32 | font-weight: bold; 33 | } 34 | 35 | 36 | /* User color: hue: 0 */ 37 | 38 | .hljs-type, 39 | .hljs-string, 40 | .hljs-number, 41 | .hljs-selector-id, 42 | .hljs-selector-class, 43 | .hljs-quote, 44 | .hljs-template-tag, 45 | .hljs-deletion { 46 | color: #880000; 47 | } 48 | 49 | .hljs-title, 50 | .hljs-section { 51 | color: #880000; 52 | font-weight: bold; 53 | } 54 | 55 | .hljs-regexp, 56 | .hljs-symbol, 57 | .hljs-variable, 58 | .hljs-template-variable, 59 | .hljs-link, 60 | .hljs-selector-attr, 61 | .hljs-selector-pseudo { 62 | color: #BC6060; 63 | } 64 | 65 | 66 | /* Language color: hue: 90; */ 67 | 68 | .hljs-literal { 69 | color: #78A960; 70 | } 71 | 72 | .hljs-built_in, 73 | .hljs-bullet, 74 | .hljs-code, 75 | .hljs-addition { 76 | color: #397300; 77 | } 78 | 79 | 80 | /* Meta color: hue: 200 */ 81 | 82 | .hljs-meta { 83 | color: #1f7199; 84 | } 85 | 86 | .hljs-meta-string { 87 | color: #4d99bf; 88 | } 89 | 90 | 91 | /* Misc effects */ 92 | 93 | .hljs-emphasis { 94 | font-style: italic; 95 | } 96 | 97 | .hljs-strong { 98 | font-weight: bold; 99 | } 100 | -------------------------------------------------------------------------------- /www/static/highlight/styles/docco.css: -------------------------------------------------------------------------------- 1 | /* 2 | Docco style used in http://jashkenas.github.com/docco/ converted by Simon Madine (@thingsinjars) 3 | */ 4 | 5 | .hljs { 6 | display: block; 7 | overflow-x: auto; 8 | padding: 0.5em; 9 | color: #000; 10 | background: #f8f8ff; 11 | } 12 | 13 | .hljs-comment, 14 | .hljs-quote { 15 | color: #408080; 16 | font-style: italic; 17 | } 18 | 19 | .hljs-keyword, 20 | .hljs-selector-tag, 21 | .hljs-literal, 22 | .hljs-subst { 23 | color: #954121; 24 | } 25 | 26 | .hljs-number { 27 | color: #40a070; 28 | } 29 | 30 | .hljs-string, 31 | .hljs-doctag { 32 | color: #219161; 33 | } 34 | 35 | .hljs-selector-id, 36 | .hljs-selector-class, 37 | .hljs-section, 38 | .hljs-type { 39 | color: #19469d; 40 | } 41 | 42 | .hljs-params { 43 | color: #00f; 44 | } 45 | 46 | .hljs-title { 47 | color: #458; 48 | font-weight: bold; 49 | } 50 | 51 | .hljs-tag, 52 | .hljs-name, 53 | .hljs-attribute { 54 | color: #000080; 55 | font-weight: normal; 56 | } 57 | 58 | .hljs-variable, 59 | .hljs-template-variable { 60 | color: #008080; 61 | } 62 | 63 | .hljs-regexp, 64 | .hljs-link { 65 | color: #b68; 66 | } 67 | 68 | .hljs-symbol, 69 | .hljs-bullet { 70 | color: #990073; 71 | } 72 | 73 | .hljs-built_in, 74 | .hljs-builtin-name { 75 | color: #0086b3; 76 | } 77 | 78 | .hljs-meta { 79 | color: #999; 80 | font-weight: bold; 81 | } 82 | 83 | .hljs-deletion { 84 | background: #fdd; 85 | } 86 | 87 | .hljs-addition { 88 | background: #dfd; 89 | } 90 | 91 | .hljs-emphasis { 92 | font-style: italic; 93 | } 94 | 95 | .hljs-strong { 96 | font-weight: bold; 97 | } 98 | -------------------------------------------------------------------------------- /www/static/highlight/styles/dracula.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Dracula Theme v1.2.0 4 | 5 | https://github.com/zenorocha/dracula-theme 6 | 7 | Copyright 2015, All rights reserved 8 | 9 | Code licensed under the MIT license 10 | http://zenorocha.mit-license.org 11 | 12 | @author Éverton Ribeiro 13 | @author Zeno Rocha 14 | 15 | */ 16 | 17 | .hljs { 18 | display: block; 19 | overflow-x: auto; 20 | padding: 0.5em; 21 | background: #282a36; 22 | } 23 | 24 | .hljs-keyword, 25 | .hljs-selector-tag, 26 | .hljs-literal, 27 | .hljs-section, 28 | .hljs-link { 29 | color: #8be9fd; 30 | } 31 | 32 | .hljs-function .hljs-keyword { 33 | color: #ff79c6; 34 | } 35 | 36 | .hljs, 37 | .hljs-subst { 38 | color: #f8f8f2; 39 | } 40 | 41 | .hljs-string, 42 | .hljs-title, 43 | .hljs-name, 44 | .hljs-type, 45 | .hljs-attribute, 46 | .hljs-symbol, 47 | .hljs-bullet, 48 | .hljs-addition, 49 | .hljs-variable, 50 | .hljs-template-tag, 51 | .hljs-template-variable { 52 | color: #f1fa8c; 53 | } 54 | 55 | .hljs-comment, 56 | .hljs-quote, 57 | .hljs-deletion, 58 | .hljs-meta { 59 | color: #6272a4; 60 | } 61 | 62 | .hljs-keyword, 63 | .hljs-selector-tag, 64 | .hljs-literal, 65 | .hljs-title, 66 | .hljs-section, 67 | .hljs-doctag, 68 | .hljs-type, 69 | .hljs-name, 70 | .hljs-strong { 71 | font-weight: bold; 72 | } 73 | 74 | .hljs-emphasis { 75 | font-style: italic; 76 | } 77 | -------------------------------------------------------------------------------- /www/static/highlight/styles/far.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | FAR Style (c) MajestiC 4 | 5 | */ 6 | 7 | .hljs { 8 | display: block; 9 | overflow-x: auto; 10 | padding: 0.5em; 11 | background: #000080; 12 | } 13 | 14 | .hljs, 15 | .hljs-subst { 16 | color: #0ff; 17 | } 18 | 19 | .hljs-string, 20 | .hljs-attribute, 21 | .hljs-symbol, 22 | .hljs-bullet, 23 | .hljs-built_in, 24 | .hljs-builtin-name, 25 | .hljs-template-tag, 26 | .hljs-template-variable, 27 | .hljs-addition { 28 | color: #ff0; 29 | } 30 | 31 | .hljs-keyword, 32 | .hljs-selector-tag, 33 | .hljs-section, 34 | .hljs-type, 35 | .hljs-name, 36 | .hljs-selector-id, 37 | .hljs-selector-class, 38 | .hljs-variable { 39 | color: #fff; 40 | } 41 | 42 | .hljs-comment, 43 | .hljs-quote, 44 | .hljs-doctag, 45 | .hljs-deletion { 46 | color: #888; 47 | } 48 | 49 | .hljs-number, 50 | .hljs-regexp, 51 | .hljs-literal, 52 | .hljs-link { 53 | color: #0f0; 54 | } 55 | 56 | .hljs-meta { 57 | color: #008080; 58 | } 59 | 60 | .hljs-keyword, 61 | .hljs-selector-tag, 62 | .hljs-title, 63 | .hljs-section, 64 | .hljs-name, 65 | .hljs-strong { 66 | font-weight: bold; 67 | } 68 | 69 | .hljs-emphasis { 70 | font-style: italic; 71 | } 72 | -------------------------------------------------------------------------------- /www/static/highlight/styles/foundation.css: -------------------------------------------------------------------------------- 1 | /* 2 | Description: Foundation 4 docs style for highlight.js 3 | Author: Dan Allen 4 | Website: http://foundation.zurb.com/docs/ 5 | Version: 1.0 6 | Date: 2013-04-02 7 | */ 8 | 9 | .hljs { 10 | display: block; 11 | overflow-x: auto; 12 | padding: 0.5em; 13 | background: #eee; color: black; 14 | } 15 | 16 | .hljs-link, 17 | .hljs-emphasis, 18 | .hljs-attribute, 19 | .hljs-addition { 20 | color: #070; 21 | } 22 | 23 | .hljs-emphasis { 24 | font-style: italic; 25 | } 26 | 27 | .hljs-strong, 28 | .hljs-string, 29 | .hljs-deletion { 30 | color: #d14; 31 | } 32 | 33 | .hljs-strong { 34 | font-weight: bold; 35 | } 36 | 37 | .hljs-quote, 38 | .hljs-comment { 39 | color: #998; 40 | font-style: italic; 41 | } 42 | 43 | .hljs-section, 44 | .hljs-title { 45 | color: #900; 46 | } 47 | 48 | .hljs-class .hljs-title, 49 | .hljs-type { 50 | color: #458; 51 | } 52 | 53 | .hljs-variable, 54 | .hljs-template-variable { 55 | color: #336699; 56 | } 57 | 58 | .hljs-bullet { 59 | color: #997700; 60 | } 61 | 62 | .hljs-meta { 63 | color: #3344bb; 64 | } 65 | 66 | .hljs-code, 67 | .hljs-number, 68 | .hljs-literal, 69 | .hljs-keyword, 70 | .hljs-selector-tag { 71 | color: #099; 72 | } 73 | 74 | .hljs-regexp { 75 | background-color: #fff0ff; 76 | color: #880088; 77 | } 78 | 79 | .hljs-symbol { 80 | color: #990073; 81 | } 82 | 83 | .hljs-tag, 84 | .hljs-name, 85 | .hljs-selector-id, 86 | .hljs-selector-class { 87 | color: #007700; 88 | } 89 | -------------------------------------------------------------------------------- /www/static/highlight/styles/github-gist.css: -------------------------------------------------------------------------------- 1 | /** 2 | * GitHub Gist Theme 3 | * Author : Louis Barranqueiro - https://github.com/LouisBarranqueiro 4 | */ 5 | 6 | .hljs { 7 | display: block; 8 | background: white; 9 | padding: 0.5em; 10 | color: #333333; 11 | overflow-x: auto; 12 | } 13 | 14 | .hljs-comment, 15 | .hljs-meta { 16 | color: #969896; 17 | } 18 | 19 | .hljs-string, 20 | .hljs-variable, 21 | .hljs-template-variable, 22 | .hljs-strong, 23 | .hljs-emphasis, 24 | .hljs-quote { 25 | color: #df5000; 26 | } 27 | 28 | .hljs-keyword, 29 | .hljs-selector-tag, 30 | .hljs-type { 31 | color: #a71d5d; 32 | } 33 | 34 | .hljs-literal, 35 | .hljs-symbol, 36 | .hljs-bullet, 37 | .hljs-attribute { 38 | color: #0086b3; 39 | } 40 | 41 | .hljs-section, 42 | .hljs-name { 43 | color: #63a35c; 44 | } 45 | 46 | .hljs-tag { 47 | color: #333333; 48 | } 49 | 50 | .hljs-title, 51 | .hljs-attr, 52 | .hljs-selector-id, 53 | .hljs-selector-class, 54 | .hljs-selector-attr, 55 | .hljs-selector-pseudo { 56 | color: #795da3; 57 | } 58 | 59 | .hljs-addition { 60 | color: #55a532; 61 | background-color: #eaffea; 62 | } 63 | 64 | .hljs-deletion { 65 | color: #bd2c00; 66 | background-color: #ffecec; 67 | } 68 | 69 | .hljs-link { 70 | text-decoration: underline; 71 | } 72 | -------------------------------------------------------------------------------- /www/static/highlight/styles/github.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | github.com style (c) Vasily Polovnyov 4 | 5 | */ 6 | 7 | .hljs { 8 | display: block; 9 | overflow-x: auto; 10 | padding: 0.5em; 11 | color: #333; 12 | background: #f8f8f8; 13 | } 14 | 15 | .hljs-comment, 16 | .hljs-quote { 17 | color: #998; 18 | font-style: italic; 19 | } 20 | 21 | .hljs-keyword, 22 | .hljs-selector-tag, 23 | .hljs-subst { 24 | color: #333; 25 | font-weight: bold; 26 | } 27 | 28 | .hljs-number, 29 | .hljs-literal, 30 | .hljs-variable, 31 | .hljs-template-variable, 32 | .hljs-tag .hljs-attr { 33 | color: #008080; 34 | } 35 | 36 | .hljs-string, 37 | .hljs-doctag { 38 | color: #d14; 39 | } 40 | 41 | .hljs-title, 42 | .hljs-section, 43 | .hljs-selector-id { 44 | color: #900; 45 | font-weight: bold; 46 | } 47 | 48 | .hljs-subst { 49 | font-weight: normal; 50 | } 51 | 52 | .hljs-type, 53 | .hljs-class .hljs-title { 54 | color: #458; 55 | font-weight: bold; 56 | } 57 | 58 | .hljs-tag, 59 | .hljs-name, 60 | .hljs-attribute { 61 | color: #000080; 62 | font-weight: normal; 63 | } 64 | 65 | .hljs-regexp, 66 | .hljs-link { 67 | color: #009926; 68 | } 69 | 70 | .hljs-symbol, 71 | .hljs-bullet { 72 | color: #990073; 73 | } 74 | 75 | .hljs-built_in, 76 | .hljs-builtin-name { 77 | color: #0086b3; 78 | } 79 | 80 | .hljs-meta { 81 | color: #999; 82 | font-weight: bold; 83 | } 84 | 85 | .hljs-deletion { 86 | background: #fdd; 87 | } 88 | 89 | .hljs-addition { 90 | background: #dfd; 91 | } 92 | 93 | .hljs-emphasis { 94 | font-style: italic; 95 | } 96 | 97 | .hljs-strong { 98 | font-weight: bold; 99 | } 100 | -------------------------------------------------------------------------------- /www/static/highlight/styles/googlecode.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Google Code style (c) Aahan Krish 4 | 5 | */ 6 | 7 | .hljs { 8 | display: block; 9 | overflow-x: auto; 10 | padding: 0.5em; 11 | background: white; 12 | color: black; 13 | } 14 | 15 | .hljs-comment, 16 | .hljs-quote { 17 | color: #800; 18 | } 19 | 20 | .hljs-keyword, 21 | .hljs-selector-tag, 22 | .hljs-section, 23 | .hljs-title, 24 | .hljs-name { 25 | color: #008; 26 | } 27 | 28 | .hljs-variable, 29 | .hljs-template-variable { 30 | color: #660; 31 | } 32 | 33 | .hljs-string, 34 | .hljs-selector-attr, 35 | .hljs-selector-pseudo, 36 | .hljs-regexp { 37 | color: #080; 38 | } 39 | 40 | .hljs-literal, 41 | .hljs-symbol, 42 | .hljs-bullet, 43 | .hljs-meta, 44 | .hljs-number, 45 | .hljs-link { 46 | color: #066; 47 | } 48 | 49 | .hljs-title, 50 | .hljs-doctag, 51 | .hljs-type, 52 | .hljs-attr, 53 | .hljs-built_in, 54 | .hljs-builtin-name, 55 | .hljs-params { 56 | color: #606; 57 | } 58 | 59 | .hljs-attribute, 60 | .hljs-subst { 61 | color: #000; 62 | } 63 | 64 | .hljs-formula { 65 | background-color: #eee; 66 | font-style: italic; 67 | } 68 | 69 | .hljs-selector-id, 70 | .hljs-selector-class { 71 | color: #9B703F 72 | } 73 | 74 | .hljs-addition { 75 | background-color: #baeeba; 76 | } 77 | 78 | .hljs-deletion { 79 | background-color: #ffc8bd; 80 | } 81 | 82 | .hljs-doctag, 83 | .hljs-strong { 84 | font-weight: bold; 85 | } 86 | 87 | .hljs-emphasis { 88 | font-style: italic; 89 | } 90 | -------------------------------------------------------------------------------- /www/static/highlight/styles/grayscale.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | grayscale style (c) MY Sun 4 | 5 | */ 6 | 7 | .hljs { 8 | display: block; 9 | overflow-x: auto; 10 | padding: 0.5em; 11 | color: #333; 12 | background: #fff; 13 | } 14 | 15 | .hljs-comment, 16 | .hljs-quote { 17 | color: #777; 18 | font-style: italic; 19 | } 20 | 21 | .hljs-keyword, 22 | .hljs-selector-tag, 23 | .hljs-subst { 24 | color: #333; 25 | font-weight: bold; 26 | } 27 | 28 | .hljs-number, 29 | .hljs-literal { 30 | color: #777; 31 | } 32 | 33 | .hljs-string, 34 | .hljs-doctag, 35 | .hljs-formula { 36 | color: #333; 37 | background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAYAAACp8Z5+AAAAJ0lEQVQIW2O8e/fufwYGBgZBQUEQxcCIIfDu3Tuwivfv30NUoAsAALHpFMMLqZlPAAAAAElFTkSuQmCC) repeat; 38 | } 39 | 40 | .hljs-title, 41 | .hljs-section, 42 | .hljs-selector-id { 43 | color: #000; 44 | font-weight: bold; 45 | } 46 | 47 | .hljs-subst { 48 | font-weight: normal; 49 | } 50 | 51 | .hljs-class .hljs-title, 52 | .hljs-type, 53 | .hljs-name { 54 | color: #333; 55 | font-weight: bold; 56 | } 57 | 58 | .hljs-tag { 59 | color: #333; 60 | } 61 | 62 | .hljs-regexp { 63 | color: #333; 64 | background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAICAYAAADA+m62AAAAPUlEQVQYV2NkQAN37979r6yszIgujiIAU4RNMVwhuiQ6H6wQl3XI4oy4FMHcCJPHcDS6J2A2EqUQpJhohQDexSef15DBCwAAAABJRU5ErkJggg==) repeat; 65 | } 66 | 67 | .hljs-symbol, 68 | .hljs-bullet, 69 | .hljs-link { 70 | color: #000; 71 | background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAKElEQVQIW2NkQAO7d+/+z4gsBhJwdXVlhAvCBECKwIIwAbhKZBUwBQA6hBpm5efZsgAAAABJRU5ErkJggg==) repeat; 72 | } 73 | 74 | .hljs-built_in, 75 | .hljs-builtin-name { 76 | color: #000; 77 | text-decoration: underline; 78 | } 79 | 80 | .hljs-meta { 81 | color: #999; 82 | font-weight: bold; 83 | } 84 | 85 | .hljs-deletion { 86 | color: #fff; 87 | background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAADCAYAAABS3WWCAAAAE0lEQVQIW2MMDQ39zzhz5kwIAQAyxweWgUHd1AAAAABJRU5ErkJggg==) repeat; 88 | } 89 | 90 | .hljs-addition { 91 | color: #000; 92 | background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJCAYAAADgkQYQAAAALUlEQVQYV2N89+7dfwYk8P79ewZBQUFkIQZGOiu6e/cuiptQHAPl0NtNxAQBAM97Oejj3Dg7AAAAAElFTkSuQmCC) repeat; 93 | } 94 | 95 | .hljs-emphasis { 96 | font-style: italic; 97 | } 98 | 99 | .hljs-strong { 100 | font-weight: bold; 101 | } 102 | -------------------------------------------------------------------------------- /www/static/highlight/styles/gruvbox-dark.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Gruvbox style (dark) (c) Pavel Pertsev (original style at https://github.com/morhetz/gruvbox) 4 | 5 | */ 6 | 7 | .hljs { 8 | display: block; 9 | overflow-x: auto; 10 | padding: 0.5em; 11 | background: #282828; 12 | } 13 | 14 | .hljs, 15 | .hljs-subst { 16 | color: #ebdbb2; 17 | } 18 | 19 | /* Gruvbox Red */ 20 | .hljs-deletion, 21 | .hljs-formula, 22 | .hljs-keyword, 23 | .hljs-link, 24 | .hljs-selector-tag { 25 | color: #fb4934; 26 | } 27 | 28 | /* Gruvbox Blue */ 29 | .hljs-built_in, 30 | .hljs-emphasis, 31 | .hljs-name, 32 | .hljs-quote, 33 | .hljs-strong, 34 | .hljs-title, 35 | .hljs-variable { 36 | color: #83a598; 37 | } 38 | 39 | /* Gruvbox Yellow */ 40 | .hljs-attr, 41 | .hljs-params, 42 | .hljs-template-tag, 43 | .hljs-type { 44 | color: #fabd2f; 45 | } 46 | 47 | /* Gruvbox Purple */ 48 | .hljs-builtin-name, 49 | .hljs-doctag, 50 | .hljs-literal, 51 | .hljs-number { 52 | color: #8f3f71; 53 | } 54 | 55 | /* Gruvbox Orange */ 56 | .hljs-code, 57 | .hljs-meta, 58 | .hljs-regexp, 59 | .hljs-selector-id, 60 | .hljs-template-variable { 61 | color: #fe8019; 62 | } 63 | 64 | /* Gruvbox Green */ 65 | .hljs-addition, 66 | .hljs-meta-string, 67 | .hljs-section, 68 | .hljs-selector-attr, 69 | .hljs-selector-class, 70 | .hljs-string, 71 | .hljs-symbol { 72 | color: #b8bb26; 73 | } 74 | 75 | /* Gruvbox Aqua */ 76 | .hljs-attribute, 77 | .hljs-bullet, 78 | .hljs-class, 79 | .hljs-function, 80 | .hljs-function .hljs-keyword, 81 | .hljs-meta-keyword, 82 | .hljs-selector-pseudo, 83 | .hljs-tag { 84 | color: #8ec07c; 85 | } 86 | 87 | /* Gruvbox Gray */ 88 | .hljs-comment { 89 | color: #928374; 90 | } 91 | 92 | /* Gruvbox Purple */ 93 | .hljs-link_label, 94 | .hljs-literal, 95 | .hljs-number { 96 | color: #d3869b; 97 | } 98 | 99 | .hljs-comment, 100 | .hljs-emphasis { 101 | font-style: italic; 102 | } 103 | 104 | .hljs-section, 105 | .hljs-strong, 106 | .hljs-tag { 107 | font-weight: bold; 108 | } 109 | -------------------------------------------------------------------------------- /www/static/highlight/styles/gruvbox-light.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Gruvbox style (light) (c) Pavel Pertsev (original style at https://github.com/morhetz/gruvbox) 4 | 5 | */ 6 | 7 | .hljs { 8 | display: block; 9 | overflow-x: auto; 10 | padding: 0.5em; 11 | background: #fbf1c7; 12 | } 13 | 14 | .hljs, 15 | .hljs-subst { 16 | color: #3c3836; 17 | } 18 | 19 | /* Gruvbox Red */ 20 | .hljs-deletion, 21 | .hljs-formula, 22 | .hljs-keyword, 23 | .hljs-link, 24 | .hljs-selector-tag { 25 | color: #9d0006; 26 | } 27 | 28 | /* Gruvbox Blue */ 29 | .hljs-built_in, 30 | .hljs-emphasis, 31 | .hljs-name, 32 | .hljs-quote, 33 | .hljs-strong, 34 | .hljs-title, 35 | .hljs-variable { 36 | color: #076678; 37 | } 38 | 39 | /* Gruvbox Yellow */ 40 | .hljs-attr, 41 | .hljs-params, 42 | .hljs-template-tag, 43 | .hljs-type { 44 | color: #b57614; 45 | } 46 | 47 | /* Gruvbox Purple */ 48 | .hljs-builtin-name, 49 | .hljs-doctag, 50 | .hljs-literal, 51 | .hljs-number { 52 | color: #8f3f71; 53 | } 54 | 55 | /* Gruvbox Orange */ 56 | .hljs-code, 57 | .hljs-meta, 58 | .hljs-regexp, 59 | .hljs-selector-id, 60 | .hljs-template-variable { 61 | color: #af3a03; 62 | } 63 | 64 | /* Gruvbox Green */ 65 | .hljs-addition, 66 | .hljs-meta-string, 67 | .hljs-section, 68 | .hljs-selector-attr, 69 | .hljs-selector-class, 70 | .hljs-string, 71 | .hljs-symbol { 72 | color: #79740e; 73 | } 74 | 75 | /* Gruvbox Aqua */ 76 | .hljs-attribute, 77 | .hljs-bullet, 78 | .hljs-class, 79 | .hljs-function, 80 | .hljs-function .hljs-keyword, 81 | .hljs-meta-keyword, 82 | .hljs-selector-pseudo, 83 | .hljs-tag { 84 | color: #427b58; 85 | } 86 | 87 | /* Gruvbox Gray */ 88 | .hljs-comment { 89 | color: #928374; 90 | } 91 | 92 | /* Gruvbox Purple */ 93 | .hljs-link_label, 94 | .hljs-literal, 95 | .hljs-number { 96 | color: #8f3f71; 97 | } 98 | 99 | .hljs-comment, 100 | .hljs-emphasis { 101 | font-style: italic; 102 | } 103 | 104 | .hljs-section, 105 | .hljs-strong, 106 | .hljs-tag { 107 | font-weight: bold; 108 | } 109 | -------------------------------------------------------------------------------- /www/static/highlight/styles/hopscotch.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Hopscotch 3 | * by Jan T. Sott 4 | * https://github.com/idleberg/Hopscotch 5 | * 6 | * This work is licensed under the Creative Commons CC0 1.0 Universal License 7 | */ 8 | 9 | /* Comment */ 10 | .hljs-comment, 11 | .hljs-quote { 12 | color: #989498; 13 | } 14 | 15 | /* Red */ 16 | .hljs-variable, 17 | .hljs-template-variable, 18 | .hljs-attribute, 19 | .hljs-tag, 20 | .hljs-name, 21 | .hljs-selector-id, 22 | .hljs-selector-class, 23 | .hljs-regexp, 24 | .hljs-link, 25 | .hljs-deletion { 26 | color: #dd464c; 27 | } 28 | 29 | /* Orange */ 30 | .hljs-number, 31 | .hljs-built_in, 32 | .hljs-builtin-name, 33 | .hljs-literal, 34 | .hljs-type, 35 | .hljs-params { 36 | color: #fd8b19; 37 | } 38 | 39 | /* Yellow */ 40 | .hljs-class .hljs-title { 41 | color: #fdcc59; 42 | } 43 | 44 | /* Green */ 45 | .hljs-string, 46 | .hljs-symbol, 47 | .hljs-bullet, 48 | .hljs-addition { 49 | color: #8fc13e; 50 | } 51 | 52 | /* Aqua */ 53 | .hljs-meta { 54 | color: #149b93; 55 | } 56 | 57 | /* Blue */ 58 | .hljs-function, 59 | .hljs-section, 60 | .hljs-title { 61 | color: #1290bf; 62 | } 63 | 64 | /* Purple */ 65 | .hljs-keyword, 66 | .hljs-selector-tag { 67 | color: #c85e7c; 68 | } 69 | 70 | .hljs { 71 | display: block; 72 | background: #322931; 73 | color: #b9b5b8; 74 | padding: 0.5em; 75 | } 76 | 77 | .hljs-emphasis { 78 | font-style: italic; 79 | } 80 | 81 | .hljs-strong { 82 | font-weight: bold; 83 | } 84 | -------------------------------------------------------------------------------- /www/static/highlight/styles/hybrid.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | vim-hybrid theme by w0ng (https://github.com/w0ng/vim-hybrid) 4 | 5 | */ 6 | 7 | /*background color*/ 8 | .hljs { 9 | display: block; 10 | overflow-x: auto; 11 | padding: 0.5em; 12 | background: #1d1f21; 13 | } 14 | 15 | /*selection color*/ 16 | .hljs::selection, 17 | .hljs span::selection { 18 | background: #373b41; 19 | } 20 | 21 | .hljs::-moz-selection, 22 | .hljs span::-moz-selection { 23 | background: #373b41; 24 | } 25 | 26 | /*foreground color*/ 27 | .hljs { 28 | color: #c5c8c6; 29 | } 30 | 31 | /*color: fg_yellow*/ 32 | .hljs-title, 33 | .hljs-name { 34 | color: #f0c674; 35 | } 36 | 37 | /*color: fg_comment*/ 38 | .hljs-comment, 39 | .hljs-meta, 40 | .hljs-meta .hljs-keyword { 41 | color: #707880; 42 | } 43 | 44 | /*color: fg_red*/ 45 | .hljs-number, 46 | .hljs-symbol, 47 | .hljs-literal, 48 | .hljs-deletion, 49 | .hljs-link { 50 | color: #cc6666 51 | } 52 | 53 | /*color: fg_green*/ 54 | .hljs-string, 55 | .hljs-doctag, 56 | .hljs-addition, 57 | .hljs-regexp, 58 | .hljs-selector-attr, 59 | .hljs-selector-pseudo { 60 | color: #b5bd68; 61 | } 62 | 63 | /*color: fg_purple*/ 64 | .hljs-attribute, 65 | .hljs-code, 66 | .hljs-selector-id { 67 | color: #b294bb; 68 | } 69 | 70 | /*color: fg_blue*/ 71 | .hljs-keyword, 72 | .hljs-selector-tag, 73 | .hljs-bullet, 74 | .hljs-tag { 75 | color: #81a2be; 76 | } 77 | 78 | /*color: fg_aqua*/ 79 | .hljs-subst, 80 | .hljs-variable, 81 | .hljs-template-tag, 82 | .hljs-template-variable { 83 | color: #8abeb7; 84 | } 85 | 86 | /*color: fg_orange*/ 87 | .hljs-type, 88 | .hljs-built_in, 89 | .hljs-builtin-name, 90 | .hljs-quote, 91 | .hljs-section, 92 | .hljs-selector-class { 93 | color: #de935f; 94 | } 95 | 96 | .hljs-emphasis { 97 | font-style: italic; 98 | } 99 | 100 | .hljs-strong { 101 | font-weight: bold; 102 | } 103 | -------------------------------------------------------------------------------- /www/static/highlight/styles/idea.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Intellij Idea-like styling (c) Vasily Polovnyov 4 | 5 | */ 6 | 7 | .hljs { 8 | display: block; 9 | overflow-x: auto; 10 | padding: 0.5em; 11 | color: #000; 12 | background: #fff; 13 | } 14 | 15 | .hljs-subst, 16 | .hljs-title { 17 | font-weight: normal; 18 | color: #000; 19 | } 20 | 21 | .hljs-comment, 22 | .hljs-quote { 23 | color: #808080; 24 | font-style: italic; 25 | } 26 | 27 | .hljs-meta { 28 | color: #808000; 29 | } 30 | 31 | .hljs-tag { 32 | background: #efefef; 33 | } 34 | 35 | .hljs-section, 36 | .hljs-name, 37 | .hljs-literal, 38 | .hljs-keyword, 39 | .hljs-selector-tag, 40 | .hljs-type, 41 | .hljs-selector-id, 42 | .hljs-selector-class { 43 | font-weight: bold; 44 | color: #000080; 45 | } 46 | 47 | .hljs-attribute, 48 | .hljs-number, 49 | .hljs-regexp, 50 | .hljs-link { 51 | font-weight: bold; 52 | color: #0000ff; 53 | } 54 | 55 | .hljs-number, 56 | .hljs-regexp, 57 | .hljs-link { 58 | font-weight: normal; 59 | } 60 | 61 | .hljs-string { 62 | color: #008000; 63 | font-weight: bold; 64 | } 65 | 66 | .hljs-symbol, 67 | .hljs-bullet, 68 | .hljs-formula { 69 | color: #000; 70 | background: #d0eded; 71 | font-style: italic; 72 | } 73 | 74 | .hljs-doctag { 75 | text-decoration: underline; 76 | } 77 | 78 | .hljs-variable, 79 | .hljs-template-variable { 80 | color: #660e7a; 81 | } 82 | 83 | .hljs-addition { 84 | background: #baeeba; 85 | } 86 | 87 | .hljs-deletion { 88 | background: #ffc8bd; 89 | } 90 | 91 | .hljs-emphasis { 92 | font-style: italic; 93 | } 94 | 95 | .hljs-strong { 96 | font-weight: bold; 97 | } 98 | -------------------------------------------------------------------------------- /www/static/highlight/styles/ir-black.css: -------------------------------------------------------------------------------- 1 | /* 2 | IR_Black style (c) Vasily Mikhailitchenko 3 | */ 4 | 5 | .hljs { 6 | display: block; 7 | overflow-x: auto; 8 | padding: 0.5em; 9 | background: #000; 10 | color: #f8f8f8; 11 | } 12 | 13 | .hljs-comment, 14 | .hljs-quote, 15 | .hljs-meta { 16 | color: #7c7c7c; 17 | } 18 | 19 | .hljs-keyword, 20 | .hljs-selector-tag, 21 | .hljs-tag, 22 | .hljs-name { 23 | color: #96cbfe; 24 | } 25 | 26 | .hljs-attribute, 27 | .hljs-selector-id { 28 | color: #ffffb6; 29 | } 30 | 31 | .hljs-string, 32 | .hljs-selector-attr, 33 | .hljs-selector-pseudo, 34 | .hljs-addition { 35 | color: #a8ff60; 36 | } 37 | 38 | .hljs-subst { 39 | color: #daefa3; 40 | } 41 | 42 | .hljs-regexp, 43 | .hljs-link { 44 | color: #e9c062; 45 | } 46 | 47 | .hljs-title, 48 | .hljs-section, 49 | .hljs-type, 50 | .hljs-doctag { 51 | color: #ffffb6; 52 | } 53 | 54 | .hljs-symbol, 55 | .hljs-bullet, 56 | .hljs-variable, 57 | .hljs-template-variable, 58 | .hljs-literal { 59 | color: #c6c5fe; 60 | } 61 | 62 | .hljs-number, 63 | .hljs-deletion { 64 | color:#ff73fd; 65 | } 66 | 67 | .hljs-emphasis { 68 | font-style: italic; 69 | } 70 | 71 | .hljs-strong { 72 | font-weight: bold; 73 | } 74 | -------------------------------------------------------------------------------- /www/static/highlight/styles/kimbie.dark.css: -------------------------------------------------------------------------------- 1 | /* 2 | Name: Kimbie (dark) 3 | Author: Jan T. Sott 4 | License: Creative Commons Attribution-ShareAlike 4.0 Unported License 5 | URL: https://github.com/idleberg/Kimbie-highlight.js 6 | */ 7 | 8 | /* Kimbie Comment */ 9 | .hljs-comment, 10 | .hljs-quote { 11 | color: #d6baad; 12 | } 13 | 14 | /* Kimbie Red */ 15 | .hljs-variable, 16 | .hljs-template-variable, 17 | .hljs-tag, 18 | .hljs-name, 19 | .hljs-selector-id, 20 | .hljs-selector-class, 21 | .hljs-regexp, 22 | .hljs-meta { 23 | color: #dc3958; 24 | } 25 | 26 | /* Kimbie Orange */ 27 | .hljs-number, 28 | .hljs-built_in, 29 | .hljs-builtin-name, 30 | .hljs-literal, 31 | .hljs-type, 32 | .hljs-params, 33 | .hljs-deletion, 34 | .hljs-link { 35 | color: #f79a32; 36 | } 37 | 38 | /* Kimbie Yellow */ 39 | .hljs-title, 40 | .hljs-section, 41 | .hljs-attribute { 42 | color: #f06431; 43 | } 44 | 45 | /* Kimbie Green */ 46 | .hljs-string, 47 | .hljs-symbol, 48 | .hljs-bullet, 49 | .hljs-addition { 50 | color: #889b4a; 51 | } 52 | 53 | /* Kimbie Purple */ 54 | .hljs-keyword, 55 | .hljs-selector-tag, 56 | .hljs-function { 57 | color: #98676a; 58 | } 59 | 60 | .hljs { 61 | display: block; 62 | overflow-x: auto; 63 | background: #221a0f; 64 | color: #d3af86; 65 | padding: 0.5em; 66 | } 67 | 68 | .hljs-emphasis { 69 | font-style: italic; 70 | } 71 | 72 | .hljs-strong { 73 | font-weight: bold; 74 | } 75 | -------------------------------------------------------------------------------- /www/static/highlight/styles/kimbie.light.css: -------------------------------------------------------------------------------- 1 | /* 2 | Name: Kimbie (light) 3 | Author: Jan T. Sott 4 | License: Creative Commons Attribution-ShareAlike 4.0 Unported License 5 | URL: https://github.com/idleberg/Kimbie-highlight.js 6 | */ 7 | 8 | /* Kimbie Comment */ 9 | .hljs-comment, 10 | .hljs-quote { 11 | color: #a57a4c; 12 | } 13 | 14 | /* Kimbie Red */ 15 | .hljs-variable, 16 | .hljs-template-variable, 17 | .hljs-tag, 18 | .hljs-name, 19 | .hljs-selector-id, 20 | .hljs-selector-class, 21 | .hljs-regexp, 22 | .hljs-meta { 23 | color: #dc3958; 24 | } 25 | 26 | /* Kimbie Orange */ 27 | .hljs-number, 28 | .hljs-built_in, 29 | .hljs-builtin-name, 30 | .hljs-literal, 31 | .hljs-type, 32 | .hljs-params, 33 | .hljs-deletion, 34 | .hljs-link { 35 | color: #f79a32; 36 | } 37 | 38 | /* Kimbie Yellow */ 39 | .hljs-title, 40 | .hljs-section, 41 | .hljs-attribute { 42 | color: #f06431; 43 | } 44 | 45 | /* Kimbie Green */ 46 | .hljs-string, 47 | .hljs-symbol, 48 | .hljs-bullet, 49 | .hljs-addition { 50 | color: #889b4a; 51 | } 52 | 53 | /* Kimbie Purple */ 54 | .hljs-keyword, 55 | .hljs-selector-tag, 56 | .hljs-function { 57 | color: #98676a; 58 | } 59 | 60 | .hljs { 61 | display: block; 62 | overflow-x: auto; 63 | background: #fbebd4; 64 | color: #84613d; 65 | padding: 0.5em; 66 | } 67 | 68 | .hljs-emphasis { 69 | font-style: italic; 70 | } 71 | 72 | .hljs-strong { 73 | font-weight: bold; 74 | } 75 | -------------------------------------------------------------------------------- /www/static/highlight/styles/magula.css: -------------------------------------------------------------------------------- 1 | /* 2 | Description: Magula style for highligh.js 3 | Author: Ruslan Keba 4 | Website: http://rukeba.com/ 5 | Version: 1.0 6 | Date: 2009-01-03 7 | Music: Aphex Twin / Xtal 8 | */ 9 | 10 | .hljs { 11 | display: block; 12 | overflow-x: auto; 13 | padding: 0.5em; 14 | background-color: #f4f4f4; 15 | } 16 | 17 | .hljs, 18 | .hljs-subst { 19 | color: black; 20 | } 21 | 22 | .hljs-string, 23 | .hljs-title, 24 | .hljs-symbol, 25 | .hljs-bullet, 26 | .hljs-attribute, 27 | .hljs-addition, 28 | .hljs-variable, 29 | .hljs-template-tag, 30 | .hljs-template-variable { 31 | color: #050; 32 | } 33 | 34 | .hljs-comment, 35 | .hljs-quote { 36 | color: #777; 37 | } 38 | 39 | .hljs-number, 40 | .hljs-regexp, 41 | .hljs-literal, 42 | .hljs-type, 43 | .hljs-link { 44 | color: #800; 45 | } 46 | 47 | .hljs-deletion, 48 | .hljs-meta { 49 | color: #00e; 50 | } 51 | 52 | .hljs-keyword, 53 | .hljs-selector-tag, 54 | .hljs-doctag, 55 | .hljs-title, 56 | .hljs-section, 57 | .hljs-built_in, 58 | .hljs-tag, 59 | .hljs-name { 60 | font-weight: bold; 61 | color: navy; 62 | } 63 | 64 | .hljs-emphasis { 65 | font-style: italic; 66 | } 67 | 68 | .hljs-strong { 69 | font-weight: bold; 70 | } 71 | -------------------------------------------------------------------------------- /www/static/highlight/styles/mono-blue.css: -------------------------------------------------------------------------------- 1 | /* 2 | Five-color theme from a single blue hue. 3 | */ 4 | .hljs { 5 | display: block; 6 | overflow-x: auto; 7 | padding: 0.5em; 8 | background: #eaeef3; 9 | } 10 | 11 | .hljs { 12 | color: #00193a; 13 | } 14 | 15 | .hljs-keyword, 16 | .hljs-selector-tag, 17 | .hljs-title, 18 | .hljs-section, 19 | .hljs-doctag, 20 | .hljs-name, 21 | .hljs-strong { 22 | font-weight: bold; 23 | } 24 | 25 | .hljs-comment { 26 | color: #738191; 27 | } 28 | 29 | .hljs-string, 30 | .hljs-title, 31 | .hljs-section, 32 | .hljs-built_in, 33 | .hljs-literal, 34 | .hljs-type, 35 | .hljs-addition, 36 | .hljs-tag, 37 | .hljs-quote, 38 | .hljs-name, 39 | .hljs-selector-id, 40 | .hljs-selector-class { 41 | color: #0048ab; 42 | } 43 | 44 | .hljs-meta, 45 | .hljs-subst, 46 | .hljs-symbol, 47 | .hljs-regexp, 48 | .hljs-attribute, 49 | .hljs-deletion, 50 | .hljs-variable, 51 | .hljs-template-variable, 52 | .hljs-link, 53 | .hljs-bullet { 54 | color: #4c81c9; 55 | } 56 | 57 | .hljs-emphasis { 58 | font-style: italic; 59 | } 60 | -------------------------------------------------------------------------------- /www/static/highlight/styles/monokai-sublime.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Monokai Sublime style. Derived from Monokai by noformnocontent http://nn.mit-license.org/ 4 | 5 | */ 6 | 7 | .hljs { 8 | display: block; 9 | overflow-x: auto; 10 | padding: 0.5em; 11 | background: #23241f; 12 | } 13 | 14 | .hljs, 15 | .hljs-tag, 16 | .hljs-subst { 17 | color: #f8f8f2; 18 | } 19 | 20 | .hljs-strong, 21 | .hljs-emphasis { 22 | color: #a8a8a2; 23 | } 24 | 25 | .hljs-bullet, 26 | .hljs-quote, 27 | .hljs-number, 28 | .hljs-regexp, 29 | .hljs-literal, 30 | .hljs-link { 31 | color: #ae81ff; 32 | } 33 | 34 | .hljs-code, 35 | .hljs-title, 36 | .hljs-section, 37 | .hljs-selector-class { 38 | color: #a6e22e; 39 | } 40 | 41 | .hljs-strong { 42 | font-weight: bold; 43 | } 44 | 45 | .hljs-emphasis { 46 | font-style: italic; 47 | } 48 | 49 | .hljs-keyword, 50 | .hljs-selector-tag, 51 | .hljs-name, 52 | .hljs-attr { 53 | color: #f92672; 54 | } 55 | 56 | .hljs-function .hljs-keyword, 57 | .hljs-symbol, 58 | .hljs-attribute { 59 | color: #66d9ef; 60 | } 61 | 62 | .hljs-params, 63 | .hljs-class .hljs-title { 64 | color: #f8f8f2; 65 | } 66 | 67 | .hljs-string, 68 | .hljs-type, 69 | .hljs-built_in, 70 | .hljs-builtin-name, 71 | .hljs-selector-id, 72 | .hljs-selector-attr, 73 | .hljs-selector-pseudo, 74 | .hljs-addition, 75 | .hljs-variable, 76 | .hljs-template-variable { 77 | color: #e6db74; 78 | } 79 | 80 | .hljs-comment, 81 | .hljs-deletion, 82 | .hljs-meta { 83 | color: #75715e; 84 | } 85 | -------------------------------------------------------------------------------- /www/static/highlight/styles/monokai.css: -------------------------------------------------------------------------------- 1 | /* 2 | Monokai style - ported by Luigi Maselli - http://grigio.org 3 | */ 4 | 5 | .hljs { 6 | display: block; 7 | overflow-x: auto; 8 | padding: 0.5em; 9 | background: #272822; color: #ddd; 10 | } 11 | 12 | .hljs-tag, 13 | .hljs-keyword, 14 | .hljs-selector-tag, 15 | .hljs-literal, 16 | .hljs-strong, 17 | .hljs-name { 18 | color: #f92672; 19 | } 20 | 21 | .hljs-code { 22 | color: #66d9ef; 23 | } 24 | 25 | .hljs-class .hljs-title { 26 | color: white; 27 | } 28 | 29 | .hljs-attribute, 30 | .hljs-symbol, 31 | .hljs-regexp, 32 | .hljs-link { 33 | color: #bf79db; 34 | } 35 | 36 | .hljs-string, 37 | .hljs-bullet, 38 | .hljs-subst, 39 | .hljs-title, 40 | .hljs-section, 41 | .hljs-emphasis, 42 | .hljs-type, 43 | .hljs-built_in, 44 | .hljs-builtin-name, 45 | .hljs-selector-attr, 46 | .hljs-selector-pseudo, 47 | .hljs-addition, 48 | .hljs-variable, 49 | .hljs-template-tag, 50 | .hljs-template-variable { 51 | color: #a6e22e; 52 | } 53 | 54 | .hljs-comment, 55 | .hljs-quote, 56 | .hljs-deletion, 57 | .hljs-meta { 58 | color: #75715e; 59 | } 60 | 61 | .hljs-keyword, 62 | .hljs-selector-tag, 63 | .hljs-literal, 64 | .hljs-doctag, 65 | .hljs-title, 66 | .hljs-section, 67 | .hljs-type, 68 | .hljs-selector-id { 69 | font-weight: bold; 70 | } 71 | -------------------------------------------------------------------------------- /www/static/highlight/styles/obsidian.css: -------------------------------------------------------------------------------- 1 | /** 2 | * Obsidian style 3 | * ported by Alexander Marenin (http://github.com/ioncreature) 4 | */ 5 | 6 | .hljs { 7 | display: block; 8 | overflow-x: auto; 9 | padding: 0.5em; 10 | background: #282b2e; 11 | } 12 | 13 | .hljs-keyword, 14 | .hljs-selector-tag, 15 | .hljs-literal, 16 | .hljs-selector-id { 17 | color: #93c763; 18 | } 19 | 20 | .hljs-number { 21 | color: #ffcd22; 22 | } 23 | 24 | .hljs { 25 | color: #e0e2e4; 26 | } 27 | 28 | .hljs-attribute { 29 | color: #668bb0; 30 | } 31 | 32 | .hljs-code, 33 | .hljs-class .hljs-title, 34 | .hljs-section { 35 | color: white; 36 | } 37 | 38 | .hljs-regexp, 39 | .hljs-link { 40 | color: #d39745; 41 | } 42 | 43 | .hljs-meta { 44 | color: #557182; 45 | } 46 | 47 | .hljs-tag, 48 | .hljs-name, 49 | .hljs-bullet, 50 | .hljs-subst, 51 | .hljs-emphasis, 52 | .hljs-type, 53 | .hljs-built_in, 54 | .hljs-selector-attr, 55 | .hljs-selector-pseudo, 56 | .hljs-addition, 57 | .hljs-variable, 58 | .hljs-template-tag, 59 | .hljs-template-variable { 60 | color: #8cbbad; 61 | } 62 | 63 | .hljs-string, 64 | .hljs-symbol { 65 | color: #ec7600; 66 | } 67 | 68 | .hljs-comment, 69 | .hljs-quote, 70 | .hljs-deletion { 71 | color: #818e96; 72 | } 73 | 74 | .hljs-selector-class { 75 | color: #A082BD 76 | } 77 | 78 | .hljs-keyword, 79 | .hljs-selector-tag, 80 | .hljs-literal, 81 | .hljs-doctag, 82 | .hljs-title, 83 | .hljs-section, 84 | .hljs-type, 85 | .hljs-name, 86 | .hljs-strong { 87 | font-weight: bold; 88 | } 89 | -------------------------------------------------------------------------------- /www/static/highlight/styles/ocean.css: -------------------------------------------------------------------------------- 1 | /* Ocean Dark Theme */ 2 | /* https://github.com/gavsiu */ 3 | /* Original theme - https://github.com/chriskempson/base16 */ 4 | 5 | /* Ocean Comment */ 6 | .hljs-comment, 7 | .hljs-quote { 8 | color: #65737e; 9 | } 10 | 11 | /* Ocean Red */ 12 | .hljs-variable, 13 | .hljs-template-variable, 14 | .hljs-tag, 15 | .hljs-name, 16 | .hljs-selector-id, 17 | .hljs-selector-class, 18 | .hljs-regexp, 19 | .hljs-deletion { 20 | color: #bf616a; 21 | } 22 | 23 | /* Ocean Orange */ 24 | .hljs-number, 25 | .hljs-built_in, 26 | .hljs-builtin-name, 27 | .hljs-literal, 28 | .hljs-type, 29 | .hljs-params, 30 | .hljs-meta, 31 | .hljs-link { 32 | color: #d08770; 33 | } 34 | 35 | /* Ocean Yellow */ 36 | .hljs-attribute { 37 | color: #ebcb8b; 38 | } 39 | 40 | /* Ocean Green */ 41 | .hljs-string, 42 | .hljs-symbol, 43 | .hljs-bullet, 44 | .hljs-addition { 45 | color: #a3be8c; 46 | } 47 | 48 | /* Ocean Blue */ 49 | .hljs-title, 50 | .hljs-section { 51 | color: #8fa1b3; 52 | } 53 | 54 | /* Ocean Purple */ 55 | .hljs-keyword, 56 | .hljs-selector-tag { 57 | color: #b48ead; 58 | } 59 | 60 | .hljs { 61 | display: block; 62 | overflow-x: auto; 63 | background: #2b303b; 64 | color: #c0c5ce; 65 | padding: 0.5em; 66 | } 67 | 68 | .hljs-emphasis { 69 | font-style: italic; 70 | } 71 | 72 | .hljs-strong { 73 | font-weight: bold; 74 | } 75 | -------------------------------------------------------------------------------- /www/static/highlight/styles/paraiso-dark.css: -------------------------------------------------------------------------------- 1 | /* 2 | Paraíso (dark) 3 | Created by Jan T. Sott (http://github.com/idleberg) 4 | Inspired by the art of Rubens LP (http://www.rubenslp.com.br) 5 | */ 6 | 7 | /* Paraíso Comment */ 8 | .hljs-comment, 9 | .hljs-quote { 10 | color: #8d8687; 11 | } 12 | 13 | /* Paraíso Red */ 14 | .hljs-variable, 15 | .hljs-template-variable, 16 | .hljs-tag, 17 | .hljs-name, 18 | .hljs-selector-id, 19 | .hljs-selector-class, 20 | .hljs-regexp, 21 | .hljs-link, 22 | .hljs-meta { 23 | color: #ef6155; 24 | } 25 | 26 | /* Paraíso Orange */ 27 | .hljs-number, 28 | .hljs-built_in, 29 | .hljs-builtin-name, 30 | .hljs-literal, 31 | .hljs-type, 32 | .hljs-params, 33 | .hljs-deletion { 34 | color: #f99b15; 35 | } 36 | 37 | /* Paraíso Yellow */ 38 | .hljs-title, 39 | .hljs-section, 40 | .hljs-attribute { 41 | color: #fec418; 42 | } 43 | 44 | /* Paraíso Green */ 45 | .hljs-string, 46 | .hljs-symbol, 47 | .hljs-bullet, 48 | .hljs-addition { 49 | color: #48b685; 50 | } 51 | 52 | /* Paraíso Purple */ 53 | .hljs-keyword, 54 | .hljs-selector-tag { 55 | color: #815ba4; 56 | } 57 | 58 | .hljs { 59 | display: block; 60 | overflow-x: auto; 61 | background: #2f1e2e; 62 | color: #a39e9b; 63 | padding: 0.5em; 64 | } 65 | 66 | .hljs-emphasis { 67 | font-style: italic; 68 | } 69 | 70 | .hljs-strong { 71 | font-weight: bold; 72 | } 73 | -------------------------------------------------------------------------------- /www/static/highlight/styles/paraiso-light.css: -------------------------------------------------------------------------------- 1 | /* 2 | Paraíso (light) 3 | Created by Jan T. Sott (http://github.com/idleberg) 4 | Inspired by the art of Rubens LP (http://www.rubenslp.com.br) 5 | */ 6 | 7 | /* Paraíso Comment */ 8 | .hljs-comment, 9 | .hljs-quote { 10 | color: #776e71; 11 | } 12 | 13 | /* Paraíso Red */ 14 | .hljs-variable, 15 | .hljs-template-variable, 16 | .hljs-tag, 17 | .hljs-name, 18 | .hljs-selector-id, 19 | .hljs-selector-class, 20 | .hljs-regexp, 21 | .hljs-link, 22 | .hljs-meta { 23 | color: #ef6155; 24 | } 25 | 26 | /* Paraíso Orange */ 27 | .hljs-number, 28 | .hljs-built_in, 29 | .hljs-builtin-name, 30 | .hljs-literal, 31 | .hljs-type, 32 | .hljs-params, 33 | .hljs-deletion { 34 | color: #f99b15; 35 | } 36 | 37 | /* Paraíso Yellow */ 38 | .hljs-title, 39 | .hljs-section, 40 | .hljs-attribute { 41 | color: #fec418; 42 | } 43 | 44 | /* Paraíso Green */ 45 | .hljs-string, 46 | .hljs-symbol, 47 | .hljs-bullet, 48 | .hljs-addition { 49 | color: #48b685; 50 | } 51 | 52 | /* Paraíso Purple */ 53 | .hljs-keyword, 54 | .hljs-selector-tag { 55 | color: #815ba4; 56 | } 57 | 58 | .hljs { 59 | display: block; 60 | overflow-x: auto; 61 | background: #e7e9db; 62 | color: #4f424c; 63 | padding: 0.5em; 64 | } 65 | 66 | .hljs-emphasis { 67 | font-style: italic; 68 | } 69 | 70 | .hljs-strong { 71 | font-weight: bold; 72 | } 73 | -------------------------------------------------------------------------------- /www/static/highlight/styles/pojoaque.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Pojoaque Style by Jason Tate 4 | http://web-cms-designs.com/ftopict-10-pojoaque-style-for-highlight-js-code-highlighter.html 5 | Based on Solarized Style from http://ethanschoonover.com/solarized 6 | 7 | */ 8 | 9 | .hljs { 10 | display: block; 11 | overflow-x: auto; 12 | padding: 0.5em; 13 | color: #dccf8f; 14 | background: url(./pojoaque.jpg) repeat scroll left top #181914; 15 | } 16 | 17 | .hljs-comment, 18 | .hljs-quote { 19 | color: #586e75; 20 | font-style: italic; 21 | } 22 | 23 | .hljs-keyword, 24 | .hljs-selector-tag, 25 | .hljs-literal, 26 | .hljs-addition { 27 | color: #b64926; 28 | } 29 | 30 | .hljs-number, 31 | .hljs-string, 32 | .hljs-doctag, 33 | .hljs-regexp { 34 | color: #468966; 35 | } 36 | 37 | .hljs-title, 38 | .hljs-section, 39 | .hljs-built_in, 40 | .hljs-name { 41 | color: #ffb03b; 42 | } 43 | 44 | .hljs-variable, 45 | .hljs-template-variable, 46 | .hljs-class .hljs-title, 47 | .hljs-type, 48 | .hljs-tag { 49 | color: #b58900; 50 | } 51 | 52 | .hljs-attribute { 53 | color: #b89859; 54 | } 55 | 56 | .hljs-symbol, 57 | .hljs-bullet, 58 | .hljs-link, 59 | .hljs-subst, 60 | .hljs-meta { 61 | color: #cb4b16; 62 | } 63 | 64 | .hljs-deletion { 65 | color: #dc322f; 66 | } 67 | 68 | .hljs-selector-id, 69 | .hljs-selector-class { 70 | color: #d3a60c; 71 | } 72 | 73 | .hljs-formula { 74 | background: #073642; 75 | } 76 | 77 | .hljs-emphasis { 78 | font-style: italic; 79 | } 80 | 81 | .hljs-strong { 82 | font-weight: bold; 83 | } 84 | -------------------------------------------------------------------------------- /www/static/highlight/styles/pojoaque.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itorr/smartisanBlog/0e132b5e16c4b08b327ef1dc83f0966e7e6bf5d7/www/static/highlight/styles/pojoaque.jpg -------------------------------------------------------------------------------- /www/static/highlight/styles/purebasic.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | PureBASIC native IDE style ( version 1.0 - April 2016 ) 4 | 5 | by Tristano Ajmone 6 | 7 | Public Domain 8 | 9 | NOTE_1: PureBASIC code syntax highlighting only applies the following classes: 10 | .hljs-comment 11 | .hljs-function 12 | .hljs-keywords 13 | .hljs-string 14 | .hljs-symbol 15 | 16 | Other classes are added here for the benefit of styling other languages with the look and feel of PureBASIC native IDE style. 17 | If you need to customize a stylesheet for PureBASIC only, remove all non-relevant classes -- PureBASIC-related classes are followed by 18 | a "--- used for PureBASIC ... ---" comment on same line. 19 | 20 | NOTE_2: Color names provided in comments were derived using "Name that Color" online tool: 21 | http://chir.ag/projects/name-that-color 22 | */ 23 | 24 | .hljs { /* Common set of rules required by highlight.js (don'r remove!) */ 25 | display: block; 26 | overflow-x: auto; 27 | padding: 0.5em; 28 | background: #FFFFDF; /* Half and Half (approx.) */ 29 | /* --- Uncomment to add PureBASIC native IDE styled font! 30 | font-family: Consolas; 31 | */ 32 | } 33 | 34 | .hljs, /* --- used for PureBASIC base color --- */ 35 | .hljs-type, /* --- used for PureBASIC Procedures return type --- */ 36 | .hljs-function, /* --- used for wrapping PureBASIC Procedures definitions --- */ 37 | .hljs-name, 38 | .hljs-number, 39 | .hljs-attr, 40 | .hljs-params, 41 | .hljs-subst { 42 | color: #000000; /* Black */ 43 | } 44 | 45 | .hljs-comment, /* --- used for PureBASIC Comments --- */ 46 | .hljs-regexp, 47 | .hljs-section, 48 | .hljs-selector-pseudo, 49 | .hljs-addition { 50 | color: #00AAAA; /* Persian Green (approx.) */ 51 | } 52 | 53 | .hljs-title, /* --- used for PureBASIC Procedures Names --- */ 54 | .hljs-tag, 55 | .hljs-variable, 56 | .hljs-code { 57 | color: #006666; /* Blue Stone (approx.) */ 58 | } 59 | 60 | .hljs-keyword, /* --- used for PureBASIC Keywords --- */ 61 | .hljs-class, 62 | .hljs-meta-keyword, 63 | .hljs-selector-class, 64 | .hljs-built_in, 65 | .hljs-builtin-name { 66 | color: #006666; /* Blue Stone (approx.) */ 67 | font-weight: bold; 68 | } 69 | 70 | .hljs-string, /* --- used for PureBASIC Strings --- */ 71 | .hljs-selector-attr { 72 | color: #0080FF; /* Azure Radiance (approx.) */ 73 | } 74 | 75 | .hljs-symbol, /* --- used for PureBASIC Constants --- */ 76 | .hljs-link, 77 | .hljs-deletion, 78 | .hljs-attribute { 79 | color: #924B72; /* Cannon Pink (approx.) */ 80 | } 81 | 82 | .hljs-meta, 83 | .hljs-literal, 84 | .hljs-selector-id { 85 | color: #924B72; /* Cannon Pink (approx.) */ 86 | font-weight: bold; 87 | } 88 | 89 | .hljs-strong, 90 | .hljs-name { 91 | font-weight: bold; 92 | } 93 | 94 | .hljs-emphasis { 95 | font-style: italic; 96 | } 97 | -------------------------------------------------------------------------------- /www/static/highlight/styles/qtcreator_dark.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Qt Creator dark color scheme 4 | 5 | */ 6 | 7 | 8 | .hljs { 9 | display: block; 10 | overflow-x: auto; 11 | padding: 0.5em; 12 | background: #000000; 13 | } 14 | 15 | .hljs, 16 | .hljs-subst, 17 | .hljs-tag, 18 | .hljs-title { 19 | color: #aaaaaa; 20 | } 21 | 22 | .hljs-strong, 23 | .hljs-emphasis { 24 | color: #a8a8a2; 25 | } 26 | 27 | .hljs-bullet, 28 | .hljs-quote, 29 | .hljs-number, 30 | .hljs-regexp, 31 | .hljs-literal { 32 | color: #ff55ff; 33 | } 34 | 35 | .hljs-code 36 | .hljs-selector-class { 37 | color: #aaaaff; 38 | } 39 | 40 | .hljs-emphasis, 41 | .hljs-stronge, 42 | .hljs-type { 43 | font-style: italic; 44 | } 45 | 46 | .hljs-keyword, 47 | .hljs-selector-tag, 48 | .hljs-function, 49 | .hljs-section, 50 | .hljs-symbol, 51 | .hljs-name { 52 | color: #ffff55; 53 | } 54 | 55 | .hljs-attribute { 56 | color: #ff5555; 57 | } 58 | 59 | .hljs-variable, 60 | .hljs-params, 61 | .hljs-class .hljs-title { 62 | color: #8888ff; 63 | } 64 | 65 | .hljs-string, 66 | .hljs-selector-id, 67 | .hljs-selector-attr, 68 | .hljs-selector-pseudo, 69 | .hljs-type, 70 | .hljs-built_in, 71 | .hljs-builtin-name, 72 | .hljs-template-tag, 73 | .hljs-template-variable, 74 | .hljs-addition, 75 | .hljs-link { 76 | color: #ff55ff; 77 | } 78 | 79 | .hljs-comment, 80 | .hljs-meta, 81 | .hljs-deletion { 82 | color: #55ffff; 83 | } 84 | -------------------------------------------------------------------------------- /www/static/highlight/styles/qtcreator_light.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Qt Creator light color scheme 4 | 5 | */ 6 | 7 | 8 | .hljs { 9 | display: block; 10 | overflow-x: auto; 11 | padding: 0.5em; 12 | background: #ffffff; 13 | } 14 | 15 | .hljs, 16 | .hljs-subst, 17 | .hljs-tag, 18 | .hljs-title { 19 | color: #000000; 20 | } 21 | 22 | .hljs-strong, 23 | .hljs-emphasis { 24 | color: #000000; 25 | } 26 | 27 | .hljs-bullet, 28 | .hljs-quote, 29 | .hljs-number, 30 | .hljs-regexp, 31 | .hljs-literal { 32 | color: #000080; 33 | } 34 | 35 | .hljs-code 36 | .hljs-selector-class { 37 | color: #800080; 38 | } 39 | 40 | .hljs-emphasis, 41 | .hljs-stronge, 42 | .hljs-type { 43 | font-style: italic; 44 | } 45 | 46 | .hljs-keyword, 47 | .hljs-selector-tag, 48 | .hljs-function, 49 | .hljs-section, 50 | .hljs-symbol, 51 | .hljs-name { 52 | color: #808000; 53 | } 54 | 55 | .hljs-attribute { 56 | color: #800000; 57 | } 58 | 59 | .hljs-variable, 60 | .hljs-params, 61 | .hljs-class .hljs-title { 62 | color: #0055AF; 63 | } 64 | 65 | .hljs-string, 66 | .hljs-selector-id, 67 | .hljs-selector-attr, 68 | .hljs-selector-pseudo, 69 | .hljs-type, 70 | .hljs-built_in, 71 | .hljs-builtin-name, 72 | .hljs-template-tag, 73 | .hljs-template-variable, 74 | .hljs-addition, 75 | .hljs-link { 76 | color: #008000; 77 | } 78 | 79 | .hljs-comment, 80 | .hljs-meta, 81 | .hljs-deletion { 82 | color: #008000; 83 | } 84 | -------------------------------------------------------------------------------- /www/static/highlight/styles/railscasts.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Railscasts-like style (c) Visoft, Inc. (Damien White) 4 | 5 | */ 6 | 7 | .hljs { 8 | display: block; 9 | overflow-x: auto; 10 | padding: 0.5em; 11 | background: #232323; 12 | color: #e6e1dc; 13 | } 14 | 15 | .hljs-comment, 16 | .hljs-quote { 17 | color: #bc9458; 18 | font-style: italic; 19 | } 20 | 21 | .hljs-keyword, 22 | .hljs-selector-tag { 23 | color: #c26230; 24 | } 25 | 26 | .hljs-string, 27 | .hljs-number, 28 | .hljs-regexp, 29 | .hljs-variable, 30 | .hljs-template-variable { 31 | color: #a5c261; 32 | } 33 | 34 | .hljs-subst { 35 | color: #519f50; 36 | } 37 | 38 | .hljs-tag, 39 | .hljs-name { 40 | color: #e8bf6a; 41 | } 42 | 43 | .hljs-type { 44 | color: #da4939; 45 | } 46 | 47 | 48 | .hljs-symbol, 49 | .hljs-bullet, 50 | .hljs-built_in, 51 | .hljs-builtin-name, 52 | .hljs-attr, 53 | .hljs-link { 54 | color: #6d9cbe; 55 | } 56 | 57 | .hljs-params { 58 | color: #d0d0ff; 59 | } 60 | 61 | .hljs-attribute { 62 | color: #cda869; 63 | } 64 | 65 | .hljs-meta { 66 | color: #9b859d; 67 | } 68 | 69 | .hljs-title, 70 | .hljs-section { 71 | color: #ffc66d; 72 | } 73 | 74 | .hljs-addition { 75 | background-color: #144212; 76 | color: #e6e1dc; 77 | display: inline-block; 78 | width: 100%; 79 | } 80 | 81 | .hljs-deletion { 82 | background-color: #600; 83 | color: #e6e1dc; 84 | display: inline-block; 85 | width: 100%; 86 | } 87 | 88 | .hljs-selector-class { 89 | color: #9b703f; 90 | } 91 | 92 | .hljs-selector-id { 93 | color: #8b98ab; 94 | } 95 | 96 | .hljs-emphasis { 97 | font-style: italic; 98 | } 99 | 100 | .hljs-strong { 101 | font-weight: bold; 102 | } 103 | 104 | .hljs-link { 105 | text-decoration: underline; 106 | } 107 | -------------------------------------------------------------------------------- /www/static/highlight/styles/rainbow.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Style with support for rainbow parens 4 | 5 | */ 6 | 7 | .hljs { 8 | display: block; 9 | overflow-x: auto; 10 | padding: 0.5em; 11 | background: #474949; 12 | color: #d1d9e1; 13 | } 14 | 15 | 16 | .hljs-comment, 17 | .hljs-quote { 18 | color: #969896; 19 | font-style: italic; 20 | } 21 | 22 | .hljs-keyword, 23 | .hljs-selector-tag, 24 | .hljs-literal, 25 | .hljs-type, 26 | .hljs-addition { 27 | color: #cc99cc; 28 | } 29 | 30 | .hljs-number, 31 | .hljs-selector-attr, 32 | .hljs-selector-pseudo { 33 | color: #f99157; 34 | } 35 | 36 | .hljs-string, 37 | .hljs-doctag, 38 | .hljs-regexp { 39 | color: #8abeb7; 40 | } 41 | 42 | .hljs-title, 43 | .hljs-name, 44 | .hljs-section, 45 | .hljs-built_in { 46 | color: #b5bd68; 47 | } 48 | 49 | .hljs-variable, 50 | .hljs-template-variable, 51 | .hljs-selector-id, 52 | .hljs-class .hljs-title { 53 | color: #ffcc66; 54 | } 55 | 56 | .hljs-section, 57 | .hljs-name, 58 | .hljs-strong { 59 | font-weight: bold; 60 | } 61 | 62 | .hljs-symbol, 63 | .hljs-bullet, 64 | .hljs-subst, 65 | .hljs-meta, 66 | .hljs-link { 67 | color: #f99157; 68 | } 69 | 70 | .hljs-deletion { 71 | color: #dc322f; 72 | } 73 | 74 | .hljs-formula { 75 | background: #eee8d5; 76 | } 77 | 78 | .hljs-attr, 79 | .hljs-attribute { 80 | color: #81a2be; 81 | } 82 | 83 | .hljs-emphasis { 84 | font-style: italic; 85 | } 86 | -------------------------------------------------------------------------------- /www/static/highlight/styles/school-book.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | School Book style from goldblog.com.ua (c) Zaripov Yura 4 | 5 | */ 6 | 7 | .hljs { 8 | display: block; 9 | overflow-x: auto; 10 | padding: 15px 0.5em 0.5em 30px; 11 | font-size: 11px; 12 | line-height:16px; 13 | } 14 | 15 | pre{ 16 | background:#f6f6ae url(./school-book.png); 17 | border-top: solid 2px #d2e8b9; 18 | border-bottom: solid 1px #d2e8b9; 19 | } 20 | 21 | .hljs-keyword, 22 | .hljs-selector-tag, 23 | .hljs-literal { 24 | color:#005599; 25 | font-weight:bold; 26 | } 27 | 28 | .hljs, 29 | .hljs-subst { 30 | color: #3e5915; 31 | } 32 | 33 | .hljs-string, 34 | .hljs-title, 35 | .hljs-section, 36 | .hljs-type, 37 | .hljs-symbol, 38 | .hljs-bullet, 39 | .hljs-attribute, 40 | .hljs-built_in, 41 | .hljs-builtin-name, 42 | .hljs-addition, 43 | .hljs-variable, 44 | .hljs-template-tag, 45 | .hljs-template-variable, 46 | .hljs-link { 47 | color: #2c009f; 48 | } 49 | 50 | .hljs-comment, 51 | .hljs-quote, 52 | .hljs-deletion, 53 | .hljs-meta { 54 | color: #e60415; 55 | } 56 | 57 | .hljs-keyword, 58 | .hljs-selector-tag, 59 | .hljs-literal, 60 | .hljs-doctag, 61 | .hljs-title, 62 | .hljs-section, 63 | .hljs-type, 64 | .hljs-name, 65 | .hljs-selector-id, 66 | .hljs-strong { 67 | font-weight: bold; 68 | } 69 | 70 | .hljs-emphasis { 71 | font-style: italic; 72 | } 73 | -------------------------------------------------------------------------------- /www/static/highlight/styles/school-book.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itorr/smartisanBlog/0e132b5e16c4b08b327ef1dc83f0966e7e6bf5d7/www/static/highlight/styles/school-book.png -------------------------------------------------------------------------------- /www/static/highlight/styles/solarized-dark.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Orginal Style from ethanschoonover.com/solarized (c) Jeremy Hull 4 | 5 | */ 6 | 7 | .hljs { 8 | display: block; 9 | overflow-x: auto; 10 | padding: 0.5em; 11 | background: #002b36; 12 | color: #839496; 13 | } 14 | 15 | .hljs-comment, 16 | .hljs-quote { 17 | color: #586e75; 18 | } 19 | 20 | /* Solarized Green */ 21 | .hljs-keyword, 22 | .hljs-selector-tag, 23 | .hljs-addition { 24 | color: #859900; 25 | } 26 | 27 | /* Solarized Cyan */ 28 | .hljs-number, 29 | .hljs-string, 30 | .hljs-meta .hljs-meta-string, 31 | .hljs-literal, 32 | .hljs-doctag, 33 | .hljs-regexp { 34 | color: #2aa198; 35 | } 36 | 37 | /* Solarized Blue */ 38 | .hljs-title, 39 | .hljs-section, 40 | .hljs-name, 41 | .hljs-selector-id, 42 | .hljs-selector-class { 43 | color: #268bd2; 44 | } 45 | 46 | /* Solarized Yellow */ 47 | .hljs-attribute, 48 | .hljs-attr, 49 | .hljs-variable, 50 | .hljs-template-variable, 51 | .hljs-class .hljs-title, 52 | .hljs-type { 53 | color: #b58900; 54 | } 55 | 56 | /* Solarized Orange */ 57 | .hljs-symbol, 58 | .hljs-bullet, 59 | .hljs-subst, 60 | .hljs-meta, 61 | .hljs-meta .hljs-keyword, 62 | .hljs-selector-attr, 63 | .hljs-selector-pseudo, 64 | .hljs-link { 65 | color: #cb4b16; 66 | } 67 | 68 | /* Solarized Red */ 69 | .hljs-built_in, 70 | .hljs-deletion { 71 | color: #dc322f; 72 | } 73 | 74 | .hljs-formula { 75 | background: #073642; 76 | } 77 | 78 | .hljs-emphasis { 79 | font-style: italic; 80 | } 81 | 82 | .hljs-strong { 83 | font-weight: bold; 84 | } 85 | -------------------------------------------------------------------------------- /www/static/highlight/styles/solarized-light.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Orginal Style from ethanschoonover.com/solarized (c) Jeremy Hull 4 | 5 | */ 6 | 7 | .hljs { 8 | display: block; 9 | overflow-x: auto; 10 | padding: 0.5em; 11 | background: #fdf6e3; 12 | color: #657b83; 13 | } 14 | 15 | .hljs-comment, 16 | .hljs-quote { 17 | color: #93a1a1; 18 | } 19 | 20 | /* Solarized Green */ 21 | .hljs-keyword, 22 | .hljs-selector-tag, 23 | .hljs-addition { 24 | color: #859900; 25 | } 26 | 27 | /* Solarized Cyan */ 28 | .hljs-number, 29 | .hljs-string, 30 | .hljs-meta .hljs-meta-string, 31 | .hljs-literal, 32 | .hljs-doctag, 33 | .hljs-regexp { 34 | color: #2aa198; 35 | } 36 | 37 | /* Solarized Blue */ 38 | .hljs-title, 39 | .hljs-section, 40 | .hljs-name, 41 | .hljs-selector-id, 42 | .hljs-selector-class { 43 | color: #268bd2; 44 | } 45 | 46 | /* Solarized Yellow */ 47 | .hljs-attribute, 48 | .hljs-attr, 49 | .hljs-variable, 50 | .hljs-template-variable, 51 | .hljs-class .hljs-title, 52 | .hljs-type { 53 | color: #b58900; 54 | } 55 | 56 | /* Solarized Orange */ 57 | .hljs-symbol, 58 | .hljs-bullet, 59 | .hljs-subst, 60 | .hljs-meta, 61 | .hljs-meta .hljs-keyword, 62 | .hljs-selector-attr, 63 | .hljs-selector-pseudo, 64 | .hljs-link { 65 | color: #cb4b16; 66 | } 67 | 68 | /* Solarized Red */ 69 | .hljs-built_in, 70 | .hljs-deletion { 71 | color: #dc322f; 72 | } 73 | 74 | .hljs-formula { 75 | background: #eee8d5; 76 | } 77 | 78 | .hljs-emphasis { 79 | font-style: italic; 80 | } 81 | 82 | .hljs-strong { 83 | font-weight: bold; 84 | } 85 | -------------------------------------------------------------------------------- /www/static/highlight/styles/sunburst.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Sunburst-like style (c) Vasily Polovnyov 4 | 5 | */ 6 | 7 | .hljs { 8 | display: block; 9 | overflow-x: auto; 10 | padding: 0.5em; 11 | background: #000; 12 | color: #f8f8f8; 13 | } 14 | 15 | .hljs-comment, 16 | .hljs-quote { 17 | color: #aeaeae; 18 | font-style: italic; 19 | } 20 | 21 | .hljs-keyword, 22 | .hljs-selector-tag, 23 | .hljs-type { 24 | color: #e28964; 25 | } 26 | 27 | .hljs-string { 28 | color: #65b042; 29 | } 30 | 31 | .hljs-subst { 32 | color: #daefa3; 33 | } 34 | 35 | .hljs-regexp, 36 | .hljs-link { 37 | color: #e9c062; 38 | } 39 | 40 | .hljs-title, 41 | .hljs-section, 42 | .hljs-tag, 43 | .hljs-name { 44 | color: #89bdff; 45 | } 46 | 47 | .hljs-class .hljs-title, 48 | .hljs-doctag { 49 | text-decoration: underline; 50 | } 51 | 52 | .hljs-symbol, 53 | .hljs-bullet, 54 | .hljs-number { 55 | color: #3387cc; 56 | } 57 | 58 | .hljs-params, 59 | .hljs-variable, 60 | .hljs-template-variable { 61 | color: #3e87e3; 62 | } 63 | 64 | .hljs-attribute { 65 | color: #cda869; 66 | } 67 | 68 | .hljs-meta { 69 | color: #8996a8; 70 | } 71 | 72 | .hljs-formula { 73 | background-color: #0e2231; 74 | color: #f8f8f8; 75 | font-style: italic; 76 | } 77 | 78 | .hljs-addition { 79 | background-color: #253b22; 80 | color: #f8f8f8; 81 | } 82 | 83 | .hljs-deletion { 84 | background-color: #420e09; 85 | color: #f8f8f8; 86 | } 87 | 88 | .hljs-selector-class { 89 | color: #9b703f; 90 | } 91 | 92 | .hljs-selector-id { 93 | color: #8b98ab; 94 | } 95 | 96 | .hljs-emphasis { 97 | font-style: italic; 98 | } 99 | 100 | .hljs-strong { 101 | font-weight: bold; 102 | } 103 | -------------------------------------------------------------------------------- /www/static/highlight/styles/tomorrow-night-blue.css: -------------------------------------------------------------------------------- 1 | /* Tomorrow Night Blue Theme */ 2 | /* http://jmblog.github.com/color-themes-for-google-code-highlightjs */ 3 | /* Original theme - https://github.com/chriskempson/tomorrow-theme */ 4 | /* http://jmblog.github.com/color-themes-for-google-code-highlightjs */ 5 | 6 | /* Tomorrow Comment */ 7 | .hljs-comment, 8 | .hljs-quote { 9 | color: #7285b7; 10 | } 11 | 12 | /* Tomorrow Red */ 13 | .hljs-variable, 14 | .hljs-template-variable, 15 | .hljs-tag, 16 | .hljs-name, 17 | .hljs-selector-id, 18 | .hljs-selector-class, 19 | .hljs-regexp, 20 | .hljs-deletion { 21 | color: #ff9da4; 22 | } 23 | 24 | /* Tomorrow Orange */ 25 | .hljs-number, 26 | .hljs-built_in, 27 | .hljs-builtin-name, 28 | .hljs-literal, 29 | .hljs-type, 30 | .hljs-params, 31 | .hljs-meta, 32 | .hljs-link { 33 | color: #ffc58f; 34 | } 35 | 36 | /* Tomorrow Yellow */ 37 | .hljs-attribute { 38 | color: #ffeead; 39 | } 40 | 41 | /* Tomorrow Green */ 42 | .hljs-string, 43 | .hljs-symbol, 44 | .hljs-bullet, 45 | .hljs-addition { 46 | color: #d1f1a9; 47 | } 48 | 49 | /* Tomorrow Blue */ 50 | .hljs-title, 51 | .hljs-section { 52 | color: #bbdaff; 53 | } 54 | 55 | /* Tomorrow Purple */ 56 | .hljs-keyword, 57 | .hljs-selector-tag { 58 | color: #ebbbff; 59 | } 60 | 61 | .hljs { 62 | display: block; 63 | overflow-x: auto; 64 | background: #002451; 65 | color: white; 66 | padding: 0.5em; 67 | } 68 | 69 | .hljs-emphasis { 70 | font-style: italic; 71 | } 72 | 73 | .hljs-strong { 74 | font-weight: bold; 75 | } 76 | -------------------------------------------------------------------------------- /www/static/highlight/styles/tomorrow-night-bright.css: -------------------------------------------------------------------------------- 1 | /* Tomorrow Night Bright Theme */ 2 | /* Original theme - https://github.com/chriskempson/tomorrow-theme */ 3 | /* http://jmblog.github.com/color-themes-for-google-code-highlightjs */ 4 | 5 | /* Tomorrow Comment */ 6 | .hljs-comment, 7 | .hljs-quote { 8 | color: #969896; 9 | } 10 | 11 | /* Tomorrow Red */ 12 | .hljs-variable, 13 | .hljs-template-variable, 14 | .hljs-tag, 15 | .hljs-name, 16 | .hljs-selector-id, 17 | .hljs-selector-class, 18 | .hljs-regexp, 19 | .hljs-deletion { 20 | color: #d54e53; 21 | } 22 | 23 | /* Tomorrow Orange */ 24 | .hljs-number, 25 | .hljs-built_in, 26 | .hljs-builtin-name, 27 | .hljs-literal, 28 | .hljs-type, 29 | .hljs-params, 30 | .hljs-meta, 31 | .hljs-link { 32 | color: #e78c45; 33 | } 34 | 35 | /* Tomorrow Yellow */ 36 | .hljs-attribute { 37 | color: #e7c547; 38 | } 39 | 40 | /* Tomorrow Green */ 41 | .hljs-string, 42 | .hljs-symbol, 43 | .hljs-bullet, 44 | .hljs-addition { 45 | color: #b9ca4a; 46 | } 47 | 48 | /* Tomorrow Blue */ 49 | .hljs-title, 50 | .hljs-section { 51 | color: #7aa6da; 52 | } 53 | 54 | /* Tomorrow Purple */ 55 | .hljs-keyword, 56 | .hljs-selector-tag { 57 | color: #c397d8; 58 | } 59 | 60 | .hljs { 61 | display: block; 62 | overflow-x: auto; 63 | background: black; 64 | color: #eaeaea; 65 | padding: 0.5em; 66 | } 67 | 68 | .hljs-emphasis { 69 | font-style: italic; 70 | } 71 | 72 | .hljs-strong { 73 | font-weight: bold; 74 | } 75 | -------------------------------------------------------------------------------- /www/static/highlight/styles/tomorrow-night-eighties.css: -------------------------------------------------------------------------------- 1 | /* Tomorrow Night Eighties Theme */ 2 | /* Original theme - https://github.com/chriskempson/tomorrow-theme */ 3 | /* http://jmblog.github.com/color-themes-for-google-code-highlightjs */ 4 | 5 | /* Tomorrow Comment */ 6 | .hljs-comment, 7 | .hljs-quote { 8 | color: #999999; 9 | } 10 | 11 | /* Tomorrow Red */ 12 | .hljs-variable, 13 | .hljs-template-variable, 14 | .hljs-tag, 15 | .hljs-name, 16 | .hljs-selector-id, 17 | .hljs-selector-class, 18 | .hljs-regexp, 19 | .hljs-deletion { 20 | color: #f2777a; 21 | } 22 | 23 | /* Tomorrow Orange */ 24 | .hljs-number, 25 | .hljs-built_in, 26 | .hljs-builtin-name, 27 | .hljs-literal, 28 | .hljs-type, 29 | .hljs-params, 30 | .hljs-meta, 31 | .hljs-link { 32 | color: #f99157; 33 | } 34 | 35 | /* Tomorrow Yellow */ 36 | .hljs-attribute { 37 | color: #ffcc66; 38 | } 39 | 40 | /* Tomorrow Green */ 41 | .hljs-string, 42 | .hljs-symbol, 43 | .hljs-bullet, 44 | .hljs-addition { 45 | color: #99cc99; 46 | } 47 | 48 | /* Tomorrow Blue */ 49 | .hljs-title, 50 | .hljs-section { 51 | color: #6699cc; 52 | } 53 | 54 | /* Tomorrow Purple */ 55 | .hljs-keyword, 56 | .hljs-selector-tag { 57 | color: #cc99cc; 58 | } 59 | 60 | .hljs { 61 | display: block; 62 | overflow-x: auto; 63 | background: #2d2d2d; 64 | color: #cccccc; 65 | padding: 0.5em; 66 | } 67 | 68 | .hljs-emphasis { 69 | font-style: italic; 70 | } 71 | 72 | .hljs-strong { 73 | font-weight: bold; 74 | } 75 | -------------------------------------------------------------------------------- /www/static/highlight/styles/tomorrow-night.css: -------------------------------------------------------------------------------- 1 | /* Tomorrow Night Theme */ 2 | /* http://jmblog.github.com/color-themes-for-google-code-highlightjs */ 3 | /* Original theme - https://github.com/chriskempson/tomorrow-theme */ 4 | /* http://jmblog.github.com/color-themes-for-google-code-highlightjs */ 5 | 6 | /* Tomorrow Comment */ 7 | .hljs-comment, 8 | .hljs-quote { 9 | color: #969896; 10 | } 11 | 12 | /* Tomorrow Red */ 13 | .hljs-variable, 14 | .hljs-template-variable, 15 | .hljs-tag, 16 | .hljs-name, 17 | .hljs-selector-id, 18 | .hljs-selector-class, 19 | .hljs-regexp, 20 | .hljs-deletion { 21 | color: #cc6666; 22 | } 23 | 24 | /* Tomorrow Orange */ 25 | .hljs-number, 26 | .hljs-built_in, 27 | .hljs-builtin-name, 28 | .hljs-literal, 29 | .hljs-type, 30 | .hljs-params, 31 | .hljs-meta, 32 | .hljs-link { 33 | color: #de935f; 34 | } 35 | 36 | /* Tomorrow Yellow */ 37 | .hljs-attribute { 38 | color: #f0c674; 39 | } 40 | 41 | /* Tomorrow Green */ 42 | .hljs-string, 43 | .hljs-symbol, 44 | .hljs-bullet, 45 | .hljs-addition { 46 | color: #b5bd68; 47 | } 48 | 49 | /* Tomorrow Blue */ 50 | .hljs-title, 51 | .hljs-section { 52 | color: #81a2be; 53 | } 54 | 55 | /* Tomorrow Purple */ 56 | .hljs-keyword, 57 | .hljs-selector-tag { 58 | color: #b294bb; 59 | } 60 | 61 | .hljs { 62 | display: block; 63 | overflow-x: auto; 64 | background: #1d1f21; 65 | color: #c5c8c6; 66 | padding: 0.5em; 67 | } 68 | 69 | .hljs-emphasis { 70 | font-style: italic; 71 | } 72 | 73 | .hljs-strong { 74 | font-weight: bold; 75 | } 76 | -------------------------------------------------------------------------------- /www/static/highlight/styles/tomorrow.css: -------------------------------------------------------------------------------- 1 | /* http://jmblog.github.com/color-themes-for-google-code-highlightjs */ 2 | 3 | /* Tomorrow Comment */ 4 | .hljs-comment, 5 | .hljs-quote { 6 | color: #8e908c; 7 | } 8 | 9 | /* Tomorrow Red */ 10 | .hljs-variable, 11 | .hljs-template-variable, 12 | .hljs-tag, 13 | .hljs-name, 14 | .hljs-selector-id, 15 | .hljs-selector-class, 16 | .hljs-regexp, 17 | .hljs-deletion { 18 | color: #c82829; 19 | } 20 | 21 | /* Tomorrow Orange */ 22 | .hljs-number, 23 | .hljs-built_in, 24 | .hljs-builtin-name, 25 | .hljs-literal, 26 | .hljs-type, 27 | .hljs-params, 28 | .hljs-meta, 29 | .hljs-link { 30 | color: #f5871f; 31 | } 32 | 33 | /* Tomorrow Yellow */ 34 | .hljs-attribute { 35 | color: #eab700; 36 | } 37 | 38 | /* Tomorrow Green */ 39 | .hljs-string, 40 | .hljs-symbol, 41 | .hljs-bullet, 42 | .hljs-addition { 43 | color: #718c00; 44 | } 45 | 46 | /* Tomorrow Blue */ 47 | .hljs-title, 48 | .hljs-section { 49 | color: #4271ae; 50 | } 51 | 52 | /* Tomorrow Purple */ 53 | .hljs-keyword, 54 | .hljs-selector-tag { 55 | color: #8959a8; 56 | } 57 | 58 | .hljs { 59 | display: block; 60 | overflow-x: auto; 61 | background: white; 62 | color: #4d4d4c; 63 | padding: 0.5em; 64 | } 65 | 66 | .hljs-emphasis { 67 | font-style: italic; 68 | } 69 | 70 | .hljs-strong { 71 | font-weight: bold; 72 | } 73 | -------------------------------------------------------------------------------- /www/static/highlight/styles/vs.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Visual Studio-like style based on original C# coloring by Jason Diamond 4 | 5 | */ 6 | .hljs { 7 | display: block; 8 | overflow-x: auto; 9 | padding: 0.5em; 10 | background: white; 11 | color: black; 12 | } 13 | 14 | .hljs-comment, 15 | .hljs-quote, 16 | .hljs-variable { 17 | color: #008000; 18 | } 19 | 20 | .hljs-keyword, 21 | .hljs-selector-tag, 22 | .hljs-built_in, 23 | .hljs-name, 24 | .hljs-tag { 25 | color: #00f; 26 | } 27 | 28 | .hljs-string, 29 | .hljs-title, 30 | .hljs-section, 31 | .hljs-attribute, 32 | .hljs-literal, 33 | .hljs-template-tag, 34 | .hljs-template-variable, 35 | .hljs-type, 36 | .hljs-addition { 37 | color: #a31515; 38 | } 39 | 40 | .hljs-deletion, 41 | .hljs-selector-attr, 42 | .hljs-selector-pseudo, 43 | .hljs-meta { 44 | color: #2b91af; 45 | } 46 | 47 | .hljs-doctag { 48 | color: #808080; 49 | } 50 | 51 | .hljs-attr { 52 | color: #f00; 53 | } 54 | 55 | .hljs-symbol, 56 | .hljs-bullet, 57 | .hljs-link { 58 | color: #00b0e8; 59 | } 60 | 61 | 62 | .hljs-emphasis { 63 | font-style: italic; 64 | } 65 | 66 | .hljs-strong { 67 | font-weight: bold; 68 | } 69 | -------------------------------------------------------------------------------- /www/static/highlight/styles/xcode.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | XCode style (c) Angel Garcia 4 | 5 | */ 6 | 7 | .hljs { 8 | display: block; 9 | overflow-x: auto; 10 | padding: 0.5em; 11 | background: #fff; 12 | color: black; 13 | } 14 | 15 | .hljs-comment, 16 | .hljs-quote { 17 | color: #006a00; 18 | } 19 | 20 | .hljs-keyword, 21 | .hljs-selector-tag, 22 | .hljs-literal { 23 | color: #aa0d91; 24 | } 25 | 26 | .hljs-name { 27 | color: #008; 28 | } 29 | 30 | .hljs-variable, 31 | .hljs-template-variable { 32 | color: #660; 33 | } 34 | 35 | .hljs-string { 36 | color: #c41a16; 37 | } 38 | 39 | .hljs-regexp, 40 | .hljs-link { 41 | color: #080; 42 | } 43 | 44 | .hljs-title, 45 | .hljs-tag, 46 | .hljs-symbol, 47 | .hljs-bullet, 48 | .hljs-number, 49 | .hljs-meta { 50 | color: #1c00cf; 51 | } 52 | 53 | .hljs-section, 54 | .hljs-class .hljs-title, 55 | .hljs-type, 56 | .hljs-attr, 57 | .hljs-built_in, 58 | .hljs-builtin-name, 59 | .hljs-params { 60 | color: #5c2699; 61 | } 62 | 63 | .hljs-attribute, 64 | .hljs-subst { 65 | color: #000; 66 | } 67 | 68 | .hljs-formula { 69 | background-color: #eee; 70 | font-style: italic; 71 | } 72 | 73 | .hljs-addition { 74 | background-color: #baeeba; 75 | } 76 | 77 | .hljs-deletion { 78 | background-color: #ffc8bd; 79 | } 80 | 81 | .hljs-selector-id, 82 | .hljs-selector-class { 83 | color: #9b703f; 84 | } 85 | 86 | .hljs-doctag, 87 | .hljs-strong { 88 | font-weight: bold; 89 | } 90 | 91 | .hljs-emphasis { 92 | font-style: italic; 93 | } 94 | -------------------------------------------------------------------------------- /www/static/highlight/styles/xt256.css: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | xt256.css 4 | 5 | Contact: initbar [at] protonmail [dot] ch 6 | : github.com/initbar 7 | */ 8 | 9 | .hljs { 10 | display: block; 11 | overflow-x: auto; 12 | color: #eaeaea; 13 | background: #000; 14 | padding: 0.5; 15 | } 16 | 17 | .hljs-subst { 18 | color: #eaeaea; 19 | } 20 | 21 | .hljs-emphasis { 22 | font-style: italic; 23 | } 24 | 25 | .hljs-strong { 26 | font-weight: bold; 27 | } 28 | 29 | .hljs-builtin-name, 30 | .hljs-type { 31 | color: #eaeaea; 32 | } 33 | 34 | .hljs-params { 35 | color: #da0000; 36 | } 37 | 38 | .hljs-literal, 39 | .hljs-number, 40 | .hljs-name { 41 | color: #ff0000; 42 | font-weight: bolder; 43 | } 44 | 45 | .hljs-comment { 46 | color: #969896; 47 | } 48 | 49 | .hljs-selector-id, 50 | .hljs-quote { 51 | color: #00ffff; 52 | } 53 | 54 | .hljs-template-variable, 55 | .hljs-variable, 56 | .hljs-title { 57 | color: #00ffff; 58 | font-weight: bold; 59 | } 60 | 61 | .hljs-selector-class, 62 | .hljs-keyword, 63 | .hljs-symbol { 64 | color: #fff000; 65 | } 66 | 67 | .hljs-string, 68 | .hljs-bullet { 69 | color: #00ff00; 70 | } 71 | 72 | .hljs-tag, 73 | .hljs-section { 74 | color: #000fff; 75 | } 76 | 77 | .hljs-selector-tag { 78 | color: #000fff; 79 | font-weight: bold; 80 | } 81 | 82 | .hljs-attribute, 83 | .hljs-built_in, 84 | .hljs-regexp, 85 | .hljs-link { 86 | color: #ff00ff; 87 | } 88 | 89 | .hljs-meta { 90 | color: #fff; 91 | font-weight: bolder; 92 | } 93 | -------------------------------------------------------------------------------- /www/static/highlight/styles/zenburn.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Zenburn style from voldmar.ru (c) Vladimir Epifanov 4 | based on dark.css by Ivan Sagalaev 5 | 6 | */ 7 | 8 | .hljs { 9 | display: block; 10 | overflow-x: auto; 11 | padding: 0.5em; 12 | background: #3f3f3f; 13 | color: #dcdcdc; 14 | } 15 | 16 | .hljs-keyword, 17 | .hljs-selector-tag, 18 | .hljs-tag { 19 | color: #e3ceab; 20 | } 21 | 22 | .hljs-template-tag { 23 | color: #dcdcdc; 24 | } 25 | 26 | .hljs-number { 27 | color: #8cd0d3; 28 | } 29 | 30 | .hljs-variable, 31 | .hljs-template-variable, 32 | .hljs-attribute { 33 | color: #efdcbc; 34 | } 35 | 36 | .hljs-literal { 37 | color: #efefaf; 38 | } 39 | 40 | .hljs-subst { 41 | color: #8f8f8f; 42 | } 43 | 44 | .hljs-title, 45 | .hljs-name, 46 | .hljs-selector-id, 47 | .hljs-selector-class, 48 | .hljs-section, 49 | .hljs-type { 50 | color: #efef8f; 51 | } 52 | 53 | .hljs-symbol, 54 | .hljs-bullet, 55 | .hljs-link { 56 | color: #dca3a3; 57 | } 58 | 59 | .hljs-deletion, 60 | .hljs-string, 61 | .hljs-built_in, 62 | .hljs-builtin-name { 63 | color: #cc9393; 64 | } 65 | 66 | .hljs-addition, 67 | .hljs-comment, 68 | .hljs-quote, 69 | .hljs-meta { 70 | color: #7f9f7f; 71 | } 72 | 73 | 74 | .hljs-emphasis { 75 | font-style: italic; 76 | } 77 | 78 | .hljs-strong { 79 | font-weight: bold; 80 | } 81 | -------------------------------------------------------------------------------- /www/static/img/bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itorr/smartisanBlog/0e132b5e16c4b08b327ef1dc83f0966e7e6bf5d7/www/static/img/bg.jpg -------------------------------------------------------------------------------- /www/static/js/controller.js: -------------------------------------------------------------------------------- 1 | $.U=function(url){ 2 | return apiPath.replace(/\{.+?\}/g,url); 3 | }; 4 | 5 | var 6 | tranH=function(t,f,ff){ 7 | switch(typeof f){ 8 | case 'function': 9 | f(t); 10 | break; 11 | case 'object': 12 | f.innerHTML=t; 13 | break; 14 | case 'string': 15 | $(f).innerHTML=t; 16 | break; 17 | default: 18 | return t; 19 | break; 20 | } 21 | 22 | switch(typeof ff){ 23 | case 'function': 24 | ff(t); 25 | break; 26 | } 27 | }, 28 | MD=function(t,i,r,f,ff){ 29 | if(!f||typeof r!='function'){ 30 | ff=f; 31 | f=r; 32 | r=function(i){return i}; 33 | } 34 | t=getTemplet(t); 35 | 36 | t=模板.运转(t,r(i)); 37 | // t=Mustache.render(t,r(i)); 38 | if(f) 39 | tranH(t,f,ff); 40 | 41 | return t; 42 | }, 43 | MX=function(t,d,r,f,ff){ 44 | if(!f||typeof r!='function'){ 45 | ff=f; 46 | f=r; 47 | r=function(i){return i}; 48 | } 49 | t=getTemplet(t); 50 | return $.x(d,function(i){ 51 | // if(i.error) 52 | // return r?r(i):alert(i.error); 53 | 54 | t=模板.运转(t,r(i)); 55 | // t=Mustache.render(t,r(i)); 56 | if(f) 57 | tranH(t,f,ff); 58 | }); 59 | }, 60 | ME, 61 | POST={}, 62 | text2html=function(txt){ 63 | 64 | txt=txt.replace(/]+?)? name=(Notes_\d+\.(jpeg|png|jpg|gif)|\w{16,32})>/g,function(全,宽,高,说明文字,图片文件名){ 65 | // console.log(全,宽,高,说明文字,图片文件名); 66 | 67 | var 68 | 输出宽=宽, 69 | 输出高=高, 70 | 比例=高/宽; 71 | 72 | 说明文字=说明文字||''; 73 | 74 | if(宽>400){ 75 | 输出宽=400; 76 | 输出高=Math.floor(输出宽*高/宽); 77 | } 78 | 79 | if(宽<400 && 高>600){ 80 | 输出高=600; 81 | 输出宽=Math.floor(输出高*宽/高); 82 | } 83 | 84 | var 85 | src='https://cloud.smartisan.com/notesimage/'+图片文件名; 86 | 87 | if(图片文件名.match(/^\w{16,32}$/i)){ 88 | src='http://ww2.sinaimg.cn/mw1024/'+图片文件名; 89 | } 90 | 91 | // if(PIC[src]) 92 | // src='http://ww2.sinaimg.cn/mw1024/'+PIC[src]; 93 | 94 | return ''+说明文字+''; 95 | 96 | return '!['+说明文字+']('+src+')'; 97 | }); 98 | 99 | // txt=markdown.toHTML(txt); 100 | txt=_md2html(txt); 101 | return txt; 102 | }, 103 | 时间格式化=function(t){ 104 | return t.reDate(); 105 | }, 106 | C=new Markdown.Converter(), 107 | _md2html=function(i){ 108 | i=i.replace(/```(|[\w]+)[\r\n]+([\W.\S]*?)```/mg,function(i,a,b){ 109 | return '
'+b.replace(/&/g,"&").replace(//g,">").replace(/\'/g,"'").replace(/\"/g,""")+'
' 110 | })//.replace(/(^|[^\"\'\]>])(http\:\/\/ww[0-9]{1}\.sinaimg\.cn\/)([\w]{4,10})(\/[\w]{16,32})(|\.gif|\.jpg|\.jpeg)/g,"") 111 | 112 | i=C.makeHtml(i); 113 | return i 114 | }; 115 | 116 | 117 | 118 | var 119 | body=document.body; 120 | 121 | Q.reg('p',function(pid){//打开具体某篇文章时 122 | 123 | body.setAttribute('step','post'); 124 | 125 | if(!pid||!POST[pid]) 126 | return location.hash='#/home'; 127 | 128 | 129 | var 130 | pNavDom; 131 | 132 | 133 | if(pNavDom=$('.posts .active')) 134 | pNavDom.className='post '; 135 | 136 | 137 | if(pNavDom=$('#p_'+pid)) 138 | pNavDom.className='post active'; 139 | 140 | 141 | 142 | var 143 | P=POST[pid]; 144 | 145 | 146 | document.title=P.title; 147 | P.text=text2html(P.detail).replace(/<\/h1>/,function(){ 148 | return '<\/h1>\n\n'; 149 | }); 150 | 151 | 152 | MD('article',P,'.article-box'); 153 | 154 | if($('pre code')){ 155 | // hljs.initHighlighting(); 156 | $$('pre code').forEach(function(block) { 157 | hljs.highlightBlock(block); 158 | }); 159 | } 160 | 161 | $('.article-box').scrollTop=0; 162 | 163 | }).reg('home',function(){//打开首页 164 | body.setAttribute('step','home'); 165 | var 166 | pNavDom; 167 | document.title=ME.nickname+' - 锤子'; 168 | 169 | if(pNavDom=$('.posts .active')) 170 | pNavDom.className='post '; 171 | }) 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | //$.x('x/?info&_r='+Math.random(),function(r){ 180 | $.x($.U('info'),function(r){ 181 | ME=r; 182 | 183 | document.title=r.nickname+' - 锤子'; 184 | 185 | MD('header',ME,'header'); 186 | 187 | $.x($.U('post'),function(post){ 188 | // r=r.data; 189 | 190 | // var 191 | // post=r.note; 192 | 193 | 194 | 195 | var 196 | i=post.length, 197 | o, 198 | _post=[]; 199 | 200 | while(i--){ 201 | o=post[i]; 202 | 203 | 204 | // o.time=o.modify_time.reDate(); 205 | o.title=o.title.replace(/^#\s?/,''); 206 | // o.count=o.detail.length; 207 | // o.text=markdown.toHTML(o.detail); 208 | o.hasImage=!!o.detail.match(/199&&x.status<301)||x.status==304||x.status==0){ 95 | //console.log(x) 96 | if(x.responseType=='blob') 97 | j=x.response; 98 | else 99 | j=x.responseText; 100 | 101 | if((x.getResponseHeader('Content-Type')||'').match(/json/)||url.match(/\.json$/)) 102 | j=JSON.parse(j||null); 103 | 104 | if(!data) 105 | d[url]=j; 106 | 107 | func(j); 108 | }else if(err) 109 | err(x.status); 110 | 111 | } 112 | }; 113 | 114 | x.send(data); 115 | return x; 116 | }; 117 | }({}); 118 | 119 | _D.x=function(u,p,f,m){ 120 | if(typeof p=='function'){ 121 | f=p 122 | p=0 123 | } 124 | m=this; 125 | $.x(u,p,function(data){ 126 | if(typeof data=='string' && !f){ 127 | m.innerHTML=data; 128 | }else if(f){ 129 | m.innerHTML=f(data)||''; 130 | } 131 | }); 132 | return m; 133 | } 134 | 135 | $.cookie=function(name,data,time,path,domain,secure){ 136 | if(typeof data=='undefined'){ 137 | data=D.cookie.match(new RegExp('(^| )'+name+'=([^;]*)(;|$)')); 138 | return data==null?null:unescape(data[2]); 139 | } 140 | 141 | if(path && (typeof path==='number' || typeof path==='object') || (typeof path=='string' && path.match(/^\d$/)) ){ 142 | time=path; 143 | path=''; 144 | } 145 | var r=[]; 146 | 147 | time=time||31536000; 148 | 149 | r.push(en(name)+'='+en(data)); // key value 150 | 151 | if(path) 152 | r.push('path='+path); // path 153 | 154 | if(time){ 155 | var j=new Date(); 156 | j.setTime(+j+time*1000); 157 | 158 | r.push('expires='+j.toUTCString()); // time 159 | } 160 | 161 | if(secure) //安全 162 | r.push('secure'); 163 | 164 | 165 | return D.cookie=r.join(';'); 166 | 167 | }; 168 | 169 | 170 | W.$Stor=W.localStorage; 171 | 172 | $.stor=function(Stor){ 173 | return function(name,data){ 174 | if(typeof data=='undefined') 175 | return Stor[name]; 176 | 177 | return Stor[name]=data; 178 | }; 179 | }($Stor); 180 | 181 | $.j= 182 | $.l=function(cssLoadEnd){ 183 | return function(url,fun,err,dom,callBackFunName){ 184 | if(url.match(/\.css$/)){ 185 | if(cssLoadEnd.indexOf(url)>-1) 186 | return; 187 | 188 | cssLoadEnd+=url+'|'; 189 | 190 | 191 | dom=$.D('link'); 192 | dom.href=url; 193 | dom.rel='stylesheet'; 194 | dom.charset='UTF-8'; 195 | if(fun) 196 | dom.onload=fun; 197 | if(err) 198 | err.onload=err; 199 | $('head').add(dom); 200 | }else if(url.match(/\w+\.html$/)){ 201 | err=[]; 202 | $.x(url,function(H){ 203 | dom=$.D('div'); 204 | 205 | var A; 206 | if(A=url.match(/(\w+)\.html/)) 207 | dom.className=A[1]+'-box' 208 | 209 | dom.setAttribute('mode',url); 210 | h=H; 211 | 212 | //console.log(H) 213 | 214 | H.replace(/[.\s\S]+?<\/script>/igm,function(o){ 215 | //console.log(o) 216 | err.push(o.replace(/^|<\/script>$/ig,'')); 217 | return ''; 218 | }); 219 | //console.log(H); 220 | if((typeof fun=='function'||!fun)&&W.m){ 221 | m.innerHTML=H; 222 | if(fun) 223 | fun(); 224 | }else{ 225 | dom.innerHTML=H; 226 | dom.addTo(fun||D.body); 227 | } 228 | 229 | //console.log(err); 230 | err.map(eval);//运行所有内联script标签 231 | }); 232 | }else{ 233 | 234 | callBackFunName='cb'+new Date().valueOf()+(Math.random()+'').substring(3); 235 | 236 | if(fun&&url.match(/\{cb\}/)){ 237 | W[callBackFunName]=fun; 238 | } 239 | 240 | dom=$.D('script'); 241 | dom.src=url.replace(/\{cb\}/,callBackFunName); 242 | dom.charset='UTF-8'; 243 | dom.onload=function(){ 244 | if(fun&&!url.match(/\{cb\}/)) 245 | fun(); 246 | 247 | dom.del(); 248 | }; 249 | dom.onerror=function(){ 250 | if(err) 251 | err(); 252 | dom.del(); 253 | }; 254 | dom.addTo(); 255 | } 256 | 257 | }; 258 | }('|'); 259 | 260 | 261 | _D.addClass=function(i){ 262 | if(this.hasClass(i)) 263 | return this; 264 | this.className+=' '+i 265 | return this 266 | } 267 | 268 | _D.hasClass=function(i){ 269 | return this.className.match(new RegExp(i)) 270 | } 271 | _D.delClass=function(i){ 272 | this.className=(' '+this.className+' ') 273 | .replace(new RegExp(' '+i+' ','g'),' ') 274 | .replace(/^\s+|\s+$/,'') 275 | .replace(/\s+/g,' ') 276 | return this 277 | } 278 | 279 | 280 | $.D=function(d){ 281 | return D.createElement(d); 282 | } 283 | _D.add=function(d){ 284 | if(d) 285 | this.appendChild(d); 286 | return this 287 | } 288 | _D.addTo=function(d){ 289 | (d||D.body).appendChild(this); 290 | return this 291 | } 292 | _D.addToFront= 293 | _D.addEnd=function(d){ 294 | this.insertBefore(d,this.childNodes[0]); 295 | return this 296 | } 297 | 298 | _D.addBefore=function(d){//把 d 增加到 this 前面 299 | var pa=this.parentNode; 300 | pa.insertBefore(d,this); 301 | return this 302 | } 303 | _D.addToBefore=function(d){//把 this 增加到 d 前面 304 | d.addBefore(this); 305 | //var pa=d.parentNode; 306 | //pa.insertBefore(d,this); 307 | return this 308 | } 309 | _D.addAfter=function(d){//把 d 增加到 this 后面 310 | var pa=this.parentNode; 311 | if (pa.lastChild==this)// 如果最后的节点是目标元素,则直接添加。因为默认是最后 312 | pa.appendChild(d); 313 | else 314 | pa.insertBefore(d,this.nextSibling); 315 | //如果不是,则插入在目标元素的下一个兄弟节点 的前面。也就是目标元素的后面 316 | } 317 | _D.addToAfter=function(d){//把 this 增加到 d 后面 318 | d.addAfter(this); 319 | return this 320 | } 321 | _D.del=function(f){ 322 | if(f=this.parentNode) 323 | f.removeChild(this); 324 | return f 325 | } 326 | _D.copy=function(){ 327 | return this.cloneNode(1); 328 | } 329 | _D.index=function(){ 330 | var pa,r; 331 | if(!(pa=this.parentNode)) 332 | return -1; 333 | r=toArr(pa.children); 334 | return r.indexOf(this); 335 | }; 336 | 337 | var 338 | aniTime=300; 339 | 340 | _D.show=function(t,f){ 341 | var o=this; 342 | if(typeof t=='function') 343 | f=t; 344 | 345 | setTimeout(function(){ 346 | o.classDel('del') 347 | o.classAdd('ani') 348 | 349 | setTimeout(function(){ 350 | o.classDel('h') 351 | 352 | setTimeout(function(){ 353 | o.classDel('ani') 354 | if(f) 355 | f(o) 356 | },aniTime); 357 | },1); 358 | 359 | },typeof t=='Number'?t:1); 360 | 361 | //console.log('show') 362 | return this 363 | } 364 | _D.hide=function(t){ 365 | var o=this; 366 | if(typeof t=='function') 367 | f=t; 368 | 369 | setTimeout(function(){ 370 | o.classAdd('h ani'); 371 | 372 | setTimeout(function(){ 373 | o.classAdd('del'); 374 | o.classDel('ani') 375 | if(f) 376 | f(o) 377 | },aniTime); 378 | 379 | },typeof t=='Number'?t:1); 380 | 381 | //console.log('hide') 382 | return this 383 | } 384 | 385 | 386 | _N.reDate= 387 | _S.reDate=function(){ 388 | 389 | var 390 | e=this, 391 | h=new Date(), 392 | d; 393 | 394 | if((e+'').match(/^\d{13}$/)){ 395 | d=new Date(e); 396 | }else if((e+'').match(/^\d{10}$/)){ 397 | d=new Date(e*1000); 398 | }else{ 399 | var arr=e.split(/[-\/ :]/); 400 | d=new Date(arr[0], arr[1]-1, arr[2], arr[3], arr[4], arr[5]); 401 | } 402 | 403 | var 404 | g=parseInt, 405 | f=g((h-d)/1000); 406 | 407 | return !e||f<0?'刚刚': 408 | f<60?(f+'秒前'): 409 | (f/=60)<60?g(f)+'分前': 410 | (f/=60)<24?g(f)+'时前': 411 | (f/=24)<7?g(f)+'天前': 412 | (f/=7)<2?g(f)+'周前': 413 | d>new Date(h.getFullYear()+'-01-01')?(d.getMonth()+1)+'月'+d.getDate()+'日': 414 | d.getFullYear()+'年'+(d.getMonth()+1)+'月'+d.getDate()+'日'; 415 | }; 416 | 417 | _S.enTxt=function(){ 418 | return this.replace(/(^\s*)|(\s*$)/g,'') 419 | .replace(/&/g,"&") 420 | .replace(//g,">") 422 | .replace(/\t/g,"    ") 423 | .replace(/\'/g,"'") 424 | .replace(/\"/g,""") 425 | .replace(/\n/g,"
"); 426 | }; 427 | 428 | _S.enHtml=function(){ 429 | return this.replace(/(^\s*)|(\s*$)/g,'') 430 | .replace(/(http\:\/\/[\w\/.#&!?%:;=_]+\.)(gif|jpg|jpeg|png)/g,'') 431 | .replace(/(http\:\/\/ww[0-9]{1}\.sinaimg\.cn\/)([\w]{4,10})(\/[\w]{16,32}\.)(gif|jpg|jpeg|png)/g,"$1mw1024$3$4") 432 | .replace(/http:\/\/www\.xiami\.com\/song\/([0-9]{5,12})[\?\w\.\=]*/g,'http://www.xiami.com/song/$1') 433 | .replace(/(@)([\u0800-\u9fa5\w\-_]{2,32})/g,'$1$2') 434 | .replace(/(^|[^\"\'\]>])(http|ftp|mms|rstp|news|https|telnet)\:\/\/([\w\/.#&!?%:;=\-_]+)/g,'$1$2://$3') 435 | .replace(/\n/g,"
"); 436 | }; 437 | 438 | 439 | 440 | 441 | if(!_A.indexOf) 442 | _A.indexOf=function(searchElement,fromIndex){ 443 | var 444 | index=-1; 445 | fromIndex=fromIndex*1||0; 446 | 447 | for (var k = 0, length = this.length; k < length; k++) 448 | if (k >= fromIndex && this[k] === searchElement) { 449 | index = k; 450 | break; 451 | } 452 | return index; 453 | }; 454 | 455 | 456 | 457 | 458 | 459 | if(!W.$) 460 | W.$=$; 461 | 462 | if(!W.$$) 463 | W.$$=$$; 464 | 465 | return $ 466 | }(this,document); -------------------------------------------------------------------------------- /www/static/js/q.js: -------------------------------------------------------------------------------- 1 | var 2 | Q=function(W,D,M,body,laHash,lash,L,LL,index,popstate,VS,NB,Regex,key,Q){ 3 | NB='onhashchange' in W; 4 | body=D.getElementsByTagName('body')[0]; 5 | laHash='`'; 6 | Regex=[]; 7 | key='!'; 8 | popstate=function(){ 9 | if(NB)W.onhashchange=popstate; 10 | if(laHash==location.hash) 11 | return; 12 | 13 | Q.lash=lash=location.hash.substring(key.length+1); 14 | 15 | L=lash.split('/'); 16 | 17 | var 18 | i=Regex.length; 19 | while(i--)if(LL=lash.match(Regex[i][0])){ 20 | LL[0]=Regex[i][1]; 21 | L=LL; 22 | break; 23 | } 24 | 25 | if(!Q[L[0]]){ 26 | location.hash='#'+key+index; 27 | Q.lash=index; 28 | return; 29 | } 30 | 31 | //body.className='body-'+L[0]; 32 | 33 | if(Q.pop) 34 | Q.pop.apply(W,L); 35 | 36 | laHash=location.hash; 37 | 38 | Q.arg=L; 39 | Q[L.shift()].apply(W,L); 40 | }; 41 | Q={ 42 | lash:'', 43 | arg:[], 44 | init:function(o){ 45 | 46 | if(o.key!==undefined) 47 | key=o.key; 48 | 49 | index=o.index||'V'; 50 | 51 | if(o.pop&&typeof o.pop=='function') 52 | Q.pop=o.pop; 53 | 54 | popstate(); 55 | 56 | if(!NB) 57 | setInterval(function(){ 58 | if(laHash!=location.hash){ 59 | popstate(); 60 | laHash=location.hash; 61 | } 62 | },100); 63 | }, 64 | reg:function(r,u){ 65 | if(!r||!u) 66 | return; 67 | 68 | switch(typeof r){ 69 | case 'object': 70 | if(typeof u=='function'){ 71 | var fn='A'+(('8'+Math.random()).substring(3)*1).toString(16); 72 | Q[fn]=u; 73 | u=fn; 74 | } 75 | Regex.push([r,u]); 76 | break; 77 | case 'string': 78 | if(typeof u=='function'){ 79 | Q[r]=u 80 | }else if(typeof u=='string' && Q[u]){ 81 | Q[r]=Q[u] 82 | } 83 | break; 84 | } 85 | return this 86 | }, 87 | V:function(){ 88 | console.log('Q.js 请设置框架默认页面'); 89 | console.log('Q.js @卜卜口 2014/12/28'); 90 | }, 91 | go:function(u){ 92 | location.hash='#'+key+u; 93 | } 94 | }; 95 | return Q; 96 | }(this,document); -------------------------------------------------------------------------------- /www/static/js/templet.js: -------------------------------------------------------------------------------- 1 | (function(上帝){ 2 | var 3 | 需编码字串表={ 4 | '&':'&', 5 | '<':'<', 6 | '>':'>', 7 | '"':'"', 8 | "'":''', 9 | '/':'/', 10 | '`':'`', 11 | '=':'=' 12 | }, 13 | 编码成文本=function(string){ 14 | return String(string).replace(/[&<>"'`=\/]/g,function(s){ 15 | return 需编码字串表[s]; 16 | }).replace(/\n\r/g,function(s){ 17 | return '\\n'; 18 | }) 19 | }, 20 | 编码成网页=function(string){ 21 | return String(string); 22 | return String(string).replace(/"/g,function(s){ 23 | return '\\'+s; 24 | }); 25 | }, 26 | 编译模板=function(模板字串){ 27 | var 28 | 已打开的钥匙们=[], 29 | 钥匙前缀们='_', 30 | 模板字串=模板字串 31 | .replace(/[\n\r\t]/g,'') 32 | .replace(/"/g,'\\"') 33 | .replace(/\{\{(#|\/|\^|&|\$)?(.+?)\}\}/g,function(整段文字,动作,管道){ 34 | 35 | 36 | if(管道=='.') 37 | 管道='_循环关键字'; 38 | 39 | 管道=管道.replace(/\|\|/g,' or '); 40 | 41 | 管道=管道.split('|'); 42 | 43 | 钥匙=管道.shift(); 44 | 45 | var 46 | 管道前, 47 | 管道后, 48 | 钥匙和管道; 49 | 50 | 管道前=管道.reverse().join('(')+'('; 51 | 52 | 管道后=[]; 53 | 管道后.length=管道.length; 54 | 管道后=管道后.join(')')+')'; 55 | 56 | 57 | 58 | 钥匙和管道=管道前+钥匙+管道后; 59 | 60 | 61 | //钥匙和管道=钥匙和管道.replace(/ or /g,'||'); 62 | 63 | 64 | 钥匙前缀们=[]; 65 | 钥匙前缀们.length=已打开的钥匙们.length+3; 66 | 钥匙前缀们=钥匙前缀们.join('_'); 67 | 68 | 69 | switch(动作){ 70 | case '#': 71 | 已打开的钥匙们.push(钥匙); 72 | 73 | return '");\ 74 | (function(){\ 75 | var '+钥匙前缀们+'value;\ 76 | var '+钥匙前缀们+'key;\ 77 | if( typeof('+钥匙+')!=="undefined" && ('+钥匙+') && ('+钥匙+'='+钥匙和管道+'))\ 78 | for('+钥匙前缀们+'key in '+钥匙+')\ 79 | with('+钥匙前缀们+'value='+钥匙+'['+钥匙前缀们+'key]){\ 80 | var _钥匙='+钥匙前缀们+'key;\ 81 | var _循环关键字='+钥匙前缀们+'value;\ 82 | $return.push("'; 83 | 84 | break; 85 | case '$': 86 | 已打开的钥匙们.push(钥匙); 87 | 88 | return '");\ 89 | (function(){\ 90 | if( typeof('+钥匙+')!=="undefined" && ('+钥匙+') ){\ 91 | $return.push("'; 92 | 93 | break; 94 | case '^': 95 | 已打开的钥匙们.push(钥匙); 96 | 97 | return '");\ 98 | (function(){\ 99 | if( typeof('+钥匙+')==="undefined" || !('+钥匙+') ){\ 100 | $return.push("'; 101 | 102 | break; 103 | case '/': 104 | var 105 | 长度=已打开的钥匙们.length+1; 106 | while(已打开的钥匙们[--长度]&&已打开的钥匙们[长度]!=钥匙); 107 | 108 | 已打开的钥匙们.splice(长度,1); 109 | 110 | return '")\ 111 | }\ 112 | })();\ 113 | $return.push("'; 114 | 115 | break; 116 | case '&': 117 | 118 | return '");\ 119 | if(typeof('+钥匙+')!=="undefined")\ 120 | $return.push(编码成网页('+钥匙和管道+'||\'\'));\ 121 | \ 122 | $return.push("'; 123 | 124 | break; 125 | default: 126 | 127 | return '");\ 128 | if(typeof('+钥匙+')!=="undefined")\ 129 | $return.push(编码成文本('+钥匙和管道+'||\'\'));\ 130 | \ 131 | $return.push("'; 132 | 133 | break; 134 | } 135 | 136 | }); 137 | 138 | 模板字串='\ 139 | var $return=[];\ 140 | var _value=$data;\ 141 | var _key;\ 142 | with($data){\ 143 | $return.push("'+模板字串+'");\ 144 | }\ 145 | return $return.join(\'\');'; 146 | 147 | return Function('$data','编码成文本','编码成网页',模板字串.replace(/ or /g,'||')); 148 | }, 149 | 运转=function(模板字串,数据,作用域){ 150 | //console.log(编译模板(模板字串)); 151 | 152 | return 编译模板(模板字串).call(作用域||上帝,数据,编码成文本,编码成网页); 153 | }; 154 | 155 | 上帝.模板={ 156 | 运转:运转, 157 | 编译模板:编译模板, 158 | 编码成文本:编码成文本, 159 | 编码成网页:编码成网页, 160 | }; 161 | 162 | })(this); -------------------------------------------------------------------------------- /www/static/js/获取模板-开发版.js: -------------------------------------------------------------------------------- 1 | var 2 | FILES={}, 3 | getFile=function(url){ 4 | if(FILES[url]) 5 | return FILES[url]; 6 | 7 | var 8 | x=new XMLHttpRequest(); 9 | x.open('GET',url,0); 10 | x.send(); 11 | 12 | return FILES[url]=x.response; 13 | }, 14 | getView=function(key){ 15 | return getFile('static/view/'+key+'.view'); 16 | }; 17 | getTemplet=function(key){ 18 | return getFile('static/templet/'+key+'.templet'); 19 | }; -------------------------------------------------------------------------------- /www/static/less/i.less: -------------------------------------------------------------------------------- 1 | @import url(itorr.normalize.less); 2 | @import url(layout.less); 3 | @import url(view-posts.less); 4 | @import url(view-article.less); 5 | @import url(step.less); -------------------------------------------------------------------------------- /www/static/less/itorr.normalize.less: -------------------------------------------------------------------------------- 1 | body,h1,h2,h3,h4,h5,p,form,ol,ul{margin:0;} 2 | ol,ul{padding:0;} 3 | html{ 4 | font:1em "Avenir Next",Avenir,"Helvetica Neue",Helvetica,"Lantinghei SC","Hiragino Sans GB","Microsoft YaHei","微软雅黑", "STHeiti","WenQuanYi Micro Hei",SimSun,sans-serif; 5 | color:#222; 6 | } 7 | 8 | 9 | textarea,input,option,select,button{font:inherit;} 10 | 11 | 12 | h1,h2,h3,h4{font-weight:500;} 13 | textarea:focus,input:focus{outline:none;} 14 | ::selection{background:rgba(0,149,255,0.1);} 15 | ul{list-style-type:none;} 16 | a{text-decoration:none;color:#635752;} 17 | img{border:0 none;} 18 | 19 | .o{overflow:hidden;zoom:1;} 20 | .l{float:left;} 21 | .r{float:right;} 22 | 23 | .c:after{content:'.';display:block;height:0;clear:both;visibility:hidden;} 24 | * html .c{height:1%;} 25 | 26 | .h{opacity:0;pointer-events:none;} 27 | 28 | a,input,button{transition:.3s ease;} 29 | 30 | xmp{display:none;} 31 | 32 | -------------------------------------------------------------------------------- /www/static/less/layout.less: -------------------------------------------------------------------------------- 1 | 2 | html{ 3 | background:#F0DAB3 url(../img/bg.jpg) top center; 4 | } 5 | 6 | html, 7 | body{ 8 | height:100%; 9 | overflow:hidden; 10 | } 11 | 12 | 13 | body{ 14 | 15 | -webkit-perspective: 400px; 16 | -moz-perspective: 400px; 17 | -ms-perspective: 400px; 18 | perspective: 400px; 19 | -webkit-transform-style: preserve-3d; 20 | -moz-transform-style: preserve-3d; 21 | -ms-transform-style: preserve-3d; 22 | transform-style: preserve-3d; 23 | } 24 | 25 | 26 | header{ 27 | 28 | } 29 | header a{ 30 | padding:2em; 31 | display:block; 32 | transition:none; 33 | } 34 | header img{ 35 | display:block; 36 | width:60px; 37 | height:60px; 38 | border-radius:9em; 39 | margin:0 auto; 40 | transition:none; 41 | box-shadow:0 1px 4px rgba(20,0,0,.1); 42 | } 43 | 44 | 45 | 46 | 47 | .side{ 48 | height:100%; 49 | position:relative; 50 | text-align:center; 51 | transition:opacity .3s ease; 52 | 53 | 54 | -webkit-overflow-scrolling:touch; 55 | overflow-y:auto; 56 | 57 | 58 | 59 | box-shadow: 60 | 0 0 15px rgba(30,0,0,.2), 61 | 0 0 0 1px rgba(100,0,0,.1); 62 | } 63 | 64 | 65 | ::-webkit-scrollbar-track-piece{} 66 | ::-webkit-scrollbar{ 67 | width:4px; 68 | height:6px; 69 | 70 | } 71 | ::-webkit-scrollbar-thumb{ 72 | height:40px; 73 | background-color:#635752; 74 | border-radius:9em; 75 | } 76 | ::-webkit-scrollbar-thumb:hover{ 77 | background-color:#222; 78 | } 79 | 80 | 81 | .side::-webkit-scrollbar{ 82 | width:0px; 83 | height:6px; 84 | 85 | } 86 | 87 | 88 | 89 | 90 | 91 | footer{ 92 | 93 | text-align:center; 94 | color:#b9a691; 95 | padding:6em 0 2em; 96 | font-size:12px; 97 | text-shadow:0 1px 0 rgba(255,255,255,.8); 98 | } 99 | 100 | footer p{ 101 | 102 | } 103 | -------------------------------------------------------------------------------- /www/static/less/step.less: -------------------------------------------------------------------------------- 1 | 2 | 3 | body[step="post"] header a{ 4 | padding:1em; 5 | } 6 | body[step="post"] header img{ 7 | } 8 | 9 | 10 | body[step="post"] .side{ 11 | 12 | text-align:left; 13 | width:300px; 14 | 15 | background:#fffcf6; 16 | -webkit-animation:sideIn .8s ease-in-out; 17 | animation:sideIn .8s ease-in-out; 18 | } 19 | @-webkit-keyframes sideIn { 20 | 0%{ 21 | opacity:0; 22 | } 23 | 50%{ 24 | opacity:0; 25 | -webkit-transform:translateY(10px); 26 | transform:translateY(10px); 27 | } 28 | } 29 | @keyframes sideIn { 30 | 0%{ 31 | opacity:0; 32 | } 33 | 50%{ 34 | opacity:0; 35 | } 36 | } 37 | 38 | body[step="post"] .post.active, 39 | body[step="post"] .post:hover{ 40 | background: linear-gradient(#fbf1e7,#fbf3ea); 41 | background: -webkit-linear-gradient(top,#fbf1e7,#fbf3ea); 42 | } 43 | 44 | body[step="post"] .post h2{ 45 | font-size:1em; 46 | } 47 | 48 | 49 | body[step="post"] .post time{ 50 | font-size:.5em; 51 | } 52 | 53 | body[step="post"] .article-box{ 54 | -webkit-transform:translateZ(0) translateX(0) rotateY(0); 55 | transform:translateZ(0) translateX(0) rotateY(0); 56 | opacity:1; 57 | pointer-events:auto; 58 | } 59 | body[step="post"] .article{ 60 | pointer-events:auto; 61 | } 62 | 63 | 64 | @media(max-width:1060px){ 65 | .article-box{ 66 | } 67 | .article{ 68 | margin:1em; 69 | max-width:800px; 70 | } 71 | } 72 | @media(max-width:960px){ 73 | body[step="post"] .side{ 74 | width:200px; 75 | background:none; 76 | } 77 | .side{ 78 | box-shadow:none; 79 | } 80 | .article-box{ 81 | margin-left:185px; 82 | } 83 | .article{ 84 | margin:15px; 85 | } 86 | 87 | body[step="post"] .post.active, 88 | body[step="post"] .post:hover{ 89 | background:linear-gradient(#716661,#5f5450); 90 | background:-webkit-linear-gradient(top,#716661,#5F5450); 91 | color:#FFF; 92 | text-shadow:0 1px 0 rgba(0,0,0,.5); 93 | } 94 | 95 | body[step="post"] .post h2{ 96 | font-size:1em; 97 | } 98 | .post[image] h2:after{ 99 | display:none; 100 | } 101 | .article{ 102 | } 103 | body[step="post"] footer{ 104 | display:none; 105 | } 106 | } 107 | @media(max-width:780px){ 108 | body[step="post"] header img{ 109 | margin:0; 110 | } 111 | .article-box{ 112 | margin-left:90px; 113 | background:#fffcf7; 114 | box-shadow: 115 | 0 0 15px rgba(30,0,0,.2), 116 | 0 0 0 1px rgba(100,0,0,.1); 117 | } 118 | .article{ 119 | box-shadow:none; 120 | margin:0; 121 | } 122 | 123 | body[step="post"] .side .post{ 124 | padding:.6em .6em .5em; 125 | } 126 | } 127 | @media(max-width:600px){ 128 | .article-box{ 129 | margin-left:0; 130 | position:absolute; 131 | overflow:hidden; 132 | -webkit-transform:translateY(80px); 133 | transform:translateY(80px); 134 | } 135 | body[step="post"] .article-box{ 136 | position:static; 137 | } 138 | .side{ 139 | height:auto; 140 | width:auto; 141 | } 142 | html,body{ 143 | overflow:visible; 144 | } 145 | body[step="post"] header img{ 146 | margin:0 auto; 147 | } 148 | body[step="post"] .side{ 149 | text-align:center; 150 | width:auto; 151 | 152 | } 153 | body[step="post"] .side img{ 154 | } 155 | body[step="post"] .posts{ 156 | display:none; 157 | } 158 | .article{ 159 | padding:1em 1.3em; 160 | } 161 | 162 | .text img{ 163 | max-width:100%; 164 | padding:0; 165 | margin:.5em 0; 166 | height:auto; 167 | } 168 | .article .count{ 169 | display:block; 170 | position:static; 171 | padding:.5em; 172 | } 173 | 174 | } -------------------------------------------------------------------------------- /www/static/less/view-article.less: -------------------------------------------------------------------------------- 1 | 2 | 3 | .article-box{ 4 | margin-left:300px; 5 | position:absolute; 6 | top:0; 7 | bottom:0; 8 | left:0; 9 | right:0; 10 | 11 | -webkit-overflow-scrolling:touch; 12 | overflow-y:auto; 13 | 14 | transition:.3s ease; 15 | 16 | opacity:0; 17 | -webkit-transform:translateZ(-10px) translateX(50px) rotateY(5deg); 18 | transform:translateZ(-10px) translateX(50px) rotateY(5deg); 19 | 20 | pointer-events:none; 21 | } 22 | 23 | 24 | 25 | .article{ 26 | padding:2em 2.8em; 27 | max-width:600px; 28 | margin:2em auto; 29 | line-height:2; 30 | background:#fffcf7; 31 | box-shadow: 32 | 0 0 15px rgba(30,0,0,.2), 33 | 0 0 0 1px rgba(100,0,0,.1); 34 | 35 | pointer-events:none; 36 | position:relative; 37 | } 38 | 39 | 40 | 41 | .article h1{ 42 | margin:-.4em -.4em 0 -.2em; 43 | line-height:1.2; 44 | padding:.5em 0 0; 45 | } 46 | .article time{ 47 | display:block; 48 | font-size:.9em; 49 | padding:0 1em; 50 | line-height:3; 51 | color:#b9a691; 52 | } 53 | .article .count{ 54 | position:absolute; 55 | top:.5em;right:.5em; 56 | font-size:.9em; 57 | padding:0 .5em; 58 | color:#b9a691; 59 | } 60 | .article .count:before{ 61 | content:'共 '; 62 | } 63 | .article .count:after{ 64 | content:' 字'; 65 | } 66 | .text img{ 67 | display:block; 68 | padding:.7em; 69 | background:#FFF; 70 | box-shadow: 71 | 0 1px 7px rgba(0,0,0,.1), 72 | 0 0 0 1px rgba(40,0,0,.1); 73 | margin:1em 5em 1em 1em; 74 | } 75 | .text im{ 76 | max-width:80%; 77 | max-height:600px; 78 | } 79 | .text p{ 80 | text-indent:1em; 81 | } 82 | .text ul{ 83 | padding:.5em; 84 | } 85 | .text ul li{ 86 | padding-left:1.5em; 87 | position:relative; 88 | } 89 | 90 | .text ol{ 91 | padding:.5em; 92 | padding-left:40px; 93 | } 94 | .text ol li{ 95 | 96 | } 97 | .text pre{ 98 | line-height:1; 99 | } 100 | .text pre code{ 101 | display:block; 102 | overflow-x:auto; 103 | padding:.5em .7em; 104 | background:#23241f;color:#f8f8f2; 105 | } 106 | /*.article ul{padding-left:2em;list-style-type:disc;}*/ 107 | 108 | .text blockquote{ 109 | font-size:.9em; 110 | line-height:1.5; 111 | background:#fbf3eb; 112 | color:#a8988e; 113 | margin:.2em; 114 | padding:1.2em 1.5em; 115 | 116 | } 117 | .text blockquote p{ 118 | text-indent:0; 119 | } 120 | 121 | .text ul li:after{ 122 | content:''; 123 | position:absolute; 124 | top:50%; 125 | left:.4em; 126 | 127 | width:.4em;height:.4em; 128 | margin-top:-.2em; 129 | background:#333; 130 | border-radius:9em; 131 | 132 | } 133 | -------------------------------------------------------------------------------- /www/static/less/view-posts.less: -------------------------------------------------------------------------------- 1 | 2 | .posts{ 3 | 4 | } 5 | .post{ 6 | display:block; 7 | padding:.6em 1em .5em; 8 | text-shadow:0 1px 0 rgba(255,255,255,.8); 9 | } 10 | .post.active, 11 | .post:hover{ 12 | box-shadow: 0 1px 4px rgba(0,0,0,.03) inset; 13 | text-shadow:0 1px 0 #FFF; 14 | 15 | background:rgba(255,255,255,.5); 16 | } 17 | 18 | 19 | .post h2{ 20 | line-height:1.1; 21 | padding:.2em 0 0; 22 | margin:0; 23 | } 24 | .post[image] h2:after{ 25 | content:''; 26 | display:inline-block; 27 | width:24px; 28 | height:24px; 29 | vertical-align:middle; 30 | margin-left:.2em; 31 | background:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCI+Cgk8cGF0aCBkPSJNMSw0djE2aDIyVjRIMXogTTIxLDZ2MTIuMTdsLTMuNjctNC4xNmwtMi4yMSwyLjE3TDguMzUsOC4yNkwzLDEzLjgxVjZIMjF6Ii8+Cgk8Y2lyY2xlIGN4PSIxNi40MyIgY3k9IjkuOTMiIHI9IjIuNDMiLz4KPC9zdmc+Cg==); 32 | opacity:.2; 33 | position:relative; 34 | top:-3px; 35 | } 36 | .post time{ 37 | color:#b9a691; 38 | font-size:.8em; 39 | margin-left:1em; 40 | margin-left:0; 41 | } 42 | 43 | -------------------------------------------------------------------------------- /www/static/templet/article.templet: -------------------------------------------------------------------------------- 1 |
2 |
3 | {{&text}} 4 |
5 | {{detail.length}} 6 |
7 | 8 |
9 |
-------------------------------------------------------------------------------- /www/static/templet/header.templet: -------------------------------------------------------------------------------- 1 | 2 | {{$avatar_url}} 3 | 4 | {{/avatar_url}} 5 | 6 | {{^avatar_url}} 7 |

{{nickname}}

8 | {{/avatar_url}} 9 |
-------------------------------------------------------------------------------- /www/static/templet/posts.templet: -------------------------------------------------------------------------------- 1 | {{#post}} 2 | 3 |

{{title}}

4 | 5 |
6 | {{/post}} --------------------------------------------------------------------------------