修改完成
This commit is contained in:
@@ -252,7 +252,7 @@
|
||||
menu.setAttribute("aria-hidden", "true");
|
||||
|
||||
inner.className = "container site-mobile-menu-inner";
|
||||
[...navLinks.querySelectorAll("a"), ...(navActions ? navActions.querySelectorAll("a") : [])].forEach((link) => {
|
||||
[...navLinks.querySelectorAll("a, button"), ...(navActions ? navActions.querySelectorAll("a") : [])].forEach((link) => {
|
||||
inner.appendChild(link.cloneNode(true));
|
||||
});
|
||||
menu.appendChild(inner);
|
||||
@@ -288,9 +288,10 @@
|
||||
initSiteMenu();
|
||||
refreshPublicUser();
|
||||
|
||||
// 只在精确指针设备上启用微动效,触屏和减少动效偏好下保持静态。
|
||||
// 鼠标反馈仅用于精确指针;首页独立启用动效,其他页面遵循系统偏好。
|
||||
const finePointer = window.matchMedia("(hover: hover) and (pointer: fine)").matches;
|
||||
const reduceMotion = window.matchMedia("(prefers-reduced-motion: reduce)").matches;
|
||||
const reduceMotion = !document.body.classList.contains("page-home-portal") &&
|
||||
window.matchMedia("(prefers-reduced-motion: reduce)").matches;
|
||||
|
||||
if (!finePointer || reduceMotion) return;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user