fix theme

This commit is contained in:
2026-02-10 15:51:44 +08:00
parent 1203a7168b
commit 6b37ddd9c7
3 changed files with 93 additions and 10 deletions

View File

@@ -1,4 +1,3 @@
#nav-right{
flex:1 1 auto;
justify-content: flex-end;
@@ -176,22 +175,17 @@
background: rgba(255, 255, 255, 0.05);
}
/* --- 附加补丁:确保文章标题正常显示且居中 --- */
/* 1. 当文章标题显示类名触发时,确保它能浮现 */
#nav.show-title .nav-page-title {
display: flex !important;
opacity: 1 !important;
visibility: visible !important;
/* 强制居中,不影响你原本的 blog-info 和 nav-right */
position: absolute !important;
left: 50% !important;
transform: translateX(-50%) !important;
white-space: nowrap !important;
z-index: 1000 !important; /* 确保层级高于你原本的 menus */
z-index: 1000 !important;
}
/* 2. 滚动时自动隐藏原本占据 100% 宽度的菜单和站点标题,防止重叠 */
#nav.show-title #menus,
#nav.show-title .nav-site-title {
opacity: 0 !important;
@@ -199,13 +193,11 @@
pointer-events: none !important;
}
/* 3. 修正文章标题的基础状态,防止它在页面顶端时乱入 */
#nav .nav-page-title {
display: none; /* 默认隐藏,由 show-title 类名控制 */
display: none;
transition: opacity 0.3s ease;
}
/* 4. 保持你原本 blog-info 的溢出显示,确保指纹菜单可用 */
#nav #blog-info {
overflow: visible !important;
}