From 5cbf0ddfcf54bad54476f398760120e387ea387b Mon Sep 17 00:00:00 2001 From: huyunan <40879024+huyunan@users.noreply.github.com> Date: Sat, 20 Sep 2025 15:19:23 +0800 Subject: [PATCH] feat(theme): add `signdown` frontmatter for home page (#691) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * signdow 参数添加 是否显示向下箭头标志 * VPSignDown components add. * Delete the wrongly modified code. * feat(theme): signdown parameter adds whether to display a downward arrow flag * feat(theme): signdown marks are changed to be fixed --------- Co-authored-by: wb_huyunan --- docs/notes/theme/config/frontmatter/basic.md | 8 ++ theme/src/client/components/VPSignDown.vue | 86 ++++++++++++++++++++ theme/src/client/layouts/Layout.vue | 2 + theme/src/shared/frontmatter/normal.ts | 7 ++ 4 files changed, 103 insertions(+) create mode 100644 theme/src/client/components/VPSignDown.vue diff --git a/docs/notes/theme/config/frontmatter/basic.md b/docs/notes/theme/config/frontmatter/basic.md index d14ba7aa..db01ecf7 100644 --- a/docs/notes/theme/config/frontmatter/basic.md +++ b/docs/notes/theme/config/frontmatter/basic.md @@ -99,6 +99,14 @@ permalink: /config/frontmatter/basic/ 当前文章是否 显示 回到顶部 的按钮。 +### signDown + +- 类型: `boolean` +- 默认值: `false` +- 详情: + + 当前文章是否 显示 向下前头 的标志。 + ### comments - 类型: `boolean` diff --git a/theme/src/client/components/VPSignDown.vue b/theme/src/client/components/VPSignDown.vue new file mode 100644 index 00000000..49414891 --- /dev/null +++ b/theme/src/client/components/VPSignDown.vue @@ -0,0 +1,86 @@ + + + + + diff --git a/theme/src/client/layouts/Layout.vue b/theme/src/client/layouts/Layout.vue index dfd8ce1a..e886fe23 100644 --- a/theme/src/client/layouts/Layout.vue +++ b/theme/src/client/layouts/Layout.vue @@ -8,6 +8,7 @@ import VPEncryptGlobal from '@theme/VPEncryptGlobal.vue' import VPFooter from '@theme/VPFooter.vue' import VPLocalNav from '@theme/VPLocalNav.vue' import VPSidebar from '@theme/VPSidebar.vue' +import VPSignDown from '@theme/VPSignDown.vue' import VPSkipLink from '@theme/VPSkipLink.vue' import { watch } from 'vue' import { useRoute } from 'vuepress/client' @@ -199,6 +200,7 @@ useCloseSidebarOnEscape(isSidebarOpen, closeSidebar) +