Skip to content

Commit 1578454

Browse files
committed
feat: update theme
1 parent 7d23170 commit 1578454

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

theme/components/CategoriesCardBlocks.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010
<h2 :class="$style.title">
1111
<NavLink :item="item.path" line>{{ item.title }}</NavLink>
1212
</h2>
13-
<div :class="$style.right">{{ item.size }} / {{ allCount }}</div>
13+
<div :class="$style.right">{{ item.size }}</div>
14+
<!-- <div :class="$style.right">{{ item.size }} / {{ allCount }}</div> -->
1415
</div>
1516
</div>
1617
</template>

theme/components/HomeBlog.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<template v-else>
55
<div>
66
<!-- 最新文章 -->
7-
<PostCardBlocks :title="['最新', '博文']" :subtitle="['LATEST', 'POST']" />
7+
<PostCardBlocks :title="['最新', '博文']" :subtitle="['LATEST', 'POST']" :max="9"/>
88
</div>
99
<div v-if="$categories && $categories.list && $categories.list.length">
1010
<!-- 热门分类 -->

theme/components/NavLinks.vue

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,16 @@ export default {
4040
link.items = this.$categories.list.map(item => {
4141
item.link = item.path;
4242
item.text = item.name;
43+
item.size = item.pages ? item.pages.length : 0;
4344
return item;
4445
}).sort((a, b) => {
4546
try {
4647
return a.text.localeCompare(b.text, 'zh-CN');
4748
} catch (error) {
4849
return a.text - b.text;
4950
}
51+
}).sort((a, b) => {
52+
return b.size - a.size;
5053
});
5154
}
5255
return Object.assign(resolveNavLinkItem(link), {

0 commit comments

Comments
 (0)