Skip to content

Commit

Permalink
v1.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
xugaoyi committed Sep 26, 2020
1 parent 35eba2e commit e14d02f
Show file tree
Hide file tree
Showing 54 changed files with 1,145 additions and 1,374 deletions.
7 changes: 3 additions & 4 deletions README.MD
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@
<a href="https://www.npmjs.com/package/vuepress-theme-vdoing"><img alt="npm" src="https://img.shields.io/npm/v/vuepress-theme-vdoing"></a>
<a href="https://github.com/xugaoyi/vuepress-theme-vdoing/stargazers"><img src="https://img.shields.io/github/stars/xugaoyi/vuepress-theme-vdoing?logo=ReverbNation&logoColor=rgba(255,255,255,.6)" alt="GitHub stars"></a>



</p>

<h2 align="center">vuepress-theme-vdoing</h2>



[文档 (github源)](https://xugaoyi.github.io/vuepress-theme-vdoing-doc/) | [文档 (国内源)](https://doc.xugaoyi.com/vuepress-theme-vdoing-doc/) | [效果:Evan's blog](https://xugaoyi.com/)
[文档 (github源)](https://xugaoyi.github.io/vuepress-theme-vdoing-doc/) | [文档 (国内源)](https://doc.xugaoyi.com/vuepress-theme-vdoing-doc/) | [效果:Evan's blog](https://xugaoyi.com/)

## 介绍
1. 这个主题的初衷是打造一个好用的、面向程序员的`知识管理工具`
Expand Down Expand Up @@ -57,8 +57,7 @@ npm run dev # or yarn dev

## :sparkling_heart:支持这个项目

我尽己所能地进行开源,并且我尽量回复每个在使用项目时需要帮助的人。很明显,这需要时间,但你可以免费享受这些。
然而, 如果你正在使用这个项目并感觉良好,或只是想要支持我继续开发,你可以通过如下方式支持我:
如果你正在使用这个项目并感觉良好,或只是想要支持我继续开发,你可以通过如下任意方式支持我:

- **Star** 并 分享这个项目 :rocket:
- 保留主题 footer(页脚) 的主题链接 :D
Expand Down
2 changes: 1 addition & 1 deletion docs/.vuepress/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ module.exports = {
options: {
clientID: 'a6e1355287947096b88b',
clientSecret: 'f0e77d070fabfcd5af95bebb82b2d574d7248d71',
repo: 'vuepress-theme-vdoing', // GitHub 仓库
repo: 'blog-gitalk-comment', // GitHub 仓库
owner: 'xugaoyi', // GitHub仓库所有者
admin: ['xugaoyi'], // 对仓库有写权限的人
// distractionFreeMode: true,
Expand Down
6 changes: 4 additions & 2 deletions docs/05.关于/01.关于.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ article: false


### 🐼Me
落魄Web前端工程师
web前端小学生

#### 技能
* 熟悉 JavaScript、HTML、CSS、Vue 的拼写
* 了解 Linux、windows、macOS 的开关机方式
Expand All @@ -39,7 +40,8 @@ article: false
- **WeChat or QQ**: <a :href="qqUrl" class='qq'>894072666</a>
- **Email**: <a href="mailto:894072666@qq.com">894072666@qq.com</a>
- **GitHub**: <https://github.com/xugaoyi>
- **Vdoing官方交流QQ群**:694387113
- **Vdoing主题文档:**<https://doc.xugaoyi.com/vuepress-theme-vdoing-doc/>
- **Vdoing交流QQ群**:694387113

<script>
export default {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"vuepress-plugin-one-click-copy": "^1.0.2",
"vuepress-plugin-thirdparty-search": "^1.0.2",
"vuepress-plugin-zooming": "^1.1.7",
"vuepress-theme-vdoing": "^1.4.4",
"vuepress-theme-vdoing": "^1.5.0",
"yamljs": "^0.3.0"
},
"dependencies": {
Expand Down
13 changes: 5 additions & 8 deletions theme-vdoing/components/AlgoliaSearchBox.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
id="algolia-search-input"
class="search-query"
:placeholder="placeholder"
>
/>
</form>
</template>

Expand All @@ -34,7 +34,7 @@ export default {
import(/* webpackChunkName: "docsearch" */ 'docsearch.js/dist/cdn/docsearch.min.css')
]).then(([docsearch]) => {
docsearch = docsearch.default
const { algoliaOptions = {}} = userOptions
const { algoliaOptions = {} } = userOptions
docsearch(Object.assign(
{},
userOptions,
Expand Down Expand Up @@ -127,8 +127,7 @@ export default {
.ds-cursor .algolia-docsearch-suggestion--content
background-color #e7edf3 !important
color var(--textColor)
@media (min-width: $MQMobile)
@media (min-width $MQMobile)
.algolia-search-wrapper
.algolia-autocomplete
.algolia-docsearch-suggestion
Expand All @@ -144,8 +143,7 @@ export default {
vertical-align top
.ds-dropdown-menu
min-width 515px !important
@media (max-width: $MQMobile)
@media (max-width $MQMobile)
.algolia-search-wrapper
.ds-dropdown-menu
min-width calc(100vw - 4rem) !important
Expand All @@ -156,12 +154,11 @@ export default {
padding 0 !important
background white !important
.algolia-docsearch-suggestion--subcategory-column-text:after
content " > "
content ' > '
font-size 10px
line-height 14.4px
display inline-block
width 5px
margin -3px 3px 0
vertical-align middle
</style>
82 changes: 37 additions & 45 deletions theme-vdoing/components/ArchivesPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,24 @@
<div class="custom-page archives-page">
<div class="theme-vdoing-wrapper">
<h1>
<img :src="currentBadge" v-if="$themeConfig.titleBadge === false ? false : true">
<img
:src="currentBadge"
v-if="$themeConfig.titleBadge === false ? false : true"
/>
{{this.$page.title}}
</h1>
<ul>
<template
v-for="(item, index) in postsList"
>
<template v-for="(item, index) in postsList">
<li
class="year"
v-if="(year = getYear(index)) !== getYear(index-1)"
:key="index+$sortPostsByDate.length"
>
<h2>{{year}}</h2>
</li>
<li
:key="index"
>
<li :key="index">
<router-link :to="item.path">
<span>
{{ getDate(item) }}
</span>
<span>{{ getDate(item) }}</span>
{{item.title}}
</router-link>
</li>
Expand All @@ -39,56 +36,56 @@ import TitleBadgeMixin from '../mixins/titleBadge'
export default {
mixins: [TitleBadgeMixin],
data() {
data () {
return {
postsList: [],
perPage: 80, // 每页长
currentPage: 1// 当前页
}
},
created() {
created () {
this.getPageData()
},
mounted() {
mounted () {
window.addEventListener('scroll', debounce(() => {
if(this.postsList.length < this.$sortPostsByDate.length) {
if (this.postsList.length < this.$sortPostsByDate.length) {
const docEl = document.documentElement
const docBody = document.body
const scrollTop = docEl.scrollTop || docBody.scrollTop;
const clientHeight = docEl.clientHeight || docBody.clientHeight;
const scrollHeight = docEl.scrollHeight || docBody.scrollHeight;
if(scrollHeight > clientHeight && scrollTop + clientHeight >= scrollHeight-250) {
if (scrollHeight > clientHeight && scrollTop + clientHeight >= scrollHeight - 250) {
this.loadmore()
}
}
}, 200))
},
methods: {
getPageData() {
getPageData () {
const currentPage = this.currentPage
const perPage = this.perPage
this.postsList = this.postsList.concat(this.$sortPostsByDate.slice((currentPage-1)*perPage, currentPage*perPage))
this.postsList = this.postsList.concat(this.$sortPostsByDate.slice((currentPage - 1) * perPage, currentPage * perPage))
},
loadmore() {
this.currentPage = this.currentPage+1
loadmore () {
this.currentPage = this.currentPage + 1
this.getPageData()
},
getYear(index) {
getYear (index) {
const item = this.postsList[index]
if (!item) {
return
}
const {frontmatter: { date }} = item
const { frontmatter: { date } } = item
if (date && type(date) === 'string') {
return date.split(" ")[0].slice(0, 4)
}
},
getDate(item) {
const {frontmatter: { date }} = item
getDate (item) {
const { frontmatter: { date } } = item
if (date && type(date) === 'string') {
return date.split(" ")[0].slice(5, 10)
}
Expand All @@ -100,14 +97,13 @@ export default {
<style lang='stylus'>
@require '../styles/wrapper.styl'
.archives-page
.theme-vdoing-wrapper
@extend $vdoing-wrapper
position relative
@media (min-width $contentWidth + 80)
margin-top 1.5rem!important
ul,li
margin-top 1.5rem !important
ul, li
margin 0
padding 0
li
Expand All @@ -120,39 +116,35 @@ export default {
&.year:not(:first-child)
margin-top 3.5rem
h2
margin-bottom .8rem
margin-bottom 0.8rem
font-weight 400
padding .5rem 0
padding 0.5rem 0
a
display block
color var(--textColor)
transition padding .3s
padding .5rem 2rem
transition padding 0.3s
padding 0.5rem 2rem
line-height 1.2rem
&:hover
padding-left 2.5rem
color $accentColor
background lighten($accentColor, 90%)
background #f9f9f9
@media (max-width $contentWidth + 80)
padding .5rem 1rem
font-weight: normal;
padding 0.5rem 1rem
font-weight normal
&:hover
padding-left 1.5rem
span
opacity .6
font-size .85rem
span
opacity 0.6
font-size 0.85rem
font-weight 400
margin-right .3rem
margin-right 0.3rem
.loadmore
text-align center
margin-top 1rem
opacity .5
.theme-mode-dark .archives-page .theme-vdoing-wrapper li a:hover,
.theme-mode-read .archives-page .theme-vdoing-wrapper li a:hover
opacity 0.5
.theme-mode-dark .archives-page .theme-vdoing-wrapper li a:hover, .theme-mode-read .archives-page .theme-vdoing-wrapper li a:hover
background var(--customBlockBg)
.hide-navbar
.archives-page
.theme-vdoing-wrapper
Expand Down
Loading

0 comments on commit e14d02f

Please sign in to comment.