From 48f0bcbe74fa02ba15df61a934d24256986f48b6 Mon Sep 17 00:00:00 2001 From: Zyao89 Date: Mon, 2 Mar 2020 00:29:46 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=A2=9E=E5=8A=A0=E4=BC=98=E5=8C=96=20?= =?UTF-8?q?blog=20=E9=A6=96=E9=A1=B5=20UI=20=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- theme/components/AboutMe.vue | 53 +++++++ theme/components/BlogPosts.vue | 66 +------- theme/components/CategoriesCardBlocks.vue | 120 +++++++++++++++ theme/components/HomeBlog.vue | 38 ++++- theme/components/PersonalInfo.vue | 79 ++++++++-- theme/components/PostCardBlocks.vue | 174 ++++++++++++++++++++++ theme/components/PostInfo.vue | 91 +++++++++++ theme/components/Topics.vue | 103 +++++++++++++ 8 files changed, 651 insertions(+), 73 deletions(-) create mode 100644 theme/components/AboutMe.vue create mode 100644 theme/components/CategoriesCardBlocks.vue create mode 100644 theme/components/PostCardBlocks.vue create mode 100644 theme/components/PostInfo.vue create mode 100644 theme/components/Topics.vue diff --git a/theme/components/AboutMe.vue b/theme/components/AboutMe.vue new file mode 100644 index 0000000..9b336bf --- /dev/null +++ b/theme/components/AboutMe.vue @@ -0,0 +1,53 @@ + + + + + diff --git a/theme/components/BlogPosts.vue b/theme/components/BlogPosts.vue index 592e7d8..fa538e3 100644 --- a/theme/components/BlogPosts.vue +++ b/theme/components/BlogPosts.vue @@ -8,28 +8,11 @@ @@ -48,15 +31,13 @@ + + diff --git a/theme/components/HomeBlog.vue b/theme/components/HomeBlog.vue index f024439..a19c539 100644 --- a/theme/components/HomeBlog.vue +++ b/theme/components/HomeBlog.vue @@ -1,6 +1,24 @@ @@ -8,15 +26,31 @@ import Home from '@theme/components/Home.vue'; import Header from '@theme/components/Header.vue'; import BlogWrapper from '@theme/components/BlogWrapper.vue'; +import PostCardBlocks from '@theme/components/PostCardBlocks.vue'; +import CategoriesCardBlocks from '@theme/components/CategoriesCardBlocks.vue'; +import AboutMe from '@theme/components/AboutMe.vue'; export default { name: 'HomeBlog', components: { - Home, Header, BlogWrapper, + Home, Header, BlogWrapper, PostCardBlocks, CategoriesCardBlocks, AboutMe, }, computed: { data() { return this.$page.frontmatter; }, + hotCategories() { + return this.$categories.list.map(item => { + const obj = Object.assign({}, item); + obj.title = item.name; + obj.size = item.pages ? item.pages.length : 0; + obj.frontmatter = { + + }; + return obj; + }).sort((a, b) => { + return b.size - a.size; + }); + }, }, }; diff --git a/theme/components/PersonalInfo.vue b/theme/components/PersonalInfo.vue index ed3e36e..0471877 100644 --- a/theme/components/PersonalInfo.vue +++ b/theme/components/PersonalInfo.vue @@ -1,15 +1,27 @@