Skip to content

Commit

Permalink
v1.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
xugaoyi committed May 25, 2020
1 parent 30d5017 commit 7b7229d
Show file tree
Hide file tree
Showing 8 changed files with 36 additions and 35 deletions.
1 change: 1 addition & 0 deletions docs/04.更多/99.友情链接.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ title: 友情链接
date: 2019-12-25 14:27:01
permalink: /friends
article: false
sidebar: false
---

# 小伙伴们 o(^∇^*)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,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.0.0",
"vuepress-theme-vdoing": "^1.0.1",
"yamljs": "^0.3.0"
},
"dependencies": {
Expand Down
10 changes: 5 additions & 5 deletions theme-vdoing/components/CategoriesPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
:perPage="perPage"
:currentPage="currentPage"
@getCurrentPage="handlePagination"
v-if="Math.ceil(total / perPage) > 1"
v-show="Math.ceil(total / perPage) > 1"
/>
</template>
<template #mainRight>
Expand Down Expand Up @@ -48,10 +48,10 @@ export default {
},
components: { MainLayout, PostList, Pagination, CategoriesBar },
beforeMount() {
const category = this.$route.query.category
if (category) {
this.category = category
this.total = this.$groupPosts.categories[category].length
const queryCategory = this.$route.query.category
if (queryCategory) {
this.category = queryCategory
this.total = this.$groupPosts.categories[queryCategory].length
} else {
this.total = this.$sortPosts.length
}
Expand Down
19 changes: 10 additions & 9 deletions theme-vdoing/components/Footer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,8 @@ export default {
}
</script>

<style lang='stylus' scoped>
$mobileSidebarWidth = $sidebarWidth * 0.82
.icons
margin-bottom 12px
.iconfont
padding 0 10px
font-size 19px
<style lang='stylus'>
// $mobileSidebarWidth = $sidebarWidth * 0.82
.footer
padding 5rem 1.5rem 2.5rem
Expand All @@ -50,8 +44,15 @@ $mobileSidebarWidth = $sidebarWidth * 0.82
box-sizing border-box
font-size .85rem
transition all .2s ease
.icons
margin-bottom 12px
.iconfont
padding 0 10px
font-size 19px
a
color #666
color inherit
&:hover
color $accentColor
@media (min-width: ($MQMobile + 1px))
.sidebar-open .footer
Expand Down
7 changes: 4 additions & 3 deletions theme-vdoing/components/Home.vue
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@
:perPage="perPage"
:currentPage="currentPage"
@getCurrentPage="handlePagination"
v-if="Math.ceil(total / perPage) > 1"
v-show="Math.ceil(total / perPage) > 1"
/>
</template>

Expand Down Expand Up @@ -182,12 +182,13 @@ export default {
beforeMount(){
this.isMQMobile = window.innerWidth < MOBILE_DESKTOP_BREAKPOINT ? true : false; // vupress在打包时不能在beforeCreate(),created()访问浏览器api(如window)
},
mounted() {
if (this.$route.query.p) {
this.currentPage = Number(this.$route.query.p)
}
},
mounted() {
if (this.isMQMobile && (!this.$route.query.p || this.$route.query.p == 1)) {
this.init()
}
Expand Down
19 changes: 8 additions & 11 deletions theme-vdoing/components/Pagination.vue
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,16 @@

<!-- 二号位 -->
<span class="ellipsis iconfont icon-jiantou_zuoer"
v-if="currentPage > 3"
v-show="currentPage > 3"
@click="goIndex(currentPage - 3)"
title="上三页"
>
</span>
/>
<!--这里没有使用v-if的原因是因为部署版本在当前页大于3时刷新页面出现了一些bug-->
<span class="card-box"
v-else
v-show="currentPage <= 3"
:class="{active: currentPage === 2}"
@click="goIndex(2)"
>
2
</span>
>2</span>

<!-- 三号位 -->
<span class="card-box"
Expand All @@ -53,13 +51,12 @@

<!-- 四号位 -->
<span class="ellipsis iconfont icon-jiantou_youer"
v-if="currentPage < (pages - 2)"
v-show="currentPage < (pages - 2)"
@click="goIndex(currentPage + 3)"
title="下三页"
>
</span>
/>
<span class="card-box"
v-else
v-show="currentPage >= (pages - 2)"
:class="{active: currentPage === pages-1}"
@click="goIndex(pages-1)"
>
Expand Down
11 changes: 6 additions & 5 deletions theme-vdoing/components/TagsPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
:perPage="perPage"
:currentPage="currentPage"
@getCurrentPage="handlePagination"
v-if="Math.ceil(total / perPage) > 1"
v-show="Math.ceil(total / perPage) > 1"
/>
</template>
<template #mainRight>
Expand Down Expand Up @@ -48,10 +48,11 @@ export default {
},
components: { MainLayout, PostList, Pagination, TagsBar },
beforeMount() {
const tag = this.$route.query.tag
if (tag) {
this.tag = tag
this.total = this.$groupPosts.tags[tag].length
const queryTag = this.$route.query.tag
if (queryTag) {
this.tag = queryTag
this.total = this.$groupPosts.tags[queryTag].length
} else {
this.total = this.$sortPosts.length
}
Expand Down
2 changes: 1 addition & 1 deletion theme-vdoing/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vuepress-theme-vdoing",
"version": "1.0.0",
"version": "1.0.1",
"description": "Vdoing theme for VuePress. 一个基于VuePress的知识管理兼博客主题。",
"author": {
"name": "gaoyi(Evan) Xu"
Expand Down

0 comments on commit 7b7229d

Please sign in to comment.