From d10399a5904957b408146f07246e80a83102c08d Mon Sep 17 00:00:00 2001 From: Jeffrey Hsu Date: Mon, 2 Dec 2024 20:00:21 +0800 Subject: [PATCH] add blog page --- components/card/ArticleCard.vue | 10 +++------ components/markdown/Section.vue | 8 ++++++- pages/blog.vue | 14 ++++++++++++ pages/blog/[cid].vue | 40 ++++++++++++++++++++++++++++++++- plugins/fontawsome.ts | 7 +++--- types/blog.d.ts | 12 +++++++++- 6 files changed, 78 insertions(+), 13 deletions(-) create mode 100644 pages/blog.vue diff --git a/components/card/ArticleCard.vue b/components/card/ArticleCard.vue index 182b8a2..6ff1ff4 100644 --- a/components/card/ArticleCard.vue +++ b/components/card/ArticleCard.vue @@ -13,16 +13,12 @@ const thumbUrl = computed(() => { return props.post.fields.thumb.value }) -const handleOnCardClick = () => { - window.open(props.post.url, '_self') -} - \ No newline at end of file diff --git a/pages/blog.vue b/pages/blog.vue new file mode 100644 index 0000000..61c76f4 --- /dev/null +++ b/pages/blog.vue @@ -0,0 +1,14 @@ + + + + + \ No newline at end of file diff --git a/pages/blog/[cid].vue b/pages/blog/[cid].vue index 545c08a..71770da 100644 --- a/pages/blog/[cid].vue +++ b/pages/blog/[cid].vue @@ -1,12 +1,50 @@