├── .editorconfig
├── .eslintrc
├── .gitignore
├── README.md
├── assets
├── css
│ └── onepice.min.css
├── fonts
│ ├── blog.eot
│ ├── blog.svg
│ ├── blog.ttf
│ ├── blog.woff
│ ├── iconfont.eot
│ ├── iconfont.svg
│ ├── iconfont.ttf
│ └── iconfont.woff
├── js
│ └── onepice.min.js
└── vendors
│ ├── highlight.js
│ ├── jquery-2.1.4.min.js
│ ├── share.min.css
│ └── share.min.js
├── config.example.js
├── default.hbs
├── gulpfile.js
├── index.hbs
├── package.json
├── page-tags.hbs
├── partials
├── navigation.hbs
├── pagination.hbs
├── scripts
│ ├── comment.hbs
│ └── share.hbs
└── sections
│ └── side.hbs
├── post.hbs
├── src
├── fonts
│ ├── blog.eot
│ ├── blog.svg
│ ├── blog.ttf
│ ├── blog.woff
│ ├── iconfont.eot
│ ├── iconfont.svg
│ ├── iconfont.ttf
│ └── iconfont.woff
├── js
│ └── common.js
├── scss
│ ├── _common
│ │ ├── _base.scss
│ │ ├── _icon.scss
│ │ ├── _normalize.scss
│ │ ├── _variables.scss
│ │ └── index.scss
│ ├── _components
│ │ ├── highlight
│ │ │ ├── _diff.scss
│ │ │ ├── _theme.scss
│ │ │ └── index.scss
│ │ └── index.scss
│ ├── _custom
│ │ ├── _about.scss
│ │ ├── _tags.scss
│ │ └── index.scss
│ ├── _mixins
│ │ ├── _clearfix.scss
│ │ └── index.scss
│ ├── _site
│ │ ├── _article.scss
│ │ ├── _base.scss
│ │ ├── _media.scss
│ │ ├── _page.scss
│ │ └── index.scss
│ └── app.scss
└── vendors
│ ├── highlight.js
│ ├── jquery-2.1.4.min.js
│ ├── share.min.css
│ └── share.min.js
├── tag.hbs
└── yarn.lock
/.editorconfig:
--------------------------------------------------------------------------------
1 | # EditorConfig is awesome: http://EditorConfig.org
2 |
3 | root = true
4 |
5 | [*]
6 | charset = utf-8
7 | end_of_line = lf
8 | indent_style = space
9 | indent_size = 2
10 | trim_trailing_whitespace = true
11 | insert_final_newline = true
12 |
--------------------------------------------------------------------------------
/.eslintrc:
--------------------------------------------------------------------------------
1 | {
2 | "env": {
3 | "browser": true,
4 | "node": true,
5 | "commonjs": true,
6 | "es6": true
7 | },
8 | "extends": "eslint:recommended",
9 | "parserOptions": {
10 | "sourceType": "module"
11 | },
12 | "rules": {
13 | "indent": [
14 | "error",
15 | 4, {
16 | "SwitchCase": 1
17 | }
18 | ],
19 | "linebreak-style": [
20 | "error",
21 | "unix"
22 | ],
23 | "quotes": [
24 | "error",
25 | "single"
26 | ],
27 | "semi": [
28 | "error",
29 | "always"
30 | ]
31 | }
32 | }
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
2 |
3 | # Ignore Mac OS desktop services store
4 | .DS_Store
5 |
6 | # Ignore Windows desktop setting file
7 | desktop.ini
8 |
9 | *.log
10 |
11 | .idea
12 |
13 | .vscode
14 |
15 | /dist
16 |
17 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | Ghost主题
2 | ===
3 |
4 | onepice 是一款适用于ghost的博客主题。
5 |
6 | 反馈
7 | ===
8 |
9 | 在你浏览或使用本主题时,发现问题或者是有好的建议,希望能够在这里给予反馈。
10 |
11 | [New Issue](https://github.com/guovz/onepice/issues/new)
12 |
13 | License
14 | ===
15 | MIT License
16 |
--------------------------------------------------------------------------------
/assets/css/onepice.min.css:
--------------------------------------------------------------------------------
1 | /**
2 | * onepice - this is a simple theme for ghost
3 | * @version 1.1.1
4 | * @link https://github.com/jaylinwang/onepice#readme
5 | * @author Jaylin Wang (http://jaylin.wang)
6 | * @license MIT
7 | *//*! normalize.css v5.0.0 | MIT License | github.com/necolas/normalize.css */html{font-family:sans-serif;line-height:1.15;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,footer,header,nav,section{display:block}h1{font-size:2em;margin:0.67em 0}figcaption,figure,main{display:block}figure{margin:1em 40px}hr{box-sizing:content-box;height:0;overflow:visible}pre{font-family:monospace, monospace;font-size:1em}a{background-color:transparent;-webkit-text-decoration-skip:objects}a:active,a:hover{outline-width:0}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted}b,strong{font-weight:inherit}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em}dfn{font-style:italic}mark{background-color:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}audio,video{display:inline-block}audio:not([controls]){display:none;height:0}img{border-style:none}svg:not(:root){overflow:hidden}button,input,optgroup,select,textarea{font-family:sans-serif;font-size:100%;line-height:1.15;margin:0}button,input{overflow:visible}button,select{text-transform:none}button,html [type="button"],[type="reset"],[type="submit"]{-webkit-appearance:button}button::-moz-focus-inner,[type="button"]::-moz-focus-inner,[type="reset"]::-moz-focus-inner,[type="submit"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type="button"]:-moz-focusring,[type="reset"]:-moz-focusring,[type="submit"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{border:1px solid #c0c0c0;margin:0 2px;padding:0.35em 0.625em 0.75em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{display:inline-block;vertical-align:baseline}textarea{overflow:auto}[type="checkbox"],[type="radio"]{box-sizing:border-box;padding:0}[type="number"]::-webkit-inner-spin-button,[type="number"]::-webkit-outer-spin-button{height:auto}[type="search"]{-webkit-appearance:textfield;outline-offset:-2px}[type="search"]::-webkit-search-cancel-button,[type="search"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details,menu{display:block}summary{display:list-item}canvas{display:inline-block}template{display:none}[hidden]{display:none}body{font-size:14px;font-family:"PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "微软雅黑", "Helvetica Neue", Helvetica, Arial, sans-serif}*{box-sizing:border-box}@font-face{font-family:"iconfont";src:url("../fonts/blog.eot?t=1476881981450");src:url("../fonts/blog.eot?t=1476881981450#iefix") format("embedded-opentype"),url("../fonts/blog.woff?t=1476881981450") format("woff"),url("../fonts/blog.ttf?t=1476881981450") format("truetype"),url("../fonts/blog.svg?t=1476881981450#iconfont") format("svg")}.iconfont{font-family:"iconfont" !important;font-size:16px;font-style:normal;-webkit-font-smoothing:antialiased;-webkit-text-stroke-width:0.2px;-moz-osx-font-smoothing:grayscale}.icon-weixin:before{content:"\3488"}.icon-twitter:before{content:"\e634"}.icon-liebiao:before{content:"\e654"}.icon-mulu:before{content:"\e600"}.icon-search:before{content:"\e672"}.icon-guanbifuzhi:before{content:"\e633"}.icon-weibo:before{content:"\e60a"}.icon-dianzan:before{content:"\e83b"}.icon-rss:before{content:"\e630"}.icon-xihuan:before{content:"\e63c"}.icon-facebook:before{content:"\e608"}.icon-iconfonttengxunweibo:before{content:"\e67e"}.icon-github:before{content:"\e636"}.icon-kongjian01:before{content:"\e646"}.icon-xiaolian:before{content:"\e645"}.icon-add:before{content:"\e603"}.icon-attachment:before{content:"\e604"}.icon-down:before{content:"\e605"}.icon-enter:before{content:"\e601"}.icon-up:before{content:"\e606"}.icon-back:before{content:"\e602"}.icon-youxiang:before{content:"\e62f"}.icon-mulu1:before{content:"\e6c5"}.icon-quotes-down:before{content:"\e60e"}.icon-quotes-up:before{content:"\e60f"}.icon-google:before{content:"\e635"}.icon-shenglve:before{content:"\e607"}pre,code{font-family:"consolas","Menlo","monospace"}code{padding:2px 6px;word-wrap:break-all;color:#4d4d4c;background:#f2f2f2;border-radius:3px;font-size:13px}pre{overflow:scroll;margin:20px 0;padding:15px;color:#4d4d4c;font-size:13px;background:#f2f2f2;line-height:1}pre code{padding:0;color:#4d4d4c;background:none;text-shadow:none}.highlight{overflow:scroll;margin:20px 0;padding:15px;color:#4d4d4c;font-size:13px;background:#f2f2f2;line-height:1}.highlight pre{border:none;margin:0;padding:1px}.highlight table{margin:0;width:auto;border:none}.highlight td{border:none;padding:0}.highlight figcaption{font-size:1em;color:#4d4d4c;line-height:1em;margin-bottom:1em}.highlight figcaption::after{content:"";display:table;clear:both}.highlight figcaption a{float:right;color:#4d4d4c}.highlight figcaption a:hover{border-bottom-color:#4d4d4c}.highlight .gutter pre{color:#636363;text-align:right;border-right:1px solid #e6e6e6;padding-right:20px}.highlight .code{overflow:scroll}.highlight .line{height:20px}.gutter{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.gist table{width:auto}.gist table td{border:none}pre .deletion{background:#fdd}pre .addition{background:#dfd}pre .meta{color:#8959a8}pre .comment{color:#8e908c}pre .variable,pre .attribute,pre .tag,pre .regexp,pre .ruby,pre .constant,pre .xml,pre .tag,pre .title,pre .xml,pre .pi,pre .xml,pre .doctype,pre .html,pre .doctype,pre .css,pre .id,pre .css,pre .class,pre .css,pre .pseudo{color:#c82829}pre .number,pre .preprocessor,pre .built_in,pre .literal,pre .params,pre .constant,pre .command{color:#f5871f}pre .ruby,pre .class,pre .title,pre .css,pre .rules,pre .attribute,pre .string,pre .value,pre .inheritance,pre .header,pre .ruby,pre .symbol,pre .xml,pre .cdata,pre .special,pre .number,pre .formula{color:#718c00}pre .title,pre .css,pre .hexcolor{color:#3e999f}pre .function,pre .python,pre .decorator,pre .python,pre .title,pre .ruby,pre .function,pre .title,pre .ruby,pre .title,pre .keyword,pre .perl,pre .sub,pre .javascript,pre .title,pre .coffeescript,pre .title{color:#4271ae}pre .keyword,pre .javascript,pre .function{color:#8959a8}.top-loading{height:2px;width:100%;background-color:#fff}.header{border-bottom:1px solid #f2f2f2;box-shadow:1px 1px 1px #f2f2f2}.header .header-wrapper{position:relative;width:1000px;margin-left:auto;margin-right:auto;overflow:hidden}.header .header-wrapper::after{content:"";display:table;clear:both}.header .brand{height:60px;float:left;line-height:60px}.header .brand a{font-size:24px;text-decoration:none;vertical-align:middle}.header .brand a img{height:50px;vertical-align:middle}.header .nav{float:left}.header .nav ul{margin:0;list-style:none}.header .nav ul li{line-height:60px;display:inline-block;position:relative}.header .nav ul li a{display:inline-block;height:60px;padding-left:10px;padding-right:10px;color:#333;text-decoration:none;font-weight:320;border-bottom:2px solid transparent}.header .nav ul li a:hover{color:#00A0E9}.header .nav ul li.current a{color:#000;border-bottom-color:#00A0E9}.header .nav .submenu{position:absolute;z-index:999;width:420px}.header .tool{float:right}.header .tool ul{padding:0;margin:0;list-style:none}.header .tool ul li{display:inline-block;padding-top:10px;padding-left:10px;padding-right:10px;text-align:center;cursor:pointer}.header .tool ul li:hover{color:#00A0E9}.header .tool ul li div:first-child{line-height:20px}.header .tool ul li div{font-size:12px;line-height:20px}.header .search{position:absolute;top:0;bottom:0;left:1000px;right:0;background:#fff;transition:left .3s}.header .search.active{left:0}.header .search .search-wrapper{display:table;width:640px;line-height:60px;margin-left:auto;margin-right:auto;color:#555}.header .search .search-wrapper .search-icon{display:table-cell;width:40px;text-align:center}.header .search .search-wrapper .search-input{display:table-cell}.header .search .search-wrapper .search-input input{width:100%;border:none;margin-top:10px;line-height:40px;color:#555;outline:none}.header .search .search-wrapper .search-close{display:table-cell;width:40px;text-align:center;cursor:pointer}.content .content-wrapper{display:-ms-flexbox;display:flex;width:1000px;margin-left:auto;margin-right:auto;padding-top:30px;padding-bottom:30px;position:relative}.content .content-wrapper::after{content:"";display:table;clear:both}.main{-ms-flex:1;flex:1}.main.post__wrap{background:rgba(250,250,250,0.8);padding-left:30px;padding-right:30px;border-radius:4px}.side{width:280px}.side .side-wrapper{padding-left:30px}.side h2{margin:0;padding:10px 0;font-size:16px;color:#333;text-align:center;border-top:2px solid #00A0E9;border-bottom:1px dashed #ccc}.side .box:not(:last-child){margin-bottom:30px}.side ul{list-style:none;margin:0;padding:10px 0}.side ul li a{text-decoration:none}.side ul.latest-list{margin:0;list-style:none;padding:10px 0}.side ul.latest-list li{position:relative;padding-top:5px;padding-bottom:5px;padding-left:20px}.side ul.latest-list li::before{position:absolute;content:' ';display:inline-block;height:0;width:0;top:10px;left:0;border-width:4px;border-style:solid;border-color:#fff #fff #fff #00A0E9}.side ul.latest-list li a{color:#68727d;text-decoration:none}.side ul.latest-list li a:hover{color:#00A0E9}.side ul.latest-list li .date{padding:5px 0;color:#828a92;font-size:12px}.side ul.tag-list{margin:0;list-style:none;padding:10px 0}.side ul.tag-list::after{content:"";display:table;clear:both}.side ul.tag-list li{width:33.3%;float:left;text-align:center;padding-right:4px;margin-bottom:5px}.side ul.tag-list li:nth-child(2n){padding-right:2px;padding-left:2px;text-align:center}.side ul.tag-list li:nth-child(3n){padding-right:0px;padding-left:4px}.side ul.tag-list li a{display:inline-block;width:100%;padding:0 10px;line-height:24px;color:#68727d;border:1px solid #68727d;border-radius:30px;text-decoration:none;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.side ul.tag-list li a:hover{color:#00A0E9;border-color:#00A0E9}.side ul.category-list{margin:0;list-style:none;padding:10px 0}.side ul.category-list::after{content:"";display:table;clear:both}.side ul.category-list li{width:50%;float:left;text-align:center;padding-right:5px;margin-bottom:10px}.side ul.category-list li:nth-child(2n){padding-right:0px;padding-left:5px}.side ul.category-list li a{display:inline-block;width:100%;padding:0 10px;line-height:30px;color:#68727d;border:1px solid #68727d;border-radius:3px;text-decoration:none;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.side ul.category-list li a:hover{color:#00A0E9;border-color:#00A0E9}.footer{background:#333}.footer .footer-wrapper{position:relative;width:1000px;margin-left:auto;margin-right:auto}.footer .footer-wrapper::after{content:"";display:table;clear:both}.footer .footer-wrapper ul{list-style:none;padding:0}.footer .footer-wrapper .sns{padding:30px;text-align:center}.footer .footer-wrapper .sns li{display:inline-block;height:40px;width:40px;text-align:center;line-height:40px;background:#636363;border-radius:40px}.footer .footer-wrapper .sns li:not(:last-child){margin-right:15px}.footer .footer-wrapper .sns li a{text-decoration:none}.footer .footer-wrapper .sns li .iconfont{font-size:18px;color:#fff}.footer .bottom-wrapper{position:relative;background:#222;color:#666}.footer .bottom-wrapper::after{content:"";display:table;clear:both}.footer .bottom-wrapper .copy{text-align:center;padding:10px}.article .article-wrapper{position:relative;margin-bottom:20px;padding-bottom:20px;border-bottom:1px solid #f2f2f2;word-wrap:break-word;word-break:break-all}.article .article-wrapper:last-child{border:none}.article .article-wrapper h1{padding-top:10px;padding-bottom:10px;font-size:22px;border-bottom:1px solid #f2f2f2}.article .article-wrapper h1 a{color:#333;text-decoration:none}.article .article-wrapper h1 a:hover{color:#00A0E9}.article .article-wrapper h2{font-size:18px;padding-top:5px;padding-bottom:5px;letter-spacing:1px;margin:0}.article .article-wrapper h2 a{color:#333;text-decoration:none}.article .article-wrapper h2 a:hover{color:#00A0E9}.article .article-wrapper hr{color:#f2f2f2;height:1px;border:0px;border-top:1px solid #f2f2f2;margin:0px;padding:0px;overflow:hidden}.article .article-wrapper p{margin-top:0;margin-bottom:15px}.article .article-wrapper p a{display:inline-block;color:#828a92;text-decoration:none;color:#00A0E9;border-bottom:1px solid transparent}.article .article-wrapper p a:hover{border-bottom:1px solid #00A0E9}.article .article-wrapper .tocbox{position:absolute;right:0;top:0}.article .article-wrapper .tocbox ol{margin:0;padding:0;list-style:none}.article .article-wrapper .tocbox ol li{line-height:20px}.article .article-wrapper .tocbox .toc-icon{position:absolute;right:0;top:0;height:30px;width:30px;text-align:center;line-height:30px;background-color:#00A0E9;border-radius:3px;color:#fff;cursor:pointer}.article .article-wrapper .tocbox .toc{display:none;position:absolute;right:40px;width:200px;padding:10px;background:#f2f2f2;border-radius:3px}.article .article-wrapper .tocbox .toc.active{display:block}.article .article-wrapper .tocbox .toc::before{position:absolute;content:' ';display:inline-block;height:10px;width:10px;right:-5px;top:10px;z-index:-1;background:#f2f2f2;transform:rotate(45deg)}.article .article-wrapper .tocbox .toc a{color:#68727d;text-decoration:none}.article .article-wrapper .tocbox .toc a:hover{color:#00A0E9}.article .article-wrapper .tocbox .toc>li{margin-bottom:5px}.article .article-wrapper .essential{color:#828a92;line-height:2;letter-spacing:1px;padding:15px 0}.article .article-wrapper .essential h1,.article .article-wrapper .essential h2,.article .article-wrapper .essential h3{margin-bottom:15px;padding-bottom:0;padding-top:10px}.article .article-wrapper .essential h1{font-size:18px}.article .article-wrapper .essential h2{font-size:16px}.article .article-wrapper .essential h3{font-size:14px}.article .article-wrapper .essential img{display:inline-block;margin:0 auto;width:100%;background:#f2f2f2;padding:5px;border-radius:3px}.article .article-wrapper .essential blockquote{margin:0;position:relative;padding:15px;margin-bottom:15px;border:1px solid #f8f8f8;background:#f8f8f8}.article .article-wrapper .essential blockquote p{margin:0}.article .article-wrapper .essential blockquote::before,.article .article-wrapper .essential blockquote::after{display:inline-block;position:absolute;font-family:"iconfont" !important;font-size:12px;height:30px;line-height:30px;width:30px;background:transparent;text-align:center;color:#68727d}.article .article-wrapper .essential blockquote::before{content:'\e60f';top:-15px;left:-10px}.article .article-wrapper .essential blockquote::after{content:'\e60e';bottom:-15px;right:-10px}.article .article-wrapper .essential ul{margin-top:0;margin-bottom:15px;padding:0;list-style:none}.article .article-wrapper .essential ul li{padding-left:15px;position:relative}.article .article-wrapper .essential ul li::before{content:' ';display:block;width:4px;height:4px;position:absolute;border-radius:4px;left:0;top:8px;background:#828a92}.article .article-wrapper .essential ul ul{list-style:none}.article .article-wrapper .essential ul ul li{padding-left:15px;position:relative}.article .article-wrapper .essential ul ul li::before{content:' ';display:block;width:3px;height:3px;position:absolute;left:0;top:8px;background:#828a92}.article .article-wrapper .basic ul{margin:0;padding:0;list-style:disc}.article .article-wrapper .basic ul li{display:inline-block;position:relative;line-height:20px;padding-right:6px;font-size:12px}.article .article-wrapper .basic ul li:not(:first-child){padding-left:8px}.article .article-wrapper .basic ul li:not(:first-child)::before{content:' ';display:inline-block;width:3px;height:3px;position:absolute;top:9px;left:-1px;border-radius:3px;background-color:#828a92}.article .article-wrapper .basic ul li a{color:#828a92;text-decoration:none}.article .article-wrapper .readall{display:inline-block;padding:5px 20px;color:#00A0E9;text-align:center;text-decoration:none;border:1px solid #00A0E9;border-radius:3px}.article .article-wrapper .readall:hover{color:#fff;background:#00A0E9}.article .article-wrapper .detail{color:#68727d;line-height:2;letter-spacing:1px;padding:15px 0}.article .article-wrapper .detail img{display:inline-block;margin:0 auto;max-width:100%;background:#f2f2f2;padding:5px;border-radius:3px}.article .article-wrapper .detail h1,.article .article-wrapper .detail h2,.article .article-wrapper .detail h3{margin-bottom:15px;padding-top:0;padding-bottom:0}.article .article-wrapper .detail h1{font-size:18px}.article .article-wrapper .detail h2{font-size:16px}.article .article-wrapper .detail h3{font-size:14px}.article .article-wrapper .detail blockquote{margin:0;position:relative;padding:15px;margin-bottom:15px;border:1px solid #f2f2f2;background:#f2f2f2}.article .article-wrapper .detail blockquote p{margin:0}.article .article-wrapper .detail blockquote::before,.article .article-wrapper .detail blockquote::after{display:inline-block;position:absolute;font-family:"iconfont" !important;font-size:12px;height:30px;line-height:30px;width:30px;background:transparent;text-align:center;color:#68727d}.article .article-wrapper .detail blockquote::before{content:'\e60f';top:-15px;left:-10px}.article .article-wrapper .detail blockquote::after{content:'\e60e';bottom:-15px;right:-10px}.article .article-wrapper .detail ul{margin-top:0;margin-bottom:15px;padding:0;list-style:none}.article .article-wrapper .detail ul li{padding-left:15px;position:relative}.article .article-wrapper .detail ul li::before{content:' ';display:block;width:6px;height:6px;position:absolute;border-radius:6px;left:0;top:12px;background:#00A0E9}.article .article-wrapper .detail ul ul{list-style:none}.article .article-wrapper .detail ul ul li{padding-left:15px;position:relative}.article .article-wrapper .detail ul ul li::before{content:' ';display:block;width:3px;height:3px;position:absolute;left:0;top:8px;background:#828a92}.article .article-wrapper .tags{color:#636363;text-align:center;padding-bottom:20px}.article .article-wrapper .tags a{display:inline-block;padding-bottom:5px;padding-left:5px;padding-right:5px;text-decoration:none;color:#68727d;cursor:pointer}.article .article-wrapper .tags a:not(:last-child){margin-right:5px}.article .article-wrapper .tags a:hover{color:#00A0E9}.article .article-wrapper .link{padding:20px 0;margin:0;font-size:14px;list-style:none;line-height:24px;border-top:1px solid #eee;border-bottom:1px solid #eee;color:#68727d}.article .article-wrapper .link .iconfont{font-size:14px}.article .article-wrapper .link span{display:inline-block}.article .article-wrapper .link a{display:inline-block;text-decoration:none;color:#68727d}.article .article-wrapper .link a:hover{color:#00A0E9}.article .share{display:-ms-flexbox;display:flex;padding:20px 0;border-top:1px solid #eee}.article .share .info{-ms-flex:1;flex:1;line-height:24px}.article .share .info input{width:280px;border:none;background:#eee;padding:2px 10px;outline:none;border-radius:3px}.article .share .social-share{width:220px;text-align:right}.article .share .social-share a{display:inline-block;height:40px;width:40px;line-height:40px;text-align:center;color:#fff;background:#eee;border:1px solid transparent;border-radius:2px}.article .share .social-share a.icon-weibo:hover{color:#F56467}.article .share .social-share a.icon-wechat:hover{color:#8CC81B}.article .share .social-share a.icon-qzone:hover{color:#F5BE3F}.article .share .social-share a.icon-qq:hover{color:#38A6D7}.article .share .social-share .icon-wechat .wechat-qrcode .qrcode{margin-top:10px;margin-bottom:0;margin-left:auto;margin-right:auto}.article .page-wrapper{border-top:1px solid #828a92}.page{border-top:1px solid #e4e4e4}.page .page-wrapper{text-align:center}.page .page-wrapper a{text-align:center;text-decoration:none}.page .page-wrapper .page-number,.page .page-wrapper .prev,.page .page-wrapper .next,.page .page-wrapper .space{display:inline-block;width:30px;height:40px;margin-top:-1px;line-height:40px;color:#636363;border-top:1px solid transparent}.page .page-wrapper .page-number.disabled,.page .page-wrapper .prev.disabled,.page .page-wrapper .next.disabled,.page .page-wrapper .space.disabled{cursor:not-allowed}.page .page-wrapper .page-number:hover,.page .page-wrapper .page-number.current,.page .page-wrapper .prev:hover,.page .page-wrapper .prev.current,.page .page-wrapper .next:hover,.page .page-wrapper .next.current,.page .page-wrapper .space:hover,.page .page-wrapper .space.current{background:#f2f2f2;border-top-color:#00A0E9}.page .page-wrapper .page-block{display:inline-block;margin-top:-1px;padding-left:30px;padding-right:30px;line-height:40px;color:#636363;background:#f2f2f2;border-top:1px solid #00A0E9}.page .page-wrapper .iconfont{font-size:14px}@media all and (max-width: 1000px) and (min-width: 740px){.header .header-wrapper{width:740px}.content .content-wrapper{width:740px}.footer .footer-wrapper{width:740px}}@media all and (max-width: 740px){.header .header-wrapper{width:100%}.header .header-wrapper .brand{float:none;text-align:center;box-shadow:1px 1px 1px #f2f2f2}.header .header-wrapper .tool{display:none}.header .header-wrapper .nav{float:none}.header .header-wrapper .nav ul{padding-left:20px;padding-right:20px}.header .header-wrapper .nav ul li{line-height:40px;display:inline-block}.header .header-wrapper .nav ul li a{height:40px}.content .post__wrap{padding-left:15px;padding-right:15px}.content .content-wrapper{padding-top:15px;padding-left:15px;padding-right:15px;display:block;width:100%}.content .article-wrapper{width:100%}.side{display:none}.footer .footer-wrapper{width:100%}.footer .footer-wrapper .sns{padding:20px}.footer .bottom-wrapper{font-size:10px}.article .link .title{display:inline-block;width:200px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;vertical-align:middle}.article .share{display:block}.article .share .info{padding-bottom:20px;margin-bottom:20px;border-bottom:1px solid #f2f2f2}.article .share .ds-share{width:auto}.article .share .ds-share #ds-reset{text-align:center}}.tagcloud{min-height:720px}.tagcloud .tags{padding-bottom:20px;border-bottom:1px solid #f2f2f2}.tagcloud a{display:inline-block;vertical-align:bottom;padding:5px 10px;margin-right:10px;margin-bottom:20px;color:#333;text-decoration:none;border-bottom:1px solid #68727d}.tagcloud a:hover{color:#00A0E9;border-bottom:1px dashed #00A0E9}.about .info{padding-bottom:20px;border-bottom:1px solid #f8f8f8}.about .info::after{content:"";display:table;clear:both}.about .info .avatar{float:left}.about .info .avatar img{padding:5px;background:#f2f2f2;border-radius:3px;height:200px}.about .info .social{float:left;padding-left:20px}.about .info .social ul{list-style:none;padding:0;margin:0}.about .info .social ul li{height:40px}.about .info .social ul li i{margin-right:10px}.about .info .social ul li .iconfont{color:#636363}.about .info .social ul li a{text-decoration:none;color:#333}.about .info .social ul li a:hover{color:#00A0E9}.about .description{padding:20px 0;border-bottom:1px solid #f8f8f8;color:#636363}.about .description h2,.about .description h3{margin:0;padding:0;color:#333}.about .description h2:not(:first-child),.about .description h3:not(:first-child){margin-top:30px}.about .description h2{font-size:18px}.about .description h3{font-size:16px}.about .description blockquote{position:relative;margin:0;margin-bottom:20px;padding:10px;border:1px solid #e4e4e4;border-radius:3px;text-align:center;line-height:20px}.about .description blockquote::before,.about .description blockquote::after{display:inline-block;position:absolute;font-family:"iconfont" !important;font-size:18px;height:30px;line-height:30px;width:30px;background:#fff;text-align:center;color:#68727d}.about .description blockquote::before{content:'\e60f';background:#fff;top:-15px;left:-10px}.about .description blockquote::after{content:'\e60e';bottom:-15px;right:-10px}.about .description ul{margin-top:0;margin-bottom:15px;padding:0;list-style:none}.about .description ul li{padding-left:15px;position:relative;line-height:24px}.about .description ul li::before{content:' ';display:block;width:4px;height:4px;position:absolute;border-radius:4px;left:0;top:8px;background:#828a92}.about .description ul ul{list-style:none}.about .description ul ul li{padding-left:15px;position:relative}.about .description ul ul li::before{content:' ';display:block;width:3px;height:3px;position:absolute;left:0;top:8px;background:#828a92}@media all and (max-width: 1000px){.about .info{padding-bottom:0}.about .info .avatar{float:none;margin-bottom:20px}.about .info .avatar img{width:100%;height:auto}.about .info .social{padding:0}}
8 |
--------------------------------------------------------------------------------
/assets/fonts/blog.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jaylinwang/paper/732bc063d2ef5dc7936788a7a7ad05712437271e/assets/fonts/blog.eot
--------------------------------------------------------------------------------
/assets/fonts/blog.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
126 |
--------------------------------------------------------------------------------
/assets/fonts/blog.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jaylinwang/paper/732bc063d2ef5dc7936788a7a7ad05712437271e/assets/fonts/blog.ttf
--------------------------------------------------------------------------------
/assets/fonts/blog.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jaylinwang/paper/732bc063d2ef5dc7936788a7a7ad05712437271e/assets/fonts/blog.woff
--------------------------------------------------------------------------------
/assets/fonts/iconfont.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jaylinwang/paper/732bc063d2ef5dc7936788a7a7ad05712437271e/assets/fonts/iconfont.eot
--------------------------------------------------------------------------------
/assets/fonts/iconfont.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
89 |
--------------------------------------------------------------------------------
/assets/fonts/iconfont.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jaylinwang/paper/732bc063d2ef5dc7936788a7a7ad05712437271e/assets/fonts/iconfont.ttf
--------------------------------------------------------------------------------
/assets/fonts/iconfont.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jaylinwang/paper/732bc063d2ef5dc7936788a7a7ad05712437271e/assets/fonts/iconfont.woff
--------------------------------------------------------------------------------
/assets/js/onepice.min.js:
--------------------------------------------------------------------------------
1 | /**
2 | * onepice - this is a simple theme for ghost
3 | * @version 1.1.1
4 | * @link https://github.com/jaylinwang/onepice#readme
5 | * @author Jaylin Wang (http://jaylin.wang)
6 | * @license MIT
7 | */!function(){$('[data-toggle="startSearch"]').on("click",function(){$(".search").addClass("active")}),$('[data-toggle="closeSearch"]').on("click",function(){$(".search").removeClass("active")}),$(".search-icon").on("click",function(){$(".search-form").submit()})}();
--------------------------------------------------------------------------------
/assets/vendors/share.min.css:
--------------------------------------------------------------------------------
1 | @font-face{font-family:"socialshare";src:url("../fonts/iconfont.eot");src:url("../fonts/iconfont.eot?#iefix") format("embedded-opentype"),url("../fonts/iconfont.woff") format("woff"),url("../fonts/iconfont.ttf") format("truetype"),url("../fonts/iconfont.svg#iconfont") format("svg")}.social-share{font-family:"socialshare" !important;font-size:16px;font-style:normal;-webkit-font-smoothing:antialiased;-webkit-text-stroke-width:0.2px;-moz-osx-font-smoothing:grayscale}.social-share *{font-family:"socialshare" !important}.social-share .icon-tencent:before{content:"\f07a"}.social-share .icon-qq:before{content:"\f11a"}.social-share .icon-weibo:before{content:"\f12a"}.social-share .icon-wechat:before{content:"\f09a"}.social-share .icon-douban:before{content:"\f10a"}.social-share .icon-heart:before{content:"\f20a"}.social-share .icon-like:before{content:"\f00a"}.social-share .icon-qzone:before{content:"\f08a"}.social-share .icon-linkedin:before{content:"\f01a"}.social-share .icon-diandian:before{content:"\f05a"}.social-share .icon-facebook:before{content:"\f03a"}.social-share .icon-google:before{content:"\f04a"}.social-share .icon-twitter:before{content:"\f06a"}.social-share a{position:relative;text-decoration:none;margin:4px;display:inline-block;outline:none}.social-share .social-share-icon{position:relative;display:inline-block;width:32px;height:32px;font-size:20px;border-radius:50%;line-height:32px;border:1px solid #666;color:#666;text-align:center;vertical-align:middle;transition:background 0.6s ease-out 0s}.social-share .social-share-icon:hover{background:#666;color:#fff}.social-share .icon-weibo{color:#ff763b;border-color:#ff763b}.social-share .icon-weibo:hover{background:#ff763b}.social-share .icon-tencent{color:#56b6e7;border-color:#56b6e7}.social-share .icon-tencent:hover{background:#56b6e7}.social-share .icon-qq{color:#56b6e7;border-color:#56b6e7}.social-share .icon-qq:hover{background:#56b6e7}.social-share .icon-qzone{color:#FDBE3D;border-color:#FDBE3D}.social-share .icon-qzone:hover{background:#FDBE3D}.social-share .icon-douban{color:#33b045;border-color:#33b045}.social-share .icon-douban:hover{background:#33b045}.social-share .icon-linkedin{color:#0077B5;border-color:#0077B5}.social-share .icon-linkedin:hover{background:#0077B5}.social-share .icon-facebook{color:#44619D;border-color:#44619D}.social-share .icon-facebook:hover{background:#44619D}.social-share .icon-google{color:#db4437;border-color:#db4437}.social-share .icon-google:hover{background:#db4437}.social-share .icon-twitter{color:#55acee;border-color:#55acee}.social-share .icon-twitter:hover{background:#55acee}.social-share .icon-diandian{color:#307DCA;border-color:#307DCA}.social-share .icon-diandian:hover{background:#307DCA}.social-share .icon-wechat{position:relative;color:#7bc549;border-color:#7bc549}.social-share .icon-wechat:hover{background:#7bc549}.social-share .icon-wechat .wechat-qrcode{display:none;border:1px solid #eee;position:absolute;z-index:9;top:-205px;left:-84px;width:200px;height:192px;color:#666;font-size:12px;text-align:center;background-color:#fff;box-shadow:0 2px 10px #aaa;transition:all 200ms;-webkit-tansition:all 350ms;-moz-transition:all 350ms}.social-share .icon-wechat .wechat-qrcode.bottom{top:40px;left:-84px}.social-share .icon-wechat .wechat-qrcode.bottom:after{display:none}.social-share .icon-wechat .wechat-qrcode h4{font-weight:normal;height:26px;line-height:26px;font-size:12px;background-color:#f3f3f3;margin:0;padding:0;color:#777}.social-share .icon-wechat .wechat-qrcode .qrcode{width:105px;margin:10px auto}.social-share .icon-wechat .wechat-qrcode .qrcode table{margin:0 !important}.social-share .icon-wechat .wechat-qrcode .help p{font-weight:normal;line-height:16px;padding:0;margin:0}.social-share .icon-wechat .wechat-qrcode:after{content:'';position:absolute;left:50%;margin-left:-6px;bottom:-13px;width:0;height:0;border-width:8px 6px 6px 6px;border-style:solid;border-color:#fff transparent transparent transparent}.social-share .icon-wechat:hover .wechat-qrcode{display:block}
2 |
--------------------------------------------------------------------------------
/assets/vendors/share.min.js:
--------------------------------------------------------------------------------
1 | !function(r){"use strict";function t(t,e,n,o){function i(r,t){return r-=o,t-=o,!(0>r||r>=u||0>t||t>=u)&&a.isDark(r,t)}var a=r(n,e);a.addData(t),a.make(),o=o||0;var u=a.getModuleCount(),f=a.getModuleCount()+2*o,c=function(r,t,e,n){var o=this.isDark,i=1/f;this.isDark=function(a,u){var f=u*i,c=a*i,s=f+i,l=c+i;return o(a,u)&&(r>s||f>e||t>l||c>n)}};this.text=t,this.level=e,this.version=n,this.moduleCount=f,this.isDark=i,this.addBlank=c}function e(r,e,n,o,i){n=Math.max(1,n||1),o=Math.min(40,o||40);for(var a=n;o>=a;a+=1)try{return new t(r,e,a,i)}catch(r){}}function n(r,t,e){var n=e.size,o="bold "+e.mSize*n+"px "+e.fontname,i=p("")[0].getContext("2d");i.font=o;var a=i.measureText(e.label).width,u=e.mSize,f=a/n,c=(1-f)*e.mPosX,s=(1-u)*e.mPosY,l=c+f,h=s+u,d=.01;1===e.mode?r.addBlank(0,s-d,n,h+d):r.addBlank(c-d,s-d,l+d,h+d),t.fillStyle=e.fontcolor,t.font=o,t.fillText(e.label,c*n,s*n+.75*e.mSize*n)}function o(r,t,e){var n=e.size,o=e.image.naturalWidth||1,i=e.image.naturalHeight||1,a=e.mSize,u=a*o/i,f=(1-u)*e.mPosX,c=(1-a)*e.mPosY,s=f+u,l=c+a,h=.01;3===e.mode?r.addBlank(0,c-h,n,l+h):r.addBlank(f-h,c-h,s+h,l+h),t.drawImage(e.image,f*n,c*n,u*n,a*n)}function i(r,t,e){p(e.background).is("img")?t.drawImage(e.background,0,0,e.size,e.size):e.background&&(t.fillStyle=e.background,t.fillRect(e.left,e.top,e.size,e.size));var i=e.mode;1===i||2===i?n(r,t,e):(3===i||4===i)&&o(r,t,e)}function a(r,t,e,n,o,i,a,u){r.isDark(a,u)&&t.rect(n,o,i,i)}function u(r,t,e,n,o,i,a,u,f,c){a?r.moveTo(t+i,e):r.moveTo(t,e),u?(r.lineTo(n-i,e),r.arcTo(n,e,n,o,i)):r.lineTo(n,e),f?(r.lineTo(n,o-i),r.arcTo(n,o,t,o,i)):r.lineTo(n,o),c?(r.lineTo(t+i,o),r.arcTo(t,o,t,e,i)):r.lineTo(t,o),a?(r.lineTo(t,e+i),r.arcTo(t,e,n,e,i)):r.lineTo(t,e)}function f(r,t,e,n,o,i,a,u,f,c){a&&(r.moveTo(t+i,e),r.lineTo(t,e),r.lineTo(t,e+i),r.arcTo(t,e,t+i,e,i)),u&&(r.moveTo(n-i,e),r.lineTo(n,e),r.lineTo(n,e+i),r.arcTo(n,e,n-i,e,i)),f&&(r.moveTo(n-i,o),r.lineTo(n,o),r.lineTo(n,o-i),r.arcTo(n,o,n-i,o,i)),c&&(r.moveTo(t+i,o),r.lineTo(t,o),r.lineTo(t,o-i),r.arcTo(t,o,t+i,o,i))}function c(r,t,e,n,o,i,a,c){var s=r.isDark,l=n+i,h=o+i,d=e.radius*i,g=a-1,v=a+1,p=c-1,w=c+1,m=s(a,c),T=s(g,p),y=s(g,c),E=s(g,w),A=s(a,w),B=s(v,w),k=s(v,c),b=s(v,p),C=s(a,p);m?u(t,n,o,l,h,d,!y&&!C,!y&&!A,!k&&!A,!k&&!C):f(t,n,o,l,h,d,y&&C&&T,y&&A&&E,k&&A&&B,k&&C&&b)}function s(r,t,e){var n,o,i=r.moduleCount,u=e.size/i,f=a;for(m&&e.radius>0&&e.radius<=.5&&(f=c),t.beginPath(),n=0;i>n;n+=1)for(o=0;i>o;o+=1){var s=e.left+o*u,l=e.top+n*u,h=u;f(r,t,e,s,l,h,n,o)}if(p(e.fill).is("img")){t.strokeStyle="rgba(0,0,0,0.5)",t.lineWidth=2,t.stroke();var d=t.globalCompositeOperation;t.globalCompositeOperation="destination-out",t.fill(),t.globalCompositeOperation=d,t.clip(),t.drawImage(e.fill,0,0,e.size,e.size),t.restore()}else t.fillStyle=e.fill,t.fill()}function l(r,t){var n=e(t.text,t.ecLevel,t.minVersion,t.maxVersion,t.quiet);if(!n)return null;var o=p(r).data("qrcode",n),a=o[0].getContext("2d");return i(n,a,t),s(n,a,t),o}function h(r){var t=p("").attr("width",r.size).attr("height",r.size);return l(t,r)}function d(r){return p("
").attr("src",h(r)[0].toDataURL("image/png"))}function g(r){var t=e(r.text,r.ecLevel,r.minVersion,r.maxVersion,r.quiet);if(!t)return null;var n,o,i=r.size,a=r.background,u=Math.floor,f=t.moduleCount,c=u(i/f),s=u(.5*(i-c*f)),l={position:"relative",left:0,top:0,padding:0,margin:0,width:i,height:i},h={position:"absolute",padding:0,margin:0,width:c,height:c,"background-color":r.fill},d=p("
").data("qrcode",t).css(l);for(a&&d.css("background-color",a),n=0;f>n;n+=1)for(o=0;f>o;o+=1)t.isDark(n,o)&&p("").css(h).css({left:s+o*c,top:s+n*c}).appendTo(d);return d}function v(r){return w&&"canvas"===r.render?h(r):w&&"image"===r.render?d(r):g(r)}var p=jQuery,w=function(){var r=document.createElement("canvas");return Boolean(r.getContext&&r.getContext("2d"))}(),m="[object Opera]"!==Object.prototype.toString.call(window.opera),T={render:"canvas",minVersion:1,maxVersion:40,ecLevel:"L",left:0,top:0,size:200,fill:"#000",background:null,text:"no text",radius:0,quiet:0,mode:0,mSize:.1,mPosX:.5,mPosY:.5,label:"no label",fontname:"sans",fontcolor:"#000",image:null};p.fn.qrcode=function(r){var t=p.extend({},T,r);return this.each(function(){"canvas"===this.nodeName.toLowerCase()?l(this,t):p(this).append(v(t))})}}(function(){var r=function(){function r(t,e){if("undefined"==typeof t.length)throw new Error(t.length+"/"+e);var n=function(){for(var r=0;re;e+=1){t[e]=new Array(r);for(var n=0;r>n;n+=1)t[e][n]=null}return t}(d),T(0,0),T(d-7,0),T(0,d-7),A(),E(),k(r,t),s>=7&&B(r),null==v&&(v=M(s,l,p)),b(v,t)},T=function(r,t){for(var e=-1;7>=e;e+=1)if(!(-1>=r+e||r+e>=d))for(var n=-1;7>=n;n+=1)-1>=t+n||t+n>=d||(e>=0&&6>=e&&(0==n||6==n)||n>=0&&6>=n&&(0==e||6==e)||e>=2&&4>=e&&n>=2&&4>=n?h[r+e][t+n]=!0:h[r+e][t+n]=!1)},y=function(){for(var r=0,t=0,e=0;8>e;e+=1){m(!0,e);var n=i.getLostPoint(w);(0==e||r>n)&&(r=n,t=e)}return t},E=function(){for(var r=8;d-8>r;r+=1)null==h[r][6]&&(h[r][6]=r%2==0);for(var t=8;d-8>t;t+=1)null==h[6][t]&&(h[6][t]=t%2==0)},A=function(){for(var r=i.getPatternPosition(s),t=0;t=a;a+=1)for(var u=-2;2>=u;u+=1)-2==a||2==a||-2==u||2==u||0==a&&0==u?h[n+a][o+u]=!0:h[n+a][o+u]=!1}},B=function(r){for(var t=i.getBCHTypeNumber(s),e=0;18>e;e+=1){var n=!r&&1==(t>>e&1);h[Math.floor(e/3)][e%3+d-8-3]=n}for(var e=0;18>e;e+=1){var n=!r&&1==(t>>e&1);h[e%3+d-8-3][Math.floor(e/3)]=n}},k=function(r,t){for(var e=l<<3|t,n=i.getBCHTypeInfo(e),o=0;15>o;o+=1){var a=!r&&1==(n>>o&1);6>o?h[o][8]=a:8>o?h[o+1][8]=a:h[d-15+o][8]=a}for(var o=0;15>o;o+=1){var a=!r&&1==(n>>o&1);8>o?h[8][d-o-1]=a:9>o?h[8][15-o-1+1]=a:h[8][15-o-1]=a}h[d-8][8]=!r},b=function(r,t){for(var e=-1,n=d-1,o=7,a=0,u=i.getMaskFunction(t),f=d-1;f>0;f-=2)for(6==f&&(f-=1);;){for(var c=0;2>c;c+=1)if(null==h[n][f-c]){var s=!1;a>>o&1));var l=u(n,f-c);l&&(s=!s),h[n][f-c]=s,o-=1,-1==o&&(a+=1,o=7)}if(n+=e,0>n||n>=d){n-=e,e=-e;break}}},C=function(t,e){for(var n=0,o=0,a=0,u=new Array(e.length),f=new Array(e.length),c=0;c=0?v.getAt(p):0}}for(var w=0,h=0;hh;h+=1)for(var c=0;ch;h+=1)for(var c=0;c8*h)throw new Error("code length overflow. ("+c.getLengthInBits()+">"+8*h+")");for(c.getLengthInBits()+4<=8*h&&c.put(0,4);c.getLengthInBits()%8!=0;)c.putBit(!1);for(;!(c.getLengthInBits()>=8*h)&&(c.put(o,8),!(c.getLengthInBits()>=8*h));)c.put(a,8);return C(c,n)};return w.addData=function(r){var t=c(r);p.push(t),v=null},w.isDark=function(r,t){if(0>r||r>=d||0>t||t>=d)throw new Error(r+","+t);return h[r][t]},w.getModuleCount=function(){return d},w.make=function(){m(!1,y())},w.createTableTag=function(r,t){r=r||2,t="undefined"==typeof t?4*r:t;var e="";e+='',e+="";for(var n=0;n";for(var o=0;o';e+=""}return e+="",e+="
"},w.createImgTag=function(r,t){r=r||2,t="undefined"==typeof t?4*r:t;var e=w.getModuleCount()*r+2*t,n=t,o=e-t;return g(e,e,function(t,e){if(t>=n&&o>t&&e>=n&&o>e){var i=Math.floor((t-n)/r),a=Math.floor((e-n)/r);return w.isDark(a,i)?0:1}return 1})},w};t.stringToBytes=function(r){for(var t=new Array,e=0;ei)t.push(i);else{var a=e[r.charAt(o)];"number"==typeof a?(255&a)==a?t.push(a):(t.push(a>>>8),t.push(255&a)):t.push(n)}}return t}};var e={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8},n={L:1,M:0,Q:3,H:2},o={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7},i=function(){var t=[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],n=1335,i=7973,u=21522,f={},c=function(r){for(var t=0;0!=r;)t+=1,r>>>=1;return t};return f.getBCHTypeInfo=function(r){for(var t=r<<10;c(t)-c(n)>=0;)t^=n<=0;)t^=i<n;n+=1)e=e.multiply(r([1,a.gexp(n)],0));return e},f.getLengthInBits=function(r,t){if(t>=1&&10>t)switch(r){case e.MODE_NUMBER:return 10;case e.MODE_ALPHA_NUM:return 9;case e.MODE_8BIT_BYTE:return 8;case e.MODE_KANJI:return 8;default:throw new Error("mode:"+r)}else if(27>t)switch(r){case e.MODE_NUMBER:return 12;case e.MODE_ALPHA_NUM:return 11;case e.MODE_8BIT_BYTE:return 16;case e.MODE_KANJI:return 10;default:throw new Error("mode:"+r)}else{if(!(41>t))throw new Error("type:"+t);switch(r){case e.MODE_NUMBER:return 14;case e.MODE_ALPHA_NUM:return 13;case e.MODE_8BIT_BYTE:return 16;case e.MODE_KANJI:return 12;default:throw new Error("mode:"+r)}}},f.getLostPoint=function(r){for(var t=r.getModuleCount(),e=0,n=0;t>n;n+=1)for(var o=0;t>o;o+=1){for(var i=0,a=r.isDark(n,o),u=-1;1>=u;u+=1)if(!(0>n+u||n+u>=t))for(var f=-1;1>=f;f+=1)0>o+f||o+f>=t||(0!=u||0!=f)&&a==r.isDark(n+u,o+f)&&(i+=1);i>5&&(e+=3+i-5)}for(var n=0;t-1>n;n+=1)for(var o=0;t-1>o;o+=1){var c=0;r.isDark(n,o)&&(c+=1),r.isDark(n+1,o)&&(c+=1),r.isDark(n,o+1)&&(c+=1),r.isDark(n+1,o+1)&&(c+=1),(0==c||4==c)&&(e+=3)}for(var n=0;t>n;n+=1)for(var o=0;t-6>o;o+=1)r.isDark(n,o)&&!r.isDark(n,o+1)&&r.isDark(n,o+2)&&r.isDark(n,o+3)&&r.isDark(n,o+4)&&!r.isDark(n,o+5)&&r.isDark(n,o+6)&&(e+=40);for(var o=0;t>o;o+=1)for(var n=0;t-6>n;n+=1)r.isDark(n,o)&&!r.isDark(n+1,o)&&r.isDark(n+2,o)&&r.isDark(n+3,o)&&r.isDark(n+4,o)&&!r.isDark(n+5,o)&&r.isDark(n+6,o)&&(e+=40);for(var s=0,o=0;t>o;o+=1)for(var n=0;t>n;n+=1)r.isDark(n,o)&&(s+=1);var l=Math.abs(100*s/t/t-50)/5;return e+=10*l},f}(),a=function(){for(var r=new Array(256),t=new Array(256),e=0;8>e;e+=1)r[e]=1<e;e+=1)r[e]=r[e-4]^r[e-5]^r[e-6]^r[e-8];for(var e=0;255>e;e+=1)t[r[e]]=e;var n={};return n.glog=function(r){if(1>r)throw new Error("glog("+r+")");return t[r]},n.gexp=function(t){for(;0>t;)t+=255;for(;t>=256;)t-=255;return r[t]},n}(),u=function(){var r=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12,7,37,13],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]],t=function(r,t){var e={};return e.totalCount=r,e.dataCount=t,e},e={},o=function(t,e){switch(e){case n.L:return r[4*(t-1)+0];case n.M:return r[4*(t-1)+1];case n.Q:return r[4*(t-1)+2];case n.H:return r[4*(t-1)+3];default:return}};return e.getRSBlocks=function(r,e){var n=o(r,e);if("undefined"==typeof n)throw new Error("bad rs block @ typeNumber:"+r+"/errorCorrectLevel:"+e);for(var i=n.length/3,a=new Array,u=0;i>u;u+=1)for(var f=n[3*u+0],c=n[3*u+1],s=n[3*u+2],l=0;f>l;l+=1)a.push(t(c,s));return a},e}(),f=function(){var r=new Array,t=0,e={};return e.getBuffer=function(){return r},e.getAt=function(t){var e=Math.floor(t/8);return 1==(r[e]>>>7-t%8&1)},e.put=function(r,t){for(var n=0;t>n;n+=1)e.putBit(1==(r>>>t-n-1&1))},e.getLengthInBits=function(){return t},e.putBit=function(e){var n=Math.floor(t/8);r.length<=n&&r.push(0),e&&(r[n]|=128>>>t%8),t+=1},e},c=function(r){var n=e.MODE_8BIT_BYTE,o=t.stringToBytes(r),i={};return i.getMode=function(){return n},i.getLength=function(r){return o.length},i.write=function(r){for(var t=0;t>>8)},t.writeBytes=function(r,e,n){e=e||0,n=n||r.length;for(var o=0;n>o;o+=1)t.writeByte(r[o+e])},t.writeString=function(r){for(var e=0;e0&&(t+=","),t+=r[e];return t+="]"},t},l=function(){var r=0,t=0,e=0,n="",o={},i=function(r){n+=String.fromCharCode(a(63&r))},a=function(r){if(0>r);else{if(26>r)return 65+r;if(52>r)return 97+(r-26);if(62>r)return 48+(r-52);if(62==r)return 43;if(63==r)return 47}throw new Error("n:"+r)};return o.writeByte=function(n){for(r=r<<8|255&n,t+=8,e+=1;t>=6;)i(r>>>t-6),t-=6},o.flush=function(){if(t>0&&(i(r<<6-t),r=0,t=0),e%3!=0)for(var o=3-e%3,a=0;o>a;a+=1)n+="="},o.toString=function(){return n},o},h=function(r){var t=r,e=0,n=0,o=0,i={};i.read=function(){for(;8>o;){if(e>=t.length){if(0==o)return-1;throw new Error("unexpected end of file./"+o)}var r=t.charAt(e);if(e+=1,"="==r)return o=0,-1;r.match(/^\s$/)||(n=n<<6|a(r.charCodeAt(0)),o+=6)}var i=n>>>o-8&255;return o-=8,i};var a=function(r){if(r>=65&&90>=r)return r-65;if(r>=97&&122>=r)return r-97+26;if(r>=48&&57>=r)return r-48+52;if(43==r)return 62;if(47==r)return 63;throw new Error("c:"+r)};return i},d=function(r,t){var e=r,n=t,o=new Array(r*t),i={};i.setPixel=function(r,t,n){o[t*e+r]=n},i.write=function(r){r.writeString("GIF87a"),r.writeShort(e),r.writeShort(n),r.writeByte(128),r.writeByte(0),r.writeByte(0),r.writeByte(0),r.writeByte(0),r.writeByte(0),r.writeByte(255),r.writeByte(255),r.writeByte(255),r.writeString(","),r.writeShort(0),r.writeShort(0),r.writeShort(e),r.writeShort(n),r.writeByte(0);var t=2,o=u(t);r.writeByte(t);for(var i=0;o.length-i>255;)r.writeByte(255),r.writeBytes(o,i,255),i+=255;r.writeByte(o.length-i),r.writeBytes(o,i,o.length-i),r.writeByte(0),r.writeString(";")};var a=function(r){var t=r,e=0,n=0,o={};return o.write=function(r,o){if(r>>>o!=0)throw new Error("length over");for(;e+o>=8;)t.writeByte(255&(r<>>=8-e,n=0,e=0;n|=r<0&&t.writeByte(n)},o},u=function(r){for(var t=1<u;u+=1)i.add(String.fromCharCode(u));i.add(String.fromCharCode(t)),i.add(String.fromCharCode(e));var c=s(),l=a(c);l.write(t,n);var h=0,d=String.fromCharCode(o[h]);for(h+=1;hi;i+=1)for(var a=0;r>a;a+=1)o.setPixel(a,i,e(a,i));var u=s();o.write(u);for(var f=l(),c=u.toByteArray(),h=0;h"};return t}();return function(r){"function"==typeof define&&define.amd?define([],r):"object"==typeof exports&&(module.exports=r())}(function(){return r}),!function(r){r.stringToBytes=function(r){function t(r){for(var t=[],e=0;en?t.push(n):2048>n?t.push(192|n>>6,128|63&n):55296>n||n>=57344?t.push(224|n>>12,128|n>>6&63,128|63&n):(e++,n=65536+((1023&n)<<10|1023&r.charCodeAt(e)),t.push(240|n>>18,128|n>>12&63,128|n>>6&63,128|63&n))}return t}return t(r)}}(r),r}()),function(r){r.fn.share=function(t){function e(t,e){var n=o(e);"prepend"==e.mode?n.reverse():n,n.length&&r.each(n,function(n,o){var a=i(o,e),u=e.initialized?t.find(".icon-"+o):r('');return!u.length||(u.prop("aria-label","分享到 "+h[o]),u.prop("href",a),"wechat"===o?u.prop("tabindex",-1):u.prop("target","_blank"),void(e.initialized||("prepend"==e.mode?t.prepend(u):t.append(u))))})}function n(r,t){var e=r.find("a.icon-wechat");e.length&&(e.append(''+t.wechatQrcodeTitle+'
'+t.wechatQrcodeHelper+"
"),e.find(".qrcode").qrcode({render:"image",size:t.wechatQrcodeSize,text:t.url}),e.offset().top<100&&e.find(".wechat-qrcode").addClass("bottom"))}function o(t){0===t.mobileSites.length&&t.sites.length&&(t.mobileSites=t.sites);var e=(u()?t.mobileSites:t.sites.length?t.sites:[]).slice(0),n=t.disabled;return"string"==typeof e&&(e=e.split(/\s*,\s*/)),"string"==typeof n&&(n=n.split(/\s*,\s*/)),a()&&n.push("wechat"),n.length&&r.each(n,function(t,n){var o=r.inArray(n,e);o!==-1&&e.splice(o,1)}),e}function i(r,t){var e=l[r];t.summary=t.description;for(var n in t)if(t.hasOwnProperty(n)){var o=r+n.replace(/^[a-z]/,function(r){return r.toUpperCase()}),i=encodeURIComponent(void 0===t[o]?t[n]:t[o]);e=e.replace(new RegExp("{{"+n.toUpperCase()+"}}","g"),i)}return e}function a(){return/MicroMessenger/i.test(navigator.userAgent)}function u(){return r(window).width()<=768}var f=r(document.head),c={url:location.href,site_url:location.origin,source:f.find("[name=site], [name=Site]").attr("content")||document.title,title:f.find("[name=title], [name=Title]").attr("content")||document.title,description:f.find("[name=description], [name=Description]").attr("content")||"",image:r("img:first").prop("src")||"",imageSelector:void 0,weiboKey:"",wechatQrcodeTitle:"微信扫一扫:分享",wechatQrcodeHelper:"微信里点“发现”,扫一下
二维码便可将本文分享至朋友圈。
",wechatQrcodeSize:100,mobileSites:[],sites:["weibo","qq","wechat","tencent","douban","qzone","linkedin","diandian","facebook","twitter","google"],disabled:[],initialized:!1},s=r.extend({},c,t),l={qzone:"http://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?url={{URL}}&title={{TITLE}}&desc={{DESCRIPTION}}&summary={{SUMMARY}}&site={{SOURCE}}",qq:"http://connect.qq.com/widget/shareqq/index.html?url={{URL}}&title={{TITLE}}&source={{SOURCE}}&desc={{DESCRIPTION}}&pics={{IMAGE}}",tencent:"http://share.v.t.qq.com/index.php?c=share&a=index&title={{TITLE}}&url={{URL}}&pic={{IMAGE}}",weibo:"http://service.weibo.com/share/share.php?url={{URL}}&title={{TITLE}}&pic={{IMAGE}}&appkey={{WEIBOKEY}}",wechat:"javascript:;",douban:"http://shuo.douban.com/!service/share?href={{URL}}&name={{TITLE}}&text={{DESCRIPTION}}&image={{IMAGE}}&starid=0&aid=0&style=11",diandian:"http://www.diandian.com/share?lo={{URL}}&ti={{TITLE}}&type=link",linkedin:"http://www.linkedin.com/shareArticle?mini=true&ro=true&title={{TITLE}}&url={{URL}}&summary={{SUMMARY}}&source={{SOURCE}}&armin=armin",facebook:"https://www.facebook.com/sharer/sharer.php?u={{URL}}&title={{TITLE}}&description={{DESCRIPTION}}&caption={{SUBHEAD}}&link={{URL}}&picture={{IMAGE}}",twitter:"https://twitter.com/intent/tweet?text={{TITLE}}&url={{URL}}&via={{SITE_URL}}",google:"https://plus.google.com/share?url={{URL}}"},h={qzone:"QQ空间",qq:"QQ",tencent:"腾讯微博",weibo:"微博",wechat:"微信",douban:"豆瓣",diandian:"点点",linkedin:"LinkedIn",facebook:"Facebook",twitter:"Twitter",google:"Google"};this.each(function(){if(r(this).data("initialized"))return!0;var t=r.extend({},s,r(this).data());t.imageSelector&&(t.image=r(t.imageSelector).map(function(){return r(this).prop("src")}).get().join("||"));var o=r(this).addClass("share-component social-share");e(o,t),n(o,t),r(this).data("initialized",!0)})},r(function(){r(".share-component,.social-share").share()})}(jQuery);
--------------------------------------------------------------------------------
/config.example.js:
--------------------------------------------------------------------------------
1 | /**
2 | * 博客注入配置
3 | */
4 | window.onepiceConfig = {
5 | };
6 |
--------------------------------------------------------------------------------
/default.hbs:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 | {{ghost_head}}
11 |
12 |
13 |
14 |
47 |
48 |
49 | {{{body}}}
50 |
51 |
52 |
81 |
82 |
83 |
84 |
85 |
86 |
92 |
93 |
94 |
103 |
104 |
129 |
130 | {{#is "post"}}
131 |
138 | {{/is}}
139 |
140 | {{ghost_foot}}
141 |
142 |
143 |
144 |
--------------------------------------------------------------------------------
/gulpfile.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | var gulp = require('gulp');
4 | var plumber = require('gulp-plumber');
5 | var sass = require('gulp-sass');
6 | var header = require('gulp-header');
7 | var concat = require('gulp-concat');
8 | var addSrc = require('gulp-add-src');
9 | var uglify = require('gulp-uglify');
10 | var prefix = require('gulp-autoprefixer');
11 | var zip = require('gulp-zip');
12 | var pkg = require('./package.json');
13 | var browserSync = require('browser-sync').create();
14 |
15 | var PORT = {
16 | GHOST: '2368',
17 | BROWSERSYNC: '3000'
18 |
19 | };
20 |
21 | //# Files
22 | //
23 | var dist = (function () {
24 | return {
25 | name: pkg.name,
26 | css: 'assets/css',
27 | js: 'assets/js',
28 | image: 'assets/images',
29 | font: 'assets/fonts',
30 | vendor: 'assets/vendors',
31 | };
32 | }());
33 |
34 | var src = (function () {
35 | return {
36 | sass: {
37 | main: 'src/scss/app.scss',
38 | files: ['src/scss/**/**']
39 | },
40 | css: {
41 | main: []
42 | },
43 | js: {
44 | main: ['src/js/common.js']
45 | },
46 | font: {
47 | main: 'src/fonts/**/**'
48 | },
49 | vendor: {
50 | main: 'src/vendors/**/**'
51 | }
52 | };
53 | }());
54 |
55 | var banner = (function () {
56 | return ['/**',
57 | ' * <%= pkg.name %> - <%= pkg.description %>',
58 | ' * @version <%= pkg.version %>',
59 | ' * @link <%= pkg.homepage %>',
60 | ' * @author <%= pkg.author.name %> (<%= pkg.author.url %>)',
61 | ' * @license <%= pkg.license %>',
62 | ' */'
63 | ].join('\n');
64 | }());
65 |
66 | //# tasks
67 | gulp.task('css', function () {
68 | gulp.src(src.css.main)
69 | .pipe(plumber())
70 | .pipe(addSrc(src.sass.main))
71 | .pipe(sass({
72 | outputStyle: 'compressed'
73 | }))
74 | .pipe(prefix())
75 | .pipe(concat(pkg.name + '.min.css'))
76 | .pipe(header(banner, {
77 | pkg: pkg
78 | }))
79 | .pipe(gulp.dest(dist.css));
80 | });
81 |
82 | gulp.task('js', function () {
83 | gulp.src(src.js.main)
84 | .pipe(plumber())
85 | .pipe(concat(pkg.name + '.min.js'))
86 | .pipe(uglify())
87 | .pipe(header(banner, {
88 | pkg: pkg
89 | }))
90 | .pipe(gulp.dest(dist.js));
91 | });
92 |
93 | gulp.task('vendor', function () {
94 | gulp.src(src.vendor.main)
95 | .pipe(gulp.dest(dist.vendor));
96 | });
97 |
98 | gulp.task('font', function () {
99 | gulp.src(src.font.main)
100 | .pipe(gulp.dest(dist.font));
101 | });
102 |
103 | gulp.task('server', function () {
104 | browserSync.init({
105 | proxy: 'http://127.0.0.1:#{PORT.GHOST}'
106 | });
107 | });
108 |
109 | gulp.task('zip', ['css', 'js', 'vendor', 'font'], function () {
110 | var targetDir = 'dist/';
111 | var themeName = require('./package.json').name;
112 | var filename = themeName + '.zip';
113 |
114 | return gulp.src([
115 | '**',
116 | '!node_modules',
117 | '!node_modules/**',
118 | '!dist',
119 | '!dist/**',
120 | '!src',
121 | '!src/**',
122 | ])
123 | .pipe(zip(filename))
124 | .pipe(gulp.dest(targetDir));
125 | });
126 |
127 | gulp.task('build', ['css', 'js', 'vendor', 'font']);
128 |
129 | gulp.task('default', function () {
130 | gulp.start(['build']);
131 | gulp.watch(src.js.main, ['js']);
132 | gulp.watch(src.sass.files, ['css']);
133 | gulp.watch(src.font.main, ['font']);
134 | gulp.watch(src.vendor.main, ['vendor']);
135 | });
136 |
--------------------------------------------------------------------------------
/index.hbs:
--------------------------------------------------------------------------------
1 | {{!< default}}
2 |
3 |
4 | {{#foreach posts}}
5 |
6 |
9 |
14 |
15 | {{excerpt}}
16 |
17 |
阅读全文
18 |
19 | {{/foreach}}
20 |
21 | {{ pagination }}
22 |
23 | {{> "sections/side" }}
24 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "paper",
3 | "version": "1.0.0",
4 | "description": "一个简介的ghost中文主题",
5 | "main": "index.js",
6 | "scripts": {
7 | "dev": "gulp dev",
8 | "zip": "gulp zip",
9 | "test": "echo \"Error: no test specified\" && exit 1"
10 | },
11 | "repository": {
12 | "type": "git",
13 | "url": "git+https://github.com/jaylinwang/paper.git"
14 | },
15 | "keywords": [
16 | "ghost-theme",
17 | "paper"
18 | ],
19 | "author": {
20 | "name": "Jaylin Wang",
21 | "url": "http://jaylin.wang",
22 | "email": "jaylin0019@gmail.com"
23 | },
24 | "license": "MIT",
25 | "bugs": {
26 | "url": "https://github.com/jaylinwang/paper/issues"
27 | },
28 | "homepage": "https://github.com/jaylinwang/paper#readme",
29 | "devDependencies": {
30 | "browser-sync": "^2.10.0",
31 | "gulp": "^3.9.0",
32 | "gulp-add-src": "^0.2.0",
33 | "gulp-autoprefixer": "^3.1.0",
34 | "gulp-concat": "^2.6.0",
35 | "gulp-header": "^1.7.1",
36 | "gulp-imagemin": "^2.4.0",
37 | "gulp-plumber": "^1.0.1",
38 | "gulp-sass": "^2.1.1",
39 | "gulp-uglify": "^1.5.1",
40 | "gulp-uglifyjs": "^0.6.2",
41 | "gulp-zip": "^4.2.0"
42 | },
43 | "config": {
44 | "posts_per_page": 5
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/page-tags.hbs:
--------------------------------------------------------------------------------
1 | {{!< default}}
2 |
3 | {{#get "tags"}}
4 |
9 | {{/get}}
10 |
11 |
--------------------------------------------------------------------------------
/partials/navigation.hbs:
--------------------------------------------------------------------------------
1 |
2 | {{#foreach navigation}}
3 | -
4 | {{label}}
5 |
6 | {{/foreach}}
7 |
8 |
--------------------------------------------------------------------------------
/partials/pagination.hbs:
--------------------------------------------------------------------------------
1 |
2 |
3 | {{#if prev}}
4 |
5 |
6 |
7 | {{else}}
8 |
9 |
10 |
11 | {{/if}}
12 |
{{page}} / {{pages}}
13 | {{#if next}}
14 |
15 |
16 |
17 | {{else}}
18 |
19 |
20 |
21 | {{/if}}
22 |
23 |
24 |
--------------------------------------------------------------------------------
/partials/scripts/comment.hbs:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/partials/scripts/share.hbs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jaylinwang/paper/732bc063d2ef5dc7936788a7a7ad05712437271e/partials/scripts/share.hbs
--------------------------------------------------------------------------------
/partials/sections/side.hbs:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
推荐标签
5 | {{#get "tags" limit="12"}}
6 |
7 | {{#foreach tags}}
8 | - {{name}}
9 | {{/foreach }}
10 |
11 | {{/get}}
12 |
13 |
14 |
近期更新
15 | {{#get "posts" limit="6" order="updated_at asc"}}
16 |
23 | {{/get}}
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/post.hbs:
--------------------------------------------------------------------------------
1 | {{!< default}}
2 |
3 | {{#post}}
4 |
5 |
6 |
9 |
15 |
16 | {{ content }}
17 |
18 |
23 |
24 |
25 |
原文地址:
26 |
文中错误的地方,期待指正;觉得文章还行,欢迎分享~
27 |
28 |
29 |
30 |
31 | -
32 | 上一篇:
33 | {{#prev_post}}
34 |
35 | {{title}}
36 |
37 | {{else}}
38 | 已是最新一篇
39 | {{/prev_post}}
40 |
41 | -
42 | 下一篇:
43 | {{#next_post}}
44 |
45 | {{title}}
46 |
47 | {{else}}
48 | 已是最后一篇
49 | {{/next_post}}
50 |
51 |
52 |
53 |
54 |
55 | {{/post}}
56 |
57 |
--------------------------------------------------------------------------------
/src/fonts/blog.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jaylinwang/paper/732bc063d2ef5dc7936788a7a7ad05712437271e/src/fonts/blog.eot
--------------------------------------------------------------------------------
/src/fonts/blog.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
126 |
--------------------------------------------------------------------------------
/src/fonts/blog.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jaylinwang/paper/732bc063d2ef5dc7936788a7a7ad05712437271e/src/fonts/blog.ttf
--------------------------------------------------------------------------------
/src/fonts/blog.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jaylinwang/paper/732bc063d2ef5dc7936788a7a7ad05712437271e/src/fonts/blog.woff
--------------------------------------------------------------------------------
/src/fonts/iconfont.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jaylinwang/paper/732bc063d2ef5dc7936788a7a7ad05712437271e/src/fonts/iconfont.eot
--------------------------------------------------------------------------------
/src/fonts/iconfont.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
89 |
--------------------------------------------------------------------------------
/src/fonts/iconfont.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jaylinwang/paper/732bc063d2ef5dc7936788a7a7ad05712437271e/src/fonts/iconfont.ttf
--------------------------------------------------------------------------------
/src/fonts/iconfont.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jaylinwang/paper/732bc063d2ef5dc7936788a7a7ad05712437271e/src/fonts/iconfont.woff
--------------------------------------------------------------------------------
/src/js/common.js:
--------------------------------------------------------------------------------
1 | ;(function () {
2 | $('[data-toggle="startSearch"]').on('click', function () {
3 | $('.search').addClass('active');
4 | });
5 | $('[data-toggle="closeSearch"]').on('click', function () {
6 | $('.search').removeClass('active');
7 | });
8 | $('.search-icon').on('click', function () {
9 | $('.search-form').submit();
10 | });
11 | })();
12 |
--------------------------------------------------------------------------------
/src/scss/_common/_base.scss:
--------------------------------------------------------------------------------
1 | body {
2 | font-size: 14px;
3 | font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "微软雅黑", "Helvetica Neue", Helvetica, Arial, sans-serif;
4 | }
5 |
6 | *{
7 | box-sizing: border-box;
8 | }
--------------------------------------------------------------------------------
/src/scss/_common/_icon.scss:
--------------------------------------------------------------------------------
1 | @font-face {font-family: "iconfont";
2 | src: url('../fonts/blog.eot?t=1476881981450'); /* IE9*/
3 | src: url('../fonts/blog.eot?t=1476881981450#iefix') format('embedded-opentype'), /* IE6-IE8 */
4 | url('../fonts/blog.woff?t=1476881981450') format('woff'), /* chrome, firefox */
5 | url('../fonts/blog.ttf?t=1476881981450') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+*/
6 | url('../fonts/blog.svg?t=1476881981450#iconfont') format('svg'); /* iOS 4.1- */
7 | }
8 |
9 | .iconfont {
10 | font-family:"iconfont" !important;
11 | font-size:16px;
12 | font-style:normal;
13 | -webkit-font-smoothing: antialiased;
14 | -webkit-text-stroke-width: 0.2px;
15 | -moz-osx-font-smoothing: grayscale;
16 | }
17 |
18 |
19 | .icon-weixin:before { content: "\3488"; }
20 |
21 | .icon-twitter:before { content: "\e634"; }
22 |
23 | .icon-liebiao:before { content: "\e654"; }
24 |
25 | .icon-mulu:before { content: "\e600"; }
26 |
27 | .icon-search:before { content: "\e672"; }
28 |
29 | .icon-guanbifuzhi:before { content: "\e633"; }
30 |
31 | .icon-weibo:before { content: "\e60a"; }
32 |
33 | .icon-dianzan:before { content: "\e83b"; }
34 |
35 | .icon-rss:before { content: "\e630"; }
36 |
37 | .icon-xihuan:before { content: "\e63c"; }
38 |
39 | .icon-facebook:before { content: "\e608"; }
40 |
41 | .icon-iconfonttengxunweibo:before { content: "\e67e"; }
42 |
43 | .icon-github:before { content: "\e636"; }
44 |
45 | .icon-kongjian01:before { content: "\e646"; }
46 |
47 | .icon-xiaolian:before { content: "\e645"; }
48 |
49 | .icon-add:before { content: "\e603"; }
50 |
51 | .icon-attachment:before { content: "\e604"; }
52 |
53 | .icon-down:before { content: "\e605"; }
54 |
55 | .icon-enter:before { content: "\e601"; }
56 |
57 | .icon-up:before { content: "\e606"; }
58 |
59 | .icon-back:before { content: "\e602"; }
60 |
61 | .icon-youxiang:before { content: "\e62f"; }
62 |
63 | .icon-mulu1:before { content: "\e6c5"; }
64 |
65 | .icon-quotes-down:before { content: "\e60e"; }
66 |
67 | .icon-quotes-up:before { content: "\e60f"; }
68 |
69 | .icon-google:before { content: "\e635"; }
70 |
71 | .icon-shenglve:before { content: "\e607"; }
72 |
73 |
74 |
75 |
76 |
--------------------------------------------------------------------------------
/src/scss/_common/_normalize.scss:
--------------------------------------------------------------------------------
1 | /*! normalize.css v5.0.0 | MIT License | github.com/necolas/normalize.css */
2 |
3 | /**
4 | * 1. Change the default font family in all browsers (opinionated).
5 | * 2. Correct the line height in all browsers.
6 | * 3. Prevent adjustments of font size after orientation changes in
7 | * IE on Windows Phone and in iOS.
8 | */
9 |
10 | /* Document
11 | ========================================================================== */
12 |
13 | html {
14 | font-family: sans-serif; /* 1 */
15 | line-height: 1.15; /* 2 */
16 | -ms-text-size-adjust: 100%; /* 3 */
17 | -webkit-text-size-adjust: 100%; /* 3 */
18 | }
19 |
20 | /* Sections
21 | ========================================================================== */
22 |
23 | /**
24 | * Remove the margin in all browsers (opinionated).
25 | */
26 |
27 | body {
28 | margin: 0;
29 | }
30 |
31 | /**
32 | * Add the correct display in IE 9-.
33 | */
34 |
35 | article,
36 | aside,
37 | footer,
38 | header,
39 | nav,
40 | section {
41 | display: block;
42 | }
43 |
44 | /**
45 | * Correct the font size and margin on `h1` elements within `section` and
46 | * `article` contexts in Chrome, Firefox, and Safari.
47 | */
48 |
49 | h1 {
50 | font-size: 2em;
51 | margin: 0.67em 0;
52 | }
53 |
54 | /* Grouping content
55 | ========================================================================== */
56 |
57 | /**
58 | * Add the correct display in IE 9-.
59 | * 1. Add the correct display in IE.
60 | */
61 |
62 | figcaption,
63 | figure,
64 | main { /* 1 */
65 | display: block;
66 | }
67 |
68 | /**
69 | * Add the correct margin in IE 8.
70 | */
71 |
72 | figure {
73 | margin: 1em 40px;
74 | }
75 |
76 | /**
77 | * 1. Add the correct box sizing in Firefox.
78 | * 2. Show the overflow in Edge and IE.
79 | */
80 |
81 | hr {
82 | box-sizing: content-box; /* 1 */
83 | height: 0; /* 1 */
84 | overflow: visible; /* 2 */
85 | }
86 |
87 | /**
88 | * 1. Correct the inheritance and scaling of font size in all browsers.
89 | * 2. Correct the odd `em` font sizing in all browsers.
90 | */
91 |
92 | pre {
93 | font-family: monospace, monospace; /* 1 */
94 | font-size: 1em; /* 2 */
95 | }
96 |
97 | /* Text-level semantics
98 | ========================================================================== */
99 |
100 | /**
101 | * 1. Remove the gray background on active links in IE 10.
102 | * 2. Remove gaps in links underline in iOS 8+ and Safari 8+.
103 | */
104 |
105 | a {
106 | background-color: transparent; /* 1 */
107 | -webkit-text-decoration-skip: objects; /* 2 */
108 | }
109 |
110 | /**
111 | * Remove the outline on focused links when they are also active or hovered
112 | * in all browsers (opinionated).
113 | */
114 |
115 | a:active,
116 | a:hover {
117 | outline-width: 0;
118 | }
119 |
120 | /**
121 | * 1. Remove the bottom border in Firefox 39-.
122 | * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
123 | */
124 |
125 | abbr[title] {
126 | border-bottom: none; /* 1 */
127 | text-decoration: underline; /* 2 */
128 | text-decoration: underline dotted; /* 2 */
129 | }
130 |
131 | /**
132 | * Prevent the duplicate application of `bolder` by the next rule in Safari 6.
133 | */
134 |
135 | b,
136 | strong {
137 | font-weight: inherit;
138 | }
139 |
140 | /**
141 | * Add the correct font weight in Chrome, Edge, and Safari.
142 | */
143 |
144 | b,
145 | strong {
146 | font-weight: bolder;
147 | }
148 |
149 | /**
150 | * 1. Correct the inheritance and scaling of font size in all browsers.
151 | * 2. Correct the odd `em` font sizing in all browsers.
152 | */
153 |
154 | code,
155 | kbd,
156 | samp {
157 | font-family: monospace, monospace; /* 1 */
158 | font-size: 1em; /* 2 */
159 | }
160 |
161 | /**
162 | * Add the correct font style in Android 4.3-.
163 | */
164 |
165 | dfn {
166 | font-style: italic;
167 | }
168 |
169 | /**
170 | * Add the correct background and color in IE 9-.
171 | */
172 |
173 | mark {
174 | background-color: #ff0;
175 | color: #000;
176 | }
177 |
178 | /**
179 | * Add the correct font size in all browsers.
180 | */
181 |
182 | small {
183 | font-size: 80%;
184 | }
185 |
186 | /**
187 | * Prevent `sub` and `sup` elements from affecting the line height in
188 | * all browsers.
189 | */
190 |
191 | sub,
192 | sup {
193 | font-size: 75%;
194 | line-height: 0;
195 | position: relative;
196 | vertical-align: baseline;
197 | }
198 |
199 | sub {
200 | bottom: -0.25em;
201 | }
202 |
203 | sup {
204 | top: -0.5em;
205 | }
206 |
207 | /* Embedded content
208 | ========================================================================== */
209 |
210 | /**
211 | * Add the correct display in IE 9-.
212 | */
213 |
214 | audio,
215 | video {
216 | display: inline-block;
217 | }
218 |
219 | /**
220 | * Add the correct display in iOS 4-7.
221 | */
222 |
223 | audio:not([controls]) {
224 | display: none;
225 | height: 0;
226 | }
227 |
228 | /**
229 | * Remove the border on images inside links in IE 10-.
230 | */
231 |
232 | img {
233 | border-style: none;
234 | }
235 |
236 | /**
237 | * Hide the overflow in IE.
238 | */
239 |
240 | svg:not(:root) {
241 | overflow: hidden;
242 | }
243 |
244 | /* Forms
245 | ========================================================================== */
246 |
247 | /**
248 | * 1. Change the font styles in all browsers (opinionated).
249 | * 2. Remove the margin in Firefox and Safari.
250 | */
251 |
252 | button,
253 | input,
254 | optgroup,
255 | select,
256 | textarea {
257 | font-family: sans-serif; /* 1 */
258 | font-size: 100%; /* 1 */
259 | line-height: 1.15; /* 1 */
260 | margin: 0; /* 2 */
261 | }
262 |
263 | /**
264 | * Show the overflow in IE.
265 | * 1. Show the overflow in Edge.
266 | */
267 |
268 | button,
269 | input { /* 1 */
270 | overflow: visible;
271 | }
272 |
273 | /**
274 | * Remove the inheritance of text transform in Edge, Firefox, and IE.
275 | * 1. Remove the inheritance of text transform in Firefox.
276 | */
277 |
278 | button,
279 | select { /* 1 */
280 | text-transform: none;
281 | }
282 |
283 | /**
284 | * 1. Prevent a WebKit bug where (2) destroys native `audio` and `video`
285 | * controls in Android 4.
286 | * 2. Correct the inability to style clickable types in iOS and Safari.
287 | */
288 |
289 | button,
290 | html [type="button"], /* 1 */
291 | [type="reset"],
292 | [type="submit"] {
293 | -webkit-appearance: button; /* 2 */
294 | }
295 |
296 | /**
297 | * Remove the inner border and padding in Firefox.
298 | */
299 |
300 | button::-moz-focus-inner,
301 | [type="button"]::-moz-focus-inner,
302 | [type="reset"]::-moz-focus-inner,
303 | [type="submit"]::-moz-focus-inner {
304 | border-style: none;
305 | padding: 0;
306 | }
307 |
308 | /**
309 | * Restore the focus styles unset by the previous rule.
310 | */
311 |
312 | button:-moz-focusring,
313 | [type="button"]:-moz-focusring,
314 | [type="reset"]:-moz-focusring,
315 | [type="submit"]:-moz-focusring {
316 | outline: 1px dotted ButtonText;
317 | }
318 |
319 | /**
320 | * Change the border, margin, and padding in all browsers (opinionated).
321 | */
322 |
323 | fieldset {
324 | border: 1px solid #c0c0c0;
325 | margin: 0 2px;
326 | padding: 0.35em 0.625em 0.75em;
327 | }
328 |
329 | /**
330 | * 1. Correct the text wrapping in Edge and IE.
331 | * 2. Correct the color inheritance from `fieldset` elements in IE.
332 | * 3. Remove the padding so developers are not caught out when they zero out
333 | * `fieldset` elements in all browsers.
334 | */
335 |
336 | legend {
337 | box-sizing: border-box; /* 1 */
338 | color: inherit; /* 2 */
339 | display: table; /* 1 */
340 | max-width: 100%; /* 1 */
341 | padding: 0; /* 3 */
342 | white-space: normal; /* 1 */
343 | }
344 |
345 | /**
346 | * 1. Add the correct display in IE 9-.
347 | * 2. Add the correct vertical alignment in Chrome, Firefox, and Opera.
348 | */
349 |
350 | progress {
351 | display: inline-block; /* 1 */
352 | vertical-align: baseline; /* 2 */
353 | }
354 |
355 | /**
356 | * Remove the default vertical scrollbar in IE.
357 | */
358 |
359 | textarea {
360 | overflow: auto;
361 | }
362 |
363 | /**
364 | * 1. Add the correct box sizing in IE 10-.
365 | * 2. Remove the padding in IE 10-.
366 | */
367 |
368 | [type="checkbox"],
369 | [type="radio"] {
370 | box-sizing: border-box; /* 1 */
371 | padding: 0; /* 2 */
372 | }
373 |
374 | /**
375 | * Correct the cursor style of increment and decrement buttons in Chrome.
376 | */
377 |
378 | [type="number"]::-webkit-inner-spin-button,
379 | [type="number"]::-webkit-outer-spin-button {
380 | height: auto;
381 | }
382 |
383 | /**
384 | * 1. Correct the odd appearance in Chrome and Safari.
385 | * 2. Correct the outline style in Safari.
386 | */
387 |
388 | [type="search"] {
389 | -webkit-appearance: textfield; /* 1 */
390 | outline-offset: -2px; /* 2 */
391 | }
392 |
393 | /**
394 | * Remove the inner padding and cancel buttons in Chrome and Safari on macOS.
395 | */
396 |
397 | [type="search"]::-webkit-search-cancel-button,
398 | [type="search"]::-webkit-search-decoration {
399 | -webkit-appearance: none;
400 | }
401 |
402 | /**
403 | * 1. Correct the inability to style clickable types in iOS and Safari.
404 | * 2. Change font properties to `inherit` in Safari.
405 | */
406 |
407 | ::-webkit-file-upload-button {
408 | -webkit-appearance: button; /* 1 */
409 | font: inherit; /* 2 */
410 | }
411 |
412 | /* Interactive
413 | ========================================================================== */
414 |
415 | /*
416 | * Add the correct display in IE 9-.
417 | * 1. Add the correct display in Edge, IE, and Firefox.
418 | */
419 |
420 | details, /* 1 */
421 | menu {
422 | display: block;
423 | }
424 |
425 | /*
426 | * Add the correct display in all browsers.
427 | */
428 |
429 | summary {
430 | display: list-item;
431 | }
432 |
433 | /* Scripting
434 | ========================================================================== */
435 |
436 | /**
437 | * Add the correct display in IE 9-.
438 | */
439 |
440 | canvas {
441 | display: inline-block;
442 | }
443 |
444 | /**
445 | * Add the correct display in IE.
446 | */
447 |
448 | template {
449 | display: none;
450 | }
451 |
452 | /* Hidden
453 | ========================================================================== */
454 |
455 | /**
456 | * Add the correct display in IE 10-.
457 | */
458 |
459 | [hidden] {
460 | display: none;
461 | }
--------------------------------------------------------------------------------
/src/scss/_common/_variables.scss:
--------------------------------------------------------------------------------
1 | $brand-yellow: #FAC450;
2 | $brand-blue: #00A0E9;
3 | $brand-red: #E01515;
4 | $brand-green: #60BE29;
5 | $brand-dark: #333;
6 |
7 | $gray-dark: #636363;
8 | $gray: #68727d;
9 | $gray-light: #828a92;
10 | //= =================
11 | // site
12 | //= =================
13 | $container-width: 1000px;
14 | $container-width-sm: 740px;
15 | $header-height: 60px;
16 | $side-width: 280px;
17 | //= =================
18 | // code
19 | //= =================
20 | $code-font-family: 'consolas', 'Menlo', 'monospace';
21 | $code-font-size :13px;
22 | $code-border-radius :3px;
--------------------------------------------------------------------------------
/src/scss/_common/index.scss:
--------------------------------------------------------------------------------
1 | @import 'variables';
2 | @import 'normalize';
3 | @import 'base';
4 | @import 'icon';
--------------------------------------------------------------------------------
/src/scss/_components/highlight/_diff.scss:
--------------------------------------------------------------------------------
1 | $highlight-deletion: #fdd;
2 | $highlight-addition: #dfd;
--------------------------------------------------------------------------------
/src/scss/_components/highlight/_theme.scss:
--------------------------------------------------------------------------------
1 | $highlight-background: #f2f2f2;
2 | $highlight-current-line: #efefef;
3 | $highlight-selection: #d6d6d6;
4 | $highlight-foreground: #4d4d4c;
5 | $highlight-comment: #8e908c;
6 | $highlight-red: #c82829;
7 | $highlight-orange: #f5871f;
8 | $highlight-yellow: #eab700;
9 | $highlight-green: #718c00;
10 | $highlight-aqua: #3e999f;
11 | $highlight-blue: #4271ae;
12 | $highlight-purple: #8959a8;
--------------------------------------------------------------------------------
/src/scss/_components/highlight/index.scss:
--------------------------------------------------------------------------------
1 | @import "theme";
2 | @import "diff";
3 | @mixin code-block {
4 | overflow: scroll;
5 | margin: 20px 0;
6 | padding: 15px;
7 | color: $highlight-foreground;
8 | font-size: $code-font-size;
9 | background: $highlight-background;
10 | line-height: 1;
11 | }
12 |
13 | pre,
14 | code {
15 | font-family: $code-font-family;
16 | }
17 |
18 | code {
19 | padding: 2px 6px;
20 | word-wrap: break-all;
21 | color: $highlight-foreground;
22 | background: $highlight-background;
23 | border-radius: $code-border-radius;
24 | font-size: $code-font-size;
25 | }
26 |
27 | pre {
28 | @include code-block;
29 | code {
30 | padding: 0;
31 | color: $highlight-foreground;
32 | background: none;
33 | text-shadow: none;
34 | }
35 | }
36 |
37 | .highlight {
38 | @include code-block;
39 | pre {
40 | border: none;
41 | margin: 0;
42 | padding: 1px;
43 | }
44 | table {
45 | margin: 0;
46 | width: auto;
47 | border: none;
48 | }
49 | td {
50 | border: none;
51 | padding: 0;
52 | }
53 | figcaption {
54 | @include clearfix;
55 | font-size: 1em;
56 | color: $highlight-foreground;
57 | line-height: 1em;
58 | margin-bottom: 1em;
59 | a {
60 | float: right;
61 | color: $highlight-foreground;
62 | &:hover {
63 | border-bottom-color: $highlight-foreground;
64 | }
65 | }
66 | }
67 | .gutter pre {
68 | color: $gray-dark;
69 | text-align: right;
70 | border-right: 1px solid #e6e6e6;
71 | padding-right: 20px;
72 | }
73 | .code{
74 | overflow: scroll;
75 | }
76 | .line {
77 | height: 20px;
78 | }
79 | }
80 |
81 | .gutter {
82 | -webkit-user-select: none;
83 | -moz-user-select: none;
84 | -ms-user-select: none;
85 | user-select: none;
86 | }
87 |
88 | .gist table {
89 | width: auto;
90 | td {
91 | border: none;
92 | }
93 | }
94 |
95 | // For diff highlight
96 | pre .deletion {
97 | background: $highlight-deletion;
98 | }
99 |
100 | pre .addition {
101 | background: $highlight-addition;
102 | }
103 |
104 | pre .meta {
105 | color: $highlight-purple;
106 | }
107 |
108 | pre {
109 | .comment {
110 | color: $highlight-comment;
111 | }
112 | .variable,
113 | .attribute,
114 | .tag,
115 | .regexp,
116 | .ruby,
117 | .constant,
118 | .xml,
119 | .tag,
120 | .title,
121 | .xml,
122 | .pi,
123 | .xml,
124 | .doctype,
125 | .html,
126 | .doctype,
127 | .css,
128 | .id,
129 | .css,
130 | .class,
131 | .css,
132 | .pseudo {
133 | color: $highlight-red;
134 | }
135 | .number,
136 | .preprocessor,
137 | .built_in,
138 | .literal,
139 | .params,
140 | .constant,
141 | .command {
142 | color: $highlight-orange;
143 | }
144 | .ruby,
145 | .class,
146 | .title,
147 | .css,
148 | .rules,
149 | .attribute,
150 | .string,
151 | .value,
152 | .inheritance,
153 | .header,
154 | .ruby,
155 | .symbol,
156 | .xml,
157 | .cdata,
158 | .special,
159 | .number,
160 | .formula {
161 | color: $highlight-green;
162 | }
163 | .title,
164 | .css,
165 | .hexcolor {
166 | color: $highlight-aqua;
167 | }
168 | .function,
169 | .python,
170 | .decorator,
171 | .python,
172 | .title,
173 | .ruby,
174 | .function,
175 | .title,
176 | .ruby,
177 | .title,
178 | .keyword,
179 | .perl,
180 | .sub,
181 | .javascript,
182 | .title,
183 | .coffeescript,
184 | .title {
185 | color: $highlight-blue;
186 | }
187 | .keyword,
188 | .javascript,
189 | .function {
190 | color: $highlight-purple;
191 | }
192 | }
--------------------------------------------------------------------------------
/src/scss/_components/index.scss:
--------------------------------------------------------------------------------
1 | @import "highlight/index";
--------------------------------------------------------------------------------
/src/scss/_custom/_about.scss:
--------------------------------------------------------------------------------
1 | .about {
2 | .info {
3 | @include clearfix;
4 | padding-bottom: 20px;
5 | border-bottom: 1px solid #f8f8f8;
6 | .avatar {
7 | float: left;
8 | img {
9 | padding: 5px;
10 | background: #f2f2f2;
11 | border-radius: 3px;
12 | height: 200px;
13 | }
14 | }
15 | .social {
16 | float: left;
17 | padding-left: 20px;
18 | ul {
19 | list-style: none;
20 | padding: 0;
21 | margin: 0;
22 | li {
23 | height: 40px;
24 | i {
25 | margin-right: 10px;
26 | }
27 | .iconfont {
28 | color: $gray-dark;
29 | }
30 | a {
31 | text-decoration: none;
32 | color: $brand-dark;
33 | &:hover {
34 | color: $brand-blue;
35 | }
36 | }
37 | }
38 | }
39 | }
40 | }
41 | .description {
42 | padding: 20px 0;
43 | border-bottom: 1px solid #f8f8f8;
44 | color: $gray-dark;
45 | h2,
46 | h3 {
47 | margin: 0;
48 | padding: 0;
49 | color: $brand-dark;
50 | &:not(:first-child){
51 | margin-top: 30px;
52 | }
53 | }
54 | h2 {
55 | font-size: 18px;
56 | }
57 | h3 {
58 | font-size: 16px;
59 | }
60 | blockquote {
61 | position: relative;
62 | margin: 0;
63 | margin-bottom: 20px;
64 | padding: 10px;
65 | border: 1px solid #e4e4e4;
66 | border-radius: 3px;
67 | text-align: center;
68 | line-height: 20px;
69 | &::before,
70 | &::after {
71 | display: inline-block;
72 | position: absolute;
73 | font-family: "iconfont" !important;
74 | font-size: 18px;
75 | height: 30px;
76 | line-height: 30px;
77 | width: 30px;
78 | background: #fff;
79 | text-align: center;
80 | color: $gray;
81 | }
82 | &::before {
83 | content: '\e60f';
84 | background: #fff;
85 | top: -15px;
86 | left: -10px;
87 | }
88 | &::after {
89 | content: '\e60e';
90 | bottom: -15px;
91 | right: -10px;
92 | }
93 | }
94 | ul {
95 | margin-top: 0;
96 | margin-bottom: 15px;
97 | padding: 0;
98 | list-style: none;
99 | li {
100 | padding-left: 15px;
101 | position: relative;
102 | line-height: 24px;
103 | &::before {
104 | content: ' ';
105 | display: block;
106 | width: 4px;
107 | height: 4px;
108 | position: absolute;
109 | border-radius: 4px;
110 | left: 0;
111 | top: 8px;
112 | background: $gray-light;
113 | }
114 | }
115 | ul {
116 | list-style: none;
117 | li {
118 | padding-left: 15px;
119 | position: relative;
120 | &::before {
121 | content: ' ';
122 | display: block;
123 | width: 3px;
124 | height: 3px;
125 | position: absolute;
126 | left: 0;
127 | top: 8px;
128 | background: $gray-light;
129 | }
130 | }
131 | }
132 | }
133 | }
134 | }
135 |
136 | @media all and (max-width: $container-width) {
137 | .about {
138 | .info {
139 | padding-bottom: 0;
140 | .avatar {
141 | float: none;
142 | margin-bottom: 20px;
143 | img {
144 | width: 100%;
145 | height: auto;
146 | }
147 | }
148 | .social {
149 | padding: 0;
150 | }
151 | }
152 | }
153 | }
--------------------------------------------------------------------------------
/src/scss/_custom/_tags.scss:
--------------------------------------------------------------------------------
1 | .tagcloud{
2 | min-height: 720px;
3 | .tags{
4 | padding-bottom: 20px;
5 | border-bottom: 1px solid #f2f2f2;
6 | }
7 | a{
8 | display: inline-block;
9 | vertical-align: bottom;
10 | padding: 5px 10px;
11 | margin-right: 10px;
12 | margin-bottom: 20px;
13 |
14 |
15 | color: $brand-dark;
16 | text-decoration: none;
17 | border-bottom: 1px solid $gray;
18 |
19 | &:hover{
20 | color: $brand-blue;
21 | border-bottom: 1px dashed $brand-blue;
22 | }
23 | }
24 | }
--------------------------------------------------------------------------------
/src/scss/_custom/index.scss:
--------------------------------------------------------------------------------
1 | @import "tags";
2 | @import "about";
3 |
--------------------------------------------------------------------------------
/src/scss/_mixins/_clearfix.scss:
--------------------------------------------------------------------------------
1 | @mixin clearfix() {
2 | &::after {
3 | content: "";
4 | display: table;
5 | clear: both;
6 | }
7 | }
--------------------------------------------------------------------------------
/src/scss/_mixins/index.scss:
--------------------------------------------------------------------------------
1 | @import "clearfix";
--------------------------------------------------------------------------------
/src/scss/_site/_article.scss:
--------------------------------------------------------------------------------
1 | .article {
2 | .article-wrapper {
3 | position: relative;
4 | margin-bottom: 20px;
5 | padding-bottom: 20px;
6 | border-bottom: 1px solid #f2f2f2;
7 | word-wrap: break-word;
8 | word-break: break-all;
9 | &:last-child {
10 | border: none;
11 | }
12 | h1 {
13 | padding-top: 10px;
14 | padding-bottom: 10px;
15 | font-size: 22px;
16 | border-bottom: 1px solid #f2f2f2;
17 | a {
18 | color: $brand-dark;
19 | text-decoration: none;
20 | &:hover {
21 | color: $brand-blue;
22 | }
23 | }
24 | }
25 | h2 {
26 | font-size: 18px;
27 | padding-top: 5px;
28 | padding-bottom: 5px;
29 | letter-spacing: 1px;
30 | margin: 0;
31 | a {
32 | color: $brand-dark;
33 | text-decoration: none;
34 | &:hover {
35 | color: $brand-blue;
36 | }
37 | }
38 | }
39 | hr {
40 | color: #f2f2f2;
41 | height: 1px;
42 | border: 0px;
43 | border-top: 1px solid #f2f2f2;
44 | margin: 0px;
45 | padding: 0px;
46 | overflow: hidden;
47 | }
48 | p {
49 | margin-top: 0;
50 | margin-bottom: 15px;
51 | a {
52 | display: inline-block;
53 | color: $gray-light;
54 | text-decoration: none;
55 | color: $brand-blue;
56 | border-bottom: 1px solid transparent;
57 | &:hover {
58 | border-bottom: 1px solid $brand-blue;
59 | }
60 | }
61 | }
62 | .tocbox {
63 | position: absolute;
64 | right: 0;
65 | top: 0;
66 | ol {
67 | margin: 0;
68 | padding: 0;
69 | list-style: none;
70 | li {
71 | line-height: 20px;
72 | }
73 | }
74 | .toc-icon {
75 | position: absolute;
76 | right: 0;
77 | top: 0;
78 | height: 30px;
79 | width: 30px;
80 | text-align: center;
81 | line-height: 30px;
82 | background-color: $brand-blue;
83 | border-radius: 3px;
84 | color: #fff;
85 | cursor: pointer;
86 | }
87 | .toc {
88 | display: none;
89 | position: absolute;
90 | right: 40px;
91 | width: 200px;
92 | padding: 10px;
93 | background: #f2f2f2;
94 | border-radius: 3px;
95 | &.active {
96 | display: block;
97 | }
98 | &::before {
99 | position: absolute;
100 | content: ' ';
101 | display: inline-block;
102 | height: 10px;
103 | width: 10px;
104 | right: -5px;
105 | top: 10px;
106 | z-index: -1;
107 | background: #f2f2f2;
108 | transform: rotate(45deg);
109 | }
110 | a {
111 | color: $gray;
112 | text-decoration: none;
113 | &:hover {
114 | color: $brand-blue;
115 | }
116 | }
117 | >li {
118 | margin-bottom: 5px;
119 | }
120 | }
121 | }
122 | .essential {
123 | color: $gray-light;
124 | line-height: 2;
125 | letter-spacing: 1px;
126 | padding: 15px 0;
127 | h1,
128 | h2,
129 | h3 {
130 | margin-bottom: 15px;
131 | padding-bottom: 0;
132 | padding-top: 10px;
133 | }
134 | h1 {
135 | font-size: 18px;
136 | }
137 | h2 {
138 | font-size: 16px;
139 | }
140 | h3 {
141 | font-size: 14px;
142 | }
143 | img {
144 | display: inline-block;
145 | margin: 0 auto;
146 | width: 100%;
147 | background: #f2f2f2;
148 | padding: 5px;
149 | border-radius: 3px;
150 | }
151 | blockquote {
152 | margin: 0;
153 | position: relative;
154 | padding: 15px;
155 | margin-bottom: 15px;
156 | border: 1px solid #f8f8f8;
157 | background: #f8f8f8;
158 | p {
159 | margin: 0;
160 | }
161 | &::before,
162 | &::after {
163 | display: inline-block;
164 | position: absolute;
165 | font-family: "iconfont" !important;
166 | font-size: 12px;
167 | height: 30px;
168 | line-height: 30px;
169 | width: 30px;
170 | background: transparent;
171 | text-align: center;
172 | color: $gray;
173 | }
174 | &::before {
175 | content: '\e60f';
176 | top: -15px;
177 | left: -10px;
178 | }
179 | &::after {
180 | content: '\e60e';
181 | bottom: -15px;
182 | right: -10px;
183 | }
184 | }
185 | ul {
186 | margin-top: 0;
187 | margin-bottom: 15px;
188 | padding: 0;
189 | list-style: none;
190 | li {
191 | padding-left: 15px;
192 | position: relative;
193 | &::before {
194 | content: ' ';
195 | display: block;
196 | width: 4px;
197 | height: 4px;
198 | position: absolute;
199 | border-radius: 4px;
200 | left: 0;
201 | top: 8px;
202 | background: $gray-light;
203 | }
204 | }
205 | ul {
206 | list-style: none;
207 | li {
208 | padding-left: 15px;
209 | position: relative;
210 | &::before {
211 | content: ' ';
212 | display: block;
213 | width: 3px;
214 | height: 3px;
215 | position: absolute;
216 | left: 0;
217 | top: 8px;
218 | background: $gray-light;
219 | }
220 | }
221 | }
222 | }
223 | }
224 | .basic {
225 | ul {
226 | margin: 0;
227 | padding: 0;
228 | list-style: disc;
229 | li {
230 | display: inline-block;
231 | position: relative;
232 | line-height: 20px;
233 | padding-right: 6px;
234 | font-size: 12px;
235 | &:not(:first-child) {
236 | padding-left: 8px;
237 | &::before {
238 | content: ' ';
239 | display: inline-block;
240 | width: 3px;
241 | height: 3px;
242 | position: absolute;
243 | top: 9px;
244 | left: -1px;
245 | border-radius: 3px;
246 | background-color: $gray-light;
247 | }
248 | }
249 | a {
250 | color: $gray-light;
251 | text-decoration: none;
252 | }
253 | }
254 | }
255 | }
256 | .readall {
257 | display: inline-block;
258 | padding: 5px 20px;
259 | color: $brand-blue;
260 | text-align: center;
261 | text-decoration: none;
262 | border: 1px solid $brand-blue;
263 | border-radius: 3px;
264 | &:hover {
265 | color: #fff;
266 | background: $brand-blue;
267 | }
268 | }
269 | .detail {
270 | color: $gray;
271 | line-height: 2;
272 | letter-spacing: 1px;
273 | padding: 15px 0;
274 | img {
275 | display: inline-block;
276 | margin: 0 auto;
277 | max-width: 100%;
278 | background: #f2f2f2;
279 | padding: 5px;
280 | border-radius: 3px;
281 | }
282 | h1,
283 | h2,
284 | h3 {
285 | margin-bottom: 15px;
286 | padding-top: 0;
287 | padding-bottom: 0;
288 | }
289 | h1 {
290 | font-size: 18px;
291 | }
292 | h2 {
293 | font-size: 16px;
294 | }
295 | h3 {
296 | font-size: 14px;
297 | }
298 | blockquote {
299 | margin: 0;
300 | position: relative;
301 | padding: 15px;
302 | margin-bottom: 15px;
303 | border: 1px solid #f2f2f2;
304 | background: #f2f2f2;
305 | p {
306 | margin: 0;
307 | }
308 | &::before,
309 | &::after {
310 | display: inline-block;
311 | position: absolute;
312 | font-family: "iconfont" !important;
313 | font-size: 12px;
314 | height: 30px;
315 | line-height: 30px;
316 | width: 30px;
317 | background: transparent;
318 | text-align: center;
319 | color: $gray;
320 | }
321 | &::before {
322 | content: '\e60f';
323 | top: -15px;
324 | left: -10px;
325 | }
326 | &::after {
327 | content: '\e60e';
328 | bottom: -15px;
329 | right: -10px;
330 | }
331 | }
332 | ul {
333 | margin-top: 0;
334 | margin-bottom: 15px;
335 | padding: 0;
336 | list-style: none;
337 | li {
338 | padding-left: 15px;
339 | position: relative;
340 | &::before {
341 | content: ' ';
342 | display: block;
343 | width: 6px;
344 | height: 6px;
345 | position: absolute;
346 | border-radius: 6px;
347 | left: 0;
348 | top: 12px;
349 | background: $brand-blue;
350 | }
351 | }
352 | ul {
353 | list-style: none;
354 | li {
355 | padding-left: 15px;
356 | position: relative;
357 | &::before {
358 | content: ' ';
359 | display: block;
360 | width: 3px;
361 | height: 3px;
362 | position: absolute;
363 | left: 0;
364 | top: 8px;
365 | background: $gray-light;
366 | }
367 | }
368 | }
369 | }
370 | }
371 | .tags {
372 | color: $gray-dark;
373 | text-align: center;
374 | padding-bottom: 20px;
375 | a {
376 | display: inline-block;
377 | padding-bottom: 5px;
378 | padding-left: 5px;
379 | padding-right: 5px;
380 | text-decoration: none;
381 | color: $gray;
382 | cursor: pointer;
383 | &:not(:last-child) {
384 | margin-right: 5px;
385 | }
386 | &:hover {
387 | color: $brand-blue;
388 | }
389 | }
390 | }
391 | .link {
392 | padding: 20px 0;
393 | margin: 0;
394 | font-size: 14px;
395 | list-style: none;
396 | line-height: 24px;
397 | border-top: 1px solid #eee;
398 | border-bottom: 1px solid #eee;
399 | color: $gray;
400 | .iconfont {
401 | font-size: 14px;
402 | }
403 | span{
404 | display: inline-block;
405 | }
406 | a {
407 | display: inline-block;
408 | text-decoration: none;
409 | color: $gray;
410 | &:hover {
411 | color: $brand-blue;
412 | }
413 | }
414 | }
415 | }
416 | .share {
417 | display: flex;
418 | padding: 20px 0;
419 | border-top: 1px solid #eee;
420 | .info {
421 | flex: 1;
422 | line-height: 24px;
423 | input {
424 | width: 280px;
425 | border: none;
426 | background: #eee;
427 | padding: 2px 10px;
428 | outline: none;
429 | border-radius: 3px;
430 | }
431 | }
432 | .social-share {
433 | width: 220px;
434 | text-align: right;
435 | a {
436 | display: inline-block;
437 | height: 40px;
438 | width: 40px;
439 | line-height: 40px;
440 | text-align: center;
441 | color: #fff;
442 | background: #eee;
443 | border: 1px solid transparent;
444 | border-radius: 2px;
445 | &.icon-weibo {
446 | &:hover {
447 | color: #F56467;
448 | }
449 | }
450 | &.icon-wechat {
451 | &:hover {
452 | color: #8CC81B;
453 | }
454 | }
455 | &.icon-qzone {
456 | &:hover {
457 | color: #F5BE3F;
458 | }
459 | }
460 | &.icon-qq {
461 | &:hover {
462 | color: #38A6D7;
463 | }
464 | }
465 | }
466 | .icon-wechat .wechat-qrcode .qrcode {
467 | margin-top: 10px;
468 | margin-bottom: 0;
469 | margin-left: auto;
470 | margin-right: auto;
471 | }
472 | }
473 | }
474 | .page-wrapper {
475 | border-top: 1px solid $gray-light;
476 | }
477 | }
478 |
--------------------------------------------------------------------------------
/src/scss/_site/_base.scss:
--------------------------------------------------------------------------------
1 | .top-loading {
2 | height: 2px;
3 | width: 100%;
4 | background-color: #fff;
5 | }
6 |
7 | .header {
8 | border-bottom: 1px solid #f2f2f2;
9 | box-shadow: 1px 1px 1px #f2f2f2;
10 | .header-wrapper {
11 | @include clearfix;
12 | position: relative;
13 | width: $container-width;
14 | margin-left: auto;
15 | margin-right: auto;
16 | overflow: hidden;
17 | }
18 | .brand {
19 | height: $header-height;
20 | float: left;
21 | line-height: $header-height;
22 | a {
23 | font-size: 24px;
24 | text-decoration: none;
25 | vertical-align: middle;
26 | img {
27 | height: 50px;
28 | vertical-align: middle;
29 | }
30 | }
31 | }
32 | .nav {
33 | float: left;
34 | ul {
35 | margin: 0;
36 | list-style: none;
37 | li {
38 | line-height: $header-height;
39 | display: inline-block;
40 | position: relative;
41 | a {
42 | display: inline-block;
43 | height: $header-height;
44 | padding-left: 10px;
45 | padding-right: 10px;
46 | color: #333;
47 | text-decoration: none;
48 | font-weight: 320;
49 | border-bottom: 2px solid transparent;
50 | &:hover {
51 | color: $brand-blue;
52 | }
53 | }
54 | }
55 | li.current {
56 | a {
57 | color: #000;
58 | border-bottom-color: $brand-blue;
59 | }
60 | }
61 | }
62 | .submenu {
63 | position: absolute;
64 | z-index: 999;
65 | width: 420px;
66 | }
67 | }
68 | .tool {
69 | float: right;
70 | ul {
71 | padding: 0;
72 | margin: 0;
73 | list-style: none;
74 | li {
75 | display: inline-block;
76 | padding-top: 10px;
77 | padding-left: 10px;
78 | padding-right: 10px;
79 | text-align: center;
80 | cursor: pointer;
81 | &:hover {
82 | color: $brand-blue;
83 | }
84 | div:first-child {
85 | line-height: 20px;
86 | }
87 | div {
88 | font-size: 12px;
89 | line-height: 20px;
90 | }
91 | }
92 | }
93 | }
94 | .search {
95 | position: absolute;
96 | top: 0;
97 | bottom: 0;
98 | left: $container-width;
99 | right: 0;
100 | background: #fff;
101 | transition: left .3s;
102 | &.active {
103 | left: 0;
104 | }
105 | .search-wrapper {
106 | display: table;
107 | width: 640px;
108 | line-height: 60px;
109 | margin-left: auto;
110 | margin-right: auto;
111 | color: #555;
112 | .search-icon {
113 | display: table-cell;
114 | width: 40px;
115 | text-align: center;
116 | }
117 | .search-input {
118 | display: table-cell;
119 | input {
120 | width: 100%;
121 | border: none;
122 | margin-top: 10px;
123 | line-height: 40px;
124 | color: #555;
125 | outline: none;
126 | }
127 | }
128 | .search-close {
129 | display: table-cell;
130 | width: 40px;
131 | text-align: center;
132 | cursor: pointer;
133 | }
134 | }
135 | }
136 | }
137 |
138 | .content {
139 | .content-wrapper {
140 | @include clearfix;
141 | display: flex;
142 | width: $container-width;
143 | margin-left: auto;
144 | margin-right: auto;
145 | padding-top: 30px;
146 | padding-bottom: 30px;
147 | position: relative;
148 | }
149 | }
150 |
151 | .main {
152 | flex: 1;
153 | }
154 |
155 | .main.post__wrap {
156 | background: rgba(#fafafa, .8);
157 | padding-left: 30px;
158 | padding-right: 30px;
159 | border-radius: 4px;
160 | }
161 |
162 | .side {
163 | width: $side-width;
164 | .side-wrapper {
165 | padding-left: 30px;
166 | }
167 | h2 {
168 | margin: 0;
169 | padding: 10px 0;
170 | font-size: 16px;
171 | color: $brand-dark;
172 | text-align: center;
173 | border-top: 2px solid $brand-blue;
174 | border-bottom: 1px dashed #ccc;
175 | }
176 | .box {
177 | &:not(:last-child) {
178 | margin-bottom: 30px;
179 | }
180 | }
181 | ul {
182 | list-style: none;
183 | margin: 0;
184 | padding: 10px 0;
185 | li {
186 | a {
187 | text-decoration: none;
188 | }
189 | }
190 | }
191 | ul.latest-list {
192 | margin: 0;
193 | list-style: none;
194 | padding: 10px 0;
195 | li {
196 | position: relative;
197 | padding-top: 5px;
198 | padding-bottom: 5px;
199 | padding-left: 20px;
200 | &::before {
201 | position: absolute;
202 | content: ' ';
203 | display: inline-block;
204 | height: 0;
205 | width: 0;
206 | top: 10px;
207 | left: 0;
208 | border-width: 4px;
209 | border-style: solid;
210 | border-color: #fff #fff #fff $brand-blue;
211 | }
212 | a {
213 | color: $gray;
214 | text-decoration: none;
215 | &:hover {
216 | color: $brand-blue;
217 | }
218 | }
219 | .date {
220 | padding: 5px 0;
221 | color: $gray-light;
222 | font-size: 12px;
223 | }
224 | }
225 | }
226 | ul.tag-list {
227 | @include clearfix;
228 | margin: 0;
229 | list-style: none;
230 | padding: 10px 0;
231 | li {
232 | width: 33.3%;
233 | float: left;
234 | text-align: center;
235 | padding-right: 4px;
236 | margin-bottom: 5px;
237 | &:nth-child(2n) {
238 | padding-right: 2px;
239 | padding-left: 2px;
240 | text-align: center;
241 | }
242 | &:nth-child(3n) {
243 | padding-right: 0px;
244 | padding-left: 4px;
245 | }
246 | a {
247 | display: inline-block;
248 | width: 100%;
249 | padding: 0 10px;
250 | line-height: 24px;
251 | color: $gray;
252 | border: 1px solid $gray;
253 | border-radius: 30px;
254 | text-decoration: none;
255 | overflow: hidden;
256 | text-overflow: ellipsis;
257 | white-space: nowrap;
258 | &:hover {
259 | color: $brand-blue;
260 | border-color: $brand-blue;
261 | }
262 | }
263 | }
264 | }
265 | ul.category-list {
266 | @include clearfix;
267 | margin: 0;
268 | list-style: none;
269 | padding: 10px 0;
270 | li {
271 | width: 50%;
272 | float: left;
273 | text-align: center;
274 | padding-right: 5px;
275 | margin-bottom: 10px;
276 | &:nth-child(2n) {
277 | padding-right: 0px;
278 | padding-left: 5px;
279 | }
280 | a {
281 | display: inline-block;
282 | width: 100%;
283 | padding: 0 10px;
284 | line-height: 30px;
285 | color: $gray;
286 | border: 1px solid $gray;
287 | border-radius: 3px;
288 | text-decoration: none;
289 | overflow: hidden;
290 | text-overflow: ellipsis;
291 | white-space: nowrap;
292 | &:hover {
293 | color: $brand-blue;
294 | border-color: $brand-blue;
295 | }
296 | }
297 | }
298 | }
299 | }
300 |
301 | .footer {
302 | background: $brand-dark;
303 | .footer-wrapper {
304 | @include clearfix;
305 | position: relative;
306 | width: $container-width;
307 | margin-left: auto;
308 | margin-right: auto;
309 | ul {
310 | list-style: none;
311 | padding: 0;
312 | }
313 | .sns {
314 | padding: 30px;
315 | text-align: center;
316 | li {
317 | display: inline-block;
318 | height: 40px;
319 | width: 40px;
320 | text-align: center;
321 | line-height: 40px;
322 | background: $gray-dark;
323 | border-radius: 40px;
324 | &:not(:last-child) {
325 | margin-right: 15px;
326 | }
327 | a {
328 | text-decoration: none;
329 | }
330 | .iconfont {
331 | font-size: 18px;
332 | color: #fff;
333 | }
334 | }
335 | }
336 | }
337 | .bottom-wrapper {
338 | @include clearfix;
339 | position: relative;
340 | background: #222;
341 | color: #666;
342 | .copy {
343 | text-align: center;
344 | padding: 10px;
345 | }
346 | }
347 | }
348 |
--------------------------------------------------------------------------------
/src/scss/_site/_media.scss:
--------------------------------------------------------------------------------
1 | @media all and (max-width: $container-width) and (min-width: $container-width-sm) {
2 | .header {
3 | .header-wrapper {
4 | width: $container-width-sm;
5 | }
6 | }
7 | .content {
8 | .content-wrapper {
9 | width: $container-width-sm;
10 | }
11 | }
12 | .footer {
13 | .footer-wrapper {
14 | width: $container-width-sm;
15 | }
16 | }
17 | }
18 |
19 | @media all and (max-width: $container-width-sm) {
20 | .header {
21 | .header-wrapper {
22 | width: 100%;
23 | .brand {
24 | float: none;
25 | text-align: center;
26 | box-shadow: 1px 1px 1px #f2f2f2;
27 | }
28 | .tool {
29 | display: none;
30 | }
31 | .nav {
32 | float: none;
33 | ul {
34 | padding-left: 20px;
35 | padding-right: 20px;
36 | li {
37 | line-height: 40px;
38 | display: inline-block;
39 | a {
40 | height: 40px;
41 | }
42 | }
43 | }
44 | }
45 | }
46 | }
47 | .content {
48 | .post__wrap {
49 | padding-left: 15px;
50 | padding-right: 15px;
51 | }
52 | .content-wrapper {
53 | padding-top: 15px;
54 | padding-left: 15px;
55 | padding-right: 15px;
56 | display: block;
57 | width: 100%;
58 | }
59 | .article-wrapper {
60 | width: 100%;
61 | }
62 | }
63 | .side {
64 | display: none;
65 | }
66 | .footer {
67 | .footer-wrapper {
68 | width: 100%;
69 | .sns {
70 | padding: 20px;
71 | }
72 | }
73 | .bottom-wrapper {
74 | font-size: 10px;
75 | }
76 | }
77 | .article {
78 | .link{
79 | .title{
80 | display: inline-block;
81 | width: 200px;
82 | white-space: nowrap;
83 | overflow: hidden;
84 | text-overflow: ellipsis;
85 | vertical-align: middle;
86 | }
87 | }
88 | .share {
89 | display: block;
90 | .info {
91 | padding-bottom: 20px;
92 | margin-bottom: 20px;
93 | border-bottom: 1px solid #f2f2f2;
94 | }
95 | .ds-share {
96 | width: auto;
97 | #ds-reset {
98 | text-align: center;
99 | }
100 | }
101 | }
102 | }
103 | }
104 |
--------------------------------------------------------------------------------
/src/scss/_site/_page.scss:
--------------------------------------------------------------------------------
1 | .page {
2 | border-top: 1px solid #e4e4e4;
3 |
4 | .page-wrapper {
5 | text-align: center;
6 |
7 | a {
8 | text-align: center;
9 | text-decoration: none;
10 | }
11 |
12 | .page-number,
13 | .prev,
14 | .next,
15 | .space {
16 | display: inline-block;
17 | width: 30px;
18 | height: 40px;
19 | margin-top: -1px;
20 | line-height: 40px;
21 | color: $gray-dark;
22 | border-top: 1px solid transparent;
23 |
24 | &.disabled{
25 | cursor: not-allowed;
26 | }
27 |
28 | &:hover,
29 | &.current {
30 | background: #f2f2f2;
31 | border-top-color: $brand-blue;
32 | }
33 | }
34 |
35 | .page-block{
36 | display: inline-block;
37 | margin-top: -1px;
38 | padding-left: 30px;
39 | padding-right: 30px;
40 | line-height: 40px;
41 | color: $gray-dark;
42 | background: #f2f2f2;
43 | border-top: 1px solid $brand-blue;
44 | }
45 |
46 | .iconfont {
47 | font-size: 14px;
48 | }
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/src/scss/_site/index.scss:
--------------------------------------------------------------------------------
1 | @import "base";
2 | @import "article";
3 | @import "page";
4 | @import "media";
--------------------------------------------------------------------------------
/src/scss/app.scss:
--------------------------------------------------------------------------------
1 | @import "_common/index";
2 | @import "_mixins/index";
3 | @import "_components/index";
4 |
5 | @import "_site/index";
6 | @import "_custom/index";
--------------------------------------------------------------------------------
/src/vendors/share.min.css:
--------------------------------------------------------------------------------
1 | @font-face{font-family:"socialshare";src:url("../fonts/iconfont.eot");src:url("../fonts/iconfont.eot?#iefix") format("embedded-opentype"),url("../fonts/iconfont.woff") format("woff"),url("../fonts/iconfont.ttf") format("truetype"),url("../fonts/iconfont.svg#iconfont") format("svg")}.social-share{font-family:"socialshare" !important;font-size:16px;font-style:normal;-webkit-font-smoothing:antialiased;-webkit-text-stroke-width:0.2px;-moz-osx-font-smoothing:grayscale}.social-share *{font-family:"socialshare" !important}.social-share .icon-tencent:before{content:"\f07a"}.social-share .icon-qq:before{content:"\f11a"}.social-share .icon-weibo:before{content:"\f12a"}.social-share .icon-wechat:before{content:"\f09a"}.social-share .icon-douban:before{content:"\f10a"}.social-share .icon-heart:before{content:"\f20a"}.social-share .icon-like:before{content:"\f00a"}.social-share .icon-qzone:before{content:"\f08a"}.social-share .icon-linkedin:before{content:"\f01a"}.social-share .icon-diandian:before{content:"\f05a"}.social-share .icon-facebook:before{content:"\f03a"}.social-share .icon-google:before{content:"\f04a"}.social-share .icon-twitter:before{content:"\f06a"}.social-share a{position:relative;text-decoration:none;margin:4px;display:inline-block;outline:none}.social-share .social-share-icon{position:relative;display:inline-block;width:32px;height:32px;font-size:20px;border-radius:50%;line-height:32px;border:1px solid #666;color:#666;text-align:center;vertical-align:middle;transition:background 0.6s ease-out 0s}.social-share .social-share-icon:hover{background:#666;color:#fff}.social-share .icon-weibo{color:#ff763b;border-color:#ff763b}.social-share .icon-weibo:hover{background:#ff763b}.social-share .icon-tencent{color:#56b6e7;border-color:#56b6e7}.social-share .icon-tencent:hover{background:#56b6e7}.social-share .icon-qq{color:#56b6e7;border-color:#56b6e7}.social-share .icon-qq:hover{background:#56b6e7}.social-share .icon-qzone{color:#FDBE3D;border-color:#FDBE3D}.social-share .icon-qzone:hover{background:#FDBE3D}.social-share .icon-douban{color:#33b045;border-color:#33b045}.social-share .icon-douban:hover{background:#33b045}.social-share .icon-linkedin{color:#0077B5;border-color:#0077B5}.social-share .icon-linkedin:hover{background:#0077B5}.social-share .icon-facebook{color:#44619D;border-color:#44619D}.social-share .icon-facebook:hover{background:#44619D}.social-share .icon-google{color:#db4437;border-color:#db4437}.social-share .icon-google:hover{background:#db4437}.social-share .icon-twitter{color:#55acee;border-color:#55acee}.social-share .icon-twitter:hover{background:#55acee}.social-share .icon-diandian{color:#307DCA;border-color:#307DCA}.social-share .icon-diandian:hover{background:#307DCA}.social-share .icon-wechat{position:relative;color:#7bc549;border-color:#7bc549}.social-share .icon-wechat:hover{background:#7bc549}.social-share .icon-wechat .wechat-qrcode{display:none;border:1px solid #eee;position:absolute;z-index:9;top:-205px;left:-84px;width:200px;height:192px;color:#666;font-size:12px;text-align:center;background-color:#fff;box-shadow:0 2px 10px #aaa;transition:all 200ms;-webkit-tansition:all 350ms;-moz-transition:all 350ms}.social-share .icon-wechat .wechat-qrcode.bottom{top:40px;left:-84px}.social-share .icon-wechat .wechat-qrcode.bottom:after{display:none}.social-share .icon-wechat .wechat-qrcode h4{font-weight:normal;height:26px;line-height:26px;font-size:12px;background-color:#f3f3f3;margin:0;padding:0;color:#777}.social-share .icon-wechat .wechat-qrcode .qrcode{width:105px;margin:10px auto}.social-share .icon-wechat .wechat-qrcode .qrcode table{margin:0 !important}.social-share .icon-wechat .wechat-qrcode .help p{font-weight:normal;line-height:16px;padding:0;margin:0}.social-share .icon-wechat .wechat-qrcode:after{content:'';position:absolute;left:50%;margin-left:-6px;bottom:-13px;width:0;height:0;border-width:8px 6px 6px 6px;border-style:solid;border-color:#fff transparent transparent transparent}.social-share .icon-wechat:hover .wechat-qrcode{display:block}
2 |
--------------------------------------------------------------------------------
/src/vendors/share.min.js:
--------------------------------------------------------------------------------
1 | !function(r){"use strict";function t(t,e,n,o){function i(r,t){return r-=o,t-=o,!(0>r||r>=u||0>t||t>=u)&&a.isDark(r,t)}var a=r(n,e);a.addData(t),a.make(),o=o||0;var u=a.getModuleCount(),f=a.getModuleCount()+2*o,c=function(r,t,e,n){var o=this.isDark,i=1/f;this.isDark=function(a,u){var f=u*i,c=a*i,s=f+i,l=c+i;return o(a,u)&&(r>s||f>e||t>l||c>n)}};this.text=t,this.level=e,this.version=n,this.moduleCount=f,this.isDark=i,this.addBlank=c}function e(r,e,n,o,i){n=Math.max(1,n||1),o=Math.min(40,o||40);for(var a=n;o>=a;a+=1)try{return new t(r,e,a,i)}catch(r){}}function n(r,t,e){var n=e.size,o="bold "+e.mSize*n+"px "+e.fontname,i=p("")[0].getContext("2d");i.font=o;var a=i.measureText(e.label).width,u=e.mSize,f=a/n,c=(1-f)*e.mPosX,s=(1-u)*e.mPosY,l=c+f,h=s+u,d=.01;1===e.mode?r.addBlank(0,s-d,n,h+d):r.addBlank(c-d,s-d,l+d,h+d),t.fillStyle=e.fontcolor,t.font=o,t.fillText(e.label,c*n,s*n+.75*e.mSize*n)}function o(r,t,e){var n=e.size,o=e.image.naturalWidth||1,i=e.image.naturalHeight||1,a=e.mSize,u=a*o/i,f=(1-u)*e.mPosX,c=(1-a)*e.mPosY,s=f+u,l=c+a,h=.01;3===e.mode?r.addBlank(0,c-h,n,l+h):r.addBlank(f-h,c-h,s+h,l+h),t.drawImage(e.image,f*n,c*n,u*n,a*n)}function i(r,t,e){p(e.background).is("img")?t.drawImage(e.background,0,0,e.size,e.size):e.background&&(t.fillStyle=e.background,t.fillRect(e.left,e.top,e.size,e.size));var i=e.mode;1===i||2===i?n(r,t,e):(3===i||4===i)&&o(r,t,e)}function a(r,t,e,n,o,i,a,u){r.isDark(a,u)&&t.rect(n,o,i,i)}function u(r,t,e,n,o,i,a,u,f,c){a?r.moveTo(t+i,e):r.moveTo(t,e),u?(r.lineTo(n-i,e),r.arcTo(n,e,n,o,i)):r.lineTo(n,e),f?(r.lineTo(n,o-i),r.arcTo(n,o,t,o,i)):r.lineTo(n,o),c?(r.lineTo(t+i,o),r.arcTo(t,o,t,e,i)):r.lineTo(t,o),a?(r.lineTo(t,e+i),r.arcTo(t,e,n,e,i)):r.lineTo(t,e)}function f(r,t,e,n,o,i,a,u,f,c){a&&(r.moveTo(t+i,e),r.lineTo(t,e),r.lineTo(t,e+i),r.arcTo(t,e,t+i,e,i)),u&&(r.moveTo(n-i,e),r.lineTo(n,e),r.lineTo(n,e+i),r.arcTo(n,e,n-i,e,i)),f&&(r.moveTo(n-i,o),r.lineTo(n,o),r.lineTo(n,o-i),r.arcTo(n,o,n-i,o,i)),c&&(r.moveTo(t+i,o),r.lineTo(t,o),r.lineTo(t,o-i),r.arcTo(t,o,t+i,o,i))}function c(r,t,e,n,o,i,a,c){var s=r.isDark,l=n+i,h=o+i,d=e.radius*i,g=a-1,v=a+1,p=c-1,w=c+1,m=s(a,c),T=s(g,p),y=s(g,c),E=s(g,w),A=s(a,w),B=s(v,w),k=s(v,c),b=s(v,p),C=s(a,p);m?u(t,n,o,l,h,d,!y&&!C,!y&&!A,!k&&!A,!k&&!C):f(t,n,o,l,h,d,y&&C&&T,y&&A&&E,k&&A&&B,k&&C&&b)}function s(r,t,e){var n,o,i=r.moduleCount,u=e.size/i,f=a;for(m&&e.radius>0&&e.radius<=.5&&(f=c),t.beginPath(),n=0;i>n;n+=1)for(o=0;i>o;o+=1){var s=e.left+o*u,l=e.top+n*u,h=u;f(r,t,e,s,l,h,n,o)}if(p(e.fill).is("img")){t.strokeStyle="rgba(0,0,0,0.5)",t.lineWidth=2,t.stroke();var d=t.globalCompositeOperation;t.globalCompositeOperation="destination-out",t.fill(),t.globalCompositeOperation=d,t.clip(),t.drawImage(e.fill,0,0,e.size,e.size),t.restore()}else t.fillStyle=e.fill,t.fill()}function l(r,t){var n=e(t.text,t.ecLevel,t.minVersion,t.maxVersion,t.quiet);if(!n)return null;var o=p(r).data("qrcode",n),a=o[0].getContext("2d");return i(n,a,t),s(n,a,t),o}function h(r){var t=p("").attr("width",r.size).attr("height",r.size);return l(t,r)}function d(r){return p("
").attr("src",h(r)[0].toDataURL("image/png"))}function g(r){var t=e(r.text,r.ecLevel,r.minVersion,r.maxVersion,r.quiet);if(!t)return null;var n,o,i=r.size,a=r.background,u=Math.floor,f=t.moduleCount,c=u(i/f),s=u(.5*(i-c*f)),l={position:"relative",left:0,top:0,padding:0,margin:0,width:i,height:i},h={position:"absolute",padding:0,margin:0,width:c,height:c,"background-color":r.fill},d=p("").data("qrcode",t).css(l);for(a&&d.css("background-color",a),n=0;f>n;n+=1)for(o=0;f>o;o+=1)t.isDark(n,o)&&p("").css(h).css({left:s+o*c,top:s+n*c}).appendTo(d);return d}function v(r){return w&&"canvas"===r.render?h(r):w&&"image"===r.render?d(r):g(r)}var p=jQuery,w=function(){var r=document.createElement("canvas");return Boolean(r.getContext&&r.getContext("2d"))}(),m="[object Opera]"!==Object.prototype.toString.call(window.opera),T={render:"canvas",minVersion:1,maxVersion:40,ecLevel:"L",left:0,top:0,size:200,fill:"#000",background:null,text:"no text",radius:0,quiet:0,mode:0,mSize:.1,mPosX:.5,mPosY:.5,label:"no label",fontname:"sans",fontcolor:"#000",image:null};p.fn.qrcode=function(r){var t=p.extend({},T,r);return this.each(function(){"canvas"===this.nodeName.toLowerCase()?l(this,t):p(this).append(v(t))})}}(function(){var r=function(){function r(t,e){if("undefined"==typeof t.length)throw new Error(t.length+"/"+e);var n=function(){for(var r=0;re;e+=1){t[e]=new Array(r);for(var n=0;r>n;n+=1)t[e][n]=null}return t}(d),T(0,0),T(d-7,0),T(0,d-7),A(),E(),k(r,t),s>=7&&B(r),null==v&&(v=M(s,l,p)),b(v,t)},T=function(r,t){for(var e=-1;7>=e;e+=1)if(!(-1>=r+e||r+e>=d))for(var n=-1;7>=n;n+=1)-1>=t+n||t+n>=d||(e>=0&&6>=e&&(0==n||6==n)||n>=0&&6>=n&&(0==e||6==e)||e>=2&&4>=e&&n>=2&&4>=n?h[r+e][t+n]=!0:h[r+e][t+n]=!1)},y=function(){for(var r=0,t=0,e=0;8>e;e+=1){m(!0,e);var n=i.getLostPoint(w);(0==e||r>n)&&(r=n,t=e)}return t},E=function(){for(var r=8;d-8>r;r+=1)null==h[r][6]&&(h[r][6]=r%2==0);for(var t=8;d-8>t;t+=1)null==h[6][t]&&(h[6][t]=t%2==0)},A=function(){for(var r=i.getPatternPosition(s),t=0;t=a;a+=1)for(var u=-2;2>=u;u+=1)-2==a||2==a||-2==u||2==u||0==a&&0==u?h[n+a][o+u]=!0:h[n+a][o+u]=!1}},B=function(r){for(var t=i.getBCHTypeNumber(s),e=0;18>e;e+=1){var n=!r&&1==(t>>e&1);h[Math.floor(e/3)][e%3+d-8-3]=n}for(var e=0;18>e;e+=1){var n=!r&&1==(t>>e&1);h[e%3+d-8-3][Math.floor(e/3)]=n}},k=function(r,t){for(var e=l<<3|t,n=i.getBCHTypeInfo(e),o=0;15>o;o+=1){var a=!r&&1==(n>>o&1);6>o?h[o][8]=a:8>o?h[o+1][8]=a:h[d-15+o][8]=a}for(var o=0;15>o;o+=1){var a=!r&&1==(n>>o&1);8>o?h[8][d-o-1]=a:9>o?h[8][15-o-1+1]=a:h[8][15-o-1]=a}h[d-8][8]=!r},b=function(r,t){for(var e=-1,n=d-1,o=7,a=0,u=i.getMaskFunction(t),f=d-1;f>0;f-=2)for(6==f&&(f-=1);;){for(var c=0;2>c;c+=1)if(null==h[n][f-c]){var s=!1;a>>o&1));var l=u(n,f-c);l&&(s=!s),h[n][f-c]=s,o-=1,-1==o&&(a+=1,o=7)}if(n+=e,0>n||n>=d){n-=e,e=-e;break}}},C=function(t,e){for(var n=0,o=0,a=0,u=new Array(e.length),f=new Array(e.length),c=0;c=0?v.getAt(p):0}}for(var w=0,h=0;hh;h+=1)for(var c=0;ch;h+=1)for(var c=0;c8*h)throw new Error("code length overflow. ("+c.getLengthInBits()+">"+8*h+")");for(c.getLengthInBits()+4<=8*h&&c.put(0,4);c.getLengthInBits()%8!=0;)c.putBit(!1);for(;!(c.getLengthInBits()>=8*h)&&(c.put(o,8),!(c.getLengthInBits()>=8*h));)c.put(a,8);return C(c,n)};return w.addData=function(r){var t=c(r);p.push(t),v=null},w.isDark=function(r,t){if(0>r||r>=d||0>t||t>=d)throw new Error(r+","+t);return h[r][t]},w.getModuleCount=function(){return d},w.make=function(){m(!1,y())},w.createTableTag=function(r,t){r=r||2,t="undefined"==typeof t?4*r:t;var e="";e+='',e+="";for(var n=0;n";for(var o=0;o';e+=""}return e+="",e+="
"},w.createImgTag=function(r,t){r=r||2,t="undefined"==typeof t?4*r:t;var e=w.getModuleCount()*r+2*t,n=t,o=e-t;return g(e,e,function(t,e){if(t>=n&&o>t&&e>=n&&o>e){var i=Math.floor((t-n)/r),a=Math.floor((e-n)/r);return w.isDark(a,i)?0:1}return 1})},w};t.stringToBytes=function(r){for(var t=new Array,e=0;ei)t.push(i);else{var a=e[r.charAt(o)];"number"==typeof a?(255&a)==a?t.push(a):(t.push(a>>>8),t.push(255&a)):t.push(n)}}return t}};var e={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8},n={L:1,M:0,Q:3,H:2},o={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7},i=function(){var t=[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],n=1335,i=7973,u=21522,f={},c=function(r){for(var t=0;0!=r;)t+=1,r>>>=1;return t};return f.getBCHTypeInfo=function(r){for(var t=r<<10;c(t)-c(n)>=0;)t^=n<=0;)t^=i<n;n+=1)e=e.multiply(r([1,a.gexp(n)],0));return e},f.getLengthInBits=function(r,t){if(t>=1&&10>t)switch(r){case e.MODE_NUMBER:return 10;case e.MODE_ALPHA_NUM:return 9;case e.MODE_8BIT_BYTE:return 8;case e.MODE_KANJI:return 8;default:throw new Error("mode:"+r)}else if(27>t)switch(r){case e.MODE_NUMBER:return 12;case e.MODE_ALPHA_NUM:return 11;case e.MODE_8BIT_BYTE:return 16;case e.MODE_KANJI:return 10;default:throw new Error("mode:"+r)}else{if(!(41>t))throw new Error("type:"+t);switch(r){case e.MODE_NUMBER:return 14;case e.MODE_ALPHA_NUM:return 13;case e.MODE_8BIT_BYTE:return 16;case e.MODE_KANJI:return 12;default:throw new Error("mode:"+r)}}},f.getLostPoint=function(r){for(var t=r.getModuleCount(),e=0,n=0;t>n;n+=1)for(var o=0;t>o;o+=1){for(var i=0,a=r.isDark(n,o),u=-1;1>=u;u+=1)if(!(0>n+u||n+u>=t))for(var f=-1;1>=f;f+=1)0>o+f||o+f>=t||(0!=u||0!=f)&&a==r.isDark(n+u,o+f)&&(i+=1);i>5&&(e+=3+i-5)}for(var n=0;t-1>n;n+=1)for(var o=0;t-1>o;o+=1){var c=0;r.isDark(n,o)&&(c+=1),r.isDark(n+1,o)&&(c+=1),r.isDark(n,o+1)&&(c+=1),r.isDark(n+1,o+1)&&(c+=1),(0==c||4==c)&&(e+=3)}for(var n=0;t>n;n+=1)for(var o=0;t-6>o;o+=1)r.isDark(n,o)&&!r.isDark(n,o+1)&&r.isDark(n,o+2)&&r.isDark(n,o+3)&&r.isDark(n,o+4)&&!r.isDark(n,o+5)&&r.isDark(n,o+6)&&(e+=40);for(var o=0;t>o;o+=1)for(var n=0;t-6>n;n+=1)r.isDark(n,o)&&!r.isDark(n+1,o)&&r.isDark(n+2,o)&&r.isDark(n+3,o)&&r.isDark(n+4,o)&&!r.isDark(n+5,o)&&r.isDark(n+6,o)&&(e+=40);for(var s=0,o=0;t>o;o+=1)for(var n=0;t>n;n+=1)r.isDark(n,o)&&(s+=1);var l=Math.abs(100*s/t/t-50)/5;return e+=10*l},f}(),a=function(){for(var r=new Array(256),t=new Array(256),e=0;8>e;e+=1)r[e]=1<e;e+=1)r[e]=r[e-4]^r[e-5]^r[e-6]^r[e-8];for(var e=0;255>e;e+=1)t[r[e]]=e;var n={};return n.glog=function(r){if(1>r)throw new Error("glog("+r+")");return t[r]},n.gexp=function(t){for(;0>t;)t+=255;for(;t>=256;)t-=255;return r[t]},n}(),u=function(){var r=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12,7,37,13],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]],t=function(r,t){var e={};return e.totalCount=r,e.dataCount=t,e},e={},o=function(t,e){switch(e){case n.L:return r[4*(t-1)+0];case n.M:return r[4*(t-1)+1];case n.Q:return r[4*(t-1)+2];case n.H:return r[4*(t-1)+3];default:return}};return e.getRSBlocks=function(r,e){var n=o(r,e);if("undefined"==typeof n)throw new Error("bad rs block @ typeNumber:"+r+"/errorCorrectLevel:"+e);for(var i=n.length/3,a=new Array,u=0;i>u;u+=1)for(var f=n[3*u+0],c=n[3*u+1],s=n[3*u+2],l=0;f>l;l+=1)a.push(t(c,s));return a},e}(),f=function(){var r=new Array,t=0,e={};return e.getBuffer=function(){return r},e.getAt=function(t){var e=Math.floor(t/8);return 1==(r[e]>>>7-t%8&1)},e.put=function(r,t){for(var n=0;t>n;n+=1)e.putBit(1==(r>>>t-n-1&1))},e.getLengthInBits=function(){return t},e.putBit=function(e){var n=Math.floor(t/8);r.length<=n&&r.push(0),e&&(r[n]|=128>>>t%8),t+=1},e},c=function(r){var n=e.MODE_8BIT_BYTE,o=t.stringToBytes(r),i={};return i.getMode=function(){return n},i.getLength=function(r){return o.length},i.write=function(r){for(var t=0;t>>8)},t.writeBytes=function(r,e,n){e=e||0,n=n||r.length;for(var o=0;n>o;o+=1)t.writeByte(r[o+e])},t.writeString=function(r){for(var e=0;e0&&(t+=","),t+=r[e];return t+="]"},t},l=function(){var r=0,t=0,e=0,n="",o={},i=function(r){n+=String.fromCharCode(a(63&r))},a=function(r){if(0>r);else{if(26>r)return 65+r;if(52>r)return 97+(r-26);if(62>r)return 48+(r-52);if(62==r)return 43;if(63==r)return 47}throw new Error("n:"+r)};return o.writeByte=function(n){for(r=r<<8|255&n,t+=8,e+=1;t>=6;)i(r>>>t-6),t-=6},o.flush=function(){if(t>0&&(i(r<<6-t),r=0,t=0),e%3!=0)for(var o=3-e%3,a=0;o>a;a+=1)n+="="},o.toString=function(){return n},o},h=function(r){var t=r,e=0,n=0,o=0,i={};i.read=function(){for(;8>o;){if(e>=t.length){if(0==o)return-1;throw new Error("unexpected end of file./"+o)}var r=t.charAt(e);if(e+=1,"="==r)return o=0,-1;r.match(/^\s$/)||(n=n<<6|a(r.charCodeAt(0)),o+=6)}var i=n>>>o-8&255;return o-=8,i};var a=function(r){if(r>=65&&90>=r)return r-65;if(r>=97&&122>=r)return r-97+26;if(r>=48&&57>=r)return r-48+52;if(43==r)return 62;if(47==r)return 63;throw new Error("c:"+r)};return i},d=function(r,t){var e=r,n=t,o=new Array(r*t),i={};i.setPixel=function(r,t,n){o[t*e+r]=n},i.write=function(r){r.writeString("GIF87a"),r.writeShort(e),r.writeShort(n),r.writeByte(128),r.writeByte(0),r.writeByte(0),r.writeByte(0),r.writeByte(0),r.writeByte(0),r.writeByte(255),r.writeByte(255),r.writeByte(255),r.writeString(","),r.writeShort(0),r.writeShort(0),r.writeShort(e),r.writeShort(n),r.writeByte(0);var t=2,o=u(t);r.writeByte(t);for(var i=0;o.length-i>255;)r.writeByte(255),r.writeBytes(o,i,255),i+=255;r.writeByte(o.length-i),r.writeBytes(o,i,o.length-i),r.writeByte(0),r.writeString(";")};var a=function(r){var t=r,e=0,n=0,o={};return o.write=function(r,o){if(r>>>o!=0)throw new Error("length over");for(;e+o>=8;)t.writeByte(255&(r<>>=8-e,n=0,e=0;n|=r<0&&t.writeByte(n)},o},u=function(r){for(var t=1<u;u+=1)i.add(String.fromCharCode(u));i.add(String.fromCharCode(t)),i.add(String.fromCharCode(e));var c=s(),l=a(c);l.write(t,n);var h=0,d=String.fromCharCode(o[h]);for(h+=1;hi;i+=1)for(var a=0;r>a;a+=1)o.setPixel(a,i,e(a,i));var u=s();o.write(u);for(var f=l(),c=u.toByteArray(),h=0;h"};return t}();return function(r){"function"==typeof define&&define.amd?define([],r):"object"==typeof exports&&(module.exports=r())}(function(){return r}),!function(r){r.stringToBytes=function(r){function t(r){for(var t=[],e=0;en?t.push(n):2048>n?t.push(192|n>>6,128|63&n):55296>n||n>=57344?t.push(224|n>>12,128|n>>6&63,128|63&n):(e++,n=65536+((1023&n)<<10|1023&r.charCodeAt(e)),t.push(240|n>>18,128|n>>12&63,128|n>>6&63,128|63&n))}return t}return t(r)}}(r),r}()),function(r){r.fn.share=function(t){function e(t,e){var n=o(e);"prepend"==e.mode?n.reverse():n,n.length&&r.each(n,function(n,o){var a=i(o,e),u=e.initialized?t.find(".icon-"+o):r('');return!u.length||(u.prop("aria-label","分享到 "+h[o]),u.prop("href",a),"wechat"===o?u.prop("tabindex",-1):u.prop("target","_blank"),void(e.initialized||("prepend"==e.mode?t.prepend(u):t.append(u))))})}function n(r,t){var e=r.find("a.icon-wechat");e.length&&(e.append(''+t.wechatQrcodeTitle+'
'+t.wechatQrcodeHelper+"
"),e.find(".qrcode").qrcode({render:"image",size:t.wechatQrcodeSize,text:t.url}),e.offset().top<100&&e.find(".wechat-qrcode").addClass("bottom"))}function o(t){0===t.mobileSites.length&&t.sites.length&&(t.mobileSites=t.sites);var e=(u()?t.mobileSites:t.sites.length?t.sites:[]).slice(0),n=t.disabled;return"string"==typeof e&&(e=e.split(/\s*,\s*/)),"string"==typeof n&&(n=n.split(/\s*,\s*/)),a()&&n.push("wechat"),n.length&&r.each(n,function(t,n){var o=r.inArray(n,e);o!==-1&&e.splice(o,1)}),e}function i(r,t){var e=l[r];t.summary=t.description;for(var n in t)if(t.hasOwnProperty(n)){var o=r+n.replace(/^[a-z]/,function(r){return r.toUpperCase()}),i=encodeURIComponent(void 0===t[o]?t[n]:t[o]);e=e.replace(new RegExp("{{"+n.toUpperCase()+"}}","g"),i)}return e}function a(){return/MicroMessenger/i.test(navigator.userAgent)}function u(){return r(window).width()<=768}var f=r(document.head),c={url:location.href,site_url:location.origin,source:f.find("[name=site], [name=Site]").attr("content")||document.title,title:f.find("[name=title], [name=Title]").attr("content")||document.title,description:f.find("[name=description], [name=Description]").attr("content")||"",image:r("img:first").prop("src")||"",imageSelector:void 0,weiboKey:"",wechatQrcodeTitle:"微信扫一扫:分享",wechatQrcodeHelper:"微信里点“发现”,扫一下
二维码便可将本文分享至朋友圈。
",wechatQrcodeSize:100,mobileSites:[],sites:["weibo","qq","wechat","tencent","douban","qzone","linkedin","diandian","facebook","twitter","google"],disabled:[],initialized:!1},s=r.extend({},c,t),l={qzone:"http://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?url={{URL}}&title={{TITLE}}&desc={{DESCRIPTION}}&summary={{SUMMARY}}&site={{SOURCE}}",qq:"http://connect.qq.com/widget/shareqq/index.html?url={{URL}}&title={{TITLE}}&source={{SOURCE}}&desc={{DESCRIPTION}}&pics={{IMAGE}}",tencent:"http://share.v.t.qq.com/index.php?c=share&a=index&title={{TITLE}}&url={{URL}}&pic={{IMAGE}}",weibo:"http://service.weibo.com/share/share.php?url={{URL}}&title={{TITLE}}&pic={{IMAGE}}&appkey={{WEIBOKEY}}",wechat:"javascript:;",douban:"http://shuo.douban.com/!service/share?href={{URL}}&name={{TITLE}}&text={{DESCRIPTION}}&image={{IMAGE}}&starid=0&aid=0&style=11",diandian:"http://www.diandian.com/share?lo={{URL}}&ti={{TITLE}}&type=link",linkedin:"http://www.linkedin.com/shareArticle?mini=true&ro=true&title={{TITLE}}&url={{URL}}&summary={{SUMMARY}}&source={{SOURCE}}&armin=armin",facebook:"https://www.facebook.com/sharer/sharer.php?u={{URL}}&title={{TITLE}}&description={{DESCRIPTION}}&caption={{SUBHEAD}}&link={{URL}}&picture={{IMAGE}}",twitter:"https://twitter.com/intent/tweet?text={{TITLE}}&url={{URL}}&via={{SITE_URL}}",google:"https://plus.google.com/share?url={{URL}}"},h={qzone:"QQ空间",qq:"QQ",tencent:"腾讯微博",weibo:"微博",wechat:"微信",douban:"豆瓣",diandian:"点点",linkedin:"LinkedIn",facebook:"Facebook",twitter:"Twitter",google:"Google"};this.each(function(){if(r(this).data("initialized"))return!0;var t=r.extend({},s,r(this).data());t.imageSelector&&(t.image=r(t.imageSelector).map(function(){return r(this).prop("src")}).get().join("||"));var o=r(this).addClass("share-component social-share");e(o,t),n(o,t),r(this).data("initialized",!0)})},r(function(){r(".share-component,.social-share").share()})}(jQuery);
--------------------------------------------------------------------------------
/tag.hbs:
--------------------------------------------------------------------------------
1 | {{!< default}}
2 |
3 |
4 | {{#foreach posts}}
5 |
6 |
9 |
14 |
15 | {{excerpt}}
16 |
17 |
阅读全文
18 |
19 | {{/foreach}}
20 |
21 | {{ pagination }}
22 |
23 | {{ side }}
24 |
--------------------------------------------------------------------------------