Skip to content

Commit 321e8af

Browse files
author
reco_luan
committed
feat: add color var
and remove access number in list page
1 parent b2f52f9 commit 321e8af

File tree

9 files changed

+31
-47
lines changed

9 files changed

+31
-47
lines changed

components/HomeBlog.vue

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@
3737
<!-- 博客列表 -->
3838
<note-abstract
3939
:data="$recoPosts"
40-
:hideAccessNumber="true"
4140
:currentPage="currentPage"></note-abstract>
4241
<!-- 分页 -->
4342
<pagation

components/Mode/modeOptions.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ const modeOptions = {
55
'--box-shadow-hover': '0 2px 16px 0 rgba(0, 0, 0, 0.2)',
66
'--text-color': '#2c3e50',
77
'--border-color': '#eaecef',
8-
'--bgm-bg-color': 'rgba(255, 255, 255, .7)',
98
'--code-color': 'rgba(27, 31, 35, 0.05)',
109
'--mask-color': '#888'
1110
},
@@ -15,7 +14,6 @@ const modeOptions = {
1514
'--box-shadow-hover': '0 2px 26px 0 rgba(0, 0, 0, .9)',
1615
'--text-color': '#aaa',
1716
'--border-color': 'rgba(0, 0, 0, .3)',
18-
'--bgm-bg-color': 'rgba(0, 0, 0, .7)',
1917
'--code-color': 'rgba(0, 0, 0, .3)',
2018
'--mask-color': '#000'
2119
}

components/NoteAbstract.vue

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
<template>
22
<div class="abstract-wrapper">
33
<NoteAbstractItem
4-
v-for="(item) in currentPageData"
5-
:key="item.path"
6-
:item="item"
7-
:currentPage="currentPage"
8-
:currentTag="currentTag"
9-
:hideAccessNumber="true" />
4+
v-for="(item) in currentPageData"
5+
:key="item.path"
6+
:item="item"
7+
:currentPage="currentPage"
8+
:currentTag="currentTag" />
109
</div>
1110
</template>
1211

@@ -15,7 +14,7 @@ import NoteAbstractItem from './NoteAbstractItem'
1514
1615
export default {
1716
components: { NoteAbstractItem },
18-
props: ['data', 'currentPage', 'currentTag', 'hideAccessNumber'],
17+
props: ['data', 'currentPage', 'currentTag'],
1918
computed: {
2019
currentPageData () {
2120
const start = this.currentPage * 10 - 10

components/NoteAbstractItem.vue

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
<hr class="hr">
1111
<PageInfo
1212
:pageInfo="item"
13-
:hideAccessNumber="!(hideAccessNumber !== true)"
1413
:currentTag="currentTag">
1514
</PageInfo>
1615
</div>
@@ -20,7 +19,7 @@
2019
import PageInfo from './PageInfo'
2120
export default {
2221
components: { PageInfo },
23-
props: ['item', 'currentPage', 'currentTag', 'hideAccessNumber']
22+
props: ['item', 'currentPage', 'currentTag']
2423
}
2524
</script>
2625

components/Page.vue

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<div v-show="recoShowModule" class="page-title">
99
<h1>{{$page.title}}</h1>
1010
<hr>
11-
<PageInfo :pageInfo="$page" :hideAccessNumber="hideAccessNumber"></PageInfo>
11+
<PageInfo :pageInfo="$page" :showAccessNumber="true"></PageInfo>
1212
</div>
1313
</ModuleTransition>
1414

@@ -98,14 +98,6 @@ export default {
9898
},
9999
100100
computed: {
101-
hideAccessNumber () {
102-
const valineConfig = this.$themeConfig.valineConfig
103-
if (valineConfig) {
104-
return false
105-
} else {
106-
return true
107-
}
108-
},
109101
lastUpdated () {
110102
return this.$page.lastUpdated
111103
},

components/PageInfo.vue

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<span>{{ pageInfo.frontmatter.date | formatDateValue }}</span>
1212
</i>
1313
<i
14-
v-if="hideAccessNumber !== true"
14+
v-if="showAccessNumber === true"
1515
class="iconfont reco-eye">
1616
<AccessNumber
1717
:idVal="pageInfo.path"
@@ -37,7 +37,6 @@
3737
import { formatDate } from '@theme/helpers/utils'
3838
3939
export default {
40-
// props: ['pageInfo', 'currentTag'],
4140
props: {
4241
pageInfo: {
4342
type: Object,
@@ -49,7 +48,7 @@ export default {
4948
type: String,
5049
default: ''
5150
},
52-
hideAccessNumber: {
51+
showAccessNumber: {
5352
type: Boolean,
5453
default: false
5554
}

example/docs/.vuepress/config.js

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -59,26 +59,6 @@ module.exports = {
5959
// color: '#42b983',
6060
// lineColor: '#42b983'
6161
// },
62-
63-
/**
64-
* valine 设置 (if you need valine comment )
65-
*/
66-
67-
// valineConfig: {
68-
// appId: '...',// your appId
69-
// appKey: '...', // your appKey
70-
// }
71-
vssueConfig: {
72-
admins: ['recoluan'],
73-
platform: 'github',
74-
owner: 'vuepress-reco',
75-
repo: 'vuepress-reco.github.io',
76-
clientId: '4d81cea3b3d8aac8e88e',
77-
clientSecret: 'd23e8556b6d3c85abffbf4b8d853afb2ea08875a',
78-
},
79-
keyPage: {
80-
keys: ['123456']
81-
},
8262
friendLink: [
8363
{
8464
title: '午后南杂',

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "vuepress-theme-reco",
3-
"version": "1.2.0-alpha.13",
3+
"version": "1.2.0-alpha.14",
44
"description": "A simple and beautiful vuepress Blog & Doc theme.",
55
"main": "index.js",
66
"scripts": {

styles/mode.styl

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,36 @@
11
:root
2+
--default-color-10 $lightColor10
3+
--default-color-9 $lightColor9
4+
--default-color-8 $lightColor8
5+
--default-color-7 $lightColor7
6+
--default-color-6 $lightColor6
7+
--default-color-5 $lightColor5
8+
--default-color-4 $lightColor4
9+
--default-color-3 $lightColor3
10+
--default-color-2 $lightColor2
11+
--default-color-1 $lightColor1
212
--background-color $backgroundColor
313
--box-shadow $boxShadow
414
--box-shadow-hover $boxShadowHover
515
--text-color $textColor
616
--border-color $borderColor
7-
--bgm-bg-color $bgmBgColor
817
--code-color $codeColor
918
--mask-color $maskColor
1019
@media (prefers-color-scheme: dark)
20+
--default-color-10 $darkColor10
21+
--default-color-9 $darkColor9
22+
--default-color-8 $darkColor8
23+
--default-color-7 $darkColor7
24+
--default-color-6 $darkColor6
25+
--default-color-5 $darkColor5
26+
--default-color-4 $darkColor4
27+
--default-color-3 $darkColor3
28+
--default-color-2 $darkColor2
29+
--default-color-1 $darkColor1
1130
--background-color $backgroundColorDark
1231
--box-shadow $boxShadowDark
1332
--box-shadow-hover $boxShadowHoverDark
1433
--text-color $textColorDark
1534
--border-color $borderColorDark
16-
--bgm-bg-color $bgmBgColorDark
1735
--code-color $codeColorDark
1836
--mask-color $maskColorDark

0 commit comments

Comments
 (0)