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/Layout.vue b/Layout.vue
index 5a519d1..f35ac29 100644
--- a/Layout.vue
+++ b/Layout.vue
@@ -19,14 +19,16 @@
-
+
-
+
+
+
@@ -39,14 +41,17 @@ import Page from "./pages/Page/";
import Sidebar from "./components/Sidebar/";
import SWUpdatePopup from "./components/SWUpdatePopup/";
import { resolveSidebarItems } from "./util/"
+import BackToTop from "./components/BackToTop/"
+import Valine from './components/Valine/'
export default {
- components: { Home, Page, Sidebar, Navbar, SWUpdatePopup },
+ components: { Home, Page, Sidebar, Navbar, SWUpdatePopup, BackToTop, Valine },
data() {
return {
isSidebarOpen: false,
- swUpdateEvent: null
+ swUpdateEvent: null,
+ valineRefresh: false
};
},
@@ -117,18 +122,15 @@ export default {
});
this.$on("sw-updated", this.onSWUpdated);
-
- const { themeConfig } = this.$site;
-
- if (!(themeConfig.showParticles != undefined && !themeConfig.showParticles)) {
- localStorage.setItem('particle', JSON.stringify(themeConfig.particlesConfig || {}))
- var script = document.createElement('script')
- script.src = 'https://blog-static.cnblogs.com/files/luanhewei/particle.js'
- document.querySelector('body').appendChild(script)
- }
},
methods: {
+ tagChange () {
+ this.valineRefresh = true
+ setTimeout(() => {
+ this.valineRefresh = false
+ }, 300)
+ },
toggleSidebar(to) {
this.isSidebarOpen = typeof to === "boolean" ? to : !this.isSidebarOpen;
},
@@ -162,3 +164,4 @@ export default {
+
diff --git a/README.md b/README.md
index 1d041b1..690ecb7 100644
--- a/README.md
+++ b/README.md
@@ -1,25 +1,32 @@
# vuepress-theme-reco
-> 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.
+![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. It's a vuepress theme aimed at adding the categories, TAB walls, pagination, comments and other features required for blogging, suitable for `vuepress 0.x`;
+> 2. The theme itself is minimalist and is modified based on the default theme of the vuepress;
> 3. You can open https://recoluan.gitlab.io to see it.
## Preview
-#### Home Page
-![home.png](https://upload-images.jianshu.io/upload_images/4660406-becd33be1de7391c.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
+### Home Page
+![home.png](https://upload-images.jianshu.io/upload_images/4660406-0bf9d91e9d289f75.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
-#### Categories Page
-![category.png](https://upload-images.jianshu.io/upload_images/4660406-acdd68dfa730e5a8.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
+### Categories Page
+![category.png](https://upload-images.jianshu.io/upload_images/4660406-8c7995d750c58536.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
-#### Tags page
-![tag.png](https://upload-images.jianshu.io/upload_images/4660406-d3b1ec44b870fbd6.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
+### Tags page
+![tag.png](https://upload-images.jianshu.io/upload_images/4660406-39c0d47627869e3a.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
-#### Article Page
-![article.png](https://upload-images.jianshu.io/upload_images/4660406-00303788bc2edcaa.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
+### Article Page
+![article.png](https://upload-images.jianshu.io/upload_images/4660406-a19cad487991409d.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
+
+### Mobile
+![m.png](https://upload-images.jianshu.io/upload_images/4660406-7e2c78c48dd78284.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
## Installation and use
@@ -192,45 +199,44 @@ module.exports = {
}
```
-2. If you don't like the particle effect, you can turn it off. If you like it, you can also set the count and color of particles.
+2. You can add icon to the navigation menu,like this:
```javascript
-module.exports = {
- title: "午后南杂",
- theme: 'reco',
- themeConfig: {
- // particles
- showParticles: true,
- // particlesConfig
- particlesConfig: {
- color: '0, 0, 0', //color of lines, default: '0,0,0'; RGB values: (R,G,B).(note: use ',' to separate.)
- pointColor: '0, 0, 0', //color of points, default: '0,0,0'; RGB values: (R,G,B).(note: use ',' to separate.)
- opacity: 0.5, // the opacity of line (0~1), default: 0.5.
- count: 60, // the number of lines, default: 66.
- zIndex: -1, // z-index property of the background, default: -1.
- },
- }
-}
-```
-
-3. If you want to click the tags in the list, you can set themeConfig's value of tagClick true
-
-```javascript
-module.exports = {
- title: "午后南杂",
- theme: 'reco',
- themeConfig: {
- // whether you can click the tags in the list
- tagClick: true,
- }
-}
+{ text: 'Tags', link: '/tags/', icon: 'reco-tag' }
```
+The project has built-in icons for you to choose
+
+![icon.png](https://upload-images.jianshu.io/upload_images/4660406-565b8ffd891b9cb3.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
+
+3. Sets the global author name
+
+```javascript
+module.exports = {
+ themeConfig: {
+ // author
+ author: 'reco_luan',
+ }
+}
+```
+
+4. Set the author name for a single article
+
+```bash
+---
+title: 你还没真的努力过,就轻易输给了懒惰
+date: 2015-04-23 11:21
+categories: article
+author: 渡渡
+---
+```
+
+
## Home Config
1. If your heroImage has your website title, maybe you need to set the value of `isShowTitleInHome` `false` to make title not show
-```
+```bash
# this is your homepage
---
@@ -242,7 +248,7 @@ isShowTitleInHome: false
2. If you want change heroImage's style, you can set the value of `heroImageStyle` to achieve the effec you want
-```
+```bash
# this is your homepage
---
@@ -257,3 +263,18 @@ heroImageStyle: {
}
---
```
+
+3. Home page footer can no longer be edited at will, only the owner's name can be changed. The global author name will be displayed first, and if not, the title of the blog will be displayed
+
+
+## Donate
+If you are enjoying this project, please consider making a donation to keep it alive, I will try my best to dedicate more time to work on it. 😉
+
+| Alipay | Wechat |
+| :------: | :------: |
+| ![Alipay.png](https://upload-images.jianshu.io/upload_images/4660406-43aff22cc8a5a4b1.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/240)|![WeChat.png](https://upload-images.jianshu.io/upload_images/4660406-58cfd94e92e60c48.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/240)|
+
+If you are not available for this, simply spreading the word for me would help too!
+
+## License
+[MIT](https://github.com/recoluan/vuepress-theme-reco/blob/master/LICENSE)
diff --git a/components/BackToTop/index.vue b/components/BackToTop/index.vue
new file mode 100644
index 0000000..8cb87cb
--- /dev/null
+++ b/components/BackToTop/index.vue
@@ -0,0 +1,110 @@
+
+
+