From 7a128ef14881b773114006ebcd4b2401f63dbf03 Mon Sep 17 00:00:00 2001 From: Jeffrey Hsu Date: Tue, 5 Nov 2024 19:34:18 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E4=BA=86=E8=AE=B8=E5=A4=9A?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.development | 3 +- .env.production | 3 +- src/App.vue | 22 +++++++- src/components/alert/UnderMaintenance.vue | 18 +++++++ src/components/card/FullScreenIntroCard.vue | 14 +++++ src/components/nav/NavBar.vue | 14 ++--- src/components/nav/NavBarEntryItem.vue | 27 ++++++++-- src/router/index.ts | 58 ++++++++++++++++++++- src/views/article/BlogView.vue | 11 ++++ src/views/article/DiaryView.vue | 11 ++++ src/views/error/MaintenanceView.vue | 12 +++++ src/views/home/HomeView.vue | 28 ++-------- src/views/talk/TalkView.vue | 11 ++++ 13 files changed, 194 insertions(+), 38 deletions(-) create mode 100644 src/components/alert/UnderMaintenance.vue create mode 100644 src/components/card/FullScreenIntroCard.vue create mode 100644 src/views/article/BlogView.vue create mode 100644 src/views/article/DiaryView.vue create mode 100644 src/views/error/MaintenanceView.vue create mode 100644 src/views/talk/TalkView.vue diff --git a/.env.development b/.env.development index 04bd733..de28b17 100644 --- a/.env.development +++ b/.env.development @@ -1 +1,2 @@ -VITE_BASE_URL = "/api" \ No newline at end of file +VITE_BASE_URL = "/api" +VITE_DEV = true \ No newline at end of file diff --git a/.env.production b/.env.production index 56ffd93..d38fc79 100644 --- a/.env.production +++ b/.env.production @@ -1 +1,2 @@ -VITE_BASE_URL = "/" \ No newline at end of file +VITE_BASE_URL = "/" +VITE_DEV = false \ No newline at end of file diff --git a/src/App.vue b/src/App.vue index f83d798..6afa16d 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,6 +1,7 @@ diff --git a/src/components/alert/UnderMaintenance.vue b/src/components/alert/UnderMaintenance.vue new file mode 100644 index 0000000..77a7518 --- /dev/null +++ b/src/components/alert/UnderMaintenance.vue @@ -0,0 +1,18 @@ + + + + + \ No newline at end of file diff --git a/src/components/card/FullScreenIntroCard.vue b/src/components/card/FullScreenIntroCard.vue new file mode 100644 index 0000000..86a4f36 --- /dev/null +++ b/src/components/card/FullScreenIntroCard.vue @@ -0,0 +1,14 @@ + + + + + \ No newline at end of file diff --git a/src/components/nav/NavBar.vue b/src/components/nav/NavBar.vue index c1225f2..baa2ee1 100644 --- a/src/components/nav/NavBar.vue +++ b/src/components/nav/NavBar.vue @@ -37,6 +37,7 @@ const entry = [ title: '主页', icon: ['fas', 'home'], entry: [], + to: 'home' }, { title: '文章', @@ -50,7 +51,7 @@ const entry = [ { title: '日记', url: false, - to: 'log' + to: 'diary' }, ], }, @@ -66,14 +67,15 @@ const entry = [ { title: '仓库', url: true, - to: 'https://cantyonion.site/git' + to: 'https://cantyonion.site/git/' }, ], }, { title: '杂谈', icon: ['fas', 'chess-rook'], - entry: [] + entry: [], + to: 'talk' } ] @@ -84,7 +86,7 @@ const menuExpanded = () => { \ No newline at end of file diff --git a/src/views/article/DiaryView.vue b/src/views/article/DiaryView.vue new file mode 100644 index 0000000..27324a8 --- /dev/null +++ b/src/views/article/DiaryView.vue @@ -0,0 +1,11 @@ + + + + + \ No newline at end of file diff --git a/src/views/error/MaintenanceView.vue b/src/views/error/MaintenanceView.vue new file mode 100644 index 0000000..7880bc0 --- /dev/null +++ b/src/views/error/MaintenanceView.vue @@ -0,0 +1,12 @@ + + + + + \ No newline at end of file diff --git a/src/views/home/HomeView.vue b/src/views/home/HomeView.vue index 145ccae..8091bfa 100644 --- a/src/views/home/HomeView.vue +++ b/src/views/home/HomeView.vue @@ -2,13 +2,14 @@ import {computed, onMounted, ref} from "vue"; import ArticleCard from "@/components/card/ArticleCard.vue"; import {getBlogRecentPost} from "@/api/blog.ts"; -import NavBar from "@/components/nav/NavBar.vue"; +// import NavBar from "@/components/nav/NavBar.vue"; import IntroCard from "@/components/card/IntroCard.vue"; import CardTitle from "@/components/card/CardTitle.vue"; import SectionCard from "@/components/card/SectionCard.vue"; import {getActivity} from "@/api/git.ts"; import GitCard from "@/components/card/GitCard.vue"; import emitter from "@/utils/mitt.ts"; +// import FullScreenIntroCard from "@/components/card/FullScreenIntroCard.vue"; // import {getAssetURL} from "@/utils/function.ts"; const recentPosts = ref(null); @@ -44,7 +45,6 @@ const activitiesData = computed((): IActivity[] => { }).filter(item => item !== null) }) - const reloadPosts = async () => { try { isLoading.value.blog = true @@ -77,7 +77,9 @@ onMounted(async () => { \ No newline at end of file