From 8a969abb27df963c54a266144d6748dd2d2f7d71 Mon Sep 17 00:00:00 2001 From: pengzhanbo Date: Fri, 2 Feb 2024 10:36:44 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E6=94=B9=E7=89=88=E5=8D=9A=E5=AE=A2?= =?UTF-8?q?=E6=96=87=E7=AB=A0=E5=88=97=E8=A1=A8=E9=A1=B5UI=EF=BC=8C?= =?UTF-8?q?=E8=B4=B4=E5=90=88=E8=AE=BE=E8=AE=A1=E8=B6=8B=E5=8A=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- theme/src/client/components/BackToTop.vue | 5 +- theme/src/client/components/Blog.vue | 34 +++++- theme/src/client/components/BlogAside.vue | 110 +++++++++++++----- theme/src/client/components/Flyout/index.vue | 2 +- theme/src/client/components/Friends.vue | 7 ++ .../client/components/Nav/NavBarMenuLink.vue | 2 +- theme/src/client/components/PageMeta.vue | 30 +++-- theme/src/client/components/PostItem.vue | 46 +++++++- theme/src/client/components/PostList.vue | 1 + theme/src/client/components/VFooter.vue | 17 ++- .../components/icons/IconChevronRight.vue | 1 + theme/src/client/composables/blog.ts | 26 ++++- theme/src/client/composables/readingTime.ts | 4 +- theme/src/client/styles/vars.scss | 1 - theme/src/client/utils/index.ts | 1 - theme/src/node/blogTags.ts | 40 +++++++ theme/src/node/plugins.ts | 36 +++--- theme/src/shared/options/locale.ts | 4 + theme/src/shared/options/plugins.ts | 10 +- 19 files changed, 291 insertions(+), 86 deletions(-) create mode 100644 theme/src/node/blogTags.ts diff --git a/theme/src/client/components/BackToTop.vue b/theme/src/client/components/BackToTop.vue index 1752c5d7..c8600f5a 100644 --- a/theme/src/client/components/BackToTop.vue +++ b/theme/src/client/components/BackToTop.vue @@ -77,8 +77,8 @@ function handleClick() { .back-to-top-button { position: fixed; inset-inline-end: 1rem; - right: 20px; - bottom: 64px; + right: 24px; + bottom: calc(var(--vp-footer-height, 82px) - 18px); z-index: var(--vp-z-index-back-to-top); width: 36px; height: 36px; @@ -140,6 +140,7 @@ function handleClick() { @media (min-width: 768px) { .back-to-top-button { + bottom: calc(var(--vp-footer-height, 88px) - 24px); width: 48px; height: 48px; } diff --git a/theme/src/client/components/Blog.vue b/theme/src/client/components/Blog.vue index 0688ce61..4cf21ca9 100644 --- a/theme/src/client/components/Blog.vue +++ b/theme/src/client/components/Blog.vue @@ -12,16 +12,22 @@ const page = usePageData() diff --git a/theme/src/client/components/Flyout/index.vue b/theme/src/client/components/Flyout/index.vue index b2f7bbc0..96aa49f5 100644 --- a/theme/src/client/components/Flyout/index.vue +++ b/theme/src/client/components/Flyout/index.vue @@ -129,7 +129,7 @@ export default { display: flex; align-items: center; height: var(--vp-nav-height); - padding: 0 12px; + padding: 0 10px; color: var(--vp-c-text-1); transition: color 0.5s; } diff --git a/theme/src/client/components/Friends.vue b/theme/src/client/components/Friends.vue index 33b115b0..482b9f03 100644 --- a/theme/src/client/components/Friends.vue +++ b/theme/src/client/components/Friends.vue @@ -45,11 +45,18 @@ const list = computed(() => matter.value.list || [])