fix: 修复移动端 UI 问题

- 修复侧边抽屉文章目录在 PJAX 页面切换后不重新初始化的问题
- 优化涟漪点击效果:将结束动画从 scale 收缩改为 opacity 淡出
- 添加暗黑/明亮模式切换过渡动画(250ms 平滑过渡)
- 优化分享面板动画:添加退出时的反向错落延迟
- 添加分享面板移动端响应式适配,防止视口溢出
This commit is contained in:
2026-01-11 22:43:57 +08:00
parent f8d7c79b86
commit db24ca2043
6 changed files with 209 additions and 32 deletions

View File

@@ -337,7 +337,22 @@ html.immersion-color.darkmode body {
}
/* 主题切换过渡效果 (Dark/Light Mode Transition) */
html {
transition: none;
}
html.theme-transitioning,
html.theme-transitioning *,
html.theme-transitioning *::before,
html.theme-transitioning *::after {
transition:
background-color 250ms var(--ease-standard),
border-color 250ms var(--ease-standard),
color 200ms var(--ease-standard),
box-shadow 250ms var(--ease-standard),
fill 200ms var(--ease-standard),
stroke 200ms var(--ease-standard) !important;
}
/*Argon CSS Override*/
@@ -8224,6 +8239,52 @@ body.noscroll:before {
transform: scale(1) translateX(0);
}
/* 分享按钮退出动画 - 反向错落延迟 */
#share_container:not(.opened) #share > a:nth-child(1) { transition-delay: 120ms; }
#share_container:not(.opened) #share > a:nth-child(2) { transition-delay: 100ms; }
#share_container:not(.opened) #share > a:nth-child(3) { transition-delay: 80ms; }
#share_container:not(.opened) #share > a:nth-child(4) { transition-delay: 60ms; }
#share_container:not(.opened) #share > a:nth-child(5) { transition-delay: 40ms; }
#share_container:not(.opened) #share > a:nth-child(6) { transition-delay: 20ms; }
#share_container:not(.opened) #share > a:nth-child(7) { transition-delay: 0ms; }
#share_container:not(.opened) #share > a:nth-child(8) { transition-delay: 0ms; }
/* 分享面板移动端响应式适配 */
@media (max-width: 576px) {
#share_container {
position: static;
}
#share {
position: fixed;
bottom: 80px;
right: 16px;
left: auto;
top: auto;
flex-direction: column-reverse;
gap: 8px;
transform: translateY(20px);
max-height: calc(100vh - 160px);
overflow-y: auto;
padding: 8px;
background: var(--color-foreground);
border-radius: 12px;
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}
#share_container.opened #share {
transform: translateY(0);
}
#share > a {
transform: scale(0.8) translateY(10px);
}
#share_container.opened #share > a {
transform: scale(1) translateY(0);
}
}
#share_show {
opacity: 1;
@@ -14846,13 +14907,13 @@ html.darkmode article.post.card:hover {
background-position: 50%;
transform: scale(10, 10);
opacity: 0;
transition: transform var(--animation-slow), opacity var(--animation-normal);
transition: opacity 350ms var(--ease-standard);
}
.btn-ripple:active::after {
transform: scale(0, 0);
transform: scale(10, 10);
opacity: 1;
transition: 0s;
transition: transform 0s, opacity 0s;
}
/* 输入框 Apple 风格 */