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

@@ -26,11 +26,17 @@
<script>
var darkmodeAutoSwitch = "<?php echo (get_option("argon_darkmode_autoswitch") == '' ? 'false' : get_option("argon_darkmode_autoswitch"));?>";
function setDarkmode(enable){
// 添加过渡类以启用平滑切换动画
$("html").addClass("theme-transitioning");
if (enable == true){
$("html").addClass("darkmode");
}else{
$("html").removeClass("darkmode");
}
// 过渡完成后移除过渡类
setTimeout(function() {
$("html").removeClass("theme-transitioning");
}, 300);
$(window).trigger("scroll");
}
function toggleDarkmode(){