From d7a61781279b4facc08ecb5fa46bde6476e95146 Mon Sep 17 00:00:00 2001 From: reco_luan Date: Tue, 9 Apr 2019 11:26:40 +0800 Subject: [PATCH 01/21] =?UTF-8?q?=E6=B8=85=E7=A9=BA=E9=A1=B9=E7=9B=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Layout.vue | 153 -------------- NotFound.vue | 26 --- README.md | 149 ------------- README_zh.md | 147 ------------- components/AlgoliaSearchBox/index.vue | 156 -------------- components/Categories/index.vue | 84 -------- components/DropdownLink/index.vue | 180 ---------------- components/DropdownTransition/index.vue | 33 --- components/Home/index.vue | 188 ----------------- components/NavLink/index.vue | 49 ----- components/NavLinks/index.vue | 151 ------------- components/Navbar/index.vue | 149 ------------- components/NoteAbstract/index.vue | 89 -------- components/Pagation/index.vue | 145 ------------- components/Page/index.vue | 270 ------------------------ components/SWUpdatePopup/index.vue | 85 -------- components/SearchBox/index.vue | 239 --------------------- components/Sidebar/index.vue | 113 ---------- components/SidebarButton/index.vue | 28 --- components/SidebarGroup/index.vue | 78 ------- components/SidebarLink/index.vue | 91 -------- components/Tags/index.vue | 132 ------------ components/Valine/index.vue | 41 ---- images/search.svg | 1 - package.json | 21 -- styles/arrow.styl | 22 -- styles/code.styl | 129 ----------- styles/config.styl | 22 -- styles/custom-blocks.styl | 28 --- styles/mobile.styl | 37 ---- styles/nprogress.styl | 48 ----- styles/theme.styl | 191 ----------------- styles/toc.styl | 3 - styles/wrapper.styl | 9 - util/index.js | 216 ------------------- 35 files changed, 3503 deletions(-) delete mode 100644 Layout.vue delete mode 100644 NotFound.vue delete mode 100644 README.md delete mode 100644 README_zh.md delete mode 100644 components/AlgoliaSearchBox/index.vue delete mode 100644 components/Categories/index.vue delete mode 100644 components/DropdownLink/index.vue delete mode 100644 components/DropdownTransition/index.vue delete mode 100644 components/Home/index.vue delete mode 100644 components/NavLink/index.vue delete mode 100644 components/NavLinks/index.vue delete mode 100644 components/Navbar/index.vue delete mode 100644 components/NoteAbstract/index.vue delete mode 100644 components/Pagation/index.vue delete mode 100644 components/Page/index.vue delete mode 100644 components/SWUpdatePopup/index.vue delete mode 100644 components/SearchBox/index.vue delete mode 100644 components/Sidebar/index.vue delete mode 100644 components/SidebarButton/index.vue delete mode 100644 components/SidebarGroup/index.vue delete mode 100644 components/SidebarLink/index.vue delete mode 100644 components/Tags/index.vue delete mode 100644 components/Valine/index.vue delete mode 100644 images/search.svg delete mode 100644 package.json delete mode 100644 styles/arrow.styl delete mode 100644 styles/code.styl delete mode 100644 styles/config.styl delete mode 100644 styles/custom-blocks.styl delete mode 100644 styles/mobile.styl delete mode 100644 styles/nprogress.styl delete mode 100644 styles/theme.styl delete mode 100644 styles/toc.styl delete mode 100644 styles/wrapper.styl delete mode 100644 util/index.js diff --git a/Layout.vue b/Layout.vue deleted file mode 100644 index 1f1ea48..0000000 --- a/Layout.vue +++ /dev/null @@ -1,153 +0,0 @@ - - - - - - diff --git a/NotFound.vue b/NotFound.vue deleted file mode 100644 index 6aefe79..0000000 --- a/NotFound.vue +++ /dev/null @@ -1,26 +0,0 @@ - - - diff --git a/README.md b/README.md deleted file mode 100644 index 5b72e25..0000000 --- a/README.md +++ /dev/null @@ -1,149 +0,0 @@ -# vuepress-theme-reco - -[中文文档](./README_zh.md) - -> 1.This is a vuepress theme aimed at adding the categories, TAB walls, pagination, comments and other features required for blogging;
-> 2.The theme itself is minimalist and is modified based on the default theme of the vuepress. - -## Installation and use - -1. Install - - ```bash - npm install vuepress-theme-reco -dev--save - - # or - - yarn add vuepress-theme-reco - ``` -2. Use - - ```javscript - // 修改 /docs/.vuepress/config.js - - module.exports = { - theme: 'reco' - } - ``` -## Add categories - -**If want to add a `front-end` and `back-end` classification, need to undertake the following steps:** - -1. Add a category drop button to the top navigation - - ```javscript - // change /docs/.vuepress/config.js - - module.exports = { - theme: 'reco', - themeConfig: { - nav: [ - { text: 'categories', - items: [ - { text: 'frontEnd', link: '/categories/frontEnd' }, - { text: 'backEnd', link: '/categories/backEnd' } - ] - } - ] - } - } - ``` - -2. Add the files needed for classification - - **`/docs/categories/frontEnd.md`** - - ``` - --- - title: frontEnd - isCategories: true - sidebar: false - --- - - ## frontEnd - ``` - - **`/docs/categories/backEnd.md`** - - ``` - --- - title: backEnd - isCategories: true - sidebar: false - --- - - ## backEnd - ``` - - > Why do you set sidebar false? Because you enable classification, that's a little bit of a conflict with the custom sidebar feature, so you globally turn on the auto sidebar feature, and then close it where you don't need a side marker - -3. Add categories when writing articles - - ``` - --- - title: 【vue】跨域解决方案之proxyTable - date: 2017-12-28 23:39:45 - categories: frontEnd - --- - ``` - -## Add tag cloud - -1. Add a button to the top navigation - - ```javscript - // change /docs/.vuepress/config.js - - module.exports = { - theme: 'reco', - themeConfig: { - nav: [ - { text: 'Tags', link: '/tags/' } - ] - } - } - ``` - -2. Add the required files - - **`/docs/tags/README.md`** - - ``` - --- - isTags: true - sidebar: false - --- - - ## tag cloud - ``` - -3. Add tags when writing articles - - ``` - --- - title: 【vue】跨域解决方案之proxyTable - date: 2017-12-28 23:39:45 - tags: - - vue - - webpack - --- - ``` - -## Comment(valine) - -Theme with a built-in valine comments, if you want to open this function, only configure your `config.js` - -```javscript -// change /docs/.vuepress/config.js - -module.exports = { - theme: 'reco', - themeConfig: { - // valine - valineConfig: { - appId: '...',// your appId - appKey: '...', // your appKey - } - } -} -``` \ No newline at end of file diff --git a/README_zh.md b/README_zh.md deleted file mode 100644 index 0835763..0000000 --- a/README_zh.md +++ /dev/null @@ -1,147 +0,0 @@ -# vuepress-theme-reco - -> 1.这是一个vuepress主题,目的是增加博客所需要的分类、标签墙、分页、评论等功能;
-> 2.主题本身追求极简,是在vuepress默认主题的基础上进行修改的。 - -## 安装和使用 - -1. 安装 - - ```bash - npm install vuepress-theme-reco -dev--save - - # 或 - - yarn add vuepress-theme-reco - ``` -2. 使用 - - ```javscript - // 修改 /docs/.vuepress/config.js - - module.exports = { - theme: 'reco' - } - ``` -## 增加分类功能 - -**假如想增加一个 `前端` 和 `后端` 分类,需要进行以下几步操作:** - -1. 在顶部导航添加一个分类的下拉按钮 - - ```javscript - // 修改 /docs/.vuepress/config.js - - module.exports = { - theme: 'reco', - themeConfig: { - nav: [ - { text: '分类', - items: [ - { text: '前端', link: '/categories/frontEnd' }, - { text: '后端', link: '/categories/backEnd' } - ] - } - ] - } - } - ``` - -2. 添加前端和后端的分类所需要的文件 - - **`/docs/categories/frontEnd.md`** - - ``` - --- - title: 前端 - isCategories: true - sidebar: false - --- - - ## 前端 - ``` - - **`/docs/categories/backEnd.md`** - - ``` - --- - title: 后端 - isCategories: true - sidebar: false - --- - - ## 后端 - ``` - - > 为什么设置sidebar: false,因为启用分类功能,那就跟自定义侧边栏功能有些冲突了,所以全局开启了自动生成侧边栏功能,然后在这种不需要侧标兰的地方关闭 - -3. 写文章时添加分类 - - ``` - --- - title: 【vue】跨域解决方案之proxyTable - date: 2017-12-28 23:39:45 - categories: frontEnd - --- - ``` - -## 添加标签云功能 - -1. 在顶部导航添加一个按钮 - - ```javscript - // 修改 /docs/.vuepress/config.js - - module.exports = { - theme: 'reco', - themeConfig: { - nav: [ - { text: 'Tags', link: '/tags/' } - ] - } - } - ``` - -2. 添加所需要的文件 - - **`/docs/tags/README.md`** - - ``` - --- - isTags: true - sidebar: false - --- - - ## 标签墙 - ``` - -3. 写文章时添加标签 - - ``` - --- - title: 【vue】跨域解决方案之proxyTable - date: 2017-12-28 23:39:45 - tags: - - vue - - webpack - --- - ``` - -## 评论功能(valine) - -主题内置valine评论功能,如果想开启此功能,仅需配置一下 `config.js` - -```javscript -// 修改 /docs/.vuepress/config.js - -module.exports = { - theme: 'reco', - themeConfig: { - // valine配置 - valineConfig: { - appId: '...',// your appId - appKey: '...', // your appKey - } - } -} -``` \ No newline at end of file diff --git a/components/AlgoliaSearchBox/index.vue b/components/AlgoliaSearchBox/index.vue deleted file mode 100644 index 7f5d098..0000000 --- a/components/AlgoliaSearchBox/index.vue +++ /dev/null @@ -1,156 +0,0 @@ - - - - - diff --git a/components/Categories/index.vue b/components/Categories/index.vue deleted file mode 100644 index 8264cfd..0000000 --- a/components/Categories/index.vue +++ /dev/null @@ -1,84 +0,0 @@ - - - - - diff --git a/components/DropdownLink/index.vue b/components/DropdownLink/index.vue deleted file mode 100644 index 5091730..0000000 --- a/components/DropdownLink/index.vue +++ /dev/null @@ -1,180 +0,0 @@ - - - - - diff --git a/components/DropdownTransition/index.vue b/components/DropdownTransition/index.vue deleted file mode 100644 index 8c711a1..0000000 --- a/components/DropdownTransition/index.vue +++ /dev/null @@ -1,33 +0,0 @@ - - - - - diff --git a/components/Home/index.vue b/components/Home/index.vue deleted file mode 100644 index 4cc1246..0000000 --- a/components/Home/index.vue +++ /dev/null @@ -1,188 +0,0 @@ - - - - - diff --git a/components/NavLink/index.vue b/components/NavLink/index.vue deleted file mode 100644 index c95ee02..0000000 --- a/components/NavLink/index.vue +++ /dev/null @@ -1,49 +0,0 @@ - - - diff --git a/components/NavLinks/index.vue b/components/NavLinks/index.vue deleted file mode 100644 index 2657b80..0000000 --- a/components/NavLinks/index.vue +++ /dev/null @@ -1,151 +0,0 @@ - - - - - diff --git a/components/Navbar/index.vue b/components/Navbar/index.vue deleted file mode 100644 index 6a1ed30..0000000 --- a/components/Navbar/index.vue +++ /dev/null @@ -1,149 +0,0 @@ - - - - - diff --git a/components/NoteAbstract/index.vue b/components/NoteAbstract/index.vue deleted file mode 100644 index 04fc020..0000000 --- a/components/NoteAbstract/index.vue +++ /dev/null @@ -1,89 +0,0 @@ - - - - - diff --git a/components/Pagation/index.vue b/components/Pagation/index.vue deleted file mode 100644 index 0c43362..0000000 --- a/components/Pagation/index.vue +++ /dev/null @@ -1,145 +0,0 @@ - - - - - \ No newline at end of file diff --git a/components/Page/index.vue b/components/Page/index.vue deleted file mode 100644 index 5e90749..0000000 --- a/components/Page/index.vue +++ /dev/null @@ -1,270 +0,0 @@ - - - - - diff --git a/components/SWUpdatePopup/index.vue b/components/SWUpdatePopup/index.vue deleted file mode 100644 index 711f8a5..0000000 --- a/components/SWUpdatePopup/index.vue +++ /dev/null @@ -1,85 +0,0 @@ - - - - - diff --git a/components/SearchBox/index.vue b/components/SearchBox/index.vue deleted file mode 100644 index 2c1f9d6..0000000 --- a/components/SearchBox/index.vue +++ /dev/null @@ -1,239 +0,0 @@ - - - - - diff --git a/components/Sidebar/index.vue b/components/Sidebar/index.vue deleted file mode 100644 index 8b1bbd8..0000000 --- a/components/Sidebar/index.vue +++ /dev/null @@ -1,113 +0,0 @@ - - - - - diff --git a/components/SidebarButton/index.vue b/components/SidebarButton/index.vue deleted file mode 100644 index f7fc633..0000000 --- a/components/SidebarButton/index.vue +++ /dev/null @@ -1,28 +0,0 @@ - - - diff --git a/components/SidebarGroup/index.vue b/components/SidebarGroup/index.vue deleted file mode 100644 index 1ff7cd4..0000000 --- a/components/SidebarGroup/index.vue +++ /dev/null @@ -1,78 +0,0 @@ - - - - - diff --git a/components/SidebarLink/index.vue b/components/SidebarLink/index.vue deleted file mode 100644 index 00a41f0..0000000 --- a/components/SidebarLink/index.vue +++ /dev/null @@ -1,91 +0,0 @@ - - - diff --git a/components/Tags/index.vue b/components/Tags/index.vue deleted file mode 100644 index 0c770cb..0000000 --- a/components/Tags/index.vue +++ /dev/null @@ -1,132 +0,0 @@ - - - - - diff --git a/components/Valine/index.vue b/components/Valine/index.vue deleted file mode 100644 index 653728c..0000000 --- a/components/Valine/index.vue +++ /dev/null @@ -1,41 +0,0 @@ - - - - - \ No newline at end of file diff --git a/images/search.svg b/images/search.svg deleted file mode 100644 index 03d8391..0000000 --- a/images/search.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/package.json b/package.json deleted file mode 100644 index c458e25..0000000 --- a/package.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "name": "vuepress-theme-reco", - "version": "0.0.4", - "description": "this is a vuepress theme", - "main": "index.js", - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/recoluan/vuepress-theme-reco.git" - }, - "author": "reco_luan", - "license": "ISC", - "bugs": { - "url": "https://github.com/recoluan/vuepress-theme-reco/issues" - }, - "homepage": "https://github.com/recoluan/vuepress-theme-reco#readme", - "_from": "vuepress-theme-reco@0.0.3", - "_resolved": "http://registry.npm.taobao.org/vuepress-theme-reco/download/vuepress-theme-reco-0.0.3.tgz" -} \ No newline at end of file diff --git a/styles/arrow.styl b/styles/arrow.styl deleted file mode 100644 index 20bffc0..0000000 --- a/styles/arrow.styl +++ /dev/null @@ -1,22 +0,0 @@ -@require './config' - -.arrow - display inline-block - width 0 - height 0 - &.up - border-left 4px solid transparent - border-right 4px solid transparent - border-bottom 6px solid $arrowBgColor - &.down - border-left 4px solid transparent - border-right 4px solid transparent - border-top 6px solid $arrowBgColor - &.right - border-top 4px solid transparent - border-bottom 4px solid transparent - border-left 6px solid $arrowBgColor - &.left - border-top 4px solid transparent - border-bottom 4px solid transparent - border-right 6px solid $arrowBgColor diff --git a/styles/code.styl b/styles/code.styl deleted file mode 100644 index 8383c6e..0000000 --- a/styles/code.styl +++ /dev/null @@ -1,129 +0,0 @@ -@require './config' - -.content - code - color lighten($textColor, 20%) - padding 0.25rem 0.5rem - margin 0 - font-size 0.85em - background-color rgba(27,31,35,0.05) - border-radius 3px - -.content - pre, pre[class*="language-"] - line-height 1.4 - padding 1.25rem 1.5rem - margin 0.85rem 0 - background-color $codeBgColor - border-radius 6px - overflow auto - code - color #fff - padding 0 - background-color transparent - border-radius 0 - -div[class*="language-"] - position relative - background-color $codeBgColor - border-radius 6px - .highlight-lines - user-select none - padding-top 1.3rem - position absolute - top 0 - left 0 - width 100% - line-height 1.4 - .highlighted - background-color rgba(0, 0, 0, 66%) - pre, pre[class*="language-"] - background transparent - position relative - z-index 1 - &::before - position absolute - z-index 3 - top 0.8em - right 1em - font-size 0.75rem - color rgba(255, 255, 255, 0.4) - &:not(.line-numbers-mode) - .line-numbers-wrapper - display none - &.line-numbers-mode - .highlight-lines .highlighted - position relative - &:before - content ' ' - position absolute - z-index 3 - left 0 - top 0 - display block - width $lineNumbersWrapperWidth - height 100% - background-color rgba(0, 0, 0, 66%) - pre - padding-left $lineNumbersWrapperWidth + 1 rem - vertical-align middle - .line-numbers-wrapper - position absolute - top 0 - width $lineNumbersWrapperWidth - text-align center - color rgba(255, 255, 255, 0.3) - padding 1.25rem 0 - line-height 1.4 - br - user-select none - .line-number - position relative - z-index 4 - user-select none - font-size 0.85em - &::after - content '' - position absolute - z-index 2 - top 0 - left 0 - width $lineNumbersWrapperWidth - height 100% - border-radius 6px 0 0 6px - border-right 1px solid rgba(0, 0, 0, 66%) - background-color $codeBgColor - - -for lang in $codeLang - div{'[class~="language-' + lang + '"]'} - &:before - content ('' + lang) - -div[class~="language-javascript"] - &:before - content "js" - -div[class~="language-typescript"] - &:before - content "ts" - -div[class~="language-markup"] - &:before - content "html" - -div[class~="language-markdown"] - &:before - content "md" - -div[class~="language-json"]:before - content "json" - -div[class~="language-ruby"]:before - content "rb" - -div[class~="language-python"]:before - content "py" - -div[class~="language-bash"]:before - content "sh" diff --git a/styles/config.styl b/styles/config.styl deleted file mode 100644 index a57d448..0000000 --- a/styles/config.styl +++ /dev/null @@ -1,22 +0,0 @@ -// colors -$accentColor = #3eaf7c -$textColor = #2c3e50 -$borderColor = #eaecef -$codeBgColor = #282c34 -$arrowBgColor = #ccc - -// layout -$navbarHeight = 3.6rem -$sidebarWidth = 20rem -$contentWidth = 740px - -// responsive breakpoints -$MQNarrow = 959px -$MQMobile = 719px -$MQMobileNarrow = 419px - -// code -$lineNumbersWrapperWidth = 3.5rem -$codeLang = js ts html md vue css sass scss less stylus go java c sh yaml py - -@import '~@temp/override.styl' diff --git a/styles/custom-blocks.styl b/styles/custom-blocks.styl deleted file mode 100644 index 3ccc2df..0000000 --- a/styles/custom-blocks.styl +++ /dev/null @@ -1,28 +0,0 @@ -.custom-block - .custom-block-title - font-weight 600 - margin-bottom -0.4rem - &.tip, &.warning, &.danger - padding .1rem 1.5rem - border-left-width .5rem - border-left-style solid - margin 1rem 0 - &.tip - background-color #f3f5f7 - border-color #42b983 - &.warning - background-color rgba(255,229,100,.3) - border-color darken(#ffe564, 35%) - color darken(#ffe564, 70%) - .custom-block-title - color darken(#ffe564, 50%) - a - color $textColor - &.danger - background-color #ffe6e6 - border-color darken(red, 20%) - color darken(red, 70%) - .custom-block-title - color darken(red, 40%) - a - color $textColor diff --git a/styles/mobile.styl b/styles/mobile.styl deleted file mode 100644 index b35e59c..0000000 --- a/styles/mobile.styl +++ /dev/null @@ -1,37 +0,0 @@ -@require './config' - -$mobileSidebarWidth = $sidebarWidth * 0.82 - -// narrow desktop / iPad -@media (max-width: $MQNarrow) - .sidebar - font-size 15px - width $mobileSidebarWidth - .page - padding-left $mobileSidebarWidth - -// wide mobile -@media (max-width: $MQMobile) - .sidebar - top 0 - padding-top $navbarHeight - transform translateX(-100%) - transition transform .2s ease - .page - padding-left 0 - .theme-container - &.sidebar-open - .sidebar - transform translateX(0) - &.no-navbar - .sidebar - padding-top: 0 - -// narrow mobile -@media (max-width: $MQMobileNarrow) - h1 - font-size 1.9rem - .content - div[class*="language-"] - margin 0.85rem -1.5rem - border-radius 0 diff --git a/styles/nprogress.styl b/styles/nprogress.styl deleted file mode 100644 index f186a67..0000000 --- a/styles/nprogress.styl +++ /dev/null @@ -1,48 +0,0 @@ -#nprogress - pointer-events none - .bar - background $accentColor - position fixed - z-index 1031 - top 0 - left 0 - width 100% - height 2px - .peg - display block - position absolute - right 0px - width 100px - height 100% - box-shadow 0 0 10px $accentColor, 0 0 5px $accentColor - opacity 1.0 - transform rotate(3deg) translate(0px, -4px) - .spinner - display block - position fixed - z-index 1031 - top 15px - right 15px - .spinner-icon - width 18px - height 18px - box-sizing border-box - border solid 2px transparent - border-top-color $accentColor - border-left-color $accentColor - border-radius 50% - animation nprogress-spinner 400ms linear infinite - -.nprogress-custom-parent - overflow hidden - position relative - -.nprogress-custom-parent #nprogress .spinner, -.nprogress-custom-parent #nprogress .bar - position absolute - -@keyframes nprogress-spinner - 0% - transform rotate(0deg) - 100% - transform rotate(360deg) diff --git a/styles/theme.styl b/styles/theme.styl deleted file mode 100644 index bd79050..0000000 --- a/styles/theme.styl +++ /dev/null @@ -1,191 +0,0 @@ -@require './config' -@require './nprogress' -@require './code' -@require './custom-blocks' -@require './arrow' -@require './wrapper' -@require './toc' - -html, body - padding 0 - margin 0 - -body - font-family -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif - -webkit-font-smoothing antialiased - -moz-osx-font-smoothing grayscale - font-size 16px - color $textColor - -.page - padding-left $sidebarWidth - -.navbar - position fixed - z-index 20 - top 0 - left 0 - right 0 - height $navbarHeight - background-color #fff - box-sizing border-box - box-shadow: 0 1px 6px 0 rgba(32,33,36,0.28) - -.sidebar-mask - position fixed - z-index 9 - top 0 - left 0 - width 100vw - height 100vh - display none - background-color: rgba(0, 0, 0, .7) - -.sidebar - font-size 15px - background-color #fff - width $sidebarWidth - position fixed - z-index 10 - margin 0 - top $navbarHeight - left 0 - bottom 0 - box-sizing border-box - border-right 1px solid $borderColor - overflow-y auto - -.content:not(.custom) - @extend $wrapper - > *:first-child - margin-top $navbarHeight - a:hover - text-decoration underline - p.demo - padding 1rem 1.5rem - border 1px solid #ddd - border-radius 4px - img - max-width 100% - -.content.custom - padding 0 - margin 0 - img - max-width 100% - -a - font-weight 500 - color $accentColor - text-decoration none - -p a code - font-weight 400 - color $accentColor - -kbd - background #eee - border solid 0.15rem #ddd - border-bottom solid 0.25rem #ddd - border-radius 0.15rem - padding 0 0.15em - -blockquote - font-size 1rem - color #999 - border-left .25rem solid #dfe2e5 - margin-left 0 - padding-left 1rem - -ul, ol - padding-left 1.2em - -strong - font-weight 600 - -h1, h2, h3, h4, h5, h6 - font-weight 600 - line-height 1.25 - .content:not(.custom) > & - margin-top (0.5rem - $navbarHeight) - padding-top ($navbarHeight + 1rem) - margin-bottom 0 - &:first-child - margin-top -1.5rem - margin-bottom 1rem - + p, + pre, + .custom-block - margin-top 2rem - &:hover .header-anchor - opacity: 1 - -h1 - font-size 2.2rem - -h2 - font-size 1.65rem - padding-bottom .3rem - border-bottom 1px solid $borderColor - -h3 - font-size 1.35rem - -a.header-anchor - font-size 0.85em - float left - margin-left -0.87em - padding-right 0.23em - margin-top 0.125em - opacity 0 - &:hover - text-decoration none - -code, kbd, .line-number - font-family source-code-pro, Menlo, Monaco, Consolas, "Courier New", monospace - -p, ul, ol - line-height 1.7 - -hr - border 0 - border-top 1px solid $borderColor - -table - border-collapse collapse - margin 1rem 0 - display: block - overflow-x: auto - -tr - border-top 1px solid #dfe2e5 - &:nth-child(2n) - background-color #f6f8fa - -th, td - border 1px solid #dfe2e5 - padding .6em 1em - -.custom-layout - padding-top $navbarHeight - -.theme-container - &.sidebar-open - .sidebar-mask - display: block - &.no-navbar - .content:not(.custom) > h1, h2, h3, h4, h5, h6 - margin-top 1.5rem - padding-top 0 - .sidebar - top 0 - .custom-layout - padding-top 0 - - -@media (min-width: ($MQMobile + 1px)) - .theme-container.no-sidebar - .sidebar - display none - .page - padding-left 0 - -@require './mobile.styl' diff --git a/styles/toc.styl b/styles/toc.styl deleted file mode 100644 index d3e7106..0000000 --- a/styles/toc.styl +++ /dev/null @@ -1,3 +0,0 @@ -.table-of-contents - .badge - vertical-align middle diff --git a/styles/wrapper.styl b/styles/wrapper.styl deleted file mode 100644 index a99262c..0000000 --- a/styles/wrapper.styl +++ /dev/null @@ -1,9 +0,0 @@ -$wrapper - max-width $contentWidth - margin 0 auto - padding 2rem 2.5rem - @media (max-width: $MQNarrow) - padding 2rem - @media (max-width: $MQMobileNarrow) - padding 1.5rem - diff --git a/util/index.js b/util/index.js deleted file mode 100644 index ef95bea..0000000 --- a/util/index.js +++ /dev/null @@ -1,216 +0,0 @@ -export const hashRE = /#.*$/ -export const extRE = /\.(md|html)$/ -export const endingSlashRE = /\/$/ -export const outboundRE = /^(https?:|mailto:|tel:)/ - -export function normalize (path) { - return decodeURI(path) - .replace(hashRE, '') - .replace(extRE, '') -} - -export function getHash (path) { - const match = path.match(hashRE) - if (match) { - return match[0] - } -} - -export function isExternal (path) { - return outboundRE.test(path) -} - -export function isMailto (path) { - return /^mailto:/.test(path) -} - -export function isTel (path) { - return /^tel:/.test(path) -} - -export function ensureExt (path) { - if (isExternal(path)) { - return path - } - const hashMatch = path.match(hashRE) - const hash = hashMatch ? hashMatch[0] : '' - const normalized = normalize(path) - - if (endingSlashRE.test(normalized)) { - return path - } - return normalized + '.html' + hash -} - -export function isActive (route, path) { - const routeHash = route.hash - const linkHash = getHash(path) - if (linkHash && routeHash !== linkHash) { - return false - } - const routePath = normalize(route.path) - const pagePath = normalize(path) - return routePath === pagePath -} - -export function resolvePage (pages, rawPath, base) { - if (base) { - rawPath = resolvePath(rawPath, base) - } - const path = normalize(rawPath) - for (let i = 0; i < pages.length; i++) { - if (normalize(pages[i].path) === path) { - return Object.assign({}, pages[i], { - type: 'page', - path: ensureExt(rawPath) - }) - } - } - console.error(`[vuepress] No matching page found for sidebar item "${rawPath}"`) - return {} -} - -function resolvePath (relative, base, append) { - const firstChar = relative.charAt(0) - if (firstChar === '/') { - return relative - } - - if (firstChar === '?' || firstChar === '#') { - return base + relative - } - - const stack = base.split('/') - - // remove trailing segment if: - // - not appending - // - appending to trailing slash (last segment is empty) - if (!append || !stack[stack.length - 1]) { - stack.pop() - } - - // resolve relative path - const segments = relative.replace(/^\//, '').split('/') - for (let i = 0; i < segments.length; i++) { - const segment = segments[i] - if (segment === '..') { - stack.pop() - } else if (segment !== '.') { - stack.push(segment) - } - } - - // ensure leading slash - if (stack[0] !== '') { - stack.unshift('') - } - - return stack.join('/') -} - -export function resolveSidebarItems (page, route, site, localePath) { - const { pages, themeConfig } = site - - const localeConfig = localePath && themeConfig.locales - ? themeConfig.locales[localePath] || themeConfig - : themeConfig - - const pageSidebarConfig = page.frontmatter.sidebar || localeConfig.sidebar || themeConfig.sidebar - if (pageSidebarConfig === 'auto') { - return resolveHeaders(page) - } - - const sidebarConfig = localeConfig.sidebar || themeConfig.sidebar - if (!sidebarConfig) { - return [] - } else { - const { base, config } = resolveMatchingConfig(route, sidebarConfig) - return config - ? config.map(item => resolveItem(item, pages, base)) - : [] - } -} - -function resolveHeaders (page) { - const headers = groupHeaders(page.headers || []) - return [{ - type: 'group', - collapsable: false, - title: page.title, - children: headers.map(h => ({ - type: 'auto', - title: h.title, - basePath: page.path, - path: page.path + '#' + h.slug, - children: h.children || [] - })) - }] -} - -export function groupHeaders (headers) { - // group h3s under h2 - headers = headers.map(h => Object.assign({}, h)) - let lastH2 - headers.forEach(h => { - if (h.level === 2) { - lastH2 = h - } else if (lastH2) { - (lastH2.children || (lastH2.children = [])).push(h) - } - }) - return headers.filter(h => h.level === 2) -} - -export function resolveNavLinkItem (linkItem) { - return Object.assign(linkItem, { - type: linkItem.items && linkItem.items.length ? 'links' : 'link' - }) -} - -export function resolveMatchingConfig (route, config) { - if (Array.isArray(config)) { - return { - base: '/', - config: config - } - } - for (const base in config) { - if (ensureEndingSlash(route.path).indexOf(base) === 0) { - return { - base, - config: config[base] - } - } - } - return {} -} - -function ensureEndingSlash (path) { - return /(\.html|\/)$/.test(path) - ? path - : path + '/' -} - -function resolveItem (item, pages, base, isNested) { - if (typeof item === 'string') { - return resolvePage(pages, item, base) - } else if (Array.isArray(item)) { - return Object.assign(resolvePage(pages, item[0], base), { - title: item[1] - }) - } else { - if (isNested) { - console.error( - '[vuepress] Nested sidebar groups are not supported. ' + - 'Consider using navbar + categories instead.' - ) - } - const children = item.children || [] - return { - type: 'group', - title: item.title, - children: children.map(child => resolveItem(child, pages, base, true)), - collapsable: item.collapsable !== false - } - } -} From a1646763b6580028bcf7082f9713cd82fa13b76e Mon Sep 17 00:00:00 2001 From: reco_luan Date: Tue, 9 Apr 2019 11:56:58 +0800 Subject: [PATCH 02/21] =?UTF-8?q?vuepress-theme-reco@1.x=E5=BC=80=E5=A7=8B?= =?UTF-8?q?=E5=85=AC=E6=B5=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- LICENSE | 21 +++ README.md | 276 ++++++++++++++++++++++++++++ components/AlgoliaSearchBox.vue | 155 ++++++++++++++++ components/Background.vue | 118 ++++++++++++ components/Common.vue | 142 +++++++++++++++ components/DropdownLink.vue | 181 ++++++++++++++++++ components/DropdownTransition.vue | 33 ++++ components/Home.vue | 220 ++++++++++++++++++++++ components/NavLink.vue | 52 ++++++ components/NavLinks.vue | 181 ++++++++++++++++++ components/Navbar.vue | 123 +++++++++++++ components/NoteAbstract.vue | 84 +++++++++ components/Pagation.vue | 157 ++++++++++++++++ components/Page.vue | 265 +++++++++++++++++++++++++++ components/PageInfo.vue | 68 +++++++ components/Password.vue | 283 +++++++++++++++++++++++++++++ components/Sidebar.vue | 59 ++++++ components/SidebarButton.vue | 27 +++ components/SidebarGroup.vue | 129 +++++++++++++ components/SidebarLink.vue | 109 +++++++++++ components/SidebarLinks.vue | 86 +++++++++ components/TimeLine.vue | 189 +++++++++++++++++++ components/Valine/AccessNumber.vue | 18 ++ components/Valine/index.vue | 83 +++++++++ fonts/iconfont.css | 105 +++++++++++ fonts/iconfont.eot | Bin 0 -> 6168 bytes fonts/iconfont.svg | 92 ++++++++++ fonts/iconfont.ttf | Bin 0 -> 6000 bytes fonts/iconfont.woff | Bin 0 -> 4132 bytes fonts/iconfont.woff2 | Bin 0 -> 3380 bytes global-components/Badge.vue | 44 +++++ index.js | 46 +++++ layouts/404.vue | 28 +++ layouts/Category.vue | 93 ++++++++++ layouts/Layout.vue | 42 +++++ layouts/Tags.vue | 128 +++++++++++++ noopModule.js | 1 + package.json | 31 ++++ styles/arrow.styl | 22 +++ styles/code.styl | 135 ++++++++++++++ styles/custom-blocks.styl | 30 +++ styles/mobile.styl | 37 ++++ styles/theme.styl | 214 ++++++++++++++++++++++ styles/toc.styl | 3 + styles/wrapper.styl | 9 + util/index.js | 239 ++++++++++++++++++++++++ 46 files changed, 4358 insertions(+) create mode 100644 LICENSE create mode 100644 README.md create mode 100644 components/AlgoliaSearchBox.vue create mode 100644 components/Background.vue create mode 100644 components/Common.vue create mode 100644 components/DropdownLink.vue create mode 100644 components/DropdownTransition.vue create mode 100644 components/Home.vue create mode 100644 components/NavLink.vue create mode 100644 components/NavLinks.vue create mode 100644 components/Navbar.vue create mode 100644 components/NoteAbstract.vue create mode 100644 components/Pagation.vue create mode 100644 components/Page.vue create mode 100644 components/PageInfo.vue create mode 100644 components/Password.vue create mode 100644 components/Sidebar.vue create mode 100644 components/SidebarButton.vue create mode 100644 components/SidebarGroup.vue create mode 100644 components/SidebarLink.vue create mode 100644 components/SidebarLinks.vue create mode 100644 components/TimeLine.vue create mode 100644 components/Valine/AccessNumber.vue create mode 100644 components/Valine/index.vue create mode 100644 fonts/iconfont.css create mode 100644 fonts/iconfont.eot create mode 100644 fonts/iconfont.svg create mode 100644 fonts/iconfont.ttf create mode 100644 fonts/iconfont.woff create mode 100644 fonts/iconfont.woff2 create mode 100644 global-components/Badge.vue create mode 100644 index.js create mode 100644 layouts/404.vue create mode 100644 layouts/Category.vue create mode 100644 layouts/Layout.vue create mode 100644 layouts/Tags.vue create mode 100644 noopModule.js create mode 100644 package.json create mode 100644 styles/arrow.styl create mode 100644 styles/code.styl create mode 100644 styles/custom-blocks.styl create mode 100644 styles/mobile.styl create mode 100644 styles/theme.styl create mode 100644 styles/toc.styl create mode 100644 styles/wrapper.styl create mode 100644 util/index.js diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..84b7cce --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2019 reco_luan + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 0000000..2fc0803 --- /dev/null +++ b/README.md @@ -0,0 +1,276 @@ +# vuepress-theme-reco + +![vuepress](https://img.shields.io/badge/vuepress-0.14.8-brightgreen.svg) +![leancloud-storage](https://img.shields.io/badge/leancloud--storage-3.10.1-orange.svg) +![valine](https://img.shields.io/badge/valine-1.3.4-blue.svg) + +> 1. 这是一个vuepress主题,旨在添加博客所需的类别,TAB墙,分页,评论和其他功能,适合 `vuepress 1.x`;
+> 2. 主题本身是极简主义的,并根据vuepress的默认主题进行修改;
+> 3. 你可以打开 http://recoluan.gitlab.io 来查看它。 + +## 预览 + +### 首页 +![home.png](https://upload-images.jianshu.io/upload_images/4660406-0bf9d91e9d289f75.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) + + +### 分类页面 +![category.png](https://upload-images.jianshu.io/upload_images/4660406-8c7995d750c58536.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) + + +### 标签页 +![tag.png](https://upload-images.jianshu.io/upload_images/4660406-39c0d47627869e3a.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) + + +### 文章页面 +![article.png](https://upload-images.jianshu.io/upload_images/4660406-a19cad487991409d.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) + +### 加密登录页 + +![password.png](https://upload-images.jianshu.io/upload_images/4660406-7d38dc78c16b7d48.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) + +### 时间轴 + +![timeline.png](https://upload-images.jianshu.io/upload_images/4660406-1dc5a5fe6c03952e.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) + +### 移动端 +![m.png](https://upload-images.jianshu.io/upload_images/4660406-7e2c78c48dd78284.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) + +## 安装和使用 + +1. 安装 + + ```bash + npm install vuepress-theme-reco@next -dev--save + + # or + + yarn add vuepress-theme-reco@next + ``` + +2. 使用 + + ```javscript + // 修改 /docs/.vuepress/config.js + + module.exports = { + theme: 'reco' + } + ``` + +## 添加分类和标签云 + +**如果要添加 `front-end` 分类 和 标签云,需要进行以下步骤:** + +1. 在顶部导航中添加类别下拉按钮 + + ```javscript + // 修改 /docs/.vuepress/config.js + + module.exports = { + theme: 'reco', + themeConfig: { + // 博客设置 + blogConfig: { + category: { + location: 2, // 在导航栏菜单中所占的位置,默认2 + text: 'Category' // 默认 “分类” + }, + tag: { + location: 3, // 在导航栏菜单中所占的位置,默认3 + text: 'Tag' // 默认 “标签” + } + } + } + } + ``` + +2. 撰写文章时添加类别 + + ``` + --- + title: 【vue】跨域解决方案之proxyTable + date: 2017-12-28 + categories: + - frontEnd + tags: + - vue + --- + ``` + + > 请注意, `categories` 和 `categories` 要以数组的方式填写。 + +## 添加时间轴 + +1. 在顶部导航中添加一个按钮 + + ```javscript + // change /docs/.vuepress/config.js + + module.exports = { + theme: 'reco', + themeConfig: { + nav: [ + { text: 'TimeLine', link: '/timeLine/', icon: 'reco-date' } + ] + } + } + ``` + +2. 添加所需的文件 + + **`/docs/timeLine/README.md`** + + ``` + --- + isTimeLine: true + sidebar: false + isComment: false + --- + + ## Time Line + ``` + +3. 在撰写文章时添加日期 + + ``` + --- + title: 【vue】跨域解决方案之proxyTable + date: 2017-12-28 + --- + ``` + + > 请注意,本主题所有的时间都是以 `date` 为标准,不会以最后更新时间为标准。 + +## 添加摘要 + +效果: + +![2.png](https://upload-images.jianshu.io/upload_images/4660406-a15ae55c1e77bef1.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) + +相应的markdown: + +![1.png](https://upload-images.jianshu.io/upload_images/4660406-54a9168672d45d1d.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) + +在markdown代码中,您将看到注释,注释前面的代码将显示在列表页面上的文章摘要中。 + +## 评论(valine) + +带有内置了valine评论功能,如果要打开此功能,只需配置你的 `config.js` + +```javscript +// 更改 /docs/.vuepress/config.js + +module.exports = { + theme: 'reco', + themeConfig: { + // valine + valineConfig: { + appId: '...',// your appId + appKey: '...', // your appKey + } + } +} +``` + +## 加入加密功能 + +有些项目可能具有私密性,不希望被公开,只有填入密钥登录后(关闭标签后登录失效),才能进入内容页面。 + +```javscript +// 更改 /docs/.vuepress/config.js + +module.exports = { + theme: 'reco', + themeConfig: { + // 密钥 + keyPage: { + keys: ['930105'], + color: '#fb9b5f', // 登录页动画球的颜色 + lineColor: '#fb9b5f' // 登录页动画线的颜色 + } + } +} +``` + +## Config.js + +1. 在移动端,搜索框在获得焦点时会放大,并且在失去焦点后可以左右滚动,这可以通过设置元来优化。 + +```javascript +module.exports = { + head: [ + ['meta', { name: 'viewport', content: 'width=device-width,initial-scale=1,user-scalable=no' }] + ] +} +``` + +2. 您可以在导航菜单中添加图标,如下所示: + +```javascript +{ text: 'Tags', link: '/tags/', icon: 'reco-tag' } +``` + +该项目有内置图标供您选择 + +![icon.png](https://upload-images.jianshu.io/upload_images/4660406-565b8ffd891b9cb3.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) + +3. 设置全局作者姓名 + +```javascript +module.exports = { + themeConfig: { + // author + author: 'reco_luan', + } +} +``` + +4. 为单篇文章设置作者姓名 + +```bash +--- +title: 你还没真的努力过,就轻易输给了懒惰 +date: 2015-04-23 +categories: article +author: 渡渡 +--- +``` + + +## 首页配置 + +1. 如果您的heroImage具有您的网站标题,则可能需要设置值 `isShowTitleInHome` `false` 以使标题不显示。 + +```bash +# this is your homepage + +--- +home: true +heroImage: /hero.png +isShowTitleInHome: false +--- +``` + +2. 如果你想改变heroImage的风格,你可以设置值 `heroImageStyle` 来实现你想要的效果 + +```bash +# 这是你的主页 + +--- +home: true +heroImage: /hero.png +heroImageStyle: { + maxHeight: '200px', + display: block, + margin: '6rem auto 1.5rem', + borderRadius: '50%', + boxShadow: '0 5px 18px rgba(0,0,0,0.2)' +} +--- +``` + +3. 无法再随意编辑主页页脚,只能更改所有者的名称。将首先显示全局作者姓名,否则将显示博客的标题 + +## License +[MIT](https://github.com/recoluan/vuepress-theme-reco/blob/master/LICENSE) \ No newline at end of file diff --git a/components/AlgoliaSearchBox.vue b/components/AlgoliaSearchBox.vue new file mode 100644 index 0000000..41b62af --- /dev/null +++ b/components/AlgoliaSearchBox.vue @@ -0,0 +1,155 @@ + + + + + diff --git a/components/Background.vue b/components/Background.vue new file mode 100644 index 0000000..d75fdd6 --- /dev/null +++ b/components/Background.vue @@ -0,0 +1,118 @@ + + + + + diff --git a/components/Common.vue b/components/Common.vue new file mode 100644 index 0000000..8b78494 --- /dev/null +++ b/components/Common.vue @@ -0,0 +1,142 @@ + + + diff --git a/components/DropdownLink.vue b/components/DropdownLink.vue new file mode 100644 index 0000000..f859857 --- /dev/null +++ b/components/DropdownLink.vue @@ -0,0 +1,181 @@ + + + + + diff --git a/components/DropdownTransition.vue b/components/DropdownTransition.vue new file mode 100644 index 0000000..8c711a1 --- /dev/null +++ b/components/DropdownTransition.vue @@ -0,0 +1,33 @@ + + + + + diff --git a/components/Home.vue b/components/Home.vue new file mode 100644 index 0000000..4beee4e --- /dev/null +++ b/components/Home.vue @@ -0,0 +1,220 @@ + + + + + diff --git a/components/NavLink.vue b/components/NavLink.vue new file mode 100644 index 0000000..6c71577 --- /dev/null +++ b/components/NavLink.vue @@ -0,0 +1,52 @@ + + + diff --git a/components/NavLinks.vue b/components/NavLinks.vue new file mode 100644 index 0000000..7c4d3cd --- /dev/null +++ b/components/NavLinks.vue @@ -0,0 +1,181 @@ + + + + + diff --git a/components/Navbar.vue b/components/Navbar.vue new file mode 100644 index 0000000..7bd7fec --- /dev/null +++ b/components/Navbar.vue @@ -0,0 +1,123 @@ + + + + + diff --git a/components/NoteAbstract.vue b/components/NoteAbstract.vue new file mode 100644 index 0000000..a87064a --- /dev/null +++ b/components/NoteAbstract.vue @@ -0,0 +1,84 @@ + + + + + diff --git a/components/Pagation.vue b/components/Pagation.vue new file mode 100644 index 0000000..6faabdd --- /dev/null +++ b/components/Pagation.vue @@ -0,0 +1,157 @@ + + + + + diff --git a/components/Page.vue b/components/Page.vue new file mode 100644 index 0000000..24dcb97 --- /dev/null +++ b/components/Page.vue @@ -0,0 +1,265 @@ + + + + + diff --git a/components/PageInfo.vue b/components/PageInfo.vue new file mode 100644 index 0000000..c068322 --- /dev/null +++ b/components/PageInfo.vue @@ -0,0 +1,68 @@ + + + + + diff --git a/components/Password.vue b/components/Password.vue new file mode 100644 index 0000000..5bf029c --- /dev/null +++ b/components/Password.vue @@ -0,0 +1,283 @@ + + + + + \ No newline at end of file diff --git a/components/Sidebar.vue b/components/Sidebar.vue new file mode 100644 index 0000000..62f1286 --- /dev/null +++ b/components/Sidebar.vue @@ -0,0 +1,59 @@ + + + + + diff --git a/components/SidebarButton.vue b/components/SidebarButton.vue new file mode 100644 index 0000000..b8fb415 --- /dev/null +++ b/components/SidebarButton.vue @@ -0,0 +1,27 @@ + + + diff --git a/components/SidebarGroup.vue b/components/SidebarGroup.vue new file mode 100644 index 0000000..3ad029b --- /dev/null +++ b/components/SidebarGroup.vue @@ -0,0 +1,129 @@ + + + + + diff --git a/components/SidebarLink.vue b/components/SidebarLink.vue new file mode 100644 index 0000000..7d128b4 --- /dev/null +++ b/components/SidebarLink.vue @@ -0,0 +1,109 @@ + + + diff --git a/components/SidebarLinks.vue b/components/SidebarLinks.vue new file mode 100644 index 0000000..dfdb0be --- /dev/null +++ b/components/SidebarLinks.vue @@ -0,0 +1,86 @@ + + + diff --git a/components/TimeLine.vue b/components/TimeLine.vue new file mode 100644 index 0000000..0a47c3b --- /dev/null +++ b/components/TimeLine.vue @@ -0,0 +1,189 @@ + + + + + diff --git a/components/Valine/AccessNumber.vue b/components/Valine/AccessNumber.vue new file mode 100644 index 0000000..fe2e34f --- /dev/null +++ b/components/Valine/AccessNumber.vue @@ -0,0 +1,18 @@ + + + + + + diff --git a/components/Valine/index.vue b/components/Valine/index.vue new file mode 100644 index 0000000..b8e3eb6 --- /dev/null +++ b/components/Valine/index.vue @@ -0,0 +1,83 @@ + + + + + diff --git a/fonts/iconfont.css b/fonts/iconfont.css new file mode 100644 index 0000000..8434e04 --- /dev/null +++ b/fonts/iconfont.css @@ -0,0 +1,105 @@ +@font-face {font-family: "iconfont"; + src: url('iconfont.eot?t=1548606483811'); /* IE9 */ + src: url('iconfont.eot?t=1548606483811#iefix') format('embedded-opentype'), /* IE6-IE8 */ + url('data:application/x-font-woff2;charset=utf-8;base64,d09GMgABAAAAAA00AAsAAAAAF3AAAAzmAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHEIGVgCGJgqdHJczATYCJANcCzAABCAFhG0HgVwbjxMzkpFWMNn/4XhDlIfeIjISzOAvOykpJqrLNj0unghRf7XaZBLYTYHNnqhsIn05fmIHsad+Hg/0a+n7sAd7hCplVIQK0EWVwNbFF0kptDUK9eVmakSG2ixnIiszySqBNc3eXU0MOdVfxflA+4P2B2TVZKSq/8dv6+/MPGiJVKxEGysWnrmBFX3+N9jISgIAYd6+isKEeQEE1ACBxWx2Ee3+vaSoYmXat157jhvkhCXLEvm/td9X0ciLNB28Edo7nE6Ls7vP5yIXH1QsQqgkQtrFVEKFRiPSCCnSf0jx2yOe33vdPpi4UKoM0NYElBZsF06dOXtVTcZMAeUe3rtzTS0XKjeoglpgxbFkLsMbCKrFp3gbeG0/P/yn2URFwrZ18fbpm47NvH9MDKPhbDLBHB/H21IkbEcmtp0CsRQbt1tWuqpm/4D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VLDG3M3XHWg8o0/GDFQ1/sNrHwnO8ljg2KGfwCsPLCA2Find34RdfT9kPdE+ow7s8ZEpBXKl6wiucafRsO3ZCCydrtH4uA0nQXpcbpqKGEW2u8g0RmZsddH7OI0wQfS6LTedJLk9IccIFSeQS0xPERPBV8eb8suEIZ9ZfOetdN/tfyVWjR+GI80PekGXWSxATwgI/W8weyX/lcXhk2o79bKocYP+dGWjT+bezT6SVNymcAQnKwIlHwQeDBO6MO9+QkYdda8JgiQpyRisSQJm4N5tnYnBR4/UsHWh5TcIHb5Bik0A4EyB8BWGBoQRATrCSawnxAiOGtOWd8lDAp4S5hEiBCudCRdI48Te1i/MbSgUfVNBUPRighZR+W/4UqvOauzjv/gHNLVfrMr5n8hgscxTz67g4hVlmlQn8H20PekElMLIxsvko7brXXNuzE0VOvqjaFFe26U+uY7GIp2ZFmXPv4brvSaG5r98f0PzmH8yt7GroP5F4udmp2XqvnsDoS4VbIu06B8EkfPc0hJ7slaGNnwHlnpaEvd2a5sM/2A4XBgsPO1yNapPBZSWbY2jus+lfueas/p3fsPHz99/vLVYkDO2mGCG+YZmo1fmo103o74Nr/AeC2TmIaFXIIIeGpyE6cDYpm7IL7U49NpRuKdyp4GjEuaiHbTxvtMljV1uBUdV4bSjYPzstDGUImyaIOO2ZdZwDFAZzNQVQA=') format('woff2'), + url('iconfont.woff?t=1548606483811') format('woff'), + url('iconfont.ttf?t=1548606483811') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+ */ + url('iconfont.svg?t=1548606483811#iconfont') format('svg'); /* iOS 4.1- */ +} + +.iconfont { + font-family: "iconfont" !important; + font-size: 16px; + font-style: normal; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +.reco-message:before { + content: "\e634"; +} + +.reco-eye:before { + content: "\e669"; +} + +.reco-search:before { + content: "\e611"; +} + +.reco-category:before { + content: "\e61e"; +} + +.reco-wechat:before { + content: "\e615"; +} + +.reco-npm:before { + content: "\e88d"; +} + +.reco-twitter:before { + content: "\e609"; +} + +.reco-csdn:before { + content: "\e60d"; +} + +.reco-menu:before { + content: "\e67c"; +} + +.reco-github:before { + content: "\e628"; +} + +.reco-qq:before { + content: "\e60a"; +} + +.reco-other:before { + content: "\e60e"; +} + +.reco-home:before { + content: "\e65b"; +} + +.reco-up:before { + content: "\e68b"; +} + +.reco-tag:before { + content: "\e633"; +} + +.reco-date:before { + content: "\e63b"; +} + +.reco-bokeyuan:before { + content: "\e626"; +} + +.reco-copyright:before { + content: "\ef87"; +} + +.reco-account:before { + content: "\e607"; +} + +.reco-jianshu:before { + content: "\e600"; +} + +.reco-theme:before { + content: "\e7e8"; +} + +.reco-three:before { + content: "\e644"; +} + diff --git a/fonts/iconfont.eot b/fonts/iconfont.eot new file mode 100644 index 0000000000000000000000000000000000000000..0cefa507d9cdd538762e126cfda980000e08885d GIT binary patch literal 6168 zcmd@&`*U2?dFMOlKKA{*d#_&m(rR}l%ifiCwY!#NOR{83=3&QRYy(ybvb=g2Nh_q4 zK}k%Mm=t3k(F_#RJg8e}GYy@gleig}Q0$O8h4Ppb!W0G?JX2Vk5CT86rBLf`zq5B` zY(wcE(7XGc^PTTJ?svY|`R=KyA!Jq~1PCSkp+saA1S!kFv8#6&?a#^z8Jqj8M^1l6 zUBz5vl8ll9nIU79vWOiHaxKY|ak42n@ zl`IiP+J<)S>i=8)ryn43JyQF>vNM_5aN9L^V*4A|-aR@!GW*I8)*(u9K^7aIS{&;R zymo*P@d)zrgNgjee&wB>2o5-dkext+>1kmR@uv}*CZ>zG55HGFhwJ?Y+rv|Z(UItx z7R1HtvE4R3a{DZ-A?0<{%&X&qc zWLP*`{;2$^@Ihra*mdF2Dij=d`iOPkP0kJfL99Zh^Y!@^FGqNdbH6Ekz`lh|Q&nBa z0=6`ACo%I;6{>|;5Gz;OM!$sw$XWuM2d};kXBrC|Juo#nK7zDr3;TF4AO(n2rD9vK zz%mhuiQY|LMCx~q8r~-=@g!pY)Z;hj$tKN8UO2oM(L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mode 100644 index 0000000..cec90f7 --- /dev/null +++ b/fonts/iconfont.svg @@ -0,0 +1,92 @@ + + + + + +Created by iconfont + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/fonts/iconfont.ttf b/fonts/iconfont.ttf new file mode 100644 index 0000000000000000000000000000000000000000..9afa90586cc544c2dd9d135ae6d0cfba4a2a414b GIT binary patch literal 6000 zcmd@&`*U2?dFMOlKKA{*d#_&m(!M0i-j#Q?yOv~2vSdrf#13F=gRK-6dG#=oR!A#@ z5=@ks6x%%F8K_P3pl+efG<1ee;xaIy*dcWa#VTTiC~Y0VzPFWh%A>3mhXNG0`LR1*Cr0sNp@52AoTY$dLL4*HxpN_mRE| z`QR>N|HwP%p7V?sf7O>m^~2BfpRa!WnRab{wfcD)Umf{Hu_LTTz#-IOycaoUHEcE3 zC@G{1s3SsJNC+`gg;eB-m1l98D&9*L{};R}!hey>7~|MyOk%WpI@;w3VAgNfL14+i<10O{BD=N)dh1F~4I*PCki+jftK zX^@UB{Z}jn`}adCMoqD_zR}a*!RKM4Le6VZMc&DT5@)@n|9!&8vbIL%xtL zWGM*=-=z(Va{9aPoYUVCMQA*C9(;mM#_yr@p79A@P7GW}>2(7}35z>lw_0A?z56u_ zmQ{LeYU&s@%3->9aPu(0@aDn2wQ$U3vnXJ!N7;l)Gln2Jf$xozM2_TDq9LxqrHph^ zfeb(2b!7W9dKGzrXPyBnLVMfuOV1vCg0Ux#-p$Lqqr=a)wSx#0`#}`->NDGpcD}&E zpANvmT#;yN)pP753!y~?Ns9EML~!pb3JRkrE^ni@zO_6sjFO$CpInLiOKZ3TL#A>*0GV_?p6!7| z02GNEq09?zhkWCoie5|fKy0N47chp%5*h#U-ehuv-~dvs%6FqjGk z|IMiAd%|M}4?W7*qlX%E4I_>D&H9{MRhw1ylu^+XE!|DAd+S1KvRAf3G_i1U5`w8v zC>1OP+k^P%A57oR*!|O``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LlO25r-769*2-aw(6&?B&Nxe zKN%#yUfXIV4|m{+pDknEQ6T9%BO<5d&t+H5u`zhY%0P1E1f}=kdort3JLKaJ&9j(j z54Cdg9zet9w1owOa<+Gd=J-nD$$pRKRNI5MV|aeWGg z?8a+-cdN;@ay(02Y0sI?!_goA{pzEywb#X@a+Jg3Zw$xL9(FFpzj2{1V#j@1Q&#wgd<=9a3UBB{tYpLe1I$v zl@bHQy8oYtXq;V83l0E?pKFaki74*c7ETB-yMY?GYiBV zsq^5mF|I$m#g5)*`?W)CMB z_es%Pls*<&Bs#aKPmsAHs~i5c)ec{?Hmy%l6FKQI5y`i%SXJyQ?z@#C)%qmYdOtn3 zYGfsw)_*bD1H4Z2z-Yur~Or7e)SqiHH_sO66Yc>!njYk<_;tM}hG^-P|o zYUiQ{PtKJeKdx$x4<;A`?y=cjoQnS%3z^97OBLvRu6y-PEt-zOO)Sj?trY)2e8MhX zj!JSVMpU?dDUKtEoBeGmMV1&cLtVwwqAExGncoq&CqwpQ|8#jm(Jsw*@2c6(XL6!F zAJhLdBL13$ZZmk%lb%&ks8t*hBQf~!Jd0|XjoAL7U=`v-$mZ!`-&&}Yw7EDP=`V<; I8cY`WKRldzG5`Po literal 0 HcmV?d00001 diff --git a/fonts/iconfont.woff2 b/fonts/iconfont.woff2 new file mode 100644 index 0000000000000000000000000000000000000000..8efc37bf3ae4407d5ce8fa34467435aaae84b5e3 GIT binary patch literal 3380 zcmV-44a@R(Pew8T0RR9101Y$%3jhEB02goo01V~;0RR9100000000000000000000 z0000SLIzd3Z3lr|8;=t+l95(0+5h2qLzIW!A~F)p z;4eEVDJH7RHa#w$2vL8v+GG;gO@YmxsB9vAIeuaXv8R3>5A+RlgeqlJgbL6_ zmB7};7fC6!H463RW@KO|fi=zET}=!*)nCQ=K>LIC2V~V`q^keNZ|m>O zJZOnjtVA0t7M{6*6@C6U*vLu(0Ab#~io%3>0R+?lfyHcg5$*oHq^M$L+P7YNjvM5J zCCd`|zqQ|2(a4K59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lI+Z8Nz<*+!?yK@T5u7yR36+dAE0un+wDO3da=|#(;3G ziRM8m8a^DAQYMi*6aqT|o^t%?WFqk8*8I$c$1?^?|6??Jnw`$FHAEU_IRrlF;j6kZgcd6S{XDR_+%$-9WezAxI(ilq z#!hZxFl4fMHi>{ExGU)WCr->#%^WjkMA5Wp9Q=p3hsRfwsG&(6W5i>*?_8*?{Yb)fQ%KNvAk z*ZU2ud?!1}V}oLbe*mmJuz=WDr+0o4b@cs^_eA=PJF~__q!r4StRlI_pGL#CWFWG3 zyGP>SG@S+Mak^?KVHVo&Aki6_vDZiJ;xxer(&)6_bdu!sha4bOo_hP=>}b7u>m|FBlWz&?3eym7luu!@7Btp#t-??mW@A~ zdo=nj@^XpAaHAYff3;B@7C9OPEB65UzA2T_cYZdsx3Qw4hP- zO$9^IiU?Up<-g%duQ{u;j{o2s($#*mE9QS8g2ypWKD&d6RhDT`pTYLf_oNb23nLpZ zl8)Q0b<)yuRkAMApnMWX&vQsg?#Wsh+3+4&>1a#c*{*Ce{eaf*a-;nvGwYjdb3Q_%^@5crBBdhJ{>$2zY98 z6Q=`WnY$pq)Z^1>M&g~yo(7CdnuvDO#`{c`HFdZZ9ao0Zjf3;D(8f@SvS@>j*_T +export default { + functional: true, + props: { + type: { + type: String, + default: 'tip' + }, + text: String, + vertical: { + type: String, + default: 'top' + } + }, + render (h, { props, slots }) { + return h('span', { + class: ['badge', props.type], + style: { + verticalAlign: props.vertical + } + }, props.text || slots().default) + } +} + + + diff --git a/index.js b/index.js new file mode 100644 index 0000000..c9e26bd --- /dev/null +++ b/index.js @@ -0,0 +1,46 @@ +const path = require('path') + +// Theme API. +module.exports = (options, ctx) => ({ + alias () { + const { themeConfig, siteConfig } = ctx + // resolve algolia + const isAlgoliaSearch = ( + themeConfig.algolia + || Object.keys(siteConfig.locales && themeConfig.locales || {}) + .some(base => themeConfig.locales[base].algolia) + ) + return { + '@AlgoliaSearchBox': isAlgoliaSearch + ? path.resolve(__dirname, 'components/AlgoliaSearchBox.vue') + : path.resolve(__dirname, 'noopModule.js') + } + }, + + plugins: [ + '@vuepress/active-header-links', + ['@vuepress/plugin-blog', { + permalink: '/:regular' + }], + '@vuepress/search', + '@vuepress/plugin-nprogress', + ['container', { + type: 'tip', + defaultTitle: { + '/zh/': '提示' + } + }], + ['container', { + type: 'warning', + defaultTitle: { + '/zh/': '注意' + } + }], + ['container', { + type: 'danger', + defaultTitle: { + '/zh/': '警告' + } + }] + ] +}) diff --git a/layouts/404.vue b/layouts/404.vue new file mode 100644 index 0000000..4eef36d --- /dev/null +++ b/layouts/404.vue @@ -0,0 +1,28 @@ + + + + + diff --git a/layouts/Category.vue b/layouts/Category.vue new file mode 100644 index 0000000..d15066c --- /dev/null +++ b/layouts/Category.vue @@ -0,0 +1,93 @@ + + + + + + + + + diff --git a/layouts/Layout.vue b/layouts/Layout.vue new file mode 100644 index 0000000..93c834a --- /dev/null +++ b/layouts/Layout.vue @@ -0,0 +1,42 @@ + + + + + + diff --git a/layouts/Tags.vue b/layouts/Tags.vue new file mode 100644 index 0000000..5b7469d --- /dev/null +++ b/layouts/Tags.vue @@ -0,0 +1,128 @@ + + + + + + + + + diff --git a/noopModule.js b/noopModule.js new file mode 100644 index 0000000..b1c6ea4 --- /dev/null +++ b/noopModule.js @@ -0,0 +1 @@ +export default {} diff --git a/package.json b/package.json new file mode 100644 index 0000000..b425066 --- /dev/null +++ b/package.json @@ -0,0 +1,31 @@ +{ + "name": "vuepress-theme-reco", + "version": "1.0.0-alpha.3", + "description": "this is a vuepress theme", + "main": "index.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/recoluan/vuepress-theme-reco.git" + }, + "keywords": [ + "vuepress", + "vue", + "theme" + ], + "author": "reco_luan", + "license": "MIT", + "bugs": { + "url": "https://github.com/recoluan/vuepress-theme-reco/issues" + }, + "homepage": "https://recoluan.gitlab.io", + "_from": "vuepress-theme-reco@0.2.1", + "_resolved": "http://registry.npm.taobao.org/vuepress-theme-reco/download/vuepress-theme-reco-0.2.1.tgz", + "dependencies": { + "leancloud-storage": "^3.10.1", + "valine": "^1.3.4", + "@vuepress/plugin-blog": "^1.0.0-alpha.46" + } +} \ No newline at end of file diff --git a/styles/arrow.styl b/styles/arrow.styl new file mode 100644 index 0000000..20bffc0 --- /dev/null +++ b/styles/arrow.styl @@ -0,0 +1,22 @@ +@require './config' + +.arrow + display inline-block + width 0 + height 0 + &.up + border-left 4px solid transparent + border-right 4px solid transparent + border-bottom 6px solid $arrowBgColor + &.down + border-left 4px solid transparent + border-right 4px solid transparent + border-top 6px solid $arrowBgColor + &.right + border-top 4px solid transparent + border-bottom 4px solid transparent + border-left 6px solid $arrowBgColor + &.left + border-top 4px solid transparent + border-bottom 4px solid transparent + border-right 6px solid $arrowBgColor diff --git a/styles/code.styl b/styles/code.styl new file mode 100644 index 0000000..bc5701e --- /dev/null +++ b/styles/code.styl @@ -0,0 +1,135 @@ +.content + code + color lighten($textColor, 20%) + padding 0.25rem 0.5rem + margin 0 + font-size 0.85em + background-color rgba(27,31,35,0.05) + border-radius 3px + .token + &.deleted + color #EC5975 + &.inserted + color $accentColor + +.content + pre, pre[class*="language-"] + line-height 1.4 + padding 1.25rem 1.5rem + margin 0.85rem 0 + background-color $codeBgColor + border-radius 6px + overflow auto + code + color #fff + padding 0 + background-color transparent + border-radius 0 + +div[class*="language-"] + position relative + background-color $codeBgColor + border-radius 6px + .highlight-lines + user-select none + padding-top 1.3rem + position absolute + top 0 + left 0 + width 100% + line-height 1.4 + .highlighted + background-color rgba(0, 0, 0, 66%) + pre, pre[class*="language-"] + background transparent + position relative + z-index 1 + &::before + position absolute + z-index 3 + top 0.8em + right 1em + font-size 0.75rem + color rgba(255, 255, 255, 0.4) + &:not(.line-numbers-mode) + .line-numbers-wrapper + display none + &.line-numbers-mode + .highlight-lines .highlighted + position relative + &:before + content ' ' + position absolute + z-index 3 + left 0 + top 0 + display block + width $lineNumbersWrapperWidth + height 100% + background-color rgba(0, 0, 0, 66%) + pre + padding-left $lineNumbersWrapperWidth + 1 rem + vertical-align middle + .line-numbers-wrapper + position absolute + top 0 + width $lineNumbersWrapperWidth + text-align center + color rgba(255, 255, 255, 0.3) + padding 1.25rem 0 + line-height 1.4 + br + user-select none + .line-number + position relative + z-index 4 + user-select none + font-size 0.85em + &::after + content '' + position absolute + z-index 2 + top 0 + left 0 + width $lineNumbersWrapperWidth + height 100% + border-radius 6px 0 0 6px + border-right 1px solid rgba(0, 0, 0, 66%) + background-color $codeBgColor + + +for lang in $codeLang + div{'[class~="language-' + lang + '"]'} + &:before + content ('' + lang) + +div[class~="language-javascript"] + &:before + content "js" + +div[class~="language-typescript"] + &:before + content "ts" + +div[class~="language-markup"] + &:before + content "html" + +div[class~="language-markdown"] + &:before + content "md" + +div[class~="language-json"]:before + content "json" + +div[class~="language-ruby"]:before + content "rb" + +div[class~="language-python"]:before + content "py" + +div[class~="language-bash"]:before + content "sh" + +div[class~="language-php"]:before + content "php" diff --git a/styles/custom-blocks.styl b/styles/custom-blocks.styl new file mode 100644 index 0000000..2d07835 --- /dev/null +++ b/styles/custom-blocks.styl @@ -0,0 +1,30 @@ +.custom-block + .custom-block-title + font-weight 600 + margin-bottom -0.4rem + &.tip, &.warning, &.danger + padding .1rem 1.5rem + border-left-width .5rem + border-left-style solid + margin 1rem 0 + &.tip + background-color #f3f5f7 + border-color #42b983 + &.warning + background-color rgba(255,229,100,.3) + border-color darken(#ffe564, 35%) + color darken(#ffe564, 70%) + .custom-block-title + color darken(#ffe564, 50%) + a + color $textColor + &.danger + background-color #ffe6e6 + border-color darken(red, 20%) + color darken(red, 70%) + .custom-block-title + color darken(red, 40%) + a + color $textColor + + diff --git a/styles/mobile.styl b/styles/mobile.styl new file mode 100644 index 0000000..ca6b18a --- /dev/null +++ b/styles/mobile.styl @@ -0,0 +1,37 @@ +// @require './config' + +$mobileSidebarWidth = $sidebarWidth * 0.82 + +// narrow desktop / iPad +@media (max-width: $MQNarrow) + .sidebar + font-size 15px + width $mobileSidebarWidth + .page + padding-left $mobileSidebarWidth + +// wide mobile +@media (max-width: $MQMobile) + .sidebar + top 0 + padding-top $navbarHeight + transform translateX(-100%) + transition transform .2s ease + .page + padding-left 0 + .theme-container + &.sidebar-open + .sidebar + transform translateX(0) + &.no-navbar + .sidebar + padding-top: 0 + +// narrow mobile +@media (max-width: $MQMobileNarrow) + h1 + font-size 1.9rem + .content + div[class*="language-"] + margin 0.85rem -1.5rem + border-radius 0 diff --git a/styles/theme.styl b/styles/theme.styl new file mode 100644 index 0000000..6f8de7f --- /dev/null +++ b/styles/theme.styl @@ -0,0 +1,214 @@ +@require './code' +@require './custom-blocks' +@require './arrow' +@require './wrapper' +@require './toc' +@require '../fonts/iconfont.css' + +html, body + padding 0 + margin 0 + background-color #fff + +body + font-family -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif + -webkit-font-smoothing antialiased + -moz-osx-font-smoothing grayscale + font-size 16px + color $textColor + +.page + padding-left $sidebarWidth + +.navbar + position fixed + z-index 20 + top 0 + left 0 + right 0 + height $navbarHeight + background-color #fff + box-sizing border-box + +.sidebar-mask + position fixed + z-index 9 + top 0 + left 0 + width 100vw + height 100vh + display none + background-color: rgba(0,0,0,.65); + +.sidebar + font-size 16px + background-color #fff + width $sidebarWidth + position fixed + z-index 10 + margin 0 + top $navbarHeight + left 0 + bottom 0 + box-sizing border-box + border-right 1px solid $borderColor + overflow-y auto + +.content:not(.custom) + @extend $wrapper + > *:first-child + margin-top $navbarHeight + a:hover + text-decoration underline + p.demo + padding 1rem 1.5rem + border 1px solid #ddd + border-radius 4px + img + max-width 100% + +.content.custom + padding 0 + margin 0 + img + max-width 100% + +a + font-weight 500 + color $accentColor + text-decoration none + +p a code + font-weight 400 + color $accentColor + +kbd + background #eee + border solid 0.15rem #ddd + border-bottom solid 0.25rem #ddd + border-radius 0.15rem + padding 0 0.15em + +blockquote + font-size .9rem + color #999 + border-left .25rem solid #dfe2e5 + margin 0.5rem 0 + padding .25rem 0 .25rem 1rem + & > p + margin 0 + +ul, ol + padding-left 1.2em + +strong + font-weight 600 + +h1, h2, h3, h4, h5, h6 + font-weight 500 + line-height 1.25 + .content:not(.custom) > & + margin-top (0.5rem - $navbarHeight) + padding-top ($navbarHeight + 1rem) + margin-bottom 0 + &:first-child + margin-top -1.5rem + margin-bottom 1rem + + p, + pre, + .custom-block + margin-top 2rem + &:hover .header-anchor + opacity: 1 + +h1 + font-size 2.2rem + +h2 + font-size 1.65rem + padding-bottom .3rem + border-bottom 1px solid $borderColor + +h3 + font-size 1.35rem + +a.header-anchor + font-size 0.85em + float left + margin-left -0.87em + padding-right 0.23em + margin-top 0.125em + opacity 0 + &:hover + text-decoration none + +code, kbd, .line-number + font-family source-code-pro, Menlo, Monaco, Consolas, "Courier New", monospace + +p, ul, ol + line-height 1.7 + +hr + border 0 + border-top 1px solid $borderColor + +table + border-collapse collapse + margin 1rem 0 + display: block + overflow-x: auto + +tr + border-top 1px solid #dfe2e5 + &:nth-child(2n) + background-color #f6f8fa + +th, td + border 1px solid #dfe2e5 + padding .6em 1em + +.theme-container + &.sidebar-open + .sidebar-mask + display: block + &.no-navbar + .content:not(.custom) > h1, h2, h3, h4, h5, h6 + margin-top 1.5rem + padding-top 0 + .sidebar + top 0 + +@media (min-width: ($MQMobile + 1px)) + .theme-container.no-sidebar + .sidebar + display none + .page + padding-left 0 + +@require 'mobile.styl' + +.iconfont + font-size: 0.9rem; + color: #999; + // &:not(:first-child) + // margin-left: 1rem + // span + // margin-left: .5rem + +/************** 滚动条 **************/ +::-webkit-scrollbar + width: 5px; + height: 5px; + +::-webkit-scrollbar-track-piece + background-color: rgba(0, 0, 0, 0.2); + -webkit-border-radius: 6px; + +::-webkit-scrollbar-thumb:vertical + height: 5px; + background-color: rgba(125, 125, 125, 0.7); + -webkit-border-radius: 6px; + +::-webkit-scrollbar-thumb:horizontal + width: 5px; + background-color: rgba(125, 125, 125, 0.7); + -webkit-border-radius: 6px; + diff --git a/styles/toc.styl b/styles/toc.styl new file mode 100644 index 0000000..d3e7106 --- /dev/null +++ b/styles/toc.styl @@ -0,0 +1,3 @@ +.table-of-contents + .badge + vertical-align middle diff --git a/styles/wrapper.styl b/styles/wrapper.styl new file mode 100644 index 0000000..a99262c --- /dev/null +++ b/styles/wrapper.styl @@ -0,0 +1,9 @@ +$wrapper + max-width $contentWidth + margin 0 auto + padding 2rem 2.5rem + @media (max-width: $MQNarrow) + padding 2rem + @media (max-width: $MQMobileNarrow) + padding 1.5rem + diff --git a/util/index.js b/util/index.js new file mode 100644 index 0000000..9913ff7 --- /dev/null +++ b/util/index.js @@ -0,0 +1,239 @@ +export const hashRE = /#.*$/ +export const extRE = /\.(md|html)$/ +export const endingSlashRE = /\/$/ +export const outboundRE = /^(https?:|mailto:|tel:)/ + +export function normalize (path) { + return decodeURI(path) + .replace(hashRE, '') + .replace(extRE, '') +} + +export function getHash (path) { + const match = path.match(hashRE) + if (match) { + return match[0] + } +} + +export function isExternal (path) { + return outboundRE.test(path) +} + +export function isMailto (path) { + return /^mailto:/.test(path) +} + +export function isTel (path) { + return /^tel:/.test(path) +} + +export function ensureExt (path) { + if (isExternal(path)) { + return path + } + const hashMatch = path.match(hashRE) + const hash = hashMatch ? hashMatch[0] : '' + const normalized = normalize(path) + + if (endingSlashRE.test(normalized)) { + return path + } + return normalized + '.html' + hash +} + +export function isActive (route, path) { + const routeHash = route.hash + const linkHash = getHash(path) + if (linkHash && routeHash !== linkHash) { + return false + } + const routePath = normalize(route.path) + const pagePath = normalize(path) + return routePath === pagePath +} + +export function resolvePage (pages, rawPath, base) { + if (base) { + rawPath = resolvePath(rawPath, base) + } + const path = normalize(rawPath) + for (let i = 0; i < pages.length; i++) { + if (normalize(pages[i].regularPath) === path) { + return Object.assign({}, pages[i], { + type: 'page', + path: ensureExt(pages[i].path) + }) + } + } + console.error(`[vuepress] No matching page found for sidebar item "${rawPath}"`) + return {} +} + +function resolvePath (relative, base, append) { + const firstChar = relative.charAt(0) + if (firstChar === '/') { + return relative + } + + if (firstChar === '?' || firstChar === '#') { + return base + relative + } + + const stack = base.split('/') + + // remove trailing segment if: + // - not appending + // - appending to trailing slash (last segment is empty) + if (!append || !stack[stack.length - 1]) { + stack.pop() + } + + // resolve relative path + const segments = relative.replace(/^\//, '').split('/') + for (let i = 0; i < segments.length; i++) { + const segment = segments[i] + if (segment === '..') { + stack.pop() + } else if (segment !== '.') { + stack.push(segment) + } + } + + // ensure leading slash + if (stack[0] !== '') { + stack.unshift('') + } + + return stack.join('/') +} + +/** + * @param { Page } page + * @param { string } regularPath + * @param { SiteData } site + * @param { string } localePath + * @returns { SidebarGroup } + */ +export function resolveSidebarItems (page, regularPath, site, localePath) { + const { pages, themeConfig } = site + + const localeConfig = localePath && themeConfig.locales + ? themeConfig.locales[localePath] || themeConfig + : themeConfig + + const pageSidebarConfig = page.frontmatter.sidebar || localeConfig.sidebar || themeConfig.sidebar + if (pageSidebarConfig === 'auto') { + return resolveHeaders(page) + } + + const sidebarConfig = localeConfig.sidebar || themeConfig.sidebar + if (!sidebarConfig) { + return [] + } else { + const { base, config } = resolveMatchingConfig(regularPath, sidebarConfig) + return config + ? config.map(item => resolveItem(item, pages, base)) + : [] + } +} + +/** + * @param { Page } page + * @returns { SidebarGroup } + */ +function resolveHeaders (page) { + const headers = groupHeaders(page.headers || []) + return [{ + type: 'group', + collapsable: false, + title: page.title, + path: null, + children: headers.map(h => ({ + type: 'auto', + title: h.title, + basePath: page.path, + path: page.path + '#' + h.slug, + children: h.children || [] + })) + }] +} + +export function groupHeaders (headers) { + // group h3s under h2 + headers = headers.map(h => Object.assign({}, h)) + let lastH2 + headers.forEach(h => { + if (h.level === 2) { + lastH2 = h + } else if (lastH2) { + (lastH2.children || (lastH2.children = [])).push(h) + } + }) + return headers.filter(h => h.level === 2) +} + +export function resolveNavLinkItem (linkItem) { + return Object.assign(linkItem, { + type: linkItem.items && linkItem.items.length ? 'links' : 'link' + }) +} + +/** + * @param { Route } route + * @param { Array | Array | [link: string]: SidebarConfig } config + * @returns { base: string, config: SidebarConfig } + */ +export function resolveMatchingConfig (regularPath, config) { + if (Array.isArray(config)) { + return { + base: '/', + config: config + } + } + for (const base in config) { + if (ensureEndingSlash(regularPath).indexOf(encodeURI(base)) === 0) { + return { + base, + config: config[base] + } + } + } + return {} +} + +function ensureEndingSlash (path) { + return /(\.html|\/)$/.test(path) + ? path + : path + '/' +} + +function resolveItem (item, pages, base, groupDepth = 1) { + if (typeof item === 'string') { + return resolvePage(pages, item, base) + } else if (Array.isArray(item)) { + return Object.assign(resolvePage(pages, item[0], base), { + title: item[1] + }) + } else { + if (groupDepth > 3) { + console.error( + '[vuepress] detected a too deep nested sidebar group.' + ) + } + const children = item.children || [] + if (children.length === 0 && item.path) { + return Object.assign(resolvePage(pages, item.path, base), { + title: item.title + }) + } + return { + type: 'group', + path: item.path, + title: item.title, + sidebarDepth: item.sidebarDepth, + children: children.map(child => resolveItem(child, pages, base, groupDepth + 1)), + collapsable: item.collapsable !== false + } + } +} From 8367b622f7c148bcd5a6fbcf5bbd6bdfeecdcbe2 Mon Sep 17 00:00:00 2001 From: reco_luan Date: Tue, 9 Apr 2019 14:45:24 +0800 Subject: [PATCH 03/21] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dkeys=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/Common.vue | 4 ++-- components/Password.vue | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/components/Common.vue b/components/Common.vue index 8b78494..cd92598 100644 --- a/components/Common.vue +++ b/components/Common.vue @@ -109,8 +109,8 @@ export default { this.isHasKey = true } - const {keys} = keyPage - this.isHasKey = keys.indexOf(sessionStorage.getItem('key')) > -1 + const keys = keyPage.keys + this.isHasKey = keys && keys.indexOf(sessionStorage.getItem('key')) > -1 }, methods: { diff --git a/components/Password.vue b/components/Password.vue index 5bf029c..902dec2 100644 --- a/components/Password.vue +++ b/components/Password.vue @@ -67,8 +67,8 @@ export default { }, isHasKey () { const keyPage = this.$site.themeConfig.keyPage - const {keys} = keyPage - return keys.indexOf(sessionStorage.getItem('key')) > -1 + const keys = keyPage.keys + return keys && keys.indexOf(sessionStorage.getItem('key')) > -1 }, inputFocus () { this.warningText = 'Input Your Key' From 331960a9f26c249a3e027d00eb135469a399654e Mon Sep 17 00:00:00 2001 From: reco_luan Date: Tue, 9 Apr 2019 15:58:35 +0800 Subject: [PATCH 04/21] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=9B=9E=E5=88=B0?= =?UTF-8?q?=E9=A1=B6=E9=83=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/BackToTop.vue | 109 +++++++++++++++++++++++++++++++++++++++ components/Common.vue | 4 +- 2 files changed, 111 insertions(+), 2 deletions(-) create mode 100644 components/BackToTop.vue diff --git a/components/BackToTop.vue b/components/BackToTop.vue new file mode 100644 index 0000000..7d05abb --- /dev/null +++ b/components/BackToTop.vue @@ -0,0 +1,109 @@ + + + + + \ No newline at end of file diff --git a/components/Common.vue b/components/Common.vue index cd92598..8b78494 100644 --- a/components/Common.vue +++ b/components/Common.vue @@ -109,8 +109,8 @@ export default { this.isHasKey = true } - const keys = keyPage.keys - this.isHasKey = keys && keys.indexOf(sessionStorage.getItem('key')) > -1 + const {keys} = keyPage + this.isHasKey = keys.indexOf(sessionStorage.getItem('key')) > -1 }, methods: { From 10f9a4ec7548285513caf407812d014f0f9ff6b1 Mon Sep 17 00:00:00 2001 From: reco_luan Date: Tue, 9 Apr 2019 17:11:17 +0800 Subject: [PATCH 05/21] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=AD=90=E9=A1=B9?= =?UTF-8?q?=E7=9B=AE=E9=A1=B5=E9=9D=A2=E7=BB=9F=E8=AE=A1=E4=B8=8D=E6=AD=A3?= =?UTF-8?q?=E5=B8=B8=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/PageInfo.vue | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/components/PageInfo.vue b/components/PageInfo.vue index c068322..1c9f62f 100644 --- a/components/PageInfo.vue +++ b/components/PageInfo.vue @@ -6,7 +6,7 @@ {{ pageInfo.frontmatter.author || $site.themeConfig.author || $site.title }} {{ new Date(pageInfo.frontmatter.date).toLocaleDateString() }} - + Date: Tue, 9 Apr 2019 17:24:19 +0800 Subject: [PATCH 06/21] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=AD=90=E9=A1=B9?= =?UTF-8?q?=E7=9B=AE=E9=A1=B5=E9=9D=A2=E7=BB=9F=E8=AE=A1bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/PageInfo.vue | 6 +----- components/Valine/AccessNumber.vue | 10 ++++++++-- package.json | 2 +- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/components/PageInfo.vue b/components/PageInfo.vue index 1c9f62f..3dba962 100644 --- a/components/PageInfo.vue +++ b/components/PageInfo.vue @@ -6,7 +6,7 @@ {{ pageInfo.frontmatter.author || $site.themeConfig.author || $site.title }} {{ new Date(pageInfo.frontmatter.date).toLocaleDateString() }} - + - + @@ -7,7 +7,13 @@ diff --git a/package.json b/package.json index b425066..e8ffda8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "vuepress-theme-reco", - "version": "1.0.0-alpha.3", + "version": "1.0.0-alpha.5", "description": "this is a vuepress theme", "main": "index.js", "scripts": { From c761e0079cbf77d26d4093436743c303d0d89c67 Mon Sep 17 00:00:00 2001 From: reco_luan Date: Tue, 9 Apr 2019 19:41:57 +0800 Subject: [PATCH 07/21] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dkeys=E6=8A=A5=E9=94=99?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/Common.vue | 7 ++++--- package.json | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/components/Common.vue b/components/Common.vue index 8b78494..fea48b1 100644 --- a/components/Common.vue +++ b/components/Common.vue @@ -107,10 +107,11 @@ export default { const keyPage = this.$site.themeConfig.keyPage if (!keyPage) { this.isHasKey = true + return } - - const {keys} = keyPage - this.isHasKey = keys.indexOf(sessionStorage.getItem('key')) > -1 + + const keys = keyPage.keys + return keys && keys.indexOf(sessionStorage.getItem('key')) > -1 }, methods: { diff --git a/package.json b/package.json index e8ffda8..15b353e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "vuepress-theme-reco", - "version": "1.0.0-alpha.5", + "version": "1.0.0-alpha.6", "description": "this is a vuepress theme", "main": "index.js", "scripts": { From 44ecad7321d4240a7297c3e550b6ff725b83f79d Mon Sep 17 00:00:00 2001 From: reco_luan Date: Tue, 9 Apr 2019 20:56:19 +0800 Subject: [PATCH 08/21] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20tags.vue=20name=20?= =?UTF-8?q?=E9=94=99=E8=AF=AF=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- layouts/Tags.vue | 22 ++++++++++++---------- package.json | 2 +- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/layouts/Tags.vue b/layouts/Tags.vue index 5b7469d..6994760 100644 --- a/layouts/Tags.vue +++ b/layouts/Tags.vue @@ -39,17 +39,19 @@ export default { } }, - created () { - const currentTag = this.$route.query.tag ? this.$route.query.tag : this.$tags.list[0].name - let tags = this.$tags.list - tags.map(item => { - const color = this._tagColor() - item.color = color - return tags - }) - this.tags = tags + created () { + if (this.$tags) { + const currentTag = this.$route.query.tag ? this.$route.query.tag : this.$tags.list[0].name + let tags = this.$tags.list + tags.map(item => { + const color = this._tagColor() + item.color = color + return tags + }) + this.tags = tags - this.getPagesByTags(currentTag) + this.getPagesByTags(currentTag) + } }, methods: { diff --git a/package.json b/package.json index 15b353e..5535705 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "vuepress-theme-reco", - "version": "1.0.0-alpha.6", + "version": "1.0.0-alpha.7", "description": "this is a vuepress theme", "main": "index.js", "scripts": { From cd2043f12038ff33be034f33e24f9063088b5724 Mon Sep 17 00:00:00 2001 From: reco_luan Date: Tue, 9 Apr 2019 21:09:16 +0800 Subject: [PATCH 09/21] =?UTF-8?q?=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- layouts/Tags.vue | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/layouts/Tags.vue b/layouts/Tags.vue index 6994760..83a7d25 100644 --- a/layouts/Tags.vue +++ b/layouts/Tags.vue @@ -41,7 +41,7 @@ export default { created () { if (this.$tags) { - const currentTag = this.$route.query.tag ? this.$route.query.tag : this.$tags.list[0].name + const currentTag = this.$route.query.tag ? this.$route.query.tag : this.$tags.list.length > 0 ? this.$tags.list[0].name : '' let tags = this.$tags.list tags.map(item => { const color = this._tagColor() diff --git a/package.json b/package.json index 5535705..915c86b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "vuepress-theme-reco", - "version": "1.0.0-alpha.7", + "version": "1.0.0-alpha.8", "description": "this is a vuepress theme", "main": "index.js", "scripts": { From 5faa087969d5fa9bd223254230a0581462c5f912 Mon Sep 17 00:00:00 2001 From: reco_luan Date: Tue, 9 Apr 2019 21:12:38 +0800 Subject: [PATCH 10/21] =?UTF-8?q?=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- layouts/Tags.vue | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/layouts/Tags.vue b/layouts/Tags.vue index 83a7d25..285fa4b 100644 --- a/layouts/Tags.vue +++ b/layouts/Tags.vue @@ -40,8 +40,8 @@ export default { }, created () { - if (this.$tags) { - const currentTag = this.$route.query.tag ? this.$route.query.tag : this.$tags.list.length > 0 ? this.$tags.list[0].name : '' + if (this.$tags.list.length > 0) { + const currentTag = this.$route.query.tag ? this.$route.query.tag : this.$tags.list[0].name let tags = this.$tags.list tags.map(item => { const color = this._tagColor() @@ -61,7 +61,6 @@ export default { this.currentTag = currentTag - this.$emit('tagChange') let posts = this.$tags.map[currentTag].posts posts.sort((a, b) => { return this._getTimeNum(b) - this._getTimeNum(a) From 1e80176851b0ee13940b50bb42b746250d9a92c2 Mon Sep 17 00:00:00 2001 From: reco_luan Date: Tue, 9 Apr 2019 21:14:39 +0800 Subject: [PATCH 11/21] =?UTF-8?q?=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 915c86b..c3ef7ba 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "vuepress-theme-reco", - "version": "1.0.0-alpha.8", + "version": "1.0.0-alpha.9", "description": "this is a vuepress theme", "main": "index.js", "scripts": { From b53c7432af9d385bb8d4876f9c9d134b68a4f2e0 Mon Sep 17 00:00:00 2001 From: reco_luan Date: Wed, 10 Apr 2019 13:34:15 +0800 Subject: [PATCH 12/21] =?UTF-8?q?1.=20=E6=81=A2=E5=A4=8D=E4=BE=A7=E8=BE=B9?= =?UTF-8?q?=E6=A0=8F=E5=88=86=E7=BB=84=E7=9A=84title=202.=20=E5=8E=BB?= =?UTF-8?q?=E6=8E=89=E9=A1=B5=E9=9D=A2=E7=AC=AC=E4=B8=80=E4=B8=AA=E5=85=83?= =?UTF-8?q?=E7=B4=A0=E7=9A=84margin-top?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/SidebarGroup.vue | 2 +- styles/theme.styl | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/components/SidebarGroup.vue b/components/SidebarGroup.vue index 3ad029b..da7b5e8 100644 --- a/components/SidebarGroup.vue +++ b/components/SidebarGroup.vue @@ -33,7 +33,7 @@ :class="{ open }" @click="$emit('toggle')" > - + {{ item.title }} *:first-child - margin-top $navbarHeight + // > *:first-child + // margin-top 1.6rem a:hover text-decoration underline p.demo From 5c07cc09f216c0e0d7690076fde15e2351a786f9 Mon Sep 17 00:00:00 2001 From: reco_luan Date: Wed, 10 Apr 2019 15:02:39 +0800 Subject: [PATCH 13/21] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E4=B8=BB=E9=A2=98?= =?UTF-8?q?=E9=93=BE=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/Home.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/Home.vue b/components/Home.vue index 4beee4e..c2a29a7 100644 --- a/components/Home.vue +++ b/components/Home.vue @@ -24,7 +24,7 @@ @@ -36,9 +37,10 @@ import Sidebar from '@theme/components/Sidebar.vue' import { resolveSidebarItems } from '../util' import Password from '@theme/components/Password' import Valine from '@theme/components/Valine/' +import BackToTop from "@theme/components/BackToTop" export default { - components: { Sidebar, Navbar, Password, Valine }, + components: { Sidebar, Navbar, Password, Valine, BackToTop }, props: ['sidebar', 'isComment'], diff --git a/components/Password.vue b/components/Password.vue index 902dec2..13d1deb 100644 --- a/components/Password.vue +++ b/components/Password.vue @@ -36,7 +36,7 @@ import Background from '@theme/components/Background' export default { components: {Background}, - name: 'BackToTop', + name: 'Password', data() { return { warningText: 'Konck! Knock!', diff --git a/package.json b/package.json index c3ef7ba..8f0fb4a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "vuepress-theme-reco", - "version": "1.0.0-alpha.9", + "version": "1.0.0-alpha.10", "description": "this is a vuepress theme", "main": "index.js", "scripts": { From befc4d73675d026b688f16788ef0ff375551ffef Mon Sep 17 00:00:00 2001 From: reco_luan Date: Wed, 10 Apr 2019 17:25:01 +0800 Subject: [PATCH 16/21] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=E9=A6=96=E9=A1=B5=E9=93=BE=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 8f0fb4a..9f16ed4 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,7 @@ "bugs": { "url": "https://github.com/recoluan/vuepress-theme-reco/issues" }, - "homepage": "https://recoluan.gitlab.io", + "homepage": "https://recoluan.gitlab.io/vuepress-theme-reco-doc/", "_from": "vuepress-theme-reco@0.2.1", "_resolved": "http://registry.npm.taobao.org/vuepress-theme-reco/download/vuepress-theme-reco-0.2.1.tgz", "dependencies": { From 893ce2ca69b7c32b21e53cb5b5f2f6eb38f6e00b Mon Sep 17 00:00:00 2001 From: reco_luan Date: Sat, 13 Apr 2019 22:46:22 +0800 Subject: [PATCH 17/21] =?UTF-8?q?1.=E4=BC=98=E5=8C=96=E6=A0=B7=E5=BC=8F?= =?UTF-8?q?=EF=BC=9B2.=E5=B0=9D=E8=AF=95=E5=8A=A0=E5=85=A5=E5=A4=9C?= =?UTF-8?q?=E6=99=9A=E6=A8=A1=E5=BC=8F=EF=BC=8C=E6=95=88=E6=9E=9C=E5=BC=80?= =?UTF-8?q?=E5=8F=91=E5=AE=8C=E6=AF=95=E5=BC=80=E5=85=B3=E4=BD=8D=E5=BC=84?= =?UTF-8?q?=E5=A5=BD=EF=BC=8C=E5=90=8E=E6=9C=9F=E5=B0=9D=E8=AF=95=E5=8A=A0?= =?UTF-8?q?=E5=85=A5=E4=B8=BB=E9=A2=98=E9=A2=9C=E8=89=B2=E5=88=87=E6=8D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/Common.vue | 11 ++- components/Home.vue | 78 +++++++++++++++-- components/Navbar.vue | 4 +- components/Page.vue | 23 ++++- components/Theme/CogIcon.vue | 20 +++++ components/Theme/ThemeOptions.vue | 112 ++++++++++++++++++++++++ components/Theme/index.vue | 140 ++++++++++++++++++++++++++++++ components/Theme/themeHandler.js | 46 ++++++++++ components/Theme/yuuConfig.js | 19 ++++ components/Valine/index.vue | 4 +- package.json | 3 +- styles/custom-blocks.styl | 14 +-- styles/loadMixin.styl | 11 +++ styles/nightMode.styl | 88 +++++++++++++++++++ styles/recoConfig.styl | 3 + styles/theme.styl | 3 +- 16 files changed, 557 insertions(+), 22 deletions(-) create mode 100755 components/Theme/CogIcon.vue create mode 100755 components/Theme/ThemeOptions.vue create mode 100755 components/Theme/index.vue create mode 100755 components/Theme/themeHandler.js create mode 100755 components/Theme/yuuConfig.js create mode 100644 styles/loadMixin.styl create mode 100644 styles/nightMode.styl create mode 100644 styles/recoConfig.styl diff --git a/components/Common.vue b/components/Common.vue index 336d5a0..c5eb29f 100644 --- a/components/Common.vue +++ b/components/Common.vue @@ -47,7 +47,8 @@ export default { data () { return { isSidebarOpen: false, - isHasKey: true + isHasKey: true, + nightMode: false } }, @@ -94,7 +95,8 @@ export default { { 'no-navbar': !this.shouldShowNavbar, 'sidebar-open': this.isSidebarOpen, - 'no-sidebar': !this.shouldShowSidebar + 'no-sidebar': !this.shouldShowSidebar, + 'night-mode': this.nightMode }, userPageClass ] @@ -106,6 +108,11 @@ export default { this.isSidebarOpen = false }) + if (localStorage.getItem('nightMode')) { + document.documentElement.style.background = "#000" + this.nightMode = true + } + const keyPage = this.$site.themeConfig.keyPage if (!keyPage) { this.isHasKey = true diff --git a/components/Home.vue b/components/Home.vue index c2a29a7..35e6a32 100644 --- a/components/Home.vue +++ b/components/Home.vue @@ -1,5 +1,5 @@