├── .npmignore
├── .gitignore
├── styles
├── vssue.styl
├── card.styl
├── tool-group.styl
├── config.styl
├── arrow.styl
├── custom-blocks.styl
├── mobile.styl
├── nprogress.styl
├── transition.styl
├── code.styl
└── theme.styl
├── layouts
├── TagLayout.vue
├── Tags.vue
├── Layout.vue
├── 404.vue
├── Page.vue
└── Activity.vue
├── lib
├── comment.mixin.js
├── animation.js
└── util.js
├── .release-it.json
├── components
├── ToolGroup.vue
├── List.vue
├── Footer.vue
├── TagsContainer.vue
├── NavLink.vue
├── Tag.vue
├── AnimationButton.vue
├── SidebarButton.vue
├── Sidebar.vue
├── Pagination.vue
├── NavLinks.vue
├── Navbar.vue
├── NoToolContainer.vue
├── SWUpdatePopup.vue
├── LayoutContainer.vue
├── PostCard.vue
├── GithubCard.vue
└── SearchBox.vue
├── index.js
├── LICENSE
├── assets
├── search.svg
└── 404.svg
├── CHANGELOG.md
├── package.json
├── README.md
└── animation
└── particleBoom.vue
/.npmignore:
--------------------------------------------------------------------------------
1 | *.lock
2 | node_modules
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | node_modules
3 | *.lock
4 | *.log
5 |
--------------------------------------------------------------------------------
/styles/vssue.styl:
--------------------------------------------------------------------------------
1 | @require './config'
2 |
3 | $vssue-theme-color = $accentColor
4 |
5 | @import '~vssue/src/styles/index'
--------------------------------------------------------------------------------
/layouts/TagLayout.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/styles/card.styl:
--------------------------------------------------------------------------------
1 | @require './config'
2 |
3 | .card
4 | background #fff
5 | overflow hidden
6 | border-radius 2px
7 | box-shadow 0 1px 3px rgba(26,26,26,.1)
8 | box-sizing border-box
9 | margin 0 auto
10 | margin-bottom 10px
--------------------------------------------------------------------------------
/layouts/Tags.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/lib/comment.mixin.js:
--------------------------------------------------------------------------------
1 | import Gitalk from 'gitalk';
2 |
3 | const commentMixin = {
4 | methods: {
5 | comment() {
6 | if (!this.$site.themeConfig.comment) return;
7 | return new Gitalk(this.$site.themeConfig.comment);
8 | }
9 | }
10 | };
11 |
12 | export default commentMixin;
13 |
--------------------------------------------------------------------------------
/.release-it.json:
--------------------------------------------------------------------------------
1 | {
2 | "src": {
3 | "tagName": "v%s",
4 | "commitMessage": "%s"
5 | },
6 | "increment": "conventional:angular",
7 | "beforeChangelogCommand": "conventional-changelog -p angular -i CHANGELOG.md -s",
8 | "changelogCommand": "conventional-changelog -p angular | tail -n +3",
9 | "safeBump": false
10 | }
--------------------------------------------------------------------------------
/components/ToolGroup.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
14 |
15 |
--------------------------------------------------------------------------------
/styles/tool-group.styl:
--------------------------------------------------------------------------------
1 | @require './config'
2 | @require './card'
3 |
4 | .tool-group
5 | flex-grow 1
6 | position fixed
7 | top $navbarHeight + 1rem
8 | width $toolWidth + 3rem
9 | margin-left $pageWidth
10 |
11 | @media (max-width ($MQNarrow + 1px))
12 | .tool-group
13 | position static
14 | width auto
15 | margin-left 0
16 | padding 1rem 0
17 |
--------------------------------------------------------------------------------
/layouts/Layout.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/components/List.vue:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
9 |
14 |
15 |
--------------------------------------------------------------------------------
/styles/config.styl:
--------------------------------------------------------------------------------
1 | // colors
2 | $accentColor = #1c94e0
3 | $textColor = #2c3e50
4 | $postColor = #ac3e40
5 | $borderColor = #e6ecf0
6 | $focusColor = #1b95e0
7 | $codeBgColor = #282c34
8 |
9 | // layout
10 | $navbarHeight = 3rem
11 | $sidebarWidth = 20rem
12 | $contentWidth = 740px
13 | $footerHeight = 32px
14 |
15 | // responsive breakpoints
16 | $MQNarrow = 959px // pad
17 | $MQMobile = 719px // mobile
18 | $MQMobileNarrow = 419px
19 |
20 | // global
21 | $appWidth = 1000px
22 | $toolWidth = 16rem
23 | $pageWidth = 43rem
24 |
--------------------------------------------------------------------------------
/components/Footer.vue:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
28 |
--------------------------------------------------------------------------------
/styles/arrow.styl:
--------------------------------------------------------------------------------
1 | @require './config'
2 |
3 | .arrow
4 | display inline-block
5 | width 0
6 | height 0
7 | &.up
8 | border-left 4px solid transparent
9 | border-right 4px solid transparent
10 | border-bottom 6px solid $textColor
11 | &.down
12 | border-left 4px solid transparent
13 | border-right 4px solid transparent
14 | border-top 6px solid $textColor
15 | &.right
16 | border-top 4px solid transparent
17 | border-bottom 4px solid transparent
18 | border-left 6px solid $textColor
19 | &.left
20 | border-top 4px solid transparent
21 | border-bottom 4px solid transparent
22 | border-right 6px solid $textColor
23 |
--------------------------------------------------------------------------------
/components/TagsContainer.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
TAGS
4 |
5 |
9 |
10 | # {{tag.name}} {{tag.pages.length}}
11 |
12 |
13 |
14 |
15 |
16 |
17 |
22 |
23 |
32 |
--------------------------------------------------------------------------------
/components/NavLink.vue:
--------------------------------------------------------------------------------
1 |
2 | {{ item.text }}
8 | {{ item.text }}
15 |
16 |
17 |
37 |
--------------------------------------------------------------------------------
/styles/custom-blocks.styl:
--------------------------------------------------------------------------------
1 | .custom-block
2 | .custom-block-title
3 | font-weight 600
4 | margin-bottom -0.4rem
5 | &.tip, &.warning, &.danger
6 | padding .1rem 1.5rem
7 | border-left-width .5rem
8 | border-left-style solid
9 | margin 1rem 0
10 | &.tip
11 | background-color #f3f5f7
12 | border-color #42b983
13 | &.warning
14 | background-color rgba(255,229,100,.3)
15 | border-color darken(#ffe564, 35%)
16 | color darken(#ffe564, 70%)
17 | .custom-block-title
18 | color darken(#ffe564, 50%)
19 | a
20 | color $textColor
21 | &.danger
22 | background-color #ffe6e6
23 | border-color darken(red, 20%)
24 | color darken(red, 70%)
25 | .custom-block-title
26 | color darken(red, 40%)
27 | a
28 | color $textColor
29 |
--------------------------------------------------------------------------------
/index.js:
--------------------------------------------------------------------------------
1 | const path = require('path');
2 |
3 | module.exports = ({ comments = {} }) => ({
4 | layoutDir: 'layouts',
5 | plugins: [
6 | ['@vuepress/google-analytics'],
7 | ['@vuepress/back-to-top'],
8 | ['@vuepress/medium-zoom'],
9 | ['@vssue/vuepress-plugin-vssue', Object.assign({
10 | platform: 'github',
11 | }, comments)],
12 | ['@vuepress/register-components', {
13 | componentsDir: [
14 | path.resolve(__dirname, 'components')
15 | ]
16 | }],
17 | ['@yubisaki/blog', {
18 | pageEnhancers: [
19 | {
20 | when: ({ frontmatter }) => frontmatter.layout === 'Activity',
21 | frontmatter: { layout: 'Activity' }
22 | }
23 | ]
24 | }],
25 | ['@yubisaki/pagination'],
26 | 'flowchart'
27 | ]
28 | })
29 |
--------------------------------------------------------------------------------
/styles/mobile.styl:
--------------------------------------------------------------------------------
1 | @require './config'
2 |
3 | $mobileSidebarWidth = $sidebarWidth * 0.8
4 |
5 | // narrow desktop / iPad
6 | @media (max-width: $MQNarrow)
7 | .sidebar
8 | font-size 15px
9 | width $mobileSidebarWidth
10 | .content:not(.custom), .content__default:not(.custom)
11 | padding 2rem
12 | .content-header
13 | padding 0 2rem
14 |
15 | // wide mobile
16 | @media (max-width: $MQMobile)
17 | .sidebar
18 | top 0
19 | padding-top $navbarHeight
20 | transform translateX(-100%)
21 | transition transform .2s ease
22 | .theme.sidebar-open
23 | .sidebar
24 | transform translateX(0)
25 |
26 | // narrow mobile
27 | @media (max-width: $MQMobileNarrow)
28 | h1
29 | font-size 1.9rem
30 | .content:not(.custom), .content__default:not(.custom)
31 | padding 1.5rem
32 | .content, .content__default
33 | pre, pre[class*="language-"]
34 | margin 0.85rem -1.5rem
35 | border-radius 0
36 |
--------------------------------------------------------------------------------
/components/Tag.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
14 |
15 |
--------------------------------------------------------------------------------
/components/AnimationButton.vue:
--------------------------------------------------------------------------------
1 |
2 | {{ item.text }}
7 | {{ item.text }}
14 |
15 |
16 |
49 |
--------------------------------------------------------------------------------
/components/SidebarButton.vue:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
9 |
29 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2018 StickmY
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 |
--------------------------------------------------------------------------------
/assets/search.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/styles/nprogress.styl:
--------------------------------------------------------------------------------
1 | #nprogress
2 | pointer-events none
3 | .bar
4 | background $accentColor
5 | position fixed
6 | z-index 1031
7 | top 0
8 | left 0
9 | width 100%
10 | height 2px
11 | .peg
12 | display block
13 | position absolute
14 | right 0px
15 | width 100px
16 | height 100%
17 | box-shadow 0 0 10px $accentColor, 0 0 5px $accentColor
18 | opacity 1.0
19 | transform rotate(3deg) translate(0px, -4px)
20 | .spinner
21 | display block
22 | position fixed
23 | z-index 1031
24 | top 15px
25 | right 15px
26 | .spinner-icon
27 | width 18px
28 | height 18px
29 | box-sizing border-box
30 | border solid 2px transparent
31 | border-top-color $accentColor
32 | border-left-color $accentColor
33 | border-radius 50%
34 | animation nprogress-spinner 400ms linear infinite
35 |
36 | .nprogress-custom-parent
37 | overflow hidden
38 | position relative
39 |
40 | .nprogress-custom-parent #nprogress .spinner,
41 | .nprogress-custom-parent #nprogress .bar
42 | position absolute
43 |
44 | @keyframes nprogress-spinner
45 | 0% transform rotate(0deg)
46 | 100% transform rotate(360deg)
47 |
--------------------------------------------------------------------------------
/lib/animation.js:
--------------------------------------------------------------------------------
1 | /**
2 | * 粒子原型, 提供一个绘图函数
3 | */
4 | export function ExplodingParticle() {
5 | this.animationDuration = 1000; // in ms
6 |
7 | // Set the speed for our particle
8 | this.speed = {
9 | x: -5 + Math.random() * 10,
10 | y: -5 + Math.random() * 10
11 | };
12 |
13 | // Size our particle
14 | this.radius = 5 + Math.random() * 5;
15 |
16 | // Set a max time to live for our particle
17 | this.life = 30 + Math.random() * 10;
18 | this.remainingLife = this.life;
19 |
20 | // This function will be called by our animation logic later on
21 | this.draw = ctx => {
22 | let p = this;
23 |
24 | if (this.remainingLife > 0 && this.radius > 0) {
25 | // Draw a circle at the current location
26 | ctx.beginPath();
27 | ctx.arc(p.startX, p.startY, p.radius, 0, Math.PI * 2);
28 | ctx.fillStyle =
29 | "rgba(" +
30 | this.rgbArray[0] +
31 | "," +
32 | this.rgbArray[1] +
33 | "," +
34 | this.rgbArray[2] +
35 | ", 1)";
36 | ctx.fill();
37 |
38 | // Update the particle's location and life
39 | p.remainingLife--;
40 | p.radius -= 0.25;
41 | p.startX += p.speed.x;
42 | p.startY += p.speed.y;
43 | }
44 | };
45 | };
46 |
--------------------------------------------------------------------------------
/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | ## [3.1.9](https://github.com/Bloss/vuepress-theme-yubisaki/compare/v3.1.8...v3.1.9) (2019-04-04)
2 |
3 |
4 |
5 | ## [3.1.8](https://github.com/Bloss/vuepress-theme-yubisaki/compare/v3.1.7...v3.1.8) (2019-04-04)
6 |
7 |
8 |
9 | ## [3.1.7](https://github.com/Bloss/vuepress-theme-yubisaki/compare/v3.1.6...v3.1.7) (2019-04-04)
10 |
11 |
12 |
13 | ## [3.1.6](https://github.com/Bloss/vuepress-theme-yubisaki/compare/v3.1.5...v3.1.6) (2019-03-02)
14 |
15 |
16 |
17 | ## [3.1.5](https://github.com/Bloss/vuepress-theme-yubisaki/compare/v3.1.4...v3.1.5) (2019-03-02)
18 |
19 |
20 |
21 | ## [3.1.4](https://github.com/Bloss/vuepress-theme-yubisaki/compare/v3.1.3...v3.1.4) (2019-01-22)
22 |
23 |
24 | ### Bug Fixes
25 |
26 | * hide scroll bar ([c179e2d](https://github.com/Bloss/vuepress-theme-yubisaki/commit/c179e2d))
27 |
28 |
29 |
30 | ## [3.1.3](https://github.com/Bloss/vuepress-theme-yubisaki/compare/v3.1.2...v3.1.3) (2019-01-10)
31 |
32 |
33 |
34 | ## [3.1.2](https://github.com/Bloss/vuepress-theme-yubisaki/compare/v3.1.1...v3.1.2) (2018-12-10)
35 |
36 |
37 |
38 | ## [3.1.1](https://github.com/Bloss/vuepress-theme-yubisaki/compare/v3.1.0...v3.1.1) (2018-11-18)
39 |
40 |
41 |
42 | # [3.1.0](https://github.com/Bloss/vuepress-theme-yubisaki/compare/v3.0.3-alpha.8.0...v3.1.0) (2018-11-10)
43 |
44 |
45 | ### Features
46 |
47 | * flowchart plugin support ([2d16b45](https://github.com/Bloss/vuepress-theme-yubisaki/commit/2d16b45))
48 |
49 |
50 |
51 |
--------------------------------------------------------------------------------
/styles/transition.styl:
--------------------------------------------------------------------------------
1 | .bounce-enter-active,
2 | .bounce-leave-active,
3 | .fade-enter-active,
4 | .fade-leave-active
5 | absolute(left top)
6 | size 100%
7 |
8 | .bounce-enter-active
9 | z-index 1
10 | animation bounce-in .1s
11 |
12 | .bounce-leave-active
13 | z-index -1
14 | animation bounce-out .1s
15 |
16 | @keyframes bounce-in
17 | from
18 | transform scale(1.25)
19 |
20 | 50%
21 | transform scale(1.125)
22 |
23 | to
24 | transform scale(1)
25 |
26 | @keyframes bounce-out
27 | from
28 | opacity 1
29 |
30 | 50%
31 | opacity .5
32 |
33 | to
34 | opacity 0
35 |
36 | .fade-enter-active, .fade-leave-active
37 | transition opacity .1s
38 |
39 | .fade-enter, .fade-leave-active
40 | opacity 0
41 |
42 | .bottom-enter-active, .bottom-leave-active
43 | transform: translate3d(0, 0, 0)
44 | transition transform .2s
45 |
46 | .bottom-enter, .bottom-leave-active
47 | transform translate3d(0, 100%, 0)
48 |
49 | .top-enter-active, .top-leave-active
50 | transform: translate3d(0, 0, 0)
51 | transition transform .2s
52 |
53 | .top-enter, .top-leave-active
54 | transform translate3d(0, -100%, 0)
55 |
56 | .left-enter-active, .left-leave-active, .right-enter-active, .right-leave-active
57 | transform: translate3d(0, 0, 0)
58 | transition transform .2s
59 |
60 | .left-enter, .left-leave-active
61 | transform translate3d(-100%, 0, 0)
62 |
63 | .right-enter, .right-leave-active
64 | transform translate3d(100%, 0, 0)
65 |
66 |
67 |
68 |
69 |
70 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "vuepress-theme-yubisaki",
3 | "version": "3.1.9",
4 | "publishConfig": {
5 | "registry": "https://registry.npmjs.org/"
6 | },
7 | "description": "vuepress-theme",
8 | "repository": "https://github.com/Bloss/vuepress-theme-yubisaki",
9 | "homepage": "https://github.com/Bloss/vuepress-theme-yubisaki/blob/master/README.md",
10 | "main": "index.js",
11 | "keywords": [
12 | "vuepress",
13 | "theme",
14 | "vuepress-theme"
15 | ],
16 | "author": "子肃 ",
17 | "license": "MIT",
18 | "scripts": {
19 | "release": "release-it"
20 | },
21 | "devDependencies": {
22 | "conventional-changelog-cli": "^2.0.11",
23 | "release-it": "^7.6.3"
24 | },
25 | "dependencies": {
26 | "@vuepress/plugin-back-to-top": "^1.0.0-alpha.20",
27 | "@vuepress/plugin-google-analytics": "^1.0.0-alpha.20",
28 | "@vuepress/plugin-medium-zoom": "^1.0.0-alpha.20",
29 | "@vuepress/plugin-pwa": "^1.0.0-alpha.20",
30 | "@vuepress/plugin-register-components": "^1.0.0-alpha.20",
31 | "@yubisaki/vuepress-plugin-blog": "0.1.8",
32 | "@yubisaki/vuepress-plugin-pagination": "0.1.9",
33 | "@vssue/vuepress-plugin-vssue": "^0.5.2",
34 | "autosize": "^4.0.2",
35 | "axios": "^0.18.0",
36 | "date-fns": "^1.29.0",
37 | "github-markdown-css": "^2.10.0",
38 | "html2canvas": "^1.0.0-alpha.12",
39 | "markdown-it-imsize": "^2.0.1",
40 | "markdown-it-task-lists": "^2.1.1",
41 | "node-polyglot": "^2.3.0",
42 | "raw-loader": "^0.5.1",
43 | "vuepress": "^1.0.0-alpha.46",
44 | "vuepress-plugin-flowchart": "^1.4.2"
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/components/Sidebar.vue:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
25 |
26 |
78 |
--------------------------------------------------------------------------------
/layouts/404.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
404
7 |
{{ getMsg() }}
8 |
back to home
9 |
10 |
11 |
12 |
13 |
14 |
30 |
31 |
76 |
--------------------------------------------------------------------------------
/components/Pagination.vue:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
21 |
32 |
33 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | _ _ _ _
4 | _ _ _ _ | |__ (_) ___ __ _ | | __ (_)
5 | | | | | | | | | | '_ \ | | / __| / _` | | |/ / | |
6 | | |_| | | |_| | | |_) | | | \__ \ | (_| | | < | |
7 | \__, | \__,_| |_.__/ |_| |___/ \__,_| |_|\_\ |_|
8 | |___/
9 |
10 |
11 |
12 |
13 |
16 |
yubisaki theme
17 | A blog theme for vuepress
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 | ## Documentation
40 |
41 | [简体中文](https://wuwaki.me/yubisaki/next.html) | [English](https://wuwaki.me/yubisaki/next-en.html)
42 |
43 | ## 📦 Installation
44 |
45 | ```bash
46 | yarn add vuepress-theme-yubisaki@next -S
47 | ```
48 | or with npm
49 | ```bash
50 | npm install vuepress-theme-yubisaki@next --save-dev
51 | ```
52 |
53 | ## ✨ Features
54 |
55 | - Post Tags
56 | - Github Card
57 | - Pagiation
58 | - Search by keyword
59 | - Multi scene layout
60 | - Comments
61 |
62 | ## 🤝 PRs Welcome
--------------------------------------------------------------------------------
/components/NavLinks.vue:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
11 |
34 |
35 |
83 |
--------------------------------------------------------------------------------
/components/Navbar.vue:
--------------------------------------------------------------------------------
1 |
2 |
21 |
22 |
23 |
95 |
--------------------------------------------------------------------------------
/components/NoToolContainer.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
12 |
13 |
14 |
15 |
16 |
55 |
56 |
57 |
58 |
59 |
92 |
93 |
--------------------------------------------------------------------------------
/components/SWUpdatePopup.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
10 |
11 |
12 |
13 |
56 |
57 |
--------------------------------------------------------------------------------
/styles/code.styl:
--------------------------------------------------------------------------------
1 | @require './config'
2 |
3 | .content, .content__default
4 | :not(pre)>code
5 | color lighten($textColor, 20%)
6 | padding 0.25rem 0.5rem
7 | margin 0
8 | font-size 0.85em
9 | background: rgba(255,229,100,.2);
10 | border-radius 3px
11 | code
12 | color lighten($textColor, 20%)
13 | padding 0.25rem 0.5rem
14 | margin 0
15 | font-size 0.85em
16 | background-color rgba(27,31,35,0.05)
17 | border-radius 3px
18 |
19 | .content, .content__default
20 | pre, pre[class*="language-"]
21 | background-color $codeBgColor
22 | line-height 1.4
23 | border-radius 6px
24 | padding 1.25rem 1.5rem
25 | margin 0.85rem 0
26 | white-space pre-wrap
27 | word-break break-word
28 | overflow auto
29 | position relative
30 | code
31 | color #fff
32 | padding 0
33 | background-color none
34 | border-radius 0
35 | &:before
36 | position absolute
37 | top 0.8em
38 | right 1em
39 | font-size 0.75rem
40 | color rgba(255, 255, 255, 0.4)
41 | .highlighted-line
42 | background-color rgba(0, 0, 0, 66%)
43 | display block
44 | margin 0.1rem -1.5rem 0
45 | padding 0.1rem 1.8rem
46 |
47 | pre[class="language-js"], pre[class="language-javascript"]
48 | &:before
49 | content "js"
50 |
51 | pre[class="language-html"], pre[class="language-markup"]
52 | &:before
53 | content "html"
54 |
55 | pre[class="language-markdown"], pre[class="language-md"]
56 | &:before
57 | content "md"
58 |
59 | pre[class="language-vue"]:before
60 | content "vue"
61 |
62 | pre[class="language-css"]:before
63 | content "css"
64 |
65 | pre[class="language-sass"]:before
66 | content "sass"
67 |
68 | pre[class="language-less"]:before
69 | content "less"
70 |
71 | pre[class="language-scss"]:before
72 | content "scss"
73 |
74 | pre[class="language-stylus"]:before
75 | content "stylus"
76 |
77 | pre[class="language-json"]:before
78 | content "json"
79 |
80 | pre[class="language-ruby"]:before
81 | content "rb"
82 |
83 | pre[class="language-python"]:before
84 | content "py"
85 |
86 | pre[class="language-go"]:before
87 | content "go"
88 |
89 | pre[class="language-java"]:before
90 | content "java"
91 |
92 | pre[class="language-c"]:before
93 | content "c"
94 |
95 | pre[class="language-bash"]:before
96 | content "sh"
97 |
--------------------------------------------------------------------------------
/components/LayoutContainer.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
15 |
16 |
17 |
18 |
19 |
58 |
59 |
60 |
61 |
62 |
102 |
103 |
--------------------------------------------------------------------------------
/components/PostCard.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
16 | {{tag}}
17 |
18 |
19 |
20 |
21 |
22 |
41 |
42 |
43 |
--------------------------------------------------------------------------------
/styles/theme.styl:
--------------------------------------------------------------------------------
1 | @require './config'
2 | @require './nprogress'
3 | @require './code'
4 | @require './custom-blocks'
5 | @require './arrow'
6 |
7 | html, body
8 | padding 0
9 | margin 0
10 | overflow-x hidden
11 |
12 | body
13 | font-family -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif
14 | -webkit-font-smoothing antialiased
15 | -moz-osx-font-smoothing grayscale
16 | font-size 16px
17 | color $textColor
18 | background #e6ecf0
19 |
20 | .content:not(.custom), .content__default:not(.custom)
21 | max-width $contentWidth
22 | margin 0 auto
23 | padding 2rem 2.5rem
24 | > *:first-child
25 | margin-top $navbarHeight - 2rem
26 | a:hover
27 | text-decoration underline
28 | p.demo
29 | padding 1rem 1.5rem
30 | border 1px solid #ddd
31 | border-radius 4px
32 | img
33 | max-width 100%
34 |
35 | .content-header
36 | max-width $contentWidth
37 | margin 0 auto
38 | padding 0 2rem
39 |
40 | .content.custom, .content__default.custom
41 | padding 0
42 | margin 0
43 |
44 | a
45 | font-weight 500
46 | color $accentColor
47 | text-decoration none
48 |
49 | p a code
50 | font-weight 400
51 | color $accentColor
52 |
53 | kbd
54 | background #eee
55 | border solid 0.15rem #ddd
56 | border-bottom solid 0.25rem #ddd
57 | border-radius 0.15rem
58 | padding 0 0.15em
59 |
60 | blockquote
61 | font-size 1rem
62 | color #999
63 | border-left .25rem solid #dfe2e5
64 | margin-left 0
65 | padding-left 1rem
66 |
67 | ul, ol
68 | padding-left 1.2em
69 |
70 | strong
71 | font-weight 600
72 |
73 | h1, h2, h3, h4, h5, h6
74 | font-weight 600
75 | line-height 1.25
76 | .content:not(.custom) > &, .content__default:not(.custom) > &
77 | margin-top (0.5rem - $navbarHeight)
78 | padding-top ($navbarHeight + 1rem)
79 | margin-bottom 0
80 | &:first-child
81 | margin-top -3.5rem
82 | margin-bottom 1rem
83 | + p, + pre, + .custom-block
84 | margin-top 2rem
85 | &:hover .header-anchor
86 | opacity: 1
87 |
88 | h1
89 | font-size 2rem
90 |
91 | h2
92 | font-size 1.5rem
93 | padding-bottom .3rem
94 | border-bottom 1px solid $borderColor
95 |
96 | h3
97 | font-size 1.2rem
98 |
99 | a.header-anchor
100 | font-size 0.85em
101 | float left
102 | margin-left -0.87em
103 | padding-right 0.23em
104 | margin-top 0.125em
105 | opacity 0
106 | &:hover
107 | text-decoration none
108 |
109 | code, kbd
110 | font-family source-code-pro, Menlo, Monaco, Consolas, "Courier New", monospace
111 |
112 | p, ul, ol
113 | line-height 1.7
114 |
115 | hr
116 | border 0
117 | border-top 1px solid $borderColor
118 |
119 | table
120 | border-collapse collapse
121 | margin 1rem 0
122 |
123 | tr
124 | border-top 1px solid #dfe2e5
125 | &:nth-child(2n)
126 | background-color #f6f8fa
127 |
128 | th, td
129 | border 1px solid #dfe2e5
130 | padding .6em 1em
131 |
132 | @require './mobile.styl'
133 |
--------------------------------------------------------------------------------
/layouts/Page.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
8 |
9 |
10 |
11 | ←
12 | {{ prev.title || prev.path }}
13 |
14 |
15 | {{ next.title || next.path }}→
16 |
17 |
18 |
19 |
20 |
23 |
24 |
25 |
26 |
96 |
97 |
98 |
99 |
147 |
--------------------------------------------------------------------------------
/components/GithubCard.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
{{ name }}
9 |
14 |
15 |
16 |
17 |
18 |
81 |
82 |
83 |
84 |
--------------------------------------------------------------------------------
/animation/particleBoom.vue:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
9 |
10 |
140 |
--------------------------------------------------------------------------------
/layouts/Activity.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
![hero]()
6 |
{{ data.heroText }}
7 |
8 | {{ data.tagline }}
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
{{ feature.title }}
30 |
{{ feature.details }}
31 |
32 |
33 |
34 |
37 |
38 |
39 |
40 |
41 |
63 |
64 |
161 |
--------------------------------------------------------------------------------
/lib/util.js:
--------------------------------------------------------------------------------
1 | export const hashRE = /#.*$/
2 | export const indexRE = /(.+\/)index$/
3 | export const navLayoutRE = /(\/.+\/)(.*)$/g
4 | export const extRE = /\.(md|html)$/
5 | export const endingSlashRE = /\/$/
6 | export const outboundRE = /^(https?:|mailto:)/
7 |
8 | export function normalize (path) {
9 | return path
10 | .replace(hashRE, '')
11 | .replace(extRE, '')
12 | }
13 |
14 | export function getHash (path) {
15 | const match = path.match(hashRE)
16 | if (match) {
17 | return match[0]
18 | }
19 | }
20 |
21 | export function isExternal (path) {
22 | return outboundRE.test(path)
23 | }
24 |
25 | export function isMailto (path) {
26 | return /^mailto:/.test(path)
27 | }
28 |
29 | export function ensureExt (path) {
30 | if (isExternal(path)) {
31 | return path
32 | }
33 | const hashMatch = path.match(hashRE)
34 | const hash = hashMatch ? hashMatch[0] : ''
35 | const normalized = normalize(path)
36 |
37 | if (endingSlashRE.test(normalized)) {
38 | return path
39 | }
40 | return normalized + '.html' + hash
41 | }
42 |
43 | export function isActive (route, path) {
44 | const routeHash = route.hash
45 | const linkHash = getHash(path)
46 | if (linkHash && routeHash !== linkHash) {
47 | return false
48 | }
49 | const routePath = normalize(route.path)
50 | const pagePath = normalize(path)
51 | if (endingSlashRE.test(routePath) || endingSlashRE.test(pagePath)) {
52 | return routePath === pagePath
53 | } else {
54 | return routePath.indexOf(pagePath) === 0
55 | }
56 | }
57 |
58 | export function getTitle (siteTitle, page) {
59 | if(page.frontmatter.activity) {
60 | return page.frontmatter.title || siteTitle
61 | }
62 |
63 | return siteTitle
64 | }
65 |
66 | // /about/index ==> /about/
67 | export function navsLinksNormalize(link) {
68 | const re = link.match(indexRE)
69 | return re ? re[1] : link
70 | }
71 |
72 | export function resolvePage (pages, rawPath, base) {
73 | if (base) {
74 | rawPath = resolvePath(rawPath, base)
75 | }
76 | const path = normalize(rawPath)
77 | for (let i = 0; i < pages.length; i++) {
78 | if (normalize(pages[i].path) === path) {
79 | return Object.assign({}, pages[i], {
80 | type: 'page',
81 | path: ensureExt(rawPath)
82 | })
83 | }
84 | }
85 | console.error(`[vuepress] No matching page found for sidebar item "${rawPath}"`)
86 | return {}
87 | }
88 |
89 | function resolvePath (relative, base, append) {
90 | const firstChar = relative.charAt(0)
91 | if (firstChar === '/') {
92 | return relative
93 | }
94 |
95 | if (firstChar === '?' || firstChar === '#') {
96 | return base + relative
97 | }
98 |
99 | const stack = base.split('/')
100 |
101 | // remove trailing segment if:
102 | // - not appending
103 | // - appending to trailing slash (last segment is empty)
104 | if (!append || !stack[stack.length - 1]) {
105 | stack.pop()
106 | }
107 |
108 | // resolve relative path
109 | const segments = relative.replace(/^\//, '').split('/')
110 | for (let i = 0; i < segments.length; i++) {
111 | const segment = segments[i]
112 | if (segment === '..') {
113 | stack.pop()
114 | } else if (segment !== '.') {
115 | stack.push(segment)
116 | }
117 | }
118 |
119 | // ensure leading slash
120 | if (stack[0] !== '') {
121 | stack.unshift('')
122 | }
123 |
124 | return stack.join('/')
125 | }
126 |
127 | export function resolveNavLinkItem (linkItem) {
128 | return Object.assign(linkItem, {
129 | type: linkItem.items && linkItem.items.length ? 'links' : 'link'
130 | })
131 | }
132 |
133 | export function resolveMatchingConfig (route, config) {
134 | if (Array.isArray(config)) {
135 | return {
136 | base: '/',
137 | config: config
138 | }
139 | }
140 | for (const base in config) {
141 | if (ensureEndingSlash(route.path).indexOf(base) === 0) {
142 | return {
143 | base,
144 | config: config[base]
145 | }
146 | }
147 | }
148 | return {}
149 | }
150 |
151 | function ensureEndingSlash (path) {
152 | return /(\.html|\/)$/.test(path)
153 | ? path
154 | : path + '/'
155 | }
156 |
157 | Date.prototype.Format = function (fmt) {
158 | var o = {
159 | "y+": this.getFullYear(),
160 | "M+": this.getMonth() + 1, // month
161 | "d+": this.getDate(), // day
162 | "H+": this.getHours(), // hour
163 | "m+": this.getMinutes(), // Minute
164 | "s+": this.getSeconds(), // Seconds
165 | "q+": Math.floor((this.getMonth() + 3) / 3), // Quarter
166 | "S": this.getMilliseconds() // millisecond
167 | };
168 | if (!fmt) fmt = 'yyyy-MM-dd HH:mm:ss'
169 | if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length));
170 | for (var k in o)
171 | if (new RegExp("(" + k + ")").test(fmt)) {
172 | fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length)));
173 | }
174 | return fmt;
175 | }
--------------------------------------------------------------------------------
/components/SearchBox.vue:
--------------------------------------------------------------------------------
1 |
2 |
30 |
31 |
32 |
144 |
145 |
255 |
--------------------------------------------------------------------------------
/assets/404.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------