├── .gitignore
├── beaudar.json
├── utterances.json
├── scripts
└── tags
│ ├── time.js
│ └── keywords.js
├── source
├── css
│ ├── _readmore.styl
│ ├── _fonts.styl
│ ├── _syntax.styl
│ ├── _settings.styl
│ ├── _style-guide.styl
│ ├── _sidebar.styl
│ ├── _header.styl
│ ├── _common.styl
│ ├── vue-pdf.css
│ ├── page.styl
│ └── style.min.css
└── js
│ ├── css.escape.js
│ ├── smooth-scroll.min.js
│ └── common.js
├── package.json
├── .github
├── workflows
│ ├── npm-publish.yml
│ └── auto-close-issues.yml
└── ISSUE_TEMPLATE
│ ├── other-issue.md
│ ├── feature-request.md
│ ├── question-report.md
│ └── bug-report.md
├── _config.yml
├── LICENSE
├── layout
├── page.ejs
└── layout.ejs
└── README.md
/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | node_modules
3 | db.json
4 | .deploy_git
5 | public
6 |
--------------------------------------------------------------------------------
/beaudar.json:
--------------------------------------------------------------------------------
1 | {
2 | "origins": [
3 | "https://resume.js.org",
4 | "https://xaoxuu.com"
5 | ]
6 | }
7 |
--------------------------------------------------------------------------------
/utterances.json:
--------------------------------------------------------------------------------
1 | {
2 | "origins": [
3 | "https://resume.js.org",
4 | "https://xaoxuu.com"
5 | ]
6 | }
7 |
--------------------------------------------------------------------------------
/scripts/tags/time.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | hexo.extend.tag.register('time', function(args) {
4 | args = args.join(' ');
5 | let ret = '';
6 | ret += '
'
7 | ret += '' + args + '';
8 | ret += '
'
9 | return ret;
10 | });
11 |
--------------------------------------------------------------------------------
/scripts/tags/keywords.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | hexo.extend.tag.register('keywords', function(args) {
4 | args = args.join(' ').split(', ');
5 | let ret = '';
6 | args.forEach((item, i) => {
7 | ret += '' + item + '';
8 | });
9 | return ret;
10 | });
11 |
--------------------------------------------------------------------------------
/source/css/_readmore.styl:
--------------------------------------------------------------------------------
1 | .readmore
2 | background-color color_for_bg($color_ax_blue)
3 | padding 1em
4 | border-radius 2px
5 | color $color_ax_blue
6 | position relative
7 | a
8 | margin 0 4px
9 | width 100%
10 | color $color_ax_blue !important
11 | position relative
12 | &:first-child
13 | margin-left: 0
14 | hoverable_text()
15 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "hexo-theme-resume",
3 | "version": "2.0.0",
4 | "description": "Minimalist resume theme for Hexo.",
5 | "main": "package.json",
6 | "scripts": {
7 | "test": "echo test"
8 | },
9 | "repository": {
10 | "type": "git",
11 | "url": "git+https://github.com/xaoxuu/hexo-theme-resume.git"
12 | },
13 | "keywords": [
14 | "hexo",
15 | "theme",
16 | "resume"
17 | ],
18 | "author": "xaoxuu (https://github.com/xaoxuu/)",
19 | "license": "MIT",
20 | "bugs": {
21 | "url": "https://github.com/xaoxuu/hexo-theme-resume/issues"
22 | },
23 | "homepage": "https://resume.js.org",
24 | "devDependencies": {
25 | "hexo": "5.2.0"
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/.github/workflows/npm-publish.yml:
--------------------------------------------------------------------------------
1 | name: npm-publish
2 | on:
3 | push:
4 | branches:
5 | - master
6 | jobs:
7 | npm-publish:
8 | name: npm-publish
9 | runs-on: ubuntu-latest
10 | steps:
11 | - name: Checkout repository
12 | uses: actions/checkout@master
13 | - name: Set up Node.js
14 | uses: actions/setup-node@master
15 | with:
16 | node-version: 10.0.0
17 | - name: Publish
18 | uses: MHuiG/npm-publish-action@master
19 | with:
20 | tag_name: "%s"
21 | tag_message: "%s"
22 | commit_pattern: "^release\\:\ (.*)"
23 | env:
24 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
25 | NPM_AUTH_TOKEN: ${{ secrets.npm_token }}
26 |
--------------------------------------------------------------------------------
/.github/workflows/auto-close-issues.yml:
--------------------------------------------------------------------------------
1 | name: auto close issues
2 |
3 | on:
4 | issues:
5 | types: [opened, edited]
6 |
7 | jobs:
8 | auto_close_issues:
9 | runs-on: ubuntu-latest
10 | steps:
11 | - name: Checkout
12 | uses: actions/checkout@v1
13 | - name: Automatically close issues that don't follow the issue template
14 | uses: lucasbento/auto-close-issues@v1.0.2
15 | with:
16 | github-token: ${{ secrets.GITHUB_TOKEN }}
17 | issue-close-message: "@${issue.user.login}: hello! :wave:\n\nThis issue is being automatically closed because it does not follow the issue template." # optional property
18 | closed-issues-label: "🙁 Not following issue template"
19 |
--------------------------------------------------------------------------------
/source/css/_fonts.styl:
--------------------------------------------------------------------------------
1 | // @font-face
2 | // font-family: "Source Sans Pro"
3 | // src: local("Source Sans Pro"), url(https://cdn.jsdelivr.net/gh/xaoxuu/cdn-fonts/SourceSansPro/SourceSansPro-Regular.ttf)
4 | //
5 | // @font-face
6 | // font-family: "Source Sans Pro"
7 | // src: local("Source Sans Pro Light"), url(https://cdn.jsdelivr.net/gh/xaoxuu/cdn-fonts/SourceSansPro/SourceSansPro-Light.ttf)
8 | // font-weight: 300
9 | //
10 | // @font-face
11 | // font-family: "Source Sans Pro"
12 | // src: local("Source Sans Pro Semibold"), url(https://cdn.jsdelivr.net/gh/xaoxuu/cdn-fonts/SourceSansPro/SourceSansPro-Semibold.ttf)
13 | // font-weight: 600
14 |
15 | @font-face
16 | font-family: "Courier"
17 | src: url(https://cdn.jsdelivr.net/gh/xaoxuu/cdn-fonts/Courier/Courier.dfont)
18 | font-weight: 300
19 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/other-issue.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Other Issue
3 | about: Others
4 | title: ''
5 | labels: 'new'
6 | assignees: ''
7 |
8 | ---
9 |
10 | If you delete this template, we may close your issue without conducting an investigation.
11 | 如果您删除此模版,我们可能会在不进行调查的情况下关闭您的 Issue。
12 |
13 | Please check if your Issue fulfills the following requirements. This will guide you to resolve the issue quickly.
14 | 请务必确认您在提交此 Issue 前已经查看并完成了下列检查单中的所有事项。这会指导您快速地解决问题。
15 |
16 | ## Issue Checklist
17 |
18 |
19 | - [ ] I am using [the latest](https://github.com/xaoxuu/hexo-theme-resume/releases/latest) version of Resume.
20 | - [ ] I have reviewed [guidelines for resume](https://resume.js.org), which does not help me.
21 | - [ ] I have reviewed the latest Roadmap on GitHub and searched for current issues, which does not help me.
22 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/feature-request.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Feature Request
3 | about: Suggest an idea for this project
4 | title: ''
5 | labels: 'new,suggest'
6 | assignees: ''
7 |
8 | ---
9 |
10 | If you delete this template, we may close your issue without conducting an investigation.
11 | 如果您删除此模版,我们可能会在不进行调查的情况下关闭您的 Issue。
12 |
13 | Please check if your Issue fulfills the following requirements. This will guide you to resolve the issue quickly.
14 | 请务必确认您在提交此 Issue 前已经查看并完成了下列检查单中的所有事项。这会指导您快速地解决问题。
15 |
16 | ## Issue Checklist
17 |
18 |
19 | - [ ] I am using [the latest](https://github.com/xaoxuu/hexo-theme-resume/releases/latest) version of Resume.
20 | - [ ] I have reviewed [guidelines for resume](https://resume.js.org), which does not help me.
21 | - [ ] I have reviewed the latest Roadmap on GitHub and searched for current issues, which does not help me.
22 |
--------------------------------------------------------------------------------
/_config.yml:
--------------------------------------------------------------------------------
1 | cdn:
2 | # These base libraries cannot be deleted
3 | jquery: https://cdn.jsdelivr.net/npm/jquery@3.5/dist/jquery.min.js
4 | vue: https://cdn.jsdelivr.net/npm/vue@2.6/dist/vue.min.js
5 | # When these CDN resources are deleted, local resources are loaded.
6 | common: https://cdn.jsdelivr.net/gh/xaoxuu/hexo-theme-resume@1.0.0/source/js/common.js
7 | escape: https://cdn.jsdelivr.net/gh/xaoxuu/hexo-theme-resume@1.0.0/source/js/css.escape.js
8 | smooth_scroll: https://cdn.jsdelivr.net/gh/xaoxuu/hexo-theme-resume@1.0.0/source/js/smooth-scroll.min.js
9 | # css: https://cdn.jsdelivr.net/gh/xaoxuu/hexo-theme-resume@1.0.0/source/css/style.min.css
10 | # Optional plug-in: image zoom
11 | fancybox:
12 | css: https://cdn.jsdelivr.net/npm/@fancyapps/fancybox@3.5/dist/jquery.fancybox.min.css
13 | js: https://cdn.jsdelivr.net/gh/fancyapps/fancybox@3.5/dist/jquery.fancybox.min.js
14 |
15 | # robots meta tag
16 | robots: noindex,nofollow
17 |
18 | # the footer of your site
19 | copyright: '[Copyright © 2017-2020 XXX](/)'
20 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2019 Mr. X
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/source/css/_syntax.styl:
--------------------------------------------------------------------------------
1 | .gutter pre
2 | color: #0006
3 |
4 | pre
5 | color: #444
6 | .function .keyword,
7 | .constant
8 | color: #0092db
9 | .keyword,
10 | .attribute
11 | color: #e96900
12 | .number,
13 | .literal
14 | color: #AE81FF
15 | .tag,
16 | .tag .title,
17 | .change,
18 | .winutils,
19 | .flow,
20 | .lisp .title,
21 | .clojure .built_in,
22 | .nginx .title,
23 | .tex .special
24 | color: #2973b7
25 | .class .title
26 | color: $dark
27 | .symbol,
28 | .symbol .string,
29 | .value,
30 | .regexp
31 | color: $green
32 | .title
33 | color: #A6E22E
34 | .type
35 | color: #2395F3
36 | .tag .value,
37 | .string,
38 | .subst,
39 | .haskell .type,
40 | .preprocessor,
41 | .ruby .class .parent,
42 | .built_in,
43 | .sql .aggregate,
44 | .django .template_tag,
45 | .django .variable,
46 | .smalltalk .class,
47 | .javadoc,
48 | .django .filter .argument,
49 | .smalltalk .localvars,
50 | .smalltalk .array,
51 | .attr_selector,
52 | .pseudo,
53 | .addition,
54 | .stream,
55 | .envvar,
56 | .apache .tag,
57 | .apache .cbracket,
58 | .tex .command,
59 | .prompt
60 | color: $green
61 | .comment,
62 | .java .annotation,
63 | .python .decorator,
64 | .template_comment,
65 | .pi,
66 | .doctype,
67 | .deletion,
68 | .shebang,
69 | .apache .sqbracket,
70 | .tex .formula
71 | color: #888
72 | .coffeescript .javascript,
73 | .javascript .xml,
74 | .tex .formula,
75 | .xml .javascript,
76 | .xml .vbscript,
77 | .xml .css,
78 | .xml .cdata
79 | opacity: 0.5
80 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/question-report.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Question Report
3 | about: I have a question for Resume (e.g. Customize)
4 | title: ''
5 | labels: 'new,question'
6 | assignees: ''
7 |
8 | ---
9 |
10 | If you delete this template, we may close your issue without conducting an investigation.
11 | 如果您删除此模版,我们可能会在不进行调查的情况下关闭您的 Issue。
12 |
13 | Please check if your Issue fulfills the following requirements. This will guide you to resolve the issue quickly.
14 | 请务必确认您在提交此 Issue 前已经查看并完成了下列检查单中的所有事项。这会指导您快速地解决问题。
15 |
16 | ## Issue Checklist
17 |
18 |
19 | - [ ] I am using [the latest](https://github.com/xaoxuu/hexo-theme-resume/releases/latest) version of Resume.
20 | - [ ] I have reviewed [guidelines for resume](https://resume.js.org), which does not help me.
21 | - [ ] I have reviewed the latest Roadmap on GitHub and searched for current issues, which does not help me.
22 |
23 | ***
24 |
25 | ## Describe your question
26 |
27 |
28 |
29 | ## Environment Information
30 |
31 | ### Node.js and NPM Information
32 |
33 | ```
34 |
35 | ```
36 |
37 | ### Package dependencies Information
38 |
39 | ```
40 |
41 | ```
42 |
43 | ### Hexo Configuration
44 |
45 | ```yml
46 |
47 | ```
48 |
49 | ### Resume Configuration
50 |
51 | ```yml
52 |
53 | ```
54 |
55 | ## Other Information
56 |
--------------------------------------------------------------------------------
/layout/page.ejs:
--------------------------------------------------------------------------------
1 |
32 |
33 |
55 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/bug-report.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Bug Report
3 | about: Something isn't working as expected
4 | title: ''
5 | labels: 'new,question'
6 | assignees: ''
7 |
8 | ---
9 |
10 | If you delete this template, we may close your issue without conducting an investigation.
11 | 如果您删除此模版,我们可能会在不进行调查的情况下关闭您的 Issue。
12 |
13 | Please check if your Issue fulfills the following requirements. This will guide you to resolve the issue quickly.
14 | 请务必确认您在提交此 Issue 前已经查看并完成了下列检查单中的所有事项。这会指导您快速地解决问题。
15 |
16 | ## Issue Checklist
17 |
18 |
19 | - [ ] I am using [the latest](https://github.com/xaoxuu/hexo-theme-resume/releases/latest) version of Resume.
20 | - [ ] I have reviewed [guidelines for resume](https://resume.js.org), which does not help me.
21 | - [ ] I have reviewed the latest Roadmap on GitHub and searched for current issues, which does not help me.
22 |
23 | ***
24 |
25 | ## Expected behavior
26 |
27 |
28 | ## Actual behavior
29 |
30 |
31 | - Links to demo site with this issue: N/A
32 | - Links to repository or source code of the blog: N/A
33 |
34 |
35 | ## Steps to reproduce the behavior
36 | 1. N/A
37 | 2. N/A
38 | 3. N/A
39 |
40 |
41 | ## Environment Information
42 |
43 | ### Node.js and NPM Information
44 |
45 | ```
46 |
47 | ```
48 |
49 | ### Package dependencies Information
50 |
51 | ```
52 |
53 | ```
54 |
55 | ### Hexo Configuration
56 |
57 | ```yml
58 |
59 | ```
60 |
61 | ### Resume Configuration
62 |
63 | ```yml
64 |
65 | ```
66 |
67 | ## Other Information
68 |
--------------------------------------------------------------------------------
/source/css/_settings.styl:
--------------------------------------------------------------------------------
1 | // font faces
2 | $body-font = Courier, Menlo, Monaco, "Helvetica Neue", Arial, sans-serif
3 | $logo-font = Courier, Menlo, Monaco, "Helvetica Neue", Arial, sans-serif, cursive
4 | $code-font = Menlo, Monaco, courier, monospace, Arial, sans-serif
5 |
6 | // font sizes
7 | $body-font-size = 15px
8 | $code-font-size = 0.8em
9 |
10 | // colors
11 | $dark = #2c3e50
12 | $medium = #22313f
13 | $light = #7f8c8d
14 | $green = #42b983
15 | $color_mac_maximize = #3DC550
16 | $color_mac_minimize = #FFBD2B
17 | $color_mac_close = #FE5F58
18 | $color_mac_finder = #1BB9FA
19 |
20 | $border = #dddddd
21 | $codebg = color_for_bg(#52A1F8)
22 | $gridbg = #f8f8f8
23 | $red = #ff6666
24 | $info = #1C90F3
25 |
26 | $color_ax_light_pink = #E7BED0
27 | $color_ax_light_red = #FF8485
28 | $color_ax_red = #F24E32
29 | $color_ax_blue = #52A1F8
30 |
31 | $color_success = #28C940
32 | $color_warning = #FFBD2D
33 | $color_error = #FF6058
34 |
35 | $color_theme = #2196f3
36 | $color_link = $color_theme
37 | $color_link_highlight = #ff5722
38 |
39 | $gap = 16px
40 | $radius = 4px
41 | $content-padding-top = 10px
42 | $mobile-content-padding-top = 30px
43 | $nav-height = 54px
44 |
45 | // header settings
46 | $header-inner-height = 40px
47 | $heading-padding-vertical = 10px
48 | $header-height = $header-inner-height + $heading-padding-vertical * 2
49 | $mobile-header-height = 40px
50 | // prevent headers from being covered by the top nav upon navigation
51 | $heading-link-padding-top = $content-padding-top
52 | $mobile-heading-link-padding-top = $mobile-header-height + $mobile-content-padding-top
53 | $h2-margin-top = 3.5em
54 | $h3-margin-top = 3rem
55 | $h4-margin-top = 2rem
56 |
57 | $box-shadow-nav = 0 1px 1px rgba(0,0,0,.12), 0 2px 2px rgba(0,0,0,.08)
58 | $box-shadow-nav-mobile = 0 1px 2px rgba(0,0,0,.12)
59 | $box-shadow-float = 0 4px 8px rgba(0,0,0,0.12), 0 8px 16px rgba(0,0,0,0.12), 0 16px 32px rgba(0,0,0,0.12)
60 | $box-shadow-down = 0 2px 4px rgba(0,0,0,0.1)
61 |
62 | transition_all(time = 0.28s)
63 | $a = time
64 | transition: all $a ease
65 | -moz-transition: all $a ease
66 | -webkit-transition: all $a ease
67 | -o-transition: all $a ease
68 |
69 | card()
70 | transition_all()
71 | &:hover
72 | box-shadow: 0 0 4px rgba(0,0,0,.1), 0 0 8px rgba(0,0,0,.08)
73 |
74 | hoverable_text()
75 | transition_all(0.2s)
76 | &:hover
77 | color: $color_link_highlight !important
78 |
79 | color_for_bg(color = #ccc)
80 | $a = color
81 | return lighten(desaturate($a, 10%), 88%)
82 |
--------------------------------------------------------------------------------
/source/css/_style-guide.styl:
--------------------------------------------------------------------------------
1 | $style-guide-bg = alpha(desaturate(#888, 50%), 8%)
2 | $style-guide-text = darken(desaturate(#888, 80%), 20%)
3 | $style-guide-bad-bg = alpha(desaturate($color_mac_close, 50%), 8%)
4 | $style-guide-bad-text = darken(desaturate($color_mac_close, 80%), 20%)
5 | $style-guide-good-bg = alpha(desaturate($color_mac_maximize, 50%), 8%)
6 | $style-guide-good-text = darken(desaturate($color_mac_maximize, 80%), 20%)
7 |
8 | $style-guide-priority-a-bg = $style-guide-bad-text
9 | $style-guide-priority-a-color = white
10 | $style-guide-priority-b-bg = $style-guide-bad-text
11 | $style-guide-priority-b-color = white
12 | $style-guide-priority-c-bg = steelblue
13 | $style-guide-priority-c-color = white
14 | $style-guide-priority-d-bg = $style-guide-bad-text
15 | $style-guide-priority-d-color = white
16 |
17 | .content
18 | details
19 | h2
20 | text-align: center
21 | margin-top: 0
22 | .style-example, details, .style-enforcement
23 | border-radius $radius
24 | margin: 1.6em 0
25 | padding: 1.6em
26 | h4
27 | margin-top: 0
28 | figure, p
29 | &:last-child
30 | margin-bottom: 0
31 | padding-bottom: 0
32 | .style-example
33 | h3
34 | margin-top: 2em
35 | &.example
36 | background: $style-guide-bg
37 | h4
38 | color: $style-guide-text
39 | &.example-bad
40 | background: $style-guide-bad-bg
41 | h4
42 | color: $style-guide-bad-text
43 | &.example-good
44 | background: $style-guide-good-bg
45 | h4
46 | color: $style-guide-good-text
47 | details, .style-enforcement
48 | background-color: $style-guide-bg
49 | details
50 | display: block // Add the correct display in IE and Edge.
51 | position: relative
52 | &:not([open]) summary
53 | &::after
54 | content: "..."
55 | &:hover
56 | background: rgba(255, 255, 255, .3)
57 | summary
58 | cursor: pointer
59 | padding: 1.6em
60 | margin: -1.6em
61 | outline: none
62 | > h4
63 | display: inline-block
64 | margin: 0
65 | .style-enforcement
66 | table
67 | width: 100%
68 | background-color: $codebg
69 | border-radius: $radius
70 | th, td
71 | padding: .4em
72 | text-align: center
73 | th
74 | padding-bottom: .2em
75 | td
76 | padding-top: .2em
77 | .style-rule-tag
78 | background-color: $codebg
79 | border-radius: $radius
80 | font-size: .9em
81 | color: $style-guide-good-text
82 | font-weight: 600
83 | text-transform: uppercase
84 | padding: .1em .4em
85 | a > .style-rule-tag
86 | color: $color_theme
87 | sup
88 | text-transform: uppercase
89 | font-size: .7em
90 | margin-left: 1em
91 | pointer-events: all
92 | position: absolute
93 | [data-p="a"]
94 | color: #6b2a2a
95 | [data-p="b"]
96 | color: #8c480a
97 | [data-p="c"]
98 | color: #2b5a99
99 | [data-p="d"]
100 | content: #3f536d
101 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Resume Theme for hexo
2 |
3 | - Live Demo & Documents: https://resume.js.org or https://resume-docs.vercel.app
4 | - Source Codes: https://github.com/xaoxuu/hexo-theme-resume/
5 |
6 | ## Get started
7 |
8 | Since this theme is quite different from the normal Hexo theme, it is recommended to download the source code of this site directly and rewrite it with reference to the source code.
9 |
10 | -Source code of this site: https://github.com/xaoxuu/resume-docs
11 | -Theme source code: https://github.com/xaoxuu/hexo-theme-resume
12 |
13 | You can also create a brand new blog and install it via the `npm` command:
14 |
15 | ```bash
16 | npm i hexo-theme-resume
17 | ```
18 |
19 | Then delete the redundant dependency packages (important), open `package.json`, copy and replace all with the following:
20 |
21 | ```json
22 | {
23 | "name": "hexo-site",
24 | "private": true,
25 | "hexo": {
26 | "version": "5.2.0"
27 | },
28 | "scripts": {
29 | "start": "hexo server",
30 | "build": "node pre-deploy.js && hexo clean && hexo generate",
31 | "deploy": "npm run build && hexo deploy"
32 | },
33 | "engines": {
34 | "node": ">=8.9.0"
35 | },
36 | "dependencies": {
37 | "hexo": "^5.2.0",
38 | "hexo-autonofollow": "^1.0.1",
39 | "hexo-deployer-git": "^2.1.0",
40 | "hexo-neat": "^1.0.9",
41 | "hexo-renderer-ejs": "^1.0.0",
42 | "hexo-renderer-marked": "^3.2.0",
43 | "hexo-renderer-stylus": "^2.0.1",
44 | "hexo-server": "^1.0.0"
45 | }
46 | }
47 | ```
48 |
49 | Then enter `npm i` to install dependent packages.
50 |
51 | # Hexo简历主题
52 |
53 | - Demo及文档: https://resume.js.org/zh-cn/ or https://resume-docs.vercel.app/zh-cn/
54 | - 主题源码: https://github.com/xaoxuu/hexo-theme-resume/
55 |
56 |
57 | > 附:一个适合简历的Typora主题:[vue-pdf](https://cdn.jsdelivr.net/gh/xaoxuu/hexo-theme-resume/source/css/vue-pdf.css)
58 |
59 |
60 | ## 开始使用
61 |
62 | 由于本主题与普通 Hexo 主题有较大区别,建议请直接下载本站的源码,参考源码进行改写。
63 |
64 | - 本站源码:https://github.com/xaoxuu/resume-docs
65 | - 主题源码:https://github.com/xaoxuu/hexo-theme-resume
66 |
67 | 也可以创建全新的博客,通过 `npm` 命令安装:
68 |
69 | ```bash
70 | npm i hexo-theme-resume
71 | ```
72 |
73 | 然后删除多余的依赖包(重要),打开 `package.json` 复制并全部替换为以下内容:
74 |
75 | ```json
76 | {
77 | "name": "hexo-site",
78 | "private": true,
79 | "hexo": {
80 | "version": "5.2.0"
81 | },
82 | "scripts": {
83 | "start": "hexo server",
84 | "build": "node pre-deploy.js && hexo clean && hexo generate",
85 | "deploy": "npm run build && hexo deploy"
86 | },
87 | "engines": {
88 | "node": ">=8.9.0"
89 | },
90 | "dependencies": {
91 | "hexo": "^5.2.0",
92 | "hexo-autonofollow": "^1.0.1",
93 | "hexo-deployer-git": "^2.1.0",
94 | "hexo-neat": "^1.0.9",
95 | "hexo-renderer-ejs": "^1.0.0",
96 | "hexo-renderer-marked": "^3.2.0",
97 | "hexo-renderer-stylus": "^2.0.1",
98 | "hexo-server": "^1.0.0"
99 | }
100 | }
101 | ```
102 |
103 | 然后输入 `npm i` 安装依赖包。
104 |
--------------------------------------------------------------------------------
/source/js/css.escape.js:
--------------------------------------------------------------------------------
1 | /*! https://mths.be/cssescape v1.5.1 by @mathias | MIT license */
2 | ;(function(root, factory) {
3 | // https://github.com/umdjs/umd/blob/master/returnExports.js
4 | if (typeof exports == 'object') {
5 | // For Node.js.
6 | module.exports = factory(root);
7 | } else if (typeof define == 'function' && define.amd) {
8 | // For AMD. Register as an anonymous module.
9 | define([], factory.bind(root, root));
10 | } else {
11 | // For browser globals (not exposing the function separately).
12 | factory(root);
13 | }
14 | }(typeof global != 'undefined' ? global : this, function(root) {
15 |
16 | if (root.CSS && root.CSS.escape) {
17 | return root.CSS.escape;
18 | }
19 |
20 | // https://drafts.csswg.org/cssom/#serialize-an-identifier
21 | var cssEscape = function(value) {
22 | if (arguments.length == 0) {
23 | throw new TypeError('`CSS.escape` requires an argument.');
24 | }
25 | var string = String(value);
26 | var length = string.length;
27 | var index = -1;
28 | var codeUnit;
29 | var result = '';
30 | var firstCodeUnit = string.charCodeAt(0);
31 | while (++index < length) {
32 | codeUnit = string.charCodeAt(index);
33 | // Note: there’s no need to special-case astral symbols, surrogate
34 | // pairs, or lone surrogates.
35 |
36 | // If the character is NULL (U+0000), then the REPLACEMENT CHARACTER
37 | // (U+FFFD).
38 | if (codeUnit == 0x0000) {
39 | result += '\uFFFD';
40 | continue;
41 | }
42 |
43 | if (
44 | // If the character is in the range [\1-\1F] (U+0001 to U+001F) or is
45 | // U+007F, […]
46 | (codeUnit >= 0x0001 && codeUnit <= 0x001F) || codeUnit == 0x007F ||
47 | // If the character is the first character and is in the range [0-9]
48 | // (U+0030 to U+0039), […]
49 | (index == 0 && codeUnit >= 0x0030 && codeUnit <= 0x0039) ||
50 | // If the character is the second character and is in the range [0-9]
51 | // (U+0030 to U+0039) and the first character is a `-` (U+002D), […]
52 | (
53 | index == 1 &&
54 | codeUnit >= 0x0030 && codeUnit <= 0x0039 &&
55 | firstCodeUnit == 0x002D
56 | )
57 | ) {
58 | // https://drafts.csswg.org/cssom/#escape-a-character-as-code-point
59 | result += '\\' + codeUnit.toString(16) + ' ';
60 | continue;
61 | }
62 |
63 | if (
64 | // If the character is the first character and is a `-` (U+002D), and
65 | // there is no second character, […]
66 | index == 0 &&
67 | length == 1 &&
68 | codeUnit == 0x002D
69 | ) {
70 | result += '\\' + string.charAt(index);
71 | continue;
72 | }
73 |
74 | // If the character is not handled by one of the above rules and is
75 | // greater than or equal to U+0080, is `-` (U+002D) or `_` (U+005F), or
76 | // is in one of the ranges [0-9] (U+0030 to U+0039), [A-Z] (U+0041 to
77 | // U+005A), or [a-z] (U+0061 to U+007A), […]
78 | if (
79 | codeUnit >= 0x0080 ||
80 | codeUnit == 0x002D ||
81 | codeUnit == 0x005F ||
82 | codeUnit >= 0x0030 && codeUnit <= 0x0039 ||
83 | codeUnit >= 0x0041 && codeUnit <= 0x005A ||
84 | codeUnit >= 0x0061 && codeUnit <= 0x007A
85 | ) {
86 | // the character itself
87 | result += string.charAt(index);
88 | continue;
89 | }
90 |
91 | // Otherwise, the escaped character.
92 | // https://drafts.csswg.org/cssom/#escape-a-character
93 | result += '\\' + string.charAt(index);
94 |
95 | }
96 | return result;
97 | };
98 |
99 | if (!root.CSS) {
100 | root.CSS = {};
101 | }
102 |
103 | root.CSS.escape = cssEscape;
104 | return cssEscape;
105 |
106 | }));
107 |
--------------------------------------------------------------------------------
/source/css/_sidebar.styl:
--------------------------------------------------------------------------------
1 | @import "_settings"
2 |
3 | .sidebar
4 | position: absolute
5 | top: 0
6 | left: 0
7 | bottom: 0
8 | overflow-x: hidden
9 | overflow-y: auto
10 | -webkit-overflow-scrolling: touch
11 | -ms-overflow-style: none
12 | header
13 | padding-top: $header-height
14 | padding-left: 12px
15 | h2
16 | margin-bottom: 0
17 | font-size: 2em
18 | .meta
19 | margin: $gap 0
20 | font-size: .9em
21 | p
22 | margin: 2px 0
23 | line-height: 1.4em
24 | font-size: 1em
25 | a
26 | margin: 0
27 | display: inline
28 | hoverable_text()
29 | a
30 | font-weight: bold
31 | font-size: 1em
32 | h2
33 | margin-top: .2em
34 | p.job
35 | margin-top: 8px
36 | font-weight: bold
37 | color: $color_theme
38 | ul
39 | list-style-type: none
40 | margin: 0
41 | line-height: 1.5em
42 | padding-left: 1em
43 | a
44 | font-weight: inherit
45 | font-size: 1.2em
46 | hoverable_text()
47 | li
48 | margin-top: .5em
49 | .sidebar-inner
50 | width: 250px
51 | padding: 0.5*$gap 20px 60px 60px
52 | margin-bottom: 4em
53 | .footer
54 | padding: 1em 0 2em 0
55 | bottom: 0
56 | position: fixed
57 | background: white
58 | width: inherit
59 | .version-select
60 | vertical-align: middle
61 | margin-left: 5px
62 | .menu-root
63 | padding-left: 0
64 | font-weight: bold
65 | .menu-sub
66 | font-size: .85em
67 | ul
68 | font-weight: normal
69 | .sidebar-link
70 | color: $light
71 | &.current
72 | font-weight: 600
73 | color: $color_theme
74 | &.new
75 | &:after
76 | content: "NEW"
77 | display: inline-block
78 | font-size: 10px
79 | font-weight: 600
80 | color: #fff
81 | background-color: $color_theme
82 | line-height: 14px
83 | padding: 0 4px
84 | border-radius: 3px
85 | margin-left: 5px
86 | vertical-align: middle
87 | position: relative
88 | top: -1px
89 | &:hover
90 | border-bottom: 2px solid $color_theme
91 | .section-link
92 | &.active
93 | font-weight: bold
94 | color: $color_theme
95 | .main-menu
96 | margin-bottom: 20px
97 | display: none
98 | padding-left: 0
99 | .seperator
100 | background: #12f
101 | display: none
102 | .nav-dropdown
103 | h4
104 | font-weight: normal
105 | margin: 0
106 |
107 | @media screen and (max-width: 900px)
108 | .sidebar
109 | position: fixed
110 | z-index: 10
111 | background-color: white
112 | height: 100%
113 | top: 0
114 | left: 0
115 | box-shadow: 1px 0 2px rgba(0,0,0,.08), 2px 0 4px rgba(0,0,0,.08), 4px 0 8px rgba(0,0,0,.06), 8px 0 16px rgba(0,0,0,.06)
116 | transition: all .4s cubic-bezier(0.4, 0, 0, 1)
117 | -webkit-transform: translate(-280px, 0)
118 | transform: translate(-280px, 0)
119 | .sidebar-inner
120 | padding: 0.5*$gap 0.5*$gap 2*$mobile-content-padding-top $gap
121 | box-sizing: border-box
122 | .footer
123 | display: none
124 | .sidebar-inner-index
125 | padding: 0.5*$gap 0.5*$gap 2*$mobile-content-padding-top $gap
126 | .search-query
127 | width: 200px
128 | margin-bottom: 10px
129 | .main-menu
130 | display: block
131 | .list
132 | margin: 0 auto
133 | &.open
134 | -webkit-transform: translate(0, 0)
135 | transform: translate(0, 0)
136 | width: 280px
137 | .header
138 | padding-top: $header-height * 0.5
139 |
140 | @media print
141 | .sidebar
142 | display: none
143 |
--------------------------------------------------------------------------------
/layout/layout.ejs:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 | <%- page.resume_title %>
15 | <% if (page.keywords){ %>
16 |
17 | <% } %>
18 | <% if (page.description){ %>
19 |
20 | <% } %>
21 |
22 |
23 | <% if (config.import && config.import.meta){ %>
24 | <% (config.import.meta||[]).forEach(function(item){ %>
25 | <%- item %>
26 | <% }) %>
27 | <% } %>
28 |
29 | <% if (config.import && config.import.link){ %>
30 | <% (config.import.link||[]).forEach(function(item){ %>
31 | <%- item %>
32 | <% }) %>
33 | <% } %>
34 |
35 |
36 | <% if (theme.cdn.fancybox && theme.cdn.fancybox.css) { %>
37 | <%- css(theme.cdn.fancybox.css) %>
38 | <% } %>
39 |
40 | <% if (theme.cdn.css && theme.cdn.css) { %>
41 | <%- css(theme.cdn.css) %>
42 | <% } else { %>
43 | <%- css('css/page') %>
44 | <% } %>
45 |
46 |
47 |
48 |
49 |
<%- page.resume_title %>
50 | <% if (page.download) { %>
51 |
52 | <% } %>
53 |
54 | <%- js(theme.cdn.vue) %>
55 |
59 |
60 |
61 | <%- body %>
62 |
63 | <% if (theme.cdn.smooth_scroll) { %>
64 | <%- js(theme.cdn.smooth_scroll) %>
65 | <% } else { %>
66 | <%- js(['js/smooth-scroll.min.js']) %>
67 | <% } %>
68 |
69 | <% if (theme.copyright) { %>
70 |
73 | <% } %>
74 |
75 | <%- js(theme.cdn.jquery) %>
76 | <% if (theme.cdn.common) { %>
77 | <%- js(theme.cdn.common) %>
78 | <% } else { %>
79 | <%- js(['js/common.js']) %>
80 | <% } %>
81 | <% if (theme.cdn.escape) { %>
82 | <%- js(theme.cdn.escape) %>
83 | <% } else { %>
84 | <%- js(['js/css.escape.js']) %>
85 | <% } %>
86 |
87 | <% if (theme.cdn.fancybox && theme.cdn.fancybox.js) { %>
88 |
89 |
101 | <% } %>
102 |
103 |
104 |
105 |
--------------------------------------------------------------------------------
/source/css/_header.styl:
--------------------------------------------------------------------------------
1 | $header-height = 40px
2 |
3 | #header
4 | background-color: #fff
5 | height: $header-height
6 | padding: $heading-padding-vertical 60px
7 | position: relative
8 | z-index: 100
9 | box-shadow: $box-shadow-nav
10 |
11 | body.docs
12 | #header
13 | position: fixed
14 | width: 100%
15 | top: 0
16 | #nav
17 | position: fixed
18 |
19 | #nav
20 | list-style-type: none
21 | margin: 0
22 | padding: 0
23 | position: absolute
24 | right: 30px
25 | top: $heading-padding-vertical
26 | height: $header-height
27 | line-height: $header-height
28 | .break
29 | display: none
30 | li
31 | display: inline-block
32 | position: relative
33 | margin: 0 .6em
34 | .seperator
35 | margin: 0.3em
36 | display: inline
37 | .nav-dropdown
38 | .nav-link
39 | &:hover, &.current
40 | border-bottom: none
41 | &.current
42 | &::after
43 | content: ""
44 | width: 0
45 | height: 0
46 | border-left: 5px solid $color_theme
47 | border-top: 3px solid transparent
48 | border-bottom: 3px solid transparent
49 | position: absolute
50 | top: 50%
51 | margin-top: -4px
52 | left: 8px
53 |
54 | .nav-link
55 | padding-bottom: 3px
56 | white-space: nowrap
57 | &:hover, &.current
58 | border-bottom: 3px solid $color_theme
59 | &.team, &.contribute
60 | margin-left: 10px
61 |
62 | .new-label
63 | position: absolute
64 | top: 3px
65 | left: 110%
66 | background-color: $color_theme
67 | color: #fff
68 | line-height: 16px
69 | height: 16px
70 | font-size: 9px
71 | font-weight: bold
72 | font-family: $code-font
73 | padding: 1px 4px 0 6px
74 | border-radius: 4px
75 |
76 | .search-query
77 | height: 30px
78 | line-height: 30px
79 | box-sizing: border-box
80 | padding: 0 15px 0 30px
81 | border: 1px solid #e3e3e3
82 | color: $dark
83 | outline: none
84 | border-radius: 15px
85 | margin-right: 10px
86 | transition: border-color .2s ease
87 | background: #fff url(/assets/img/search.png) 8px 5px no-repeat
88 | background-size: 20px
89 | vertical-align: middle !important
90 | &:focus
91 | border-color: $color_theme
92 |
93 | #logo
94 | display: inline-block
95 | font-size: 1.8em
96 | line-height: $header-height
97 | color: alpha($color_theme, 0.9)
98 | font-family: $logo-font
99 | font-weight: 500
100 | img
101 | vertical-align: middle
102 | margin-right: 6px
103 | width: $header-height
104 | height: $header-height
105 | display: none
106 | #mobile-bar
107 | position: fixed
108 | top: 0
109 | left: 0
110 | width: 100%
111 | height: $nav-height
112 | background-color: #fff
113 | z-index: 9
114 | display: none
115 | box-shadow: $box-shadow-nav-mobile
116 | transition_all(0.5s)
117 | .nav-title
118 | font-family: $body-font
119 | font-size: 1.1em
120 | line-height: $nav-height - 2px
121 | color: $dark
122 | display: flex
123 | margin 2px $nav-height 0 $nav-height
124 | .menu-button
125 | position: absolute
126 | width: $nav-height
127 | height: $nav-height
128 | display: flex
129 | align-items: center
130 | justify-content: center
131 | font-size: 1.25em
132 | &.right
133 | font-size: 1.1em
134 | top: 0
135 | right: 0
136 | .logo
137 | opacity: 1
138 | position: absolute
139 | width: $nav-height - $gap
140 | height: $nav-height - $gap
141 | border-radius: 50%
142 | top: $gap * .5
143 | right: $gap
144 | background-size: $nav-height - $gap
145 | img
146 | width: $nav-height - $gap
147 | height: $nav-height - $gap
148 | border-radius: 50%
149 |
150 | @media print
151 | #header
152 | display: none
153 |
--------------------------------------------------------------------------------
/source/js/smooth-scroll.min.js:
--------------------------------------------------------------------------------
1 | /*! smooth-scroll v10.2.1 | (c) 2016 Chris Ferdinandi | MIT License | http://github.com/cferdinandi/smooth-scroll */
2 | !(function(e,t){"function"==typeof define&&define.amd?define([],t(e)):"object"==typeof exports?module.exports=t(e):e.smoothScroll=t(e)})("undefined"!=typeof global?global:this.window||this.global,(function(e){"use strict";var t,n,o,r,a,c,l,i={},u="querySelector"in document&&"addEventListener"in e,s={selector:"[data-scroll]",selectorHeader:null,speed:500,easing:"easeInOutCubic",offset:0,callback:function(){}},d=function(){var e={},t=!1,n=0,o=arguments.length;"[object Boolean]"===Object.prototype.toString.call(arguments[0])&&(t=arguments[0],n++);for(var r=function(n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t&&"[object Object]"===Object.prototype.toString.call(n[o])?e[o]=d(!0,e[o],n[o]):e[o]=n[o])};n=0&&t.item(n)!==this;);return n>-1});e&&e!==document;e=e.parentNode)if(e.matches(t))return e;return null},m=function(e){"#"===e.charAt(0)&&(e=e.substr(1));for(var t,n=String(e),o=n.length,r=-1,a="",c=n.charCodeAt(0);++r=1&&t<=31||127==t||0===r&&t>=48&&t<=57||1===r&&t>=48&&t<=57&&45===c?"\\"+t.toString(16)+" ":t>=128||45===t||95===t||t>=48&&t<=57||t>=65&&t<=90||t>=97&&t<=122?n.charAt(r):"\\"+n.charAt(r)}return"#"+a},p=function(e,t){var n;return"easeInQuad"===e&&(n=t*t),"easeOutQuad"===e&&(n=t*(2-t)),"easeInOutQuad"===e&&(n=t<.5?2*t*t:-1+(4-2*t)*t),"easeInCubic"===e&&(n=t*t*t),"easeOutCubic"===e&&(n=--t*t*t+1),"easeInOutCubic"===e&&(n=t<.5?4*t*t*t:(t-1)*(2*t-2)*(2*t-2)+1),"easeInQuart"===e&&(n=t*t*t*t),"easeOutQuart"===e&&(n=1- --t*t*t*t),"easeInOutQuart"===e&&(n=t<.5?8*t*t*t*t:1-8*--t*t*t*t),"easeInQuint"===e&&(n=t*t*t*t*t),"easeOutQuint"===e&&(n=1+--t*t*t*t*t),"easeInOutQuint"===e&&(n=t<.5?16*t*t*t*t*t:1+16*--t*t*t*t*t),n||t},g=function(e,t,n){var o=0;if(e.offsetParent)do o+=e.offsetTop,e=e.offsetParent;while(e);return o=Math.max(o-t-n,0),Math.min(o,v()-b())},b=function(){return Math.max(document.documentElement.clientHeight,e.innerHeight||0)},v=function(){return Math.max(document.body.scrollHeight,document.documentElement.scrollHeight,document.body.offsetHeight,document.documentElement.offsetHeight,document.body.clientHeight,document.documentElement.clientHeight)},y=function(e){return e&&"object"==typeof JSON&&"function"==typeof JSON.parse?JSON.parse(e):{}},O=function(e){return e?f(e)+e.offsetTop:0},S=function(t,n,o){o||(t.focus(),document.activeElement.id!==t.id&&(t.setAttribute("tabindex","-1"),t.focus(),t.style.outline="none"),e.scrollTo(0,n))};i.animateScroll=function(n,o,c){var i=y(o?o.getAttribute("data-options"):null),u=d(t||s,c||{},i),f="[object Number]"===Object.prototype.toString.call(n),h=f||!n.tagName?null:n;if(f||h){var m=e.pageYOffset;u.selectorHeader&&!r&&(r=document.querySelector(u.selectorHeader)),a||(a=O(r));var b,E,I=f?n:g(h,a,parseInt(u.offset,10)),H=I-m,A=v(),j=0,C=function(t,r,a){var c=e.pageYOffset;(t==r||c==r||e.innerHeight+c>=A)&&(clearInterval(a),S(n,r,f),u.callback(n,o))},M=function(){j+=16,b=j/parseInt(u.speed,10),b=b>1?1:b,E=m+H*p(u.easing,b),e.scrollTo(0,Math.floor(E)),C(E,I,l)},w=function(){clearInterval(l),l=setInterval(M,16)};0===e.pageYOffset&&e.scrollTo(0,0),w()}};var E=function(t){var r;try{r=m(decodeURIComponent(e.location.hash))}catch(t){r=m(e.location.hash)}n&&(n.id=n.getAttribute("data-scroll-id"),i.animateScroll(n,o),n=null,o=null)},I=function(r){if(0===r.button&&!r.metaKey&&!r.ctrlKey&&(o=h(r.target,t.selector),o&&"a"===o.tagName.toLowerCase()&&o.hostname===e.location.hostname&&o.pathname===e.location.pathname&&/#/.test(o.href))){var a;try{a=m(decodeURIComponent(o.hash))}catch(e){a=m(o.hash)}if("#"===a){r.preventDefault(),n=document.body;var c=n.id?n.id:"smooth-scroll-top";return n.setAttribute("data-scroll-id",c),n.id="",void(e.location.hash.substring(1)===c?E():e.location.hash=c)}n=document.querySelector(a),n&&(n.setAttribute("data-scroll-id",n.id),n.id="",o.hash===e.location.hash&&(r.preventDefault(),E()))}},H=function(e){c||(c=setTimeout((function(){c=null,a=O(r)}),66))};return i.destroy=function(){t&&(document.removeEventListener("click",I,!1),e.removeEventListener("resize",H,!1),t=null,n=null,o=null,r=null,a=null,c=null,l=null)},i.init=function(n){u&&(i.destroy(),t=d(s,n||{}),r=t.selectorHeader?document.querySelector(t.selectorHeader):null,a=O(r),document.addEventListener("click",I,!1),e.addEventListener("hashchange",E,!1),r&&e.addEventListener("resize",H,!1))},i}));
--------------------------------------------------------------------------------
/source/css/_common.styl:
--------------------------------------------------------------------------------
1 | @import "_fonts"
2 | @import "_settings"
3 | @import "_syntax"
4 |
5 | body
6 | font-family: $body-font
7 | font-size: $body-font-size
8 | -webkit-font-smoothing: antialiased
9 | -moz-osx-font-smoothing: grayscale
10 | color: $medium
11 | background-color: white
12 | margin: 0
13 | &.docs
14 | padding-top: 0
15 |
16 | @media screen and (max-width: 900px)
17 | body.docs
18 | padding-top: 0
19 |
20 | hr
21 | border: 0
22 | border-radius: 1px
23 | border-bottom: 1px solid rgba(0,0,0,0.1)
24 | a
25 | text-decoration: none
26 | color: $medium
27 |
28 | img
29 | border: none
30 |
31 | h1, h2, h3, h4, strong
32 | font-weight: 600
33 | color: $dark
34 |
35 | code, pre
36 | font-family: $code-font
37 | font-size: $code-font-size
38 | // line-height: $code-font-size
39 | -webkit-font-smoothing: initial
40 | -moz-osx-font-smoothing: initial
41 |
42 | code
43 | color: #e96900
44 | // background-color: #eee
45 | background-color: $codebg
46 | border: 1px solid darken($codebg, 10%)
47 | padding: 3px 4px 1px 4px
48 | margin: 0 2px
49 | border-radius: 2px
50 | word-break: break-all
51 | // white-space: nowrap
52 |
53 | em
54 | color: $light
55 |
56 | .button
57 | padding: 0.32em 2em
58 | line-height: 2em
59 | border-radius: 2px
60 | display: inline-block
61 | color: #fff
62 | background-color: $color_theme
63 | transition: all .15s ease
64 | box-sizing: border-box
65 | &.white
66 | background-color: #fff
67 | color: $color_theme !important
68 | &.clear
69 | background: #0000
70 | &.gray
71 | background-color: #999
72 | &:hover
73 | color: #fff !important
74 | &:hover,&.active
75 | background: darken($color_theme, 8)
76 | box-shadow: $box-shadow-float
77 | &:active
78 | box-shadow: $box-shadow-down
79 |
80 | .highlight
81 | $code-line-height = 1.5em
82 | overflow-x: auto
83 | background-color: $codebg
84 | padding: 0
85 | line-height: 1.1em
86 | border-radius: $radius
87 | position: relative
88 | table, tr, td
89 | width: 100%
90 | border-collapse: collapse
91 | padding: 0
92 | margin: 0
93 | .gutter
94 | width: 1.5em
95 | background: darken($codebg, 5%)
96 | pre
97 | text-align: right
98 | padding: 0 1em
99 | background-color: #0000
100 | line-height: $code-line-height
101 | .code
102 | pre
103 | background: $codebg
104 | padding: 1.5em
105 | line-height: $code-line-height
106 | margin: 0
107 | .line
108 | min-height: $code-line-height
109 | &.code:before
110 | content: " "
111 | position: absolute
112 | top: 0
113 | right: 0
114 | color: #0006
115 | text-align: right
116 | font-size: .75em
117 | padding: 5px 10px 0
118 | line-height: 15px
119 | height: 15px
120 |
121 | &.c .code:before
122 | content: "C"
123 | &.swift .code:before
124 | content: "SWIFT"
125 | &.objc .code:before
126 | content: "OBJECTIVE-C"
127 | &.html .code:before
128 | content: "HTML"
129 | &.js .code:before
130 | content: "JS"
131 | &.bash .code:before
132 | content: "BASH"
133 | &.shell .code:before
134 | content: "SHELL"
135 | &.css .code:before
136 | content: "CSS"
137 | &.stylus .code:before
138 | content: "STYLUS"
139 | &.less .code:before
140 | content: "LESS"
141 | &.java .code:before
142 | content: "JAVA"
143 | &.python .code:before
144 | content: "PYTHON"
145 | &.yaml .code:before
146 | content: "YAML"
147 |
148 | .hljs
149 | background: none !important
150 | #main
151 | position: relative
152 | z-index: 1
153 | padding: 0 60px 30px
154 | overflow-x: hidden
155 |
156 | #nav
157 | .nav-link
158 | cursor: pointer
159 | .nav-dropdown-container
160 | .nav-link
161 | &:hover:not(.current)
162 | border-bottom: none
163 | &:hover
164 | .nav-dropdown
165 | display: block
166 | &.language, &.ecosystem
167 | margin-left: 20px
168 | .arrow
169 | pointer-events: none
170 | .nav-dropdown
171 | display: none
172 | box-sizing: border-box
173 | max-height: "calc(100vh - %s)" % $header-height
174 | overflow-y: auto
175 | position: absolute
176 | top: 100%
177 | right: -15px
178 | background-color: #fff
179 | padding: 10px 0
180 | border: 1px solid #ddd
181 | border-bottom-color: #ccc
182 | text-align: left
183 | border-radius: 4px
184 | white-space: nowrap
185 | li
186 | line-height: 1.8em
187 | margin: 0
188 | display: block
189 | > ul
190 | padding-left: 0
191 | &:first-child
192 | h4
193 | margin-top: 0
194 | padding-top: 0
195 | border-top: 0
196 | a, h4
197 | padding: 0 24px 0 20px
198 | h4
199 | // text-transform: uppercase
200 | font-size: .78em
201 | color: alpha($dark, 0.45)
202 | margin: .45em 0 0
203 | padding-top: .45em
204 | border-top: 1px solid #eee
205 | a
206 | color: lighten($dark, 10%)
207 | font-size: .95em
208 | font-weight: bold
209 | display: block
210 | &:hover
211 | color: $color_theme
212 | .arrow
213 | display: inline-block
214 | vertical-align: middle
215 | margin-top: -1px
216 | margin-left: 6px
217 | margin-right: -14px
218 | width: 0
219 | height: 0
220 | border-left: 4px solid transparent
221 | border-right: 4px solid transparent
222 | border-top: 5px solid #ccc
223 |
224 | sup.beta.beta
225 | font-size: .6em
226 | margin-left: .7em
227 | text-transform: uppercase
228 | opacity: .6
229 |
230 | @media print
231 | body
232 | color: rgb(0,0,0)
233 | .highlight
234 | padding: 0
235 | page-break-inside: avoid
236 | .code
237 | pre
238 | color: rgb(0,0,0)
239 | background-color: rgb(255,255,255)
240 | border-style: solid
241 | border-width: 2px 2px 2px 2px
242 | border-color: #e8e8e8
243 | page-break-inside: avoid
244 | h1,h2,h3,h4,h5
245 | color: rgb(0,0,0)
246 | page-break-after: avoid
247 | page-break-before: avoid
248 | img
249 | page-break-inside: avoid
250 | h2+p
251 | page-break-before: avoid
252 | a:link:after, a:visited:after { content: none; }
253 |
254 | #comments
255 | #valine_container
256 | .info
257 | display: none;
258 |
259 |
260 | #footer
261 | padding: 40px 0 80px
262 | color: $light
263 | text-align: center
264 | p
265 | font-size: .8em
266 | a
267 | color: $light
268 | hoverable_text()
269 | .social-wrapper
270 | display: flex
271 | justify-content: center
272 | flex-wrap: wrap
273 | a
274 | position: relative
275 | display: inline-block
276 | text-align: center
277 | display: flex
278 | justify-content: center
279 | align-items: center
280 | flex-wrap: wrap
281 | width: 1.2em
282 | height: 1.2em
283 | margin: 4px
284 | padding: .5em
285 | border-radius: 50%
286 | background-color: transparent
287 | transition_all()
288 | &:hover
289 | color: $color_theme
290 | background-color: color_for_bg($color_theme)
291 |
--------------------------------------------------------------------------------
/source/css/vue-pdf.css:
--------------------------------------------------------------------------------
1 | :root {
2 | --side-bar-bg-color: #fff;
3 | --control-text-color: #777;
4 | }
5 |
6 | @font-face {
7 | font-family: 'Courier';
8 | font-style: normal;
9 | font-weight: 400;
10 | src: url(https://cdn.jsdelivr.net/gh/xaoxuu/cdn-fonts/Courier/Courier.dfont) format('dfont');
11 | }
12 |
13 | html {
14 | font-size: 12px;
15 | }
16 |
17 | body {
18 | font-family: Courier, Menlo, Monaco, "Helvetica Neue", Arial, sans-serif, cursive !important;
19 | color: #24394e;
20 | -webkit-font-smoothing: antialiased;
21 | line-height: 1.6em;
22 | letter-spacing: 0;
23 | margin: 0;
24 | overflow-x: hidden;
25 | text-align: justify;
26 | }
27 |
28 | #write {
29 | max-width: 860px;
30 | margin: 0 auto;
31 | padding: 20px 30px 100px;
32 | }
33 |
34 | #write p {
35 | line-height: 1.6rem;
36 | word-spacing: .05rem;
37 | }
38 |
39 | #write ol li {
40 | text-indent: 0.5rem;
41 | }
42 |
43 | #write > ul:first-child,
44 | #write > ol:first-child {
45 | margin-top: 30px;
46 | }
47 |
48 | body > *:first-child {
49 | margin-top: 0 !important;
50 | }
51 |
52 | body > *:last-child {
53 | margin-bottom: 0 !important;
54 | }
55 |
56 | a {
57 | /* color: #42b983; */
58 | color: inherit;
59 | /* font-weight: 600; */
60 | /* padding: 0 2px; */
61 | text-decoration: none;
62 | }
63 |
64 | h1,
65 | h2,
66 | h3,
67 | h4,
68 | h5,
69 | h6 {
70 | position: relative;
71 | margin-top: 1rem;
72 | margin-bottom: 1rem;
73 | font-weight: bold;
74 | line-height: 1.4;
75 | cursor: text;
76 | }
77 |
78 | h1:hover a.anchor,
79 | h2:hover a.anchor,
80 | h3:hover a.anchor,
81 | h4:hover a.anchor,
82 | h5:hover a.anchor,
83 | h6:hover a.anchor {
84 | text-decoration: none;
85 | }
86 |
87 | h1 tt,
88 | h1 code {
89 | font-size: inherit !important;
90 | }
91 |
92 | h2 tt,
93 | h2 code {
94 | font-size: inherit !important;
95 | }
96 |
97 | h3 tt,
98 | h3 code {
99 | font-size: inherit !important;
100 | }
101 |
102 | h4 tt,
103 | h4 code {
104 | font-size: inherit !important;
105 | }
106 |
107 | h5 tt,
108 | h5 code {
109 | font-size: inherit !important;
110 | }
111 |
112 | h6 tt,
113 | h6 code {
114 | font-size: inherit !important;
115 | }
116 |
117 | h2 a,
118 | h3 a {
119 | color: #34495e;
120 | }
121 |
122 | h1 {
123 | font-size: 1.75em;
124 | line-height: 1.3;
125 | }
126 |
127 | h2 {
128 | font-size: 1.5em;
129 | line-height: 1.225;
130 | margin: 64px 0 16px;
131 | padding-bottom: 0.5em;
132 | border-bottom: 1px solid #ddd;
133 | }
134 |
135 | h3 {
136 | font-size: 1.2em;
137 | line-height: 1.43;
138 | margin: 20px 0 0;
139 | padding-bottom: 0;
140 | }
141 |
142 | h4 {
143 | font-size: 0.8em;
144 | margin-top: 4px;
145 | color: #516273;
146 | margin-bottom: 16px;
147 | }
148 |
149 | h5 {
150 | font-size: 1em;
151 | }
152 |
153 | h6 {
154 | font-size: 1em;
155 | color: #777;
156 | }
157 |
158 | p,
159 | blockquote,
160 | ul,
161 | ol,
162 | dl,
163 | table {
164 | margin: 0.8em 0;
165 | }
166 | blockquote {
167 | font-size: 0.8em;
168 | }
169 |
170 | li > ol,
171 | li > ul {
172 | margin: 0 0;
173 | }
174 |
175 | hr {
176 | height: 2px;
177 | padding: 0;
178 | margin: 16px 0;
179 | background-color: #f2f2f2;
180 | border: 0 none;
181 | overflow: hidden;
182 | box-sizing: content-box;
183 | }
184 |
185 | body > h2:first-child {
186 | margin-top: 0;
187 | padding-top: 0;
188 | }
189 |
190 | h1:first-child {
191 | text-align: center;
192 | margin-top: 30px;
193 | margin-bottom: 10px;
194 | }
195 |
196 | body > h1:first-child {
197 | margin-top: 0;
198 | padding-top: 0;
199 | }
200 |
201 | body > h1:first-child + h2 {
202 | margin-top: 0;
203 | padding-top: 0;
204 | }
205 |
206 | body > h3:first-child,
207 | body > h4:first-child,
208 | body > h5:first-child,
209 | body > h6:first-child {
210 | margin-top: 0;
211 | padding-top: 0;
212 | }
213 |
214 | a:first-child h1,
215 | a:first-child h2,
216 | a:first-child h3,
217 | a:first-child h4,
218 | a:first-child h5,
219 | a:first-child h6 {
220 | margin-top: 0;
221 | padding-top: 0;
222 | }
223 |
224 | h1 p,
225 | h2 p,
226 | h3 p,
227 | h4 p,
228 | h5 p,
229 | h6 p {
230 | margin-top: 0;
231 | }
232 |
233 | li p.first {
234 | display: inline-block;
235 | }
236 |
237 | ul,
238 | ol {
239 | padding-left: 30px;
240 | }
241 |
242 | ul:first-child,
243 | ol:first-child {
244 | margin-top: 0;
245 | }
246 |
247 | ul:last-child,
248 | ol:last-child {
249 | margin-bottom: 0;
250 | }
251 |
252 | blockquote {
253 | border-left: 4px solid #42b983;
254 | padding: 10px 15px;
255 | color: #777;
256 | background-color: rgba(66, 185, 131, .1);
257 | }
258 |
259 | table {
260 | padding: 0;
261 | word-break: initial;
262 | }
263 |
264 | table tr {
265 | border-top: 1px solid #dfe2e5;
266 | margin: 0;
267 | padding: 0;
268 | }
269 |
270 | table tr:nth-child(2n),
271 | thead {
272 | background-color: #fafafa;
273 | }
274 |
275 | table tr th {
276 | font-weight: bold;
277 | border: 1px solid #dfe2e5;
278 | border-bottom: 0;
279 | text-align: left;
280 | margin: 0;
281 | padding: 4px;
282 | }
283 |
284 | table tr td {
285 | border: 1px solid #dfe2e5;
286 | text-align: left;
287 | margin: 0;
288 | padding: 2px;
289 | }
290 |
291 | table tr th:first-child,
292 | table tr td:first-child {
293 | margin-top: 0;
294 | }
295 |
296 | table tr th:last-child,
297 | table tr td:last-child {
298 | margin-bottom: 0;
299 | }
300 |
301 | #write strong {
302 | padding: 0 1px;
303 | }
304 |
305 | #write em {
306 | padding: 0 5px 0 2px;
307 | }
308 |
309 | #write table thead th {
310 | background-color: #f2f2f2;
311 | }
312 |
313 | #write .CodeMirror-gutters {
314 | border-right: none;
315 | }
316 |
317 | #write .md-fences {
318 | border: 1px solid #F4F4F4;
319 | -webkit-font-smoothing: initial;
320 | margin: 0.8rem 0 !important;
321 | padding: 0.3rem 0 !important;
322 | line-height: 1.43rem;
323 | background-color: #F8F8F8 !important;
324 | border-radius: 2px;
325 | font-family: Menlo, Monaco, "Helvetica Neue", Arial, sans-serif, cursive !important;
326 | font-size: 0.85rem;
327 | word-wrap: normal;
328 | }
329 |
330 | #write .CodeMirror-wrap .CodeMirror-code pre {
331 | padding-left: 12px;
332 | }
333 |
334 | #write code, tt {
335 | margin: 0 2px;
336 | padding: 2px 4px;
337 | border-radius: 2px;
338 | font-family: Menlo, Monaco, "Helvetica Neue", Arial, sans-serif, cursive !important;
339 | font-size: 0.92rem;
340 | color: #e96900;
341 | background-color: #f8f8f8;
342 | }
343 |
344 | #write .md-footnote {
345 | background-color: #f8f8f8;
346 | color: #e96900;
347 | }
348 |
349 | /* heighlight. */
350 | #write mark {
351 | background-color: #EBFFEB;
352 | border-radius: 2px;
353 | padding: 2px 4px;
354 | margin: 0 2px;
355 | color: #222;
356 | font-weight: 500;
357 | }
358 |
359 | #write del {
360 | padding: 1px 2px;
361 | }
362 |
363 | .cm-s-inner .cm-link,
364 | .cm-s-inner.cm-link {
365 | color: #22a2c9;
366 | }
367 |
368 | .cm-s-inner .cm-string {
369 | color: #22a2c9;
370 | }
371 |
372 | .md-task-list-item > input {
373 | margin-left: -1.3em;
374 | }
375 |
376 | @media print {
377 | html {
378 | font-size: 13px;
379 | }
380 |
381 | table,
382 | pre {
383 | page-break-inside: avoid;
384 | }
385 |
386 | pre {
387 | word-wrap: break-word;
388 | }
389 | }
390 |
391 | .md-fences {
392 | background-color: #f8f8f8;
393 | }
394 |
395 | #write pre.md-meta-block {
396 | padding: 1rem;
397 | font-size: 85%;
398 | line-height: 1.45;
399 | background-color: #f7f7f7;
400 | border: 0;
401 | border-radius: 3px;
402 | color: #777777;
403 | margin-top: 0 !important;
404 | }
405 |
406 | .mathjax-block > .code-tooltip {
407 | bottom: .375rem;
408 | }
409 |
410 | #write > h3.md-focus:before {
411 | left: -1.5625rem;
412 | top: .375rem;
413 | }
414 |
415 | #write > h4.md-focus:before {
416 | left: -1.5625rem;
417 | top: .285714286rem;
418 | }
419 |
420 | #write > h5.md-focus:before {
421 | left: -1.5625rem;
422 | top: .285714286rem;
423 | }
424 |
425 | #write > h6.md-focus:before {
426 | left: -1.5625rem;
427 | top: .285714286rem;
428 | }
429 |
430 | .md-image > .md-meta {
431 | border-radius: 3px;
432 | font-family: Courier, Menlo, Monaco, "Helvetica Neue", Arial, sans-serif, cursive;
433 | padding: 2px 0 0 4px;
434 | font-size: 0.9em;
435 | color: inherit;
436 | }
437 |
438 | .md-tag {
439 | color: inherit;
440 | }
441 |
442 | .md-toc {
443 | margin-top: 20px;
444 | padding-bottom: 20px;
445 | }
446 |
447 | .sidebar-tabs {
448 | border-bottom: none;
449 | }
450 |
451 | #typora-quick-open {
452 | border: 1px solid #ddd;
453 | background-color: #f8f8f8;
454 | }
455 |
456 | #typora-quick-open-item {
457 | background-color: #FAFAFA;
458 | border-color: #FEFEFE #e5e5e5 #e5e5e5 #eee;
459 | border-style: solid;
460 | border-width: 1px;
461 | }
462 |
463 | #md-notification:before {
464 | top: 10px;
465 | }
466 |
467 | /** focus mode */
468 |
469 | .on-focus-mode blockquote {
470 | border-left-color: rgba(85, 85, 85, 0.12);
471 | }
472 |
473 | header,
474 | .context-menu,
475 | .megamenu-content,
476 | footer {
477 | font-family: Courier, Menlo, Monaco, "Helvetica Neue", Arial, sans-serif, cursive;
478 | }
479 |
480 | .file-node-content:hover .file-node-icon,
481 | .file-node-content:hover .file-node-open-state {
482 | visibility: visible;
483 | }
484 |
485 | .mac-seamless-mode #typora-sidebar {
486 | background-color: var(--side-bar-bg-color);
487 | }
488 |
489 | .md-lang {
490 | color: #b4654d;
491 | }
492 |
493 | .html-for-mac .context-menu {
494 | --item-hover-bg-color: #E6F0FE;
495 | }
496 |
--------------------------------------------------------------------------------
/source/css/page.styl:
--------------------------------------------------------------------------------
1 | @import "_common"
2 | @import "_header"
3 | @import "_sidebar"
4 | @import "_style-guide"
5 | @import "_readmore"
6 |
7 | #header
8 | transition: background-color .3s ease-in-out
9 |
10 | .content
11 | position: relative
12 | padding: 46px 0
13 | max-width: 720px
14 | margin: 0 auto
15 | padding-left: 40px
16 | text-align: justify
17 | // >:first-child
18 | // padding-top: 0
19 | // margin-top: 0
20 | &.api
21 | > a:first-of-type > h2
22 | margin-top: 0
23 | padding-top: 0
24 | ul
25 | padding-left: 1.25em
26 | line-height: 1.4em
27 | ul, p:not(.tip)
28 | padding-bottom: 0
29 | margin: 1.2em 0
30 | .button
31 | color: #fff
32 | &:hover
33 | color: #fff !important
34 | fancybox
35 | display: flex
36 | a
37 | margin: 0 1px
38 | img
39 | border-radius: 2px
40 | @media screen and (max-width: 425px)
41 | a
42 | margin: 0 0.5px
43 | img
44 | border-radius: 1px
45 | img
46 | max-width: 100%
47 | span.light
48 | color: $light
49 | span.info
50 | font-size: .85em
51 | display: inline-block
52 | vertical-align: middle
53 | width: 280px
54 | margin-left: 20px
55 | // h1
56 | // margin: 0 0 1em
57 | // font-size: 1.8em
58 | h2, h3
59 | pointer-events: none
60 | i
61 | text-align: center
62 | width: 28px
63 | padding-right 2px
64 | a, button
65 | pointer-events: auto
66 | color: $dark
67 | &:before
68 | content: ""
69 | display: block
70 | visibility: hidden
71 | height: 24px
72 | h2
73 | margin: $h2-margin-top 0 .8em
74 | padding-bottom: .7em
75 | border-bottom: 1px solid $border
76 | font-size: 1.6em
77 | @media screen and (max-width: 425px)
78 | font-size: 1.4em
79 | a
80 | color: $dark
81 | h3
82 | margin: $h3-margin-top 0 0
83 | line-height: 1.2
84 | position: relative
85 | font-size: 1.4em
86 | @media screen and (max-width: 425px)
87 | font-size: 1.3em
88 | a, button
89 | color: $color_theme
90 | > a:before
91 | color: $color_theme
92 | position: absolute
93 | left: -0.7em
94 | padding-right: 0.5em
95 | font-size: 1.2em
96 | line-height: 1
97 | font-weight: bold
98 | h2+h3
99 | margin-top: 0
100 | h4
101 | margin: $h4-margin-top 0 0
102 | color: $medium
103 | font-size: 16px
104 | figure
105 | margin: 1.2em 0
106 | p, ul, ol
107 | line-height: 1.6em
108 | // HACK: Create area underneath paragraphs
109 | // and lists that will be on top of heading
110 | // anchors, for easier text highlighting.
111 | position: relative
112 | z-index: 1
113 | ul, ol
114 | padding-left: 1.5em
115 | // FIX: Some link click targets are covered without this
116 | position: inherit
117 | &.center
118 | justify-content: center
119 | &.pure
120 | padding: 0
121 | display: flex
122 | flex-wrap: wrap
123 | align-items: stretch
124 | li
125 | margin: 8px
126 | display: flex
127 | width: 86px
128 | flex-direction: column
129 | align-items: stretch
130 | vertical-align: middle
131 | text-align: center
132 | font-size: .8em
133 | line-height: 1.2em
134 | overflow: hidden
135 | a
136 | display: flex
137 | flex-direction: column
138 | align-items: center
139 | text-align: center
140 | color: $dark
141 | img
142 | margin-bottom: 8px
143 | &.rounded
144 | img
145 | border-radius: 25%
146 | &.circle
147 | img
148 | border-radius: 50%
149 | &.about
150 | @media screen and (max-width: 900px)
151 | justify-content: center
152 |
153 | i
154 | &.fa-fw
155 | text-align: justify
156 | a
157 | word-break: break-all
158 | color: $color_link
159 | font-weight: 600
160 | hoverable_text()
161 | // i
162 | // &.fa-fw:first-child
163 | // margin 0
164 | blockquote
165 | margin: $gap 0
166 | padding: $gap
167 | border-left: 4px solid $color_theme
168 | background-color: color_for_bg($color_theme)
169 | border-radius: $radius
170 | p
171 | margin-left: 0
172 | margin-bottom: 0
173 | padding-bottom: 0
174 | &:first-child
175 | margin-top: 0
176 | iframe
177 | margin: 1em 0
178 | > table
179 | word-break: break-all
180 | border-spacing: 0
181 | border-collapse: collapse
182 | margin: 1.2em auto
183 | // padding: 0 0 1.2em 0
184 | // display: block
185 | width: 100%
186 | overflow-x: auto
187 | td, th
188 | line-height: 1.5em
189 | padding: .4em .8em
190 | border: none
191 | border: 1px solid #ddd
192 | div
193 | &:before
194 | display: inline-block
195 | font: normal normal normal 14px/1 FontAwesome
196 | font-size: inherit
197 | text-rendering: auto
198 | -webkit-font-smoothing: antialiased
199 | width: 20px
200 | height: 16px
201 | text-align: center
202 | a
203 | color: inherit
204 | &:hover
205 | color: inherit !important
206 | text-decoration: underline
207 | &.unknown
208 | color: $color_warning
209 | &:before
210 | content: "\f0ac"
211 | &.unsafe
212 | color: $color_error
213 | &:before
214 | content: "\f059"
215 | &.safe
216 | color: $color_success
217 | &:before
218 | content: "\f023"
219 | &.plain
220 | &:before
221 | content: ""
222 | width: 0
223 | &.safe.apple
224 | &:before
225 | content: "\f179"
226 | &.safe.google
227 | &:before
228 | content: "\f1a0"
229 | &.safe.local
230 | &:before
231 | content: "\f07c"
232 | &.safe.github
233 | &:before
234 | content: "\f09b"
235 |
236 | th
237 | font-weight: bold
238 | text-align: left
239 | th, tr:nth-child(2n)
240 | background-color: #f8f8f8
241 | code
242 | background-color: #efefef
243 | p
244 | strong
245 | // margin 0 2px
246 | &.tip, &.success
247 | margin: $gap 0
248 | padding: $gap
249 | border-left-width: 4px
250 | border-left-style: solid
251 | background-color: $gridbg
252 | position: relative
253 | border-bottom-right-radius: $radius
254 | border-top-right-radius: $radius
255 | &:before
256 | position: absolute
257 | top: $gap
258 | left: -12px
259 | color: #fff
260 | width: 20px
261 | height: 20px
262 | border-radius: 100%
263 | text-align: center
264 | line-height: 22px
265 | font-family: FontAwesome
266 | font-size: 12px
267 | code
268 | background-color: #efefef
269 | em
270 | color: $medium
271 | &.tip
272 | border-left-color: $color_mac_close
273 | background-color: color_for_bg(alpha($color_mac_close, 50%))
274 | &:before
275 | content: "\f12a"
276 | background-color: $color_mac_close
277 | &.success
278 | border-left-color: $color_mac_maximize
279 | background-color: color_for_bg(alpha($color_mac_maximize, 50%))
280 | &:before
281 | content: "\f00c"
282 | background-color: $color_mac_maximize
283 | .flex
284 | display: flex
285 | a
286 | margin 0 4px
287 | &.around
288 | justify-content: space-around
289 | &.start
290 | justify-content: flex-start
291 | &.end
292 | justify-content: flex-end
293 | &.center
294 | justify-content: center
295 | &.between
296 | justify-content: space-between
297 | p, .readmore
298 | i, a
299 | margin: 0 2px
300 | text-align: center
301 | a
302 | margin: 0 2px
303 | .readmore
304 | i
305 | width: 18px
306 |
307 | .guide-links
308 | margin-top: 2em
309 | height: 1em
310 |
311 | .footer
312 | color: $light
313 | margin-top: 2em
314 | padding-top: 2em
315 | border-top: 1px solid #e5e5e5
316 | font-size: .9em
317 |
318 | #main.fix-sidebar
319 | position: static
320 | .sidebar
321 | position: fixed
322 |
323 | @media screen and (min-width: 1590px)
324 | #header
325 | background-color: rgba(255,255,255,.8)
326 | @media screen and (min-width: 1300px)
327 | .content
328 | padding-left: 150px
329 | @media screen and (max-width: 1300px)
330 | .content.with-sidebar
331 | margin-left: 260px
332 | #ad
333 | z-index: 1
334 | position: relative
335 | padding: 0
336 | bottom: 0
337 | right: 0
338 | float: right
339 | padding: 0 0 20px 30px
340 |
341 | @media screen and (max-width: 900px)
342 | body
343 | -webkit-text-size-adjust: none
344 | font-size: $body-font-size
345 | #header
346 | display: none
347 | #logo
348 | display: none
349 | .nav-link
350 | padding-bottom: 1px
351 | &:hover, &.current
352 | border-bottom: 2px solid $color_theme
353 | #mobile-bar
354 | display: block
355 | #main
356 | padding: 2em 1.4em 0
357 | .highlight pre
358 | padding: 1.2em 1em
359 | .content
360 | padding-left: 0
361 | &.with-sidebar
362 | margin: auto
363 | h2, h3
364 | &:before
365 | content: ""
366 | display: block
367 | visibility: hidden
368 | height: $mobile-heading-link-padding-top
369 | h2,h3
370 | &:before
371 | margin-top: -1 * $mobile-heading-link-padding-top + 0px
372 | .footer
373 | margin-left: 0
374 | text-align: center
375 |
376 | @media screen and (max-width: 560px)
377 | #downloads
378 | text-align: center
379 | margin-bottom: 25px
380 | .info
381 | margin-top: 5px
382 | margin-left: 0
383 | iframe
384 | margin: 0 !important
385 |
386 | @media print
387 | .footer
388 | display: none
389 | .content
390 | padding-left: 0px
391 | .content p
392 | line-height: 1.35em
393 | &.tip
394 | background-color: rgb(255,255,255)
395 | border: 2px solid #e8e8e8
396 | border-left: 4px solid $red
397 |
398 | [data-p="blue"]
399 | color: #52A1F8
400 | [data-p="green"]
401 | color: #3DC550
402 | [data-p="yellow"]
403 | color: #FFBD2B
404 | [data-p="red"]
405 | color: #FE5F58
406 |
407 | .content
408 | .resume-header
409 | display: block
410 | margin: $gap 0
411 | padding: $gap * 2 $gap
412 | background: $gridbg
413 | border-radius: 4px
414 |
415 | h1
416 | margin-top: $gap * 2
417 | line-height: 1.2
418 | position: relative
419 | font-size: 1.4em
420 | text-align: center
421 | .description
422 | text-align: center
423 | font-size: 16px
424 | .social-btns
425 | text-align: center
426 | .social-link
427 | padding: 4px 8px
428 | margin: 0 8px
429 | border-radius: 2px
430 | img.avatar
431 | width: 80px
432 | height: 80px
433 | display: block
434 | margin: $gap auto
435 | margin-top: $gap
436 | border-radius: 50%
437 | p
438 | &[subtitle]
439 | margin-top: $gap * 0.5
440 | &[center]
441 | text-align: center
442 |
443 |
444 | btns
445 | display: flex
446 | flex-wrap: wrap
447 | margin: $gap 0
448 | justify-content: flex-start
449 | align-items: flex-start
450 | @media screen and (max-width: 500px)
451 | justify-content: space-between
452 | a
453 | transition_all()
454 | margin: 0
455 | display: flex
456 | justify-content: flex-start
457 | align-content: center
458 | align-items: center
459 | flex-direction: column
460 | line-height: 1.5
461 | padding: 8px 12px
462 | text-align: center
463 | font-size: 12.5px
464 | min-width: 48px
465 | width: 0.1 * 100%
466 | @media screen and (max-width: 425px)
467 | width: "calc(100% * 0.3 - %s)" % 32px
468 | @media screen and (max-width: 320px)
469 | width: "calc(100% * 0.5 - %s)" % 32px
470 | &>img:first-child
471 | transition_all()
472 | height: 48px
473 | width: 48px
474 | margin: 16px 8px 8px 8px
475 | background: white
476 | line-height: 60px
477 | font-size: 28px
478 | box-shadow: $box-shadow-nav
479 | border-radius: 0px
480 | color: #34495e
481 | img
482 | margin: .4em auto
483 | &:hover
484 | text-decoration: none
485 | border-radius: 8px
486 | background: alpha($color_link_highlight, 0.15)
487 | &>img:first-child
488 | transform: scale(1.1) translateY(-8px)
489 | box-shadow: $box-shadow-float
490 | &[circle] > a
491 | &>img:first-child
492 | border-radius: 24px
493 | &[rounded] > a
494 | &>img:first-child
495 | border-radius: 12px
496 |
497 | .content
498 | div.time
499 | margin-top: 2px
500 | margin-bottom: 16px
501 | span
502 | font-weight: 600
503 | font-size: 14px
504 | opacity: .75
505 | span.keyword
506 | margin-right: 12px
507 | font-weight: bold
508 | color: $color_link_highlight
509 | font-size: 15px
510 | &:before
511 | content: '#'
512 | opacity: 0.5
513 |
514 |
515 |
516 | .resume-footer
517 | margin-top: 120px
518 | padding: 10px 0
519 | color: $light
520 | p
521 | font-size: .9em
522 | a
523 | color: $light
524 | hoverable_text()
525 | text-decoration: underline
526 |
--------------------------------------------------------------------------------
/source/js/common.js:
--------------------------------------------------------------------------------
1 | (function () {
2 | initHashLevelRedirects()
3 | initMobileMenu()
4 | initVideoModal()
5 | if (PAGE_TYPE) {
6 | initVersionSelect()
7 | initApiSpecLinks()
8 | initSubHeaders()
9 | initLocationHashFuzzyMatching()
10 | }
11 |
12 | // Most redirects should be specified in Hexo's
13 | // _config.yml. However, it can't handle hash-level
14 | // redirects, such as:
15 | //
16 | // /foo#hello -> /bar#hello
17 | //
18 | // For these cases where a section on one page has
19 | // moved to a perhaps differently-named section on
20 | // another page, we need this.
21 | function initHashLevelRedirects() {
22 | checkForHashRedirect(/components\.html$/, {
23 | '什么是组件?': '/v2/guide/components.html',
24 | '使用组件': '/v2/guide/components-registration.html',
25 | '全局注册': '/v2/guide/components-registration.html#全局注册',
26 | '局部注册': '/v2/guide/components-registration.html#局部注册',
27 | 'DOM-模板解析注意事项': '/v2/guide/components.html#解析-DOM-模板时的注意事项',
28 | 'data-必须是函数': '/v2/guide/components.html#data-必须是一个函数',
29 | '组件组合': '/v2/guide/components.html#组件的组织',
30 | 'Prop': '/v2/guide/components.html#通过-Prop-向子组件传递数据',
31 | '使用-Prop-传递数据': '/v2/guide/components.html#通过-Prop-向子组件传递数据',
32 | 'camelCase-vs-kebab-case': '/v2/guide/components-props.html#Prop-的大小写-camelCase-vs-kebab-case',
33 | '动态-Prop': '/v2/guide/components-props.html#静态的和动态的-Prop',
34 | '字面量语法-vs-动态语法': '/v2/guide/components-props.html#静态的和动态的-Prop',
35 | '单向数据流': '/v2/guide/components-props.html#单向数据流',
36 | 'Prop-验证': '/v2/guide/components-props.html#Prop-验证',
37 | '非-Prop-特性': '/v2/guide/components-props.html#非-Prop-的特性',
38 | '替换-合并现有的特性': '/v2/guide/components-props.html#替换-合并已有的特性',
39 | '自定义事件': '/v2/guide/components.html#通过事件向父级组件发送消息',
40 | '使用-v-on-绑定自定义事件': '/v2/guide/components.html#通过事件向父级组件发送消息',
41 | '给组件绑定原生事件': '/v2/guide/components-custom-events.html#将原生事件绑定到组件',
42 | 'sync-修饰符': '/v2/guide/components-custom-events.html#sync-修饰符',
43 | '使用自定义事件的表单输入组件': '/v2/guide/components-custom-events.html#将原生事件绑定到组件',
44 | '自定义组件的-v-model': '/v2/guide/components-custom-events.html#自定义组件的-v-model',
45 | '非父子组件的通信': '/v2/guide/state-management.html',
46 | '使用插槽分发内容': '/v2/guide/components.html#通过插槽分发内容',
47 | '编译作用域': '/v2/guide/components-slots.html#编译作用域',
48 | '单个插槽': '/v2/guide/components-slots.html#插槽内容',
49 | '具名插槽': '/v2/guide/components-slots.html#具名插槽',
50 | '作用域插槽': '/v2/guide/components-slots.html#作用域插槽',
51 | '动态组件': '/v2/guide/components.html#动态组件',
52 | 'keep-alive': '/v2/guide/components-dynamic-async.html#在动态组件上使用-keep-alive',
53 | '杂项': '/v2/guide/components-edge-cases.html',
54 | '编写可复用组件': '/v2/guide/components.html#组件的组织',
55 | '子组件引用': '/v2/guide/components-edge-cases.html#访问子组件实例或子元素',
56 | '异步组件': '/v2/guide/components-dynamic-async.html#异步组件',
57 | '高级异步组件': '/v2/guide/components-dynamic-async.html#处理加载状态',
58 | '组件命名约定': '/v2/guide/components-registration.html#组件名',
59 | '递归组件': '/v2/guide/components-edge-cases.html#递归组件',
60 | '组件间的循环引用': '/v2/guide/components-edge-cases.html#组件之间的循环引用',
61 | '内联模板': '/v2/guide/components-edge-cases.html#内联模板',
62 | 'X-Templates': '/v2/guide/components-edge-cases.html#X-Templates',
63 | '对低开销的静态组件使用-v-once': '/v2/guide/components-edge-cases.html#通过-v-once-创建低开销的静态组件'
64 | })
65 | function checkForHashRedirect(pageRegex, redirects) {
66 | // Abort if the current page doesn't match the page regex
67 | if (!pageRegex.test(window.location.pathname)) return
68 |
69 | var redirectPath = redirects[decodeURIComponent(window.location.hash.slice(1))]
70 | if (redirectPath) {
71 | window.location.href = window.location.origin + redirectPath
72 | }
73 | }
74 | }
75 |
76 | function initApiSpecLinks () {
77 | var apiContent = document.querySelector('.content.api')
78 | if (apiContent) {
79 | var apiTitles = [].slice.call(apiContent.querySelectorAll('h3'))
80 | apiTitles.forEach(function (titleNode) {
81 | var methodMatch = titleNode.textContent.match(/^([^(]+)\(/)
82 | if (methodMatch) {
83 | var idWithoutArguments = slugize(methodMatch[1])
84 | titleNode.setAttribute('id', idWithoutArguments)
85 | titleNode.querySelector('a').setAttribute('href', '#' + idWithoutArguments)
86 | }
87 |
88 | var ulNode = titleNode.parentNode.nextSibling
89 | if (ulNode.tagName !== 'UL') {
90 | ulNode = ulNode.nextSibling
91 | if (!ulNode) return
92 | }
93 | if (ulNode.tagName === 'UL') {
94 | var specNode = document.createElement('li')
95 | var specLink = createSourceSearchPath(titleNode.textContent)
96 | specNode.innerHTML = '源代码'
97 | ulNode.appendChild(specNode)
98 | }
99 | })
100 | }
101 |
102 | function createSourceSearchPath (query) {
103 | query = query
104 | .replace(/\([^\)]*?\)/g, '')
105 | .replace(/(Vue\.)(\w+)/g, '$1$2" OR "$2')
106 | .replace(/vm\./g, 'Vue.prototype.')
107 | return 'https://github.com/search?utf8=%E2%9C%93&q=repo%3Avuejs%2Fvue+extension%3Ajs+' + encodeURIComponent('"' + query + '"') + '&type=Code'
108 | }
109 | }
110 |
111 | function parseRawHash (hash) {
112 | // Remove leading hash
113 | if (hash.charAt(0) === '#') {
114 | hash = hash.substr(1)
115 | }
116 |
117 | // Escape characters
118 | try {
119 | hash = decodeURIComponent(hash)
120 | } catch (e) {}
121 | return CSS.escape(hash)
122 | }
123 |
124 | function initLocationHashFuzzyMatching () {
125 | var rawHash = window.location.hash
126 | if (!rawHash) return
127 | var hash = parseRawHash(rawHash)
128 | var hashTarget = document.getElementById(hash)
129 | if (!hashTarget) {
130 | var normalizedHash = normalizeHash(hash)
131 | var possibleHashes = [].slice.call(document.querySelectorAll('[id]'))
132 | .map(function (el) { return el.id })
133 | possibleHashes.sort(function (hashA, hashB) {
134 | var distanceA = levenshteinDistance(normalizedHash, normalizeHash(hashA))
135 | var distanceB = levenshteinDistance(normalizedHash, normalizeHash(hashB))
136 | if (distanceA < distanceB) return -1
137 | if (distanceA > distanceB) return 1
138 | return 0
139 | })
140 | window.location.hash = '#' + possibleHashes[0]
141 | }
142 |
143 | function normalizeHash (rawHash) {
144 | return rawHash
145 | .toLowerCase()
146 | .replace(/\-(?:deprecated|removed|replaced|changed|obsolete)$/, '')
147 | }
148 |
149 | function levenshteinDistance (a, b) {
150 | var m = []
151 | if (!(a && b)) return (b || a).length
152 | for (var i = 0; i <= b.length; m[i] = [i++]) {}
153 | for (var j = 0; j <= a.length; m[0][j] = j++) {}
154 | for (var i = 1; i <= b.length; i++) {
155 | for (var j = 1; j <= a.length; j++) {
156 | m[i][j] = b.charAt(i - 1) === a.charAt(j - 1)
157 | ? m[i - 1][j - 1]
158 | : m[i][j] = Math.min(
159 | m[i - 1][j - 1] + 1,
160 | Math.min(m[i][j - 1] + 1, m[i - 1][j] + 1))
161 | }
162 | }
163 | return m[b.length][a.length]
164 | }
165 | }
166 |
167 | /**
168 | * Mobile burger menu button and gesture for toggling sidebar
169 | */
170 |
171 | function initMobileMenu () {
172 | var mobileBar = document.getElementById('mobile-bar')
173 | var sidebar = document.querySelector('.sidebar')
174 | var menuButton = mobileBar.querySelector('.menu-button')
175 |
176 | menuButton.addEventListener('click', function () {
177 | sidebar.classList.toggle('open')
178 | })
179 |
180 | document.body.addEventListener('click', function (e) {
181 | if (e.target !== menuButton && !sidebar.contains(e.target)) {
182 | sidebar.classList.remove('open')
183 | }
184 | })
185 |
186 | // Toggle sidebar on swipe
187 | var start = {}, end = {}
188 |
189 | document.body.addEventListener('touchstart', function (e) {
190 | start.x = e.changedTouches[0].clientX
191 | start.y = e.changedTouches[0].clientY
192 | })
193 |
194 | document.body.addEventListener('touchend', function (e) {
195 | end.y = e.changedTouches[0].clientY
196 | end.x = e.changedTouches[0].clientX
197 |
198 | var xDiff = end.x - start.x
199 | var yDiff = end.y - start.y
200 |
201 | if (Math.abs(xDiff) > Math.abs(yDiff)) {
202 | if (xDiff > 0 && start.x <= 80) sidebar.classList.add('open')
203 | else sidebar.classList.remove('open')
204 | }
205 | })
206 | }
207 |
208 | /**
209 | * Modal Video Player
210 | */
211 | function initVideoModal () {
212 | var modalButton = document.getElementById('modal-player')
213 | var videoModal = document.getElementById('video-modal')
214 |
215 | if (!modalButton || !videoModal) {
216 | return
217 | }
218 |
219 | var videoWrapper = videoModal.querySelector('.video-space')
220 | var overlay = document.createElement('div')
221 | overlay.className = 'overlay'
222 | var isOpen = false
223 |
224 | modalButton.addEventListener('click', function(event) {
225 | event.stopPropagation()
226 | videoModal.classList.toggle('open')
227 | document.body.classList.toggle('stop-scroll')
228 | document.body.appendChild(overlay)
229 | videoWrapper.innerHTML = ''
230 | isOpen = true
231 | })
232 |
233 | document.body.addEventListener('click', function(e) {
234 | if (isOpen && e.target !== modalButton && !videoModal.contains(e.target)) {
235 | videoModal.classList.remove('open')
236 | document.body.classList.remove('stop-scroll')
237 | document.body.removeChild(overlay)
238 | videoWrapper.innerHTML = ''
239 | isOpen = false
240 | }
241 | })
242 | }
243 |
244 | /**
245 | * Doc version select
246 | */
247 |
248 | function initVersionSelect () {
249 | // version select
250 | var versionSelect = document.querySelector('.version-select')
251 | versionSelect && versionSelect.addEventListener('change', function (e) {
252 | var version = e.target.value
253 | var section = window.location.pathname.match(/\/v\d\/(\w+?)\//)[1]
254 | if (version === 'SELF') return
255 | window.location.assign(
256 | 'https://' +
257 | version +
258 | (version && '.') +
259 | 'vuejs.org/' + section + '/'
260 | )
261 | })
262 | }
263 |
264 | /**
265 | * Sub headers in sidebar
266 | */
267 |
268 | function initSubHeaders () {
269 | var each = [].forEach
270 | var main = document.getElementById('main')
271 | var header = document.getElementById('header')
272 | var sidebar = document.querySelector('.sidebar')
273 | var content = document.querySelector('.content')
274 |
275 | // build sidebar
276 | var currentPageAnchor = sidebar.querySelector('.sidebar-link.current')
277 | var contentClasses = document.querySelector('.content').classList
278 | var isAPIOrStyleGuide = (
279 | contentClasses.contains('api') ||
280 | contentClasses.contains('style-guide')
281 | )
282 | if (currentPageAnchor || isAPIOrStyleGuide) {
283 | var allHeaders = []
284 | var sectionContainer
285 | if (isAPIOrStyleGuide) {
286 | sectionContainer = document.querySelector('.menu-root')
287 | } else {
288 | sectionContainer = document.createElement('ul')
289 | sectionContainer.className = 'menu-sub'
290 | currentPageAnchor.parentNode.appendChild(sectionContainer)
291 | }
292 | var headers = content.querySelectorAll('h2')
293 | if (headers.length) {
294 | each.call(headers, function (h) {
295 | sectionContainer.appendChild(makeLink(h))
296 | var h3s = collectH3s(h)
297 | allHeaders.push(h)
298 | allHeaders.push.apply(allHeaders, h3s)
299 | if (h3s.length) {
300 | sectionContainer.appendChild(makeSubLinks(h3s, isAPIOrStyleGuide))
301 | }
302 | })
303 | } else {
304 | headers = content.querySelectorAll('h3')
305 | each.call(headers, function (h) {
306 | sectionContainer.appendChild(makeLink(h))
307 | allHeaders.push(h)
308 | })
309 | }
310 |
311 | var animating = false
312 | sectionContainer.addEventListener('click', function (e) {
313 |
314 | // Not prevent hashchange for smooth-scroll
315 | // e.preventDefault()
316 |
317 | if (e.target.classList.contains('section-link')) {
318 | sidebar.classList.remove('open')
319 | setActive(e.target)
320 | animating = true
321 | setTimeout(function () {
322 | animating = false
323 | }, 400)
324 | }
325 | }, true)
326 |
327 | // make links clickable
328 | allHeaders
329 | .filter(function(el) {
330 | if (!el.querySelector('a')) {
331 | return false
332 | }
333 | var demos = [].slice.call(document.querySelectorAll('demo'))
334 | return !demos.some(function(demoEl) {
335 | return demoEl.contains(el)
336 | })
337 | })
338 | .forEach(makeHeaderClickable)
339 |
340 | smoothScroll.init({
341 | speed: 400,
342 | offset: 0
343 | })
344 | }
345 |
346 | var hoveredOverSidebar = false
347 | sidebar.addEventListener('mouseover', function () {
348 | hoveredOverSidebar = true
349 | })
350 | sidebar.addEventListener('mouseleave', function () {
351 | hoveredOverSidebar = false
352 | })
353 |
354 | // listen for scroll event to do positioning & highlights
355 | window.addEventListener('scroll', updateSidebar)
356 | window.addEventListener('resize', updateSidebar)
357 |
358 | function updateSidebar () {
359 | var doc = document.documentElement
360 | var top = doc && doc.scrollTop || document.body.scrollTop
361 | if (animating || !allHeaders) return
362 | var last
363 | for (var i = 0; i < allHeaders.length; i++) {
364 | var link = allHeaders[i]
365 | if (link.offsetTop > top) {
366 | if (!last) last = link
367 | break
368 | } else {
369 | last = link
370 | }
371 | }
372 | if (last)
373 | setActive(last.id, !hoveredOverSidebar)
374 | }
375 |
376 | function makeLink (h) {
377 | var link = document.createElement('li')
378 | window.arst = h
379 | var text = [].slice.call(h.childNodes).map(function (node) {
380 | if (node.nodeType === Node.TEXT_NODE) {
381 | return node.nodeValue
382 | } else if (['CODE', 'SPAN'].indexOf(node.tagName) !== -1) {
383 | return node.textContent
384 | } else {
385 | return ''
386 | }
387 | }).join('').replace(/\(.*\)$/, '')
388 | link.innerHTML =
389 | '' +
390 | htmlEscape(text) +
391 | ''
392 | return link
393 | }
394 |
395 | function htmlEscape (text) {
396 | return text
397 | .replace(/&/g, '&')
398 | .replace(/"/g, '"')
399 | .replace(/'/g, ''')
400 | .replace(//g, '>')
402 | }
403 |
404 | function collectH3s (h) {
405 | var h3s = []
406 | var next = h.nextSibling
407 | while (next && next.tagName !== 'H2') {
408 | if (next.tagName === 'H3') {
409 | h3s.push(next)
410 | }
411 | next = next.nextSibling
412 | }
413 | return h3s
414 | }
415 |
416 | function makeSubLinks (h3s, small) {
417 | var container = document.createElement('ul')
418 | if (small) {
419 | container.className = 'menu-sub'
420 | }
421 | h3s.forEach(function (h) {
422 | container.appendChild(makeLink(h))
423 | })
424 | return container
425 | }
426 |
427 | function setActive (id, shouldScrollIntoView) {
428 | var previousActive = sidebar.querySelector('.section-link.active')
429 | var currentActive = typeof id === 'string'
430 | ? sidebar.querySelector('.section-link[href="#' + id + '"]')
431 | : id
432 | if (currentActive !== previousActive) {
433 | if (previousActive) previousActive.classList.remove('active')
434 | currentActive.classList.add('active')
435 | if (shouldScrollIntoView) {
436 | var currentPageOffset = currentPageAnchor
437 | ? currentPageAnchor.offsetTop - 8
438 | : 0
439 | var currentActiveOffset = currentActive.offsetTop + currentActive.parentNode.clientHeight
440 | var sidebarHeight = sidebar.clientHeight
441 | var currentActiveIsInView = (
442 | currentActive.offsetTop >= sidebar.scrollTop &&
443 | currentActiveOffset <= sidebar.scrollTop + sidebarHeight
444 | )
445 | var linkNotFurtherThanSidebarHeight = currentActiveOffset - currentPageOffset < sidebarHeight
446 | var newScrollTop = currentActiveIsInView
447 | ? sidebar.scrollTop
448 | : linkNotFurtherThanSidebarHeight
449 | ? currentPageOffset
450 | : currentActiveOffset - sidebarHeight
451 | sidebar.scrollTop = newScrollTop
452 | }
453 | }
454 | }
455 |
456 | function makeHeaderClickable (header) {
457 | var link = header.querySelector('a')
458 | link.setAttribute('data-scroll', '')
459 |
460 | // transform DOM structure from
461 | // `Header` to `
462 | // to make the header clickable
463 | var nodes = Array.prototype.slice.call(header.childNodes)
464 | for (var i = 0; i < nodes.length; i++) {
465 | var node = nodes[i]
466 | if (node !== link) {
467 | link.appendChild(node)
468 | }
469 | }
470 | }
471 | }
472 |
473 | // Stolen from: https://github.com/hexojs/hexo-util/blob/master/lib/escape_regexp.js
474 | function escapeRegExp(str) {
475 | if (typeof str !== 'string') throw new TypeError('str must be a string!');
476 |
477 | // http://stackoverflow.com/a/6969486
478 | return str.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, '\\$&');
479 | }
480 |
481 | // Stolen from: https://github.com/hexojs/hexo-util/blob/master/lib/slugize.js
482 | function slugize(str, options) {
483 | if (typeof str !== 'string') throw new TypeError('str must be a string!')
484 | options = options || {}
485 |
486 | var rControl = /[\u0000-\u001f]/g
487 | var rSpecial = /[\s~`!@#\$%\^&\*\(\)\-_\+=\[\]\{\}\|\\;:"'<>,\.\?\/]+/g
488 | var separator = options.separator || '-'
489 | var escapedSep = escapeRegExp(separator)
490 |
491 | var result = str
492 | // Remove control characters
493 | .replace(rControl, '')
494 | // Replace special characters
495 | .replace(rSpecial, separator)
496 | // Remove continuous separators
497 | .replace(new RegExp(escapedSep + '{2,}', 'g'), separator)
498 | // Remove prefixing and trailing separators
499 | .replace(new RegExp('^' + escapedSep + '+|' + escapedSep + '+$', 'g'), '')
500 |
501 | switch (options.transform) {
502 | case 1:
503 | return result.toLowerCase()
504 | case 2:
505 | return result.toUpperCase()
506 | default:
507 | return result
508 | }
509 | }
510 | })()
511 |
--------------------------------------------------------------------------------
/source/css/style.min.css:
--------------------------------------------------------------------------------
1 | @font-face{font-family:Courier;src:url(https://cdn.jsdelivr.net/gh/xaoxuu/cdn-fonts/Courier/Courier.dfont);font-weight:300}.gutter pre{color:rgba(0,0,0,.4)}pre{color:#444}pre .constant,pre .function .keyword{color:#0092db}pre .attribute,pre .keyword{color:#e96900}pre .literal,pre .number{color:#ae81ff}pre .change,pre .clojure .built_in,pre .flow,pre .lisp .title,pre .nginx .title,pre .tag,pre .tag .title,pre .tex .special,pre .winutils{color:#2973b7}pre .class .title{color:#2c3e50}pre .regexp,pre .symbol,pre .symbol .string,pre .value{color:#42b983}pre .title{color:#a6e22e}pre .type{color:#2395f3}pre .addition,pre .apache .cbracket,pre .apache .tag,pre .attr_selector,pre .built_in,pre .django .filter .argument,pre .django .template_tag,pre .django .variable,pre .envvar,pre .haskell .type,pre .javadoc,pre .preprocessor,pre .prompt,pre .pseudo,pre .ruby .class .parent,pre .smalltalk .array,pre .smalltalk .class,pre .smalltalk .localvars,pre .sql .aggregate,pre .stream,pre .string,pre .subst,pre .tag .value,pre .tex .command{color:#42b983}pre .apache .sqbracket,pre .comment,pre .deletion,pre .doctype,pre .java .annotation,pre .pi,pre .python .decorator,pre .shebang,pre .template_comment,pre .tex .formula{color:#888}pre .coffeescript .javascript,pre .javascript .xml,pre .tex .formula,pre .xml .cdata,pre .xml .css,pre .xml .javascript,pre .xml .vbscript{opacity:.5}body{font-family:Courier,Menlo,Monaco,"Helvetica Neue",Arial,sans-serif;font-size:15px;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;color:#34495e;background-color:#fff;margin:0}body.docs{padding-top:0}@media screen and (max-width:900px){body.docs{padding-top:0}}hr{border:0;border-radius:1px;border-bottom:1px solid rgba(0,0,0,.1)}a{text-decoration:none;color:#34495e}img{border:none}h1,h2,h3,h4,strong{font-weight:600;color:#2c3e50}code,pre{font-family:Menlo,Monaco,courier,monospace,Arial,sans-serif;font-size:.8em;-webkit-font-smoothing:initial;-moz-osx-font-smoothing:initial}code{color:#e96900;background-color:#ebf4fd;border:1px solid #bfdcf9;padding:3px 4px 1px 4px;margin:0 2px;border-radius:2px;word-break:break-all}em{color:#7f8c8d}.button{padding:.32em 2em;line-height:2em;border-radius:2px;display:inline-block;color:#fff;background-color:#2196f3;transition:all .15s ease;box-sizing:border-box}.button.white{background-color:#fff;color:#2196f3!important}.button.clear{background:rgba(0,0,0,0)}.button.gray{background-color:#999}.button:hover{color:#fff!important}.button.active,.button:hover{background:#0c82df;box-shadow:0 4px 8px rgba(0,0,0,.12),0 8px 16px rgba(0,0,0,.12),0 16px 32px rgba(0,0,0,.12)}.button:active{box-shadow:0 2px 4px rgba(0,0,0,.1)}.highlight{overflow-x:auto;background-color:#ebf4fd;padding:0;line-height:1.1em;border-radius:4px;position:relative}.highlight table,.highlight td,.highlight tr{width:100%;border-collapse:collapse;padding:0;margin:0}.highlight .gutter{width:1.5em;background:#d5e8fb}.highlight .gutter pre{text-align:right;padding:0 1em;background-color:rgba(0,0,0,0);line-height:1.5em}.highlight .code pre{background:#ebf4fd;padding:1.5em;line-height:1.5em;margin:0}.highlight .code .line{min-height:1.5em}.highlight .code.code:before{content:" ";position:absolute;top:0;right:0;color:rgba(0,0,0,.4);text-align:right;font-size:.75em;padding:5px 10px 0;line-height:15px;height:15px}.highlight.c .code:before{content:"C"}.highlight.swift .code:before{content:"SWIFT"}.highlight.objc .code:before{content:"OBJECTIVE-C"}.highlight.html .code:before{content:"HTML"}.highlight.js .code:before{content:"JS"}.highlight.bash .code:before{content:"BASH"}.highlight.shell .code:before{content:"SHELL"}.highlight.css .code:before{content:"CSS"}.highlight.stylus .code:before{content:"STYLUS"}.highlight.less .code:before{content:"LESS"}.highlight.java .code:before{content:"JAVA"}.highlight.python .code:before{content:"PYTHON"}.highlight.yaml .code:before{content:"YAML"}.hljs{background:0 0!important}#main{position:relative;z-index:1;padding:0 60px 30px;overflow-x:hidden}#nav .nav-link{cursor:pointer}#nav .nav-dropdown-container .nav-link:hover:not(.current){border-bottom:none}#nav .nav-dropdown-container:hover .nav-dropdown{display:block}#nav .nav-dropdown-container.ecosystem,#nav .nav-dropdown-container.language{margin-left:20px}#nav .nav-dropdown-container .arrow{pointer-events:none}#nav .nav-dropdown{display:none;box-sizing:border-box;max-height:calc(100vh - 60px);overflow-y:auto;position:absolute;top:100%;right:-15px;background-color:#fff;padding:10px 0;border:1px solid #ddd;border-bottom-color:#ccc;text-align:left;border-radius:4px;white-space:nowrap}#nav .nav-dropdown li{line-height:1.8em;margin:0;display:block}#nav .nav-dropdown li>ul{padding-left:0}#nav .nav-dropdown li:first-child h4{margin-top:0;padding-top:0;border-top:0}#nav .nav-dropdown a,#nav .nav-dropdown h4{padding:0 24px 0 20px}#nav .nav-dropdown h4{font-size:.78em;color:rgba(44,62,80,.45);margin:.45em 0 0;padding-top:.45em;border-top:1px solid #eee}#nav .nav-dropdown a{color:#3a5169;font-size:.95em;font-weight:700;display:block}#nav .nav-dropdown a:hover{color:#2196f3}#nav .arrow{display:inline-block;vertical-align:middle;margin-top:-1px;margin-left:6px;margin-right:-14px;width:0;height:0;border-left:4px solid transparent;border-right:4px solid transparent;border-top:5px solid #ccc}sup.beta.beta{font-size:.6em;margin-left:.7em;text-transform:uppercase;opacity:.6}@media print{body{color:#000}.highlight{padding:0;page-break-inside:avoid}.highlight .code pre{color:#000;background-color:#fff;border-style:solid;border-width:2px 2px 2px 2px;border-color:#e8e8e8;page-break-inside:avoid}h1,h2,h3,h4,h5{color:#000;page-break-after:avoid;page-break-before:avoid}img{page-break-inside:avoid}h2+p{page-break-before:avoid}a:link:after,a:visited:after{content:" [" attr(href) "] "}}#comments #valine_container .info{display:none}#footer{padding:40px 0 80px;color:#7f8c8d;text-align:center}#footer p{font-size:.8em}#footer a{color:#7f8c8d;transition:all .2s ease;-moz-transition:all .2s ease;-webkit-transition:all .2s ease;-o-transition:all .2s ease}#footer a:hover{color:#ff5722!important}#footer .social-wrapper{display:flex;justify-content:center;flex-wrap:wrap}#footer .social-wrapper a{position:relative;display:inline-block;text-align:center;display:flex;justify-content:center;align-items:center;flex-wrap:wrap;width:1.2em;height:1.2em;margin:4px;padding:.5em;border-radius:50%;background-color:transparent;transition:all .28s ease;-moz-transition:all .28s ease;-webkit-transition:all .28s ease;-o-transition:all .28s ease}#footer .social-wrapper a:hover{color:#2196f3;background-color:#e6f2fc}#header{background-color:#fff;height:40px;padding:10px 60px;position:relative;z-index:100;box-shadow:0 1px 1px rgba(0,0,0,.12),0 2px 2px rgba(0,0,0,.08)}body.docs #header{position:fixed;width:100%;top:0}body.docs #nav{position:fixed}#nav{list-style-type:none;margin:0;padding:0;position:absolute;right:30px;top:10px;height:40px;line-height:40px}#nav .break{display:none}#nav li{display:inline-block;position:relative;margin:0 .6em}#nav .seperator{margin:.3em;display:inline}#nav .nav-dropdown .nav-link.current,#nav .nav-dropdown .nav-link:hover{border-bottom:none}#nav .nav-dropdown .nav-link.current::after{content:"";width:0;height:0;border-left:5px solid #2196f3;border-top:3px solid transparent;border-bottom:3px solid transparent;position:absolute;top:50%;margin-top:-4px;left:8px}.nav-link{padding-bottom:3px;white-space:nowrap}.nav-link.current,.nav-link:hover{border-bottom:3px solid #2196f3}.nav-link.contribute,.nav-link.team{margin-left:10px}.new-label{position:absolute;top:3px;left:110%;background-color:#2196f3;color:#fff;line-height:16px;height:16px;font-size:9px;font-weight:700;font-family:Menlo,Monaco,courier,monospace,Arial,sans-serif;padding:1px 4px 0 6px;border-radius:4px}.search-query{height:30px;line-height:30px;box-sizing:border-box;padding:0 15px 0 30px;border:1px solid #e3e3e3;color:#2c3e50;outline:0;border-radius:15px;margin-right:10px;transition:border-color .2s ease;background:#fff url(/assets/img/search.png) 8px 5px no-repeat;background-size:20px;vertical-align:middle!important}.search-query:focus{border-color:#2196f3}#logo{display:inline-block;font-size:1.8em;line-height:40px;color:rgba(33,150,243,.9);font-family:Courier,Menlo,Monaco,"Helvetica Neue",Arial,sans-serif,cursive;font-weight:500}#logo img{vertical-align:middle;margin-right:6px;width:40px;height:40px;display:none}#mobile-bar{position:fixed;top:0;left:0;width:100%;height:54px;background-color:#fff;z-index:9;display:none;box-shadow:0 1px 2px rgba(0,0,0,.12);transition:all .5s ease;-moz-transition:all .5s ease;-webkit-transition:all .5s ease;-o-transition:all .5s ease}#mobile-bar .nav-title{font-family:Courier,Menlo,Monaco,"Helvetica Neue",Arial,sans-serif;font-size:1.1em;line-height:52px;color:#2c3e50;display:flex;margin:2px 54px 0 54px}#mobile-bar .menu-button{position:absolute;width:54px;height:54px;display:flex;align-items:center;justify-content:center;font-size:1.25em}#mobile-bar .menu-button.right{font-size:1.1em;top:0;right:0}#mobile-bar .logo{opacity:1;position:absolute;width:38px;height:38px;border-radius:50%;top:8px;right:16px;background-size:38px}#mobile-bar .logo img{width:38px;height:38px;border-radius:50%}@media print{#header{display:none}}.sidebar{position:absolute;top:0;left:0;bottom:0;overflow-x:hidden;overflow-y:auto;-webkit-overflow-scrolling:touch;-ms-overflow-style:none}.sidebar header{padding-top:60px;padding-left:12px}.sidebar header h2{margin-bottom:0;font-size:2em}.sidebar header .meta{margin:16px 0;font-size:.9em}.sidebar header p{margin:2px 0;line-height:1.4em;font-size:1em}.sidebar header a{margin:0;display:inline;transition:all .2s ease;-moz-transition:all .2s ease;-webkit-transition:all .2s ease;-o-transition:all .2s ease}.sidebar header a:hover{color:#ff5722!important}.sidebar a{font-weight:700;font-size:1em}.sidebar h2{margin-top:.2em}.sidebar ul{list-style-type:none;margin:0;line-height:1.5em;padding-left:1em}.sidebar ul a{font-weight:inherit;font-size:1.2em;transition:all .2s ease;-moz-transition:all .2s ease;-webkit-transition:all .2s ease;-o-transition:all .2s ease}.sidebar ul a:hover{color:#ff5722!important}.sidebar li{margin-top:.5em}.sidebar .sidebar-inner{width:250px;padding:8px 20px 60px 60px;margin-bottom:4em}.sidebar .sidebar-inner .footer{padding:1em 0 2em 0;bottom:0;position:fixed;background:#fff;width:inherit}.sidebar .version-select{vertical-align:middle;margin-left:5px}.sidebar .menu-root{padding-left:0;font-weight:700}.sidebar .menu-sub{font-size:.85em}.sidebar .menu-sub ul{font-weight:400}.sidebar .sidebar-link{color:#7f8c8d}.sidebar .sidebar-link.current{font-weight:600;color:#2196f3}.sidebar .sidebar-link.new:after{content:"NEW";display:inline-block;font-size:10px;font-weight:600;color:#fff;background-color:#2196f3;line-height:14px;padding:0 4px;border-radius:3px;margin-left:5px;vertical-align:middle;position:relative;top:-1px}.sidebar .sidebar-link:hover{border-bottom:2px solid #2196f3}.sidebar .section-link.active{font-weight:700;color:#2196f3}.sidebar .main-menu{margin-bottom:20px;display:none;padding-left:0}.sidebar .main-menu .seperator{background:#12f;display:none}.sidebar .nav-dropdown h4{font-weight:400;margin:0}@media screen and (max-width:900px){.sidebar{position:fixed;z-index:10;background-color:#fff;height:100%;top:0;left:0;box-shadow:1px 0 2px rgba(0,0,0,.08),2px 0 4px rgba(0,0,0,.08),4px 0 8px rgba(0,0,0,.06),8px 0 16px rgba(0,0,0,.06);transition:all .4s cubic-bezier(.4,0,0,1);-webkit-transform:translate(-280px,0);transform:translate(-280px,0)}.sidebar .sidebar-inner{padding:8px 8px 60px 16px;box-sizing:border-box}.sidebar .sidebar-inner .footer{display:none}.sidebar .sidebar-inner-index{padding:8px 8px 60px 16px}.sidebar .search-query{width:200px;margin-bottom:10px}.sidebar .main-menu{display:block}.sidebar .list{margin:0 auto}.sidebar.open{-webkit-transform:translate(0,0);transform:translate(0,0);width:280px}.sidebar.open .header{padding-top:30px}}@media print{.sidebar{display:none}}.content details h2{text-align:center;margin-top:0}.content .style-enforcement,.content .style-example,.content details{border-radius:4px;margin:1.6em 0;padding:1.6em}.content .style-enforcement h4,.content .style-example h4,.content details h4{margin-top:0}.content .style-enforcement figure:last-child,.content .style-enforcement p:last-child,.content .style-example figure:last-child,.content .style-example p:last-child,.content details figure:last-child,.content details p:last-child{margin-bottom:0;padding-bottom:0}.content .style-example h3{margin-top:2em}.content .style-example.example{background:rgba(136,136,136,.08)}.content .style-example.example h4{color:#6d6d6d}.content .style-example.example-bad{background:rgba(212,133,130,.08)}.content .style-example.example-bad h4{color:#a17471}.content .style-example.example-good{background:rgba(95,163,104,.08)}.content .style-example.example-good h4{color:#5c735f}.style-enforcement,details{background-color:rgba(136,136,136,.08)}details{display:block;position:relative}details:not([open]) summary::after{content:"..."}details:not([open]) summary:hover{background:rgba(255,255,255,.3)}summary{cursor:pointer;padding:1.6em;margin:-1.6em;outline:0}summary>h4{display:inline-block;margin:0}.style-enforcement table{width:100%;background-color:#ebf4fd;border-radius:4px}.style-enforcement td,.style-enforcement th{padding:.4em;text-align:center}.style-enforcement th{padding-bottom:.2em}.style-enforcement td{padding-top:.2em}.style-rule-tag{background-color:#ebf4fd;border-radius:4px;font-size:.9em;color:#5c735f;font-weight:600;text-transform:uppercase;padding:.1em .4em}a>.style-rule-tag{color:#2196f3}sup{text-transform:uppercase;font-size:.7em;margin-left:1em;pointer-events:all;position:absolute}[data-p="a"]{color:#6b2a2a}[data-p="b"]{color:#8c480a}[data-p="c"]{color:#2b5a99}[data-p="d"]{content:#3f536d}.readmore{background-color:#ebf4fd;padding:1em;border-radius:2px;color:#52a1f8;position:relative}.readmore a{margin:0 4px;width:100%;color:#52a1f8!important;position:relative;transition:all .2s ease;-moz-transition:all .2s ease;-webkit-transition:all .2s ease;-o-transition:all .2s ease}.readmore a:first-child{margin-left:0}.readmore a:hover{color:#ff5722!important}#header{transition:background-color .3s ease-in-out}.content{position:relative;padding:46px 0;max-width:720px;margin:0 auto;padding-left:40px}.content.api>a:first-of-type>h2{margin-top:0;padding-top:0}.content.api ul{padding-left:1.25em;line-height:1.4em}.content.api ul p:not(.tip),.content.api ul ul{padding-bottom:0;margin:1.2em 0}.content .button{color:#fff}.content .button:hover{color:#fff!important}.content fancybox{display:flex}.content fancybox a{margin:0 1px}.content fancybox img{border-radius:2px}@media screen and (max-width:425px){.content fancybox a{margin:0 .5px}.content fancybox img{border-radius:1px}}.content img{max-width:100%}.content span.light{color:#7f8c8d}.content span.info{font-size:.85em;display:inline-block;vertical-align:middle;width:280px;margin-left:20px}.content h2,.content h3{pointer-events:none}.content h2 i,.content h3 i{text-align:center;width:28px;padding-right:2px}.content h2 a,.content h2 button,.content h3 a,.content h3 button{pointer-events:auto;color:#2c3e50}.content h2:before,.content h3:before{content:"";display:block;visibility:hidden;height:70px}.content h2{margin:3.5em 0 .8em;padding-bottom:.7em;border-bottom:1px solid #ddd;font-size:1.6em}@media screen and (max-width:425px){.content h2{font-size:1.4em}}.content h2 a{color:#2c3e50}.content h2:before{margin-top:-55px}.content h3{margin:2em 0 0;line-height:1.2;position:relative;font-size:1.4em}@media screen and (max-width:425px){.content h3{font-size:1.3em}}.content h3 a,.content h3 button{color:#ff5722}.content h3>a:before{color:#2196f3;position:absolute;left:-.7em;margin-top:-.05em;padding-right:.5em;font-size:1.2em;line-height:1;font-weight:700}.content h3:before{margin-top:-85px}.content h4{margin:.5em 0 0;color:#34495e}.content figure{margin:1.2em 0}.content ol,.content p,.content ul{line-height:1.6em;position:relative;z-index:1}.content ol,.content ul{padding-left:1.5em;position:inherit}.content ol.center,.content ul.center{justify-content:center}.content ol.pure,.content ul.pure{padding:0;display:flex;flex-wrap:wrap;align-items:stretch}.content ol.pure li,.content ul.pure li{margin:8px;display:flex;width:86px;flex-direction:column;align-items:stretch;vertical-align:middle;text-align:center;font-size:.8em;line-height:1.2em;overflow:hidden}.content ol.pure li a,.content ul.pure li a{display:flex;flex-direction:column;align-items:center;text-align:center;color:#2c3e50}.content ol.pure li img,.content ul.pure li img{margin-bottom:8px}.content ol.pure.rounded img,.content ul.pure.rounded img{border-radius:25%}.content ol.pure.circle img,.content ul.pure.circle img{border-radius:50%}@media screen and (max-width:900px){.content ol.pure.about,.content ul.pure.about{justify-content:center}}.content i.fa-fw{text-align:justify}.content a{word-break:break-all;color:#2196f3;font-weight:600;transition:all .2s ease;-moz-transition:all .2s ease;-webkit-transition:all .2s ease;-o-transition:all .2s ease}.content a:hover{color:#ff5722!important}.content blockquote{margin:16px 0;padding:16px;border-left:4px solid #2196f3;background-color:#e6f2fc;border-radius:4px}.content blockquote p{margin-left:0;margin-bottom:0;padding-bottom:0}.content blockquote p:first-child{margin-top:0}.content iframe{margin:1em 0}.content>table{word-break:break-all;border-spacing:0;border-collapse:collapse;margin:1.2em auto;width:100%;overflow-x:auto}.content>table td,.content>table th{line-height:1.5em;padding:.4em .8em;border:none;border:1px solid #ddd}.content>table td div:before,.content>table th div:before{display:inline-block;font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;width:20px;height:16px;text-align:center}.content>table td div a,.content>table th div a{color:inherit}.content>table td div a:hover,.content>table th div a:hover{color:inherit!important;text-decoration:underline}.content>table td div.unknown,.content>table th div.unknown{color:#ffbd2d}.content>table td div.unknown:before,.content>table th div.unknown:before{content:"\f0ac"}.content>table td div.unsafe,.content>table th div.unsafe{color:#ff6058}.content>table td div.unsafe:before,.content>table th div.unsafe:before{content:"\f059"}.content>table td div.safe,.content>table th div.safe{color:#28c940}.content>table td div.safe:before,.content>table th div.safe:before{content:"\f023"}.content>table td div.plain:before,.content>table th div.plain:before{content:"";width:0}.content>table td div.safe.apple:before,.content>table th div.safe.apple:before{content:"\f179"}.content>table td div.safe.google:before,.content>table th div.safe.google:before{content:"\f1a0"}.content>table td div.safe.local:before,.content>table th div.safe.local:before{content:"\f07c"}.content>table td div.safe.github:before,.content>table th div.safe.github:before{content:"\f09b"}.content>table th{font-weight:700;text-align:left}.content>table th,.content>table tr:nth-child(2n){background-color:#f8f8f8}.content>table th code,.content>table tr:nth-child(2n) code{background-color:#efefef}.content p.success,.content p.tip{margin:16px 0;padding:16px;border-left-width:4px;border-left-style:solid;background-color:#f8f8f8;position:relative;border-bottom-right-radius:4px;border-top-right-radius:4px}.content p.success:before,.content p.tip:before{position:absolute;top:16px;left:-12px;color:#fff;width:20px;height:20px;border-radius:100%;text-align:center;line-height:22px;font-family:FontAwesome;font-size:12px}.content p.success code,.content p.tip code{background-color:#efefef}.content p.success em,.content p.tip em{color:#34495e}.content p.tip{border-left-color:#fe5f58;background-color:rgba(254,237,236,.5)}.content p.tip:before{content:"\f12a";background-color:#fe5f58}.content p.success{border-left-color:#3dc550;background-color:rgba(233,247,235,.5)}.content p.success:before{content:"\f00c";background-color:#3dc550}.content p .flex{display:flex}.content p .flex a{margin:0 4px}.content p .flex.around{justify-content:space-around}.content p .flex.start{justify-content:flex-start}.content p .flex.end{justify-content:flex-end}.content p .flex.center{justify-content:center}.content p .flex.between{justify-content:space-between}.content .readmore a,.content .readmore i,.content p a,.content p i{margin:0 2px;text-align:center}.content .readmore a,.content p a{margin:0 2px}.content .readmore i{width:18px}.guide-links{margin-top:2em;height:1em}.footer{color:#7f8c8d;margin-top:2em;padding-top:2em;border-top:1px solid #e5e5e5;font-size:.9em}#main.fix-sidebar{position:static}#main.fix-sidebar .sidebar{position:fixed}@media screen and (min-width:1590px){#header{background-color:rgba(255,255,255,.8)}}@media screen and (min-width:1300px){.content{padding-left:150px}}@media screen and (max-width:1300px){.content.with-sidebar{margin-left:260px}#ad{z-index:1;position:relative;padding:0;bottom:0;right:0;float:right;padding:0 0 20px 30px}}@media screen and (max-width:900px){body{-webkit-text-size-adjust:none;font-size:15px}#header{display:none}#logo{display:none}.nav-link{padding-bottom:1px}.nav-link.current,.nav-link:hover{border-bottom:2px solid #2196f3}#mobile-bar{display:block}#main{padding:2em 1.4em 0}.highlight pre{padding:1.2em 1em}.content{padding-left:0}.content.with-sidebar{margin:auto}.content h2:before,.content h3:before{content:"";display:block;visibility:hidden;height:70px}.content h2:before{margin-top:-70px}.content h3:before{margin-top:-90px}.footer{margin-left:0;text-align:center}}@media screen and (max-width:560px){#downloads{text-align:center;margin-bottom:25px}#downloads .info{margin-top:5px;margin-left:0}iframe{margin:0!important}}@media print{.footer{display:none}.content{padding-left:0}.content p{line-height:1.35em}.content p.tip{background-color:#fff;border:2px solid #e8e8e8;border-left:4px solid #f66}}[data-p=blue]{color:#52a1f8}[data-p=green]{color:#3dc550}[data-p=yellow]{color:#ffbd2b}[data-p=red]{color:#fe5f58}.content grid{display:block;margin:16px 0;padding:16px;background:#f8f8f8;border-radius:4px}.content grid h1{margin-top:32px;line-height:1.2;position:relative;font-size:1.4em;text-align:center}.content p[subtitle]{margin-top:8px}.content p[center]{text-align:center}.content avatar img{width:80px;height:80px;display:block;margin:16px auto;margin-top:32px;border-radius:50%}.content btns{display:flex;flex-wrap:wrap;margin:16px 0;justify-content:flex-start;align-items:flex-start}@media screen and (max-width:500px){.content btns{justify-content:space-between}}.content btns a{transition:all .28s ease;-moz-transition:all .28s ease;-webkit-transition:all .28s ease;-o-transition:all .28s ease;margin:0;display:flex;justify-content:flex-start;align-content:center;align-items:center;flex-direction:column;line-height:1.5;padding:8px 16px;text-align:center;font-size:.85em;min-width:48px;width:10%;border-radius:0;color:#34495e}@media screen and (max-width:425px){.content btns a{width:calc(100% * .3 - 32px)}}@media screen and (max-width:320px){.content btns a{width:calc(100% * .5 - 32px)}}.content btns a>img:first-child{transition:all .28s ease;-moz-transition:all .28s ease;-webkit-transition:all .28s ease;-o-transition:all .28s ease;height:48px;width:48px;margin:16px 8px 8px 8px;background:#fff;line-height:60px;font-size:28px;box-shadow:0 1px 1px rgba(0,0,0,.12),0 2px 2px rgba(0,0,0,.08)}.content btns a img{margin:.4em auto}.content btns a:hover{text-decoration:none;border-radius:8px;background:rgba(255,87,34,.15)}.content btns a:hover>img:first-child{transform:scale(1.1) translateY(-8px);box-shadow:0 4px 8px rgba(0,0,0,.12),0 8px 16px rgba(0,0,0,.12),0 16px 32px rgba(0,0,0,.12)}.content btns[circle]>a>img:first-child{border-radius:24px}.content btns[rounded]>a>img:first-child{border-radius:12px}
--------------------------------------------------------------------------------