fix(ui): VIP equity list wrap and theme toggle moon/sun icons

This commit is contained in:
2026-07-21 18:19:42 +08:00
parent deff20532f
commit f9b495eb14
7 changed files with 305 additions and 44 deletions
+3 -3
View File
@@ -157,8 +157,8 @@
syncThemeImages(isDark);
syncCodeHighlightTheme(isDark);
dispatchThemeChange(isDark);
var btn = document.getElementById("theme-toggle");
if (btn) {
document.querySelectorAll("#theme-toggle, #theme-toggle-desktop, #theme-toggle-mobile, #dropdown-theme-toggle, #float-theme-toggle, .toggle-theme").forEach(function (btn) {
if (!btn) return;
btn.setAttribute("aria-pressed", isDark ? "true" : "false");
btn.classList.toggle("is-dark", isDark);
var moon = btn.querySelector(".theme-icon-moon");
@@ -167,7 +167,7 @@
moon.style.display = isDark ? "none" : "";
sun.style.display = isDark ? "" : "none";
}
}
});
var floatBtn = document.getElementById("float-theme-toggle");
if (floatBtn) {
floatBtn.setAttribute("aria-pressed", isDark ? "true" : "false");