diff --git a/demo/.vitepress/config.ts b/demo/.vitepress/config.ts
index a3011ab..fc26831 100644
--- a/demo/.vitepress/config.ts
+++ b/demo/.vitepress/config.ts
@@ -19,6 +19,7 @@ export default defineConfig({
},
titleTemplate: ':title | Async',
themeConfig: {
+ globalComponents: ['TrmDividerTitle'],
topBars: [
{ title: 'Home', url: '/' },
{
@@ -109,5 +110,11 @@ export default defineConfig({
tags: '/tags',
categorys: '/categories',
},
+ noticeOutdate: {
+ enable: true,
+ limitDay: 1,
+ style: 'flat',
+ position: 'bottom',
+ },
},
});
diff --git a/demo/.vitepress/theme/index.ts b/demo/.vitepress/theme/index.ts
index f02feba..8be6b31 100644
--- a/demo/.vitepress/theme/index.ts
+++ b/demo/.vitepress/theme/index.ts
@@ -4,8 +4,10 @@
// };
import { defineTheme } from 'vitepress-theme-async';
+import layout from './layout.vue';
export default defineTheme({
+ Layout: layout,
enhanceApp(_ctx) {
//
},
diff --git a/demo/.vitepress/theme/layout.vue b/demo/.vitepress/theme/layout.vue
new file mode 100644
index 0000000..f1385c9
--- /dev/null
+++ b/demo/.vitepress/theme/layout.vue
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
diff --git a/packages/vitepress-theme-async/components/TrmPageAbout.vue b/packages/vitepress-theme-async/components/TrmPageAbout.vue
index 04ef5c9..48febe5 100644
--- a/packages/vitepress-theme-async/components/TrmPageAbout.vue
+++ b/packages/vitepress-theme-async/components/TrmPageAbout.vue
@@ -1,6 +1,6 @@
diff --git a/packages/vitepress-theme-async/components/TrmPageArchive.vue b/packages/vitepress-theme-async/components/TrmPageArchive.vue
index e7da743..2cc4b81 100644
--- a/packages/vitepress-theme-async/components/TrmPageArchive.vue
+++ b/packages/vitepress-theme-async/components/TrmPageArchive.vue
@@ -2,9 +2,9 @@
import { computed, onMounted, ref } from "vue";
import { useTags, useArchives, useCategories, useAllPosts, useTheme } from "../composables";
+import TrmTimeline from "./global/TrmTimeline.vue";
+import TrmDividerTitle from "./global/TrmDividerTitle.vue";
import TrmPagination from "./TrmPagination.vue";
-import TrmTimeLine from "./TrmTimeline.vue";
-import TrmDividerTitle from "./TrmDividerTitle.vue";
import { formatDate } from "../utils/client";
import { useCurrentPageIndex } from "../blog";
@@ -80,7 +80,7 @@ onMounted(() => {
-
+
diff --git a/packages/vitepress-theme-async/components/TrmPageIndex.vue b/packages/vitepress-theme-async/components/TrmPageIndex.vue
index 42caa07..3be197e 100644
--- a/packages/vitepress-theme-async/components/TrmPageIndex.vue
+++ b/packages/vitepress-theme-async/components/TrmPageIndex.vue
@@ -1,17 +1,20 @@
@@ -38,17 +39,7 @@ const theme = useTheme();
diff --git a/packages/vitepress-theme-async/components/TrmPagePost.vue b/packages/vitepress-theme-async/components/TrmPagePost.vue
index 0b3ca61..fa07952 100644
--- a/packages/vitepress-theme-async/components/TrmPagePost.vue
+++ b/packages/vitepress-theme-async/components/TrmPagePost.vue
@@ -1,10 +1,10 @@
@@ -59,11 +60,11 @@ const theme = useTheme();
-
+
-
+
diff --git a/packages/vitepress-theme-async/components/TrmSidebarUser.vue b/packages/vitepress-theme-async/components/TrmSidebarUser.vue
index a6e9fd0..fc79381 100644
--- a/packages/vitepress-theme-async/components/TrmSidebarUser.vue
+++ b/packages/vitepress-theme-async/components/TrmSidebarUser.vue
@@ -1,6 +1,6 @@
diff --git a/packages/vitepress-theme-async/components/TrmCardCategorie.vue b/packages/vitepress-theme-async/components/global/TrmCardCategorie.vue
similarity index 86%
rename from packages/vitepress-theme-async/components/TrmCardCategorie.vue
rename to packages/vitepress-theme-async/components/global/TrmCardCategorie.vue
index 6634ebd..ffc0e26 100644
--- a/packages/vitepress-theme-async/components/TrmCardCategorie.vue
+++ b/packages/vitepress-theme-async/components/global/TrmCardCategorie.vue
@@ -1,13 +1,11 @@
@@ -17,7 +15,7 @@ const pageUrl = usePageUrl();
{{ length }}
-
+
{{ $t("title.more") }}
diff --git a/packages/vitepress-theme-async/components/global/TrmCardLink.vue b/packages/vitepress-theme-async/components/global/TrmCardLink.vue
new file mode 100644
index 0000000..03ffe3b
--- /dev/null
+++ b/packages/vitepress-theme-async/components/global/TrmCardLink.vue
@@ -0,0 +1,55 @@
+
+
+
+
+
+
+
diff --git a/packages/vitepress-theme-async/components/TrmCardPost.vue b/packages/vitepress-theme-async/components/global/TrmCardPost.vue
similarity index 87%
rename from packages/vitepress-theme-async/components/TrmCardPost.vue
rename to packages/vitepress-theme-async/components/global/TrmCardPost.vue
index 0fc9ec6..75b498a 100644
--- a/packages/vitepress-theme-async/components/TrmCardPost.vue
+++ b/packages/vitepress-theme-async/components/global/TrmCardPost.vue
@@ -1,16 +1,18 @@
@@ -29,12 +31,12 @@ const pageUrl = usePageUrl();
-
+
{{ $t("post.sticky") }}
diff --git a/packages/vitepress-theme-async/components/TrmCardPostMini.vue b/packages/vitepress-theme-async/components/global/TrmCardPostMini.vue
similarity index 96%
rename from packages/vitepress-theme-async/components/TrmCardPostMini.vue
rename to packages/vitepress-theme-async/components/global/TrmCardPostMini.vue
index 634f588..58f841e 100644
--- a/packages/vitepress-theme-async/components/TrmCardPostMini.vue
+++ b/packages/vitepress-theme-async/components/global/TrmCardPostMini.vue
@@ -1,7 +1,7 @@