diff --git a/postcss.config.js b/postcss.config.js
index 2e7af2b..d41ad63 100644
--- a/postcss.config.js
+++ b/postcss.config.js
@@ -1,6 +1,6 @@
export default {
- plugins: {
- tailwindcss: {},
- autoprefixer: {},
- },
+ plugins: {
+ tailwindcss: {},
+ autoprefixer: {},
+ },
}
diff --git a/src/api/git.ts b/src/api/git.ts
new file mode 100644
index 0000000..55c2403
--- /dev/null
+++ b/src/api/git.ts
@@ -0,0 +1,13 @@
+import {request} from "@/utils/network.ts";
+
+const TOKEN = "fb8aec429ea7d0a36f7238dbffda9d2d66c7b045"
+
+export async function getActivity() {
+ return request({
+ url: '/git/api/v1/users/cantyonion/activities/feeds',
+ method: 'get',
+ headers: {
+ Authorization: ` ${TOKEN}`
+ }
+ })
+}
diff --git a/src/components/card/CardTitle.vue b/src/components/card/CardTitle.vue
new file mode 100644
index 0000000..856e207
--- /dev/null
+++ b/src/components/card/CardTitle.vue
@@ -0,0 +1,27 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/components/card/SectionCard.vue b/src/components/card/SectionCard.vue
new file mode 100644
index 0000000..5ed707f
--- /dev/null
+++ b/src/components/card/SectionCard.vue
@@ -0,0 +1,42 @@
+
+
+
+
+
+
+
+
+
+ ❌
+ 载入错误
+
+
+
+ 最近没有动态
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/main.ts b/src/main.ts
index 3eb4448..2925513 100644
--- a/src/main.ts
+++ b/src/main.ts
@@ -6,11 +6,20 @@ import router from "@/router";
import {library} from '@fortawesome/fontawesome-svg-core'
import {FontAwesomeIcon} from '@fortawesome/vue-fontawesome'
import {faClock} from '@fortawesome/free-regular-svg-icons'
-import {faXmark, faBlog, faGauge, faCodeBranch, faCloud, faChevronRight} from '@fortawesome/free-solid-svg-icons'
+import {
+ faXmark,
+ faBlog,
+ faGauge,
+ faCodeBranch,
+ faCloud,
+ faChevronRight,
+ faCodeCommit
+} from '@fortawesome/free-solid-svg-icons'
import {faWeibo, faQq, faGithubAlt, faSteamSymbol} from '@fortawesome/free-brands-svg-icons'
library.add(
- faClock, faXmark, faBlog, faGauge, faCodeBranch, faCloud, faWeibo, faQq, faGithubAlt, faSteamSymbol, faChevronRight
+ faClock, faXmark, faBlog, faGauge, faCodeBranch, faCloud, faWeibo, faQq, faGithubAlt, faSteamSymbol, faChevronRight,
+ faCodeCommit
)
createApp(App).use(router).component('font-awesome-icon', FontAwesomeIcon).mount('#app')
diff --git a/src/views/home/HomeView.vue b/src/views/home/HomeView.vue
index 32c4682..b7d1bb3 100644
--- a/src/views/home/HomeView.vue
+++ b/src/views/home/HomeView.vue
@@ -2,13 +2,20 @@
import {computed, onMounted, ref} from "vue";
import ArticleCard from "@/components/card/ArticleCard.vue";
import {getBlogRecentPost} from "@/api/blog.ts";
-// import ArticleDigestViewer from "@/components/card/ArticleDigestViewer.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";
const recentPosts = ref(null);
-const isLoading = ref(true);
-const isError = ref(false);
+const isLoading = ref({
+ blog: true,
+ git: true
+});
+const isError = ref({
+ blog: false,
+ git: false
+});
const hasPosts = computed(() => (recentPosts.value ?? []).length > 0);
const postsData = computed(() => {
@@ -20,13 +27,13 @@ const postsData = computed(() => {
const reloadPosts = async () => {
try {
- isLoading.value = true
+ isLoading.value.blog = true
const postData = await getBlogRecentPost();
recentPosts.value = postData.data.dataSet
- isLoading.value = false
+ isLoading.value.blog = false
} catch (e) {
- isLoading.value = false
- isError.value = true
+ isLoading.value.blog = false
+ isError.value.blog = true
}
}
@@ -34,10 +41,10 @@ onMounted(async () => {
try {
const postData = await getBlogRecentPost();
recentPosts.value = postData.data.dataSet
- isLoading.value = false
+ isLoading.value.blog = false
} catch (e) {
- isLoading.value = false
- isError.value = true
+ isLoading.value.blog = false
+ isError.value.blog = true
}
})
@@ -49,44 +56,28 @@ onMounted(async () => {
-
-