Skip to content

Commit

Permalink
feat: update theme
Browse files Browse the repository at this point in the history
  • Loading branch information
zyao89 committed May 26, 2021
1 parent 7d23170 commit 1578454
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
3 changes: 2 additions & 1 deletion theme/components/CategoriesCardBlocks.vue
Expand Up @@ -10,7 +10,8 @@
<h2 :class="$style.title">
<NavLink :item="item.path" line>{{ item.title }}</NavLink>
</h2>
<div :class="$style.right">{{ item.size }} / {{ allCount }}</div>
<div :class="$style.right">{{ item.size }}</div>
<!-- <div :class="$style.right">{{ item.size }} / {{ allCount }}</div> -->
</div>
</div>
</template>
Expand Down
2 changes: 1 addition & 1 deletion theme/components/HomeBlog.vue
Expand Up @@ -4,7 +4,7 @@
<template v-else>
<div>
<!-- 最新文章 -->
<PostCardBlocks :title="['最新', '博文']" :subtitle="['LATEST', 'POST']" />
<PostCardBlocks :title="['最新', '博文']" :subtitle="['LATEST', 'POST']" :max="9"/>
</div>
<div v-if="$categories && $categories.list && $categories.list.length">
<!-- 热门分类 -->
Expand Down
3 changes: 3 additions & 0 deletions theme/components/NavLinks.vue
Expand Up @@ -40,13 +40,16 @@ export default {
link.items = this.$categories.list.map(item => {
item.link = item.path;
item.text = item.name;
item.size = item.pages ? item.pages.length : 0;
return item;
}).sort((a, b) => {
try {
return a.text.localeCompare(b.text, 'zh-CN');
} catch (error) {
return a.text - b.text;
}
}).sort((a, b) => {
return b.size - a.size;
});
}
return Object.assign(resolveNavLinkItem(link), {
Expand Down

0 comments on commit 1578454

Please sign in to comment.