From 597bc09c57a1d126c526420b761cae5fc5a47a41 Mon Sep 17 00:00:00 2001 From: Tim <135014430+nagisa77@users.noreply.github.com> Date: Wed, 6 Aug 2025 16:15:22 +0800 Subject: [PATCH 1/2] fix: offset vditor toolbar when pinned --- frontend/src/assets/global.css | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/frontend/src/assets/global.css b/frontend/src/assets/global.css index 1eaff1765..88432945e 100644 --- a/frontend/src/assets/global.css +++ b/frontend/src/assets/global.css @@ -65,7 +65,11 @@ body { *************************/ .vditor { min-height: 200px; -} +} +.vditor-toolbar--pin { + top: var(--header-height) !important; + z-index: 900 !important; +} /* .vditor { --textarea-background-color: transparent; border: none !important; From f5a3206f36fe947f7a8627c76ef806de97cb6894 Mon Sep 17 00:00:00 2001 From: Tim Date: Wed, 6 Aug 2025 17:23:19 +0800 Subject: [PATCH 2/2] =?UTF-8?q?feat:=20sticky=20=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/assets/global.css | 3 ++- frontend/src/views/AboutPageView.vue | 4 +--- frontend/src/views/HomePageView.vue | 2 +- frontend/src/views/MessagePageView.vue | 2 +- frontend/src/views/NewPostPageView.vue | 2 -- frontend/src/views/ProfileView.vue | 5 +---- 6 files changed, 6 insertions(+), 12 deletions(-) diff --git a/frontend/src/assets/global.css b/frontend/src/assets/global.css index 88432945e..77be29063 100644 --- a/frontend/src/assets/global.css +++ b/frontend/src/assets/global.css @@ -66,10 +66,11 @@ body { .vditor { min-height: 200px; } + .vditor-toolbar--pin { top: var(--header-height) !important; - z-index: 900 !important; } + /* .vditor { --textarea-background-color: transparent; border: none !important; diff --git a/frontend/src/views/AboutPageView.vue b/frontend/src/views/AboutPageView.vue index f36ba3489..669218787 100644 --- a/frontend/src/views/AboutPageView.vue +++ b/frontend/src/views/AboutPageView.vue @@ -75,13 +75,11 @@ export default { max-width: var(--page-max-width); background-color: var(--background-color); margin: 0 auto; - height: 100%; - overflow-y: auto; } .about-tabs { position: sticky; - top: 1px; + top: calc(var(--header-height) + 1px); z-index: 200; background-color: var(--background-color-blur); display: flex; diff --git a/frontend/src/views/HomePageView.vue b/frontend/src/views/HomePageView.vue index bbae20c0b..bd5a3ab13 100644 --- a/frontend/src/views/HomePageView.vue +++ b/frontend/src/views/HomePageView.vue @@ -433,7 +433,7 @@ export default { .topic-container { position: sticky; - top: 1px; + top: calc(var(--header-height) + 1px); z-index: 10; background-color: var(--background-color-blur); display: flex; diff --git a/frontend/src/views/MessagePageView.vue b/frontend/src/views/MessagePageView.vue index 03b79d59f..3eda7cf51 100644 --- a/frontend/src/views/MessagePageView.vue +++ b/frontend/src/views/MessagePageView.vue @@ -632,7 +632,7 @@ export default { .message-page-header { position: sticky; - top: 1px; + top: calc(var(--header-height) + 1px); z-index: 200; background-color: var(--background-color-blur); display: flex; diff --git a/frontend/src/views/NewPostPageView.vue b/frontend/src/views/NewPostPageView.vue index 1038df159..190c85409 100644 --- a/frontend/src/views/NewPostPageView.vue +++ b/frontend/src/views/NewPostPageView.vue @@ -261,10 +261,8 @@ export default { display: flex; justify-content: center; background-color: var(--background-color); - height: 100%; padding-right: 20px; padding-left: 20px; - overflow-y: auto; } .new-post-form { diff --git a/frontend/src/views/ProfileView.vue b/frontend/src/views/ProfileView.vue index 4470100dd..672e8d463 100644 --- a/frontend/src/views/ProfileView.vue +++ b/frontend/src/views/ProfileView.vue @@ -497,9 +497,6 @@ export default { .profile-page { background-color: var(--background-color); - height: 100%; - overflow-y: auto; - overflow-x: hidden; } .profile-page-header { @@ -639,7 +636,7 @@ export default { .profile-tabs { position: sticky; - top: 1px; + top: calc(var(--header-height) + 1px); z-index: 200; background-color: var(--background-color-blur); display: flex;