From 71a90db1151de2a4edf2bd8453e6c5718feb9c3e Mon Sep 17 00:00:00 2001 From: naiba Date: Tue, 24 Oct 2023 18:11:02 +0800 Subject: [PATCH] show ad in mobile --- docs/.vitepress/theme/components/HorizontalAd.vue | 15 +++++++++++++++ docs/.vitepress/theme/components/SmallAd.vue | 3 --- docs/.vitepress/theme/components/VerticalAd.vue | 3 +++ docs/.vitepress/theme/index.ts | 8 +++++--- 4 files changed, 23 insertions(+), 6 deletions(-) create mode 100644 docs/.vitepress/theme/components/HorizontalAd.vue delete mode 100644 docs/.vitepress/theme/components/SmallAd.vue create mode 100644 docs/.vitepress/theme/components/VerticalAd.vue diff --git a/docs/.vitepress/theme/components/HorizontalAd.vue b/docs/.vitepress/theme/components/HorizontalAd.vue new file mode 100644 index 00000000..7a8b899e --- /dev/null +++ b/docs/.vitepress/theme/components/HorizontalAd.vue @@ -0,0 +1,15 @@ + + diff --git a/docs/.vitepress/theme/components/SmallAd.vue b/docs/.vitepress/theme/components/SmallAd.vue deleted file mode 100644 index 74073b80..00000000 --- a/docs/.vitepress/theme/components/SmallAd.vue +++ /dev/null @@ -1,3 +0,0 @@ - diff --git a/docs/.vitepress/theme/components/VerticalAd.vue b/docs/.vitepress/theme/components/VerticalAd.vue new file mode 100644 index 00000000..2f158bf0 --- /dev/null +++ b/docs/.vitepress/theme/components/VerticalAd.vue @@ -0,0 +1,3 @@ + diff --git a/docs/.vitepress/theme/index.ts b/docs/.vitepress/theme/index.ts index cc343a1b..3f1b8a2a 100644 --- a/docs/.vitepress/theme/index.ts +++ b/docs/.vitepress/theme/index.ts @@ -1,12 +1,14 @@ import { h } from 'vue' import DefaultTheme from 'vitepress/theme' -import SmallAd from './components/SmallAd.vue' +import HorizontalAd from './components/HorizontalAd.vue' +import VerticalAd from './components/VerticalAd.vue' export default { ...DefaultTheme, Layout() { return h(DefaultTheme.Layout, null, { - 'aside-top': () => h(SmallAd) + 'doc-top': () => h(HorizontalAd), + 'aside-top': () => h(VerticalAd), }) } -} \ No newline at end of file +}