From 40f880fb5cca5d7c7015b5b8b4f8c6a843b3cf30 Mon Sep 17 00:00:00 2001 From: reco_luan Date: Mon, 21 Jan 2019 11:36:18 +0800 Subject: [PATCH 01/14] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=89=88=E6=9C=AC?= =?UTF-8?q?=E5=8F=B7?= 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 2993278..5c6400b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "vuepress-theme-reco", - "version": "0.1.0", + "version": "0.1.1", "description": "this is a vuepress theme", "main": "index.js", "scripts": { From ec7426a88d50cf8d9f90a7ad9b731a10da7f438b Mon Sep 17 00:00:00 2001 From: kangxu <1513087242@qq.com> Date: Wed, 23 Jan 2019 11:16:41 +0800 Subject: [PATCH 02/14] =?UTF-8?q?=E5=88=86=E9=A1=B5=E4=BC=98=E5=8C=96?= =?UTF-8?q?=EF=BC=8C=E6=89=8B=E6=9C=BA=E7=AB=AF=E9=80=82=E9=85=8D=E4=BC=98?= =?UTF-8?q?=E5=8C=96=EF=BC=8C=E6=A0=87=E9=A2=98=E8=BF=87=E9=95=BF=E4=BC=98?= =?UTF-8?q?=E5=8C=96=EF=BC=8C=E6=A0=87=E7=AD=BE=E9=A1=B5=E5=88=9D=E5=A7=8B?= =?UTF-8?q?=E5=8C=96=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/Category/index.vue | 6 +- components/Navbar/index.vue | 3 +- components/NoteAbstract/index.vue | 126 +++++++++++++++++++++--------- components/Pagation/index.vue | 46 ++++++++--- components/Tag/index.vue | 8 +- components/Valine/index.vue | 2 +- pages/Page/index.vue | 4 +- styles/config.styl | 2 +- styles/theme.styl | 4 +- 9 files changed, 139 insertions(+), 62 deletions(-) diff --git a/components/Category/index.vue b/components/Category/index.vue index b591479..21ed951 100644 --- a/components/Category/index.vue +++ b/components/Category/index.vue @@ -70,9 +70,9 @@ export default { @require '../../styles/wrapper.styl' .categories-wrapper - max-width: 740px; - margin: 0 auto; - padding: 0 2.5rem; + padding: 0rem 1.5rem 0 !important; + max-width: 960px; + margin: 0px auto; @media (max-width: $MQMobile) .categories-wrapper diff --git a/components/Navbar/index.vue b/components/Navbar/index.vue index 3ec0524..db90f6f 100644 --- a/components/Navbar/index.vue +++ b/components/Navbar/index.vue @@ -73,7 +73,8 @@ export default { // 使用ref会间断性获取不到dom const navbarWrapper = document.querySelector('#navbarWrapper') - const height = navbarWrapper.offsetHeight == 58 ? 58 : 58 + // const height = navbarWrapper.offsetHeight == 58 ? 58 : 58 + const height = navbarWrapper.offsetHeight == 0 ? 0 : 0 const transformHeight = scrollDirection == 'up' ? height : 0 if (oldTransformHeight != transformHeight) { diff --git a/components/NoteAbstract/index.vue b/components/NoteAbstract/index.vue index e441860..a12bb7b 100644 --- a/components/NoteAbstract/index.vue +++ b/components/NoteAbstract/index.vue @@ -3,22 +3,25 @@
+ v-if="((index + 1) > (currentPage - 1) * 10) && ((index + 1) <= currentPage * 10)" + class="abstract-item" + >
- {{item.title}} + {{item.title}} +
+ {{item.frontmatter.time?item.frontmatter.time:""}} + {{item.frontmatter.author?item.frontmatter.author:""}} +

- - {{subItem}} - + @click="goTags(subItem)" + >{{subItem}}
@@ -26,44 +29,51 @@ diff --git a/components/Pagation/index.vue b/components/Pagation/index.vue index c337d3a..9b3a50e 100644 --- a/components/Pagation/index.vue +++ b/components/Pagation/index.vue @@ -1,17 +1,17 @@ @@ -78,15 +78,27 @@ export default { }, methods: { goPrev () { + alert(this.currentPage) if (this.currentPage > 1) { - const currentPage = this.currentPage - this.emit(currentPage--) + let currentPage = this.currentPage; + --currentPage; + + alert(currentPage) + this.emit(currentPage); + + return; } }, goNext () { + alert(this.currentPage) + alert(this.pages) if (this.currentPage < this.pages) { - const currentPage = this.currentPage - this.emit(currentPage++) + let currentPage = this.currentPage; + ++currentPage; + alert(currentPage) + this.emit(currentPage); + + return; } }, jumpPage: function(id) { @@ -94,6 +106,10 @@ export default { this.emit(id) return } + if(!id){ + alert(`请输入页码!`) + return + } alert(`请输入小于${this.pages}的页码!`) }, emit (id) { @@ -116,6 +132,12 @@ export default { font-size: 0; background: #fff; line-height: 50px; + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; span font-size: 14px; &.jump diff --git a/components/Tag/index.vue b/components/Tag/index.vue index 2849030..27a5faf 100644 --- a/components/Tag/index.vue +++ b/components/Tag/index.vue @@ -15,6 +15,7 @@ @@ -78,6 +79,7 @@ export default { }) // reverse()是为了按时间最近排序排序 this.pages = pages.length == 0 ? [] : pages.reverse() + this.getCurrentPage(1); }, getCurrentPage (page) { this.currentPage = page @@ -104,9 +106,9 @@ export default { @require '../../styles/wrapper.styl' .tags-wrapper - max-width: 740px; - margin: 0 auto; - padding: 0 2.5rem; + padding: 0rem 1.5rem 0 !important; + max-width: 960px; + margin: 0px auto; .tags margin-bottom 30px span diff --git a/components/Valine/index.vue b/components/Valine/index.vue index 4708005..1a3f3ba 100644 --- a/components/Valine/index.vue +++ b/components/Valine/index.vue @@ -34,7 +34,7 @@ export default { \ No newline at end of file + From 3e261676eb9dc89e6f32a3445f69e7cfa2ebd34f Mon Sep 17 00:00:00 2001 From: reco_luan <1156743527@qq.com> Date: Thu, 24 Jan 2019 14:46:56 +0800 Subject: [PATCH 08/14] Update index.vue From 7dbb477c0a1ab42bff68b9758a2c6bc35e6d1f3d Mon Sep 17 00:00:00 2001 From: reco_luan <1156743527@qq.com> Date: Thu, 24 Jan 2019 14:48:34 +0800 Subject: [PATCH 09/14] Update index.vue --- components/Tag/index.vue | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/components/Tag/index.vue b/components/Tag/index.vue index 27a5faf..22c39be 100644 --- a/components/Tag/index.vue +++ b/components/Tag/index.vue @@ -106,9 +106,9 @@ export default { @require '../../styles/wrapper.styl' .tags-wrapper - padding: 0rem 1.5rem 0 !important; - max-width: 960px; - margin: 0px auto; + max-width: 740px; + margin: 0 auto; + padding: 0 2.5rem; .tags margin-bottom 30px span From 8fda36cb43afa8fd8088cfc787259f79cf1a6210 Mon Sep 17 00:00:00 2001 From: reco_luan <1156743527@qq.com> Date: Thu, 24 Jan 2019 14:50:09 +0800 Subject: [PATCH 10/14] Update index.vue --- pages/Page/index.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pages/Page/index.vue b/pages/Page/index.vue index a3e7da7..66b8179 100644 --- a/pages/Page/index.vue +++ b/pages/Page/index.vue @@ -103,7 +103,7 @@ export default { }, prev () { - let prev = this.$page.frontmatter.prev + const prev = this.$page.frontmatter.prev if (prev === false) { return } else if (prev) { @@ -114,7 +114,7 @@ export default { }, next () { - let next = this.$page.frontmatter.next + const next = this.$page.frontmatter.next if (next === false) { return } else if (next) { From 1e998db7fffd7dd0a23ab49f1f734d46571a90f8 Mon Sep 17 00:00:00 2001 From: reco_luan <1156743527@qq.com> Date: Thu, 24 Jan 2019 15:11:55 +0800 Subject: [PATCH 11/14] Update index.vue --- components/Pagation/index.vue | 40 ++++++++++++----------------------- 1 file changed, 14 insertions(+), 26 deletions(-) diff --git a/components/Pagation/index.vue b/components/Pagation/index.vue index 9b3a50e..4f8d3c0 100644 --- a/components/Pagation/index.vue +++ b/components/Pagation/index.vue @@ -1,17 +1,17 @@ @@ -78,27 +78,15 @@ export default { }, methods: { goPrev () { - alert(this.currentPage) + let currentPage = this.currentPage if (this.currentPage > 1) { - let currentPage = this.currentPage; - --currentPage; - - alert(currentPage) - this.emit(currentPage); - - return; + this.emit(--currentPage) } }, goNext () { - alert(this.currentPage) - alert(this.pages) - if (this.currentPage < this.pages) { - let currentPage = this.currentPage; - ++currentPage; - alert(currentPage) - this.emit(currentPage); - - return; + let currentPage = this.currentPage + if (currentPage < this.pages) { + this.emit(++currentPage) } }, jumpPage: function(id) { @@ -168,4 +156,4 @@ export default { padding: 0px 8px; &.jumppoint margin-left: 30px; - \ No newline at end of file + From 729e9660269dc4996391f3e5131219780ac2f883 Mon Sep 17 00:00:00 2001 From: reco_luan <1156743527@qq.com> Date: Thu, 24 Jan 2019 15:36:31 +0800 Subject: [PATCH 12/14] Update index.vue --- components/Pagation/index.vue | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/components/Pagation/index.vue b/components/Pagation/index.vue index 4f8d3c0..e15af79 100644 --- a/components/Pagation/index.vue +++ b/components/Pagation/index.vue @@ -1,14 +1,13 @@