From f9b495eb143da2df5d1069f2bb35feb21d2bbb21 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 21 Jul 2026 18:19:42 +0800 Subject: [PATCH] fix(ui): VIP equity list wrap and theme toggle moon/sun icons --- .../css/frontend/nav/header-menu-buttons.css | 19 ++ assets/css/routes/user-center/credits.css | 177 +++++++++++++++++- assets/js/core/theme.js | 6 +- header.php | 12 +- inc/helpers/user-center-renderers/vip-tab.php | 120 +++++++++--- src/AKSRT/Core/ScriptsPart1c.php | 7 + src/AKSRT/Settings/PaymentRuntime.php | 8 +- 7 files changed, 305 insertions(+), 44 deletions(-) diff --git a/assets/css/frontend/nav/header-menu-buttons.css b/assets/css/frontend/nav/header-menu-buttons.css index f68badaf..ad04385b 100644 --- a/assets/css/frontend/nav/header-menu-buttons.css +++ b/assets/css/frontend/nav/header-menu-buttons.css @@ -214,3 +214,22 @@ font-size: 12px; } } + + +/* Theme toggle: keep moon/sun icons centered, no double-glyph overlap */ +.theme-toggle-desktop, +.theme-toggle-mobile, +.toggle-theme { + position: relative; +} +.theme-toggle-desktop .theme-icon-moon, +.theme-toggle-desktop .theme-icon-sun, +.theme-toggle-mobile .theme-icon-moon, +.theme-toggle-mobile .theme-icon-sun, +.toggle-theme .theme-icon-moon, +.toggle-theme .theme-icon-sun { + margin: 0 !important; + line-height: 1; + width: 1em; + text-align: center; +} diff --git a/assets/css/routes/user-center/credits.css b/assets/css/routes/user-center/credits.css index e328f3e8..23d88404 100644 --- a/assets/css/routes/user-center/credits.css +++ b/assets/css/routes/user-center/credits.css @@ -1076,12 +1076,171 @@ body.uc-modal-open { background: linear-gradient(90deg, #22c55e, #16a34a); } -/* VIP tab */ -.uc-vip-tab .user-content-myvip{position:relative;padding:16px;margin-bottom:16px} -.uc-vip-level-cards{display:flex;flex-wrap:wrap;gap:12px} -.uc-vip-level-card{position:relative;flex:1 1 240px;padding:18px 14px;overflow:hidden} -.uc-vip-level-card .v-equity{text-align:left;margin:10px 0 14px;padding-left:1.1em;font-size:13px;line-height:1.55} -.uc-vip-level-card .pay-vip{display:inline-block;margin-top:4px} -.uc-vip-assets-entry{gap:12px} -.jb-vip1{background:linear-gradient(90deg,#f6c453,#f39c12);color:#3b2a00;border:0} -.jb-vip2{background:linear-gradient(90deg,#8e44ad,#3f51b5);color:#fff;border:0} +/* VIP tab — zibll 我的会员 */ +.uc-vip-tab .user-content-myvip { + position: relative; + padding: 16px 18px; + margin-bottom: 16px; +} +.uc-vip-tab .user-content-myvip .avatar-img img { + border-radius: 50%; + display: block; +} +.uc-vip-status { + display: flex; + flex-direction: column; + gap: 4px; +} +.uc-vip-status .flex.ac { + display: inline-flex; + align-items: center; + gap: 6px; +} +.uc-vip-level-cards { + display: flex; + flex-wrap: wrap; + gap: 12px; +} +.uc-vip-level-card { + position: relative; + flex: 1 1 240px; + padding: 20px 16px 18px; + overflow: hidden; + text-align: center; +} +.uc-vip-level-card.level-1 { + background: linear-gradient(180deg, rgba(246, 196, 83, 0.14), rgba(255,255,255,0.02)); +} +.uc-vip-level-card.level-2 { + background: linear-gradient(180deg, rgba(142, 68, 173, 0.10), rgba(255,255,255,0.02)); +} +.uc-vip-level-card .vip-baicon { + position: absolute; + right: 10px; + top: 8px; + opacity: 0.08; + font-size: 64px; + pointer-events: none; +} +.uc-vip-level-card__inner { + position: relative; + z-index: 1; +} +.uc-vip-level-card .v-iconbox { + display: flex; + align-items: center; + justify-content: center; + gap: 10px; + margin-bottom: 10px; +} +.uc-vip-level-card .v-icon { + width: 36px; + height: 36px; + border-radius: 50%; + display: inline-flex; + align-items: center; + justify-content: center; + background: rgba(0,0,0,0.05); + flex: 0 0 auto; +} +.uc-vip-level-card .v-info { + text-align: left; + min-width: 0; +} +.uc-vip-level-card .v-name { + font-size: 16px; + line-height: 1.3; +} +.uc-vip-level-card .v-desc { + margin-top: 2px; +} + +/* CRITICAL: equity must stack as list, never one jammed line */ +.uc-vip-level-card .v-equity, +.pay-vip-info .v-equity { + display: block !important; + list-style: none; + margin: 12px auto 16px; + padding: 0; + max-width: 240px; + text-align: left; + font-size: 13px; + line-height: 1.55; + color: var(--muted-2-color, #888); +} +.uc-vip-level-card .v-equity > li, +.pay-vip-info .v-equity > li { + display: block !important; + position: relative; + margin: 0 0 8px; + padding: 0 0 0 14px; + list-style: none; + white-space: normal; + word-break: break-word; +} +.uc-vip-level-card .v-equity > li:last-child, +.pay-vip-info .v-equity > li:last-child { + margin-bottom: 0; +} +.uc-vip-level-card .v-equity > li::before, +.pay-vip-info .v-equity > li::before { + content: ""; + position: absolute; + left: 0; + top: 0.55em; + width: 6px; + height: 6px; + border-radius: 50%; + background: currentColor; + opacity: 0.45; +} + +.uc-vip-cta { + display: inline-flex !important; + align-items: center; + justify-content: center; + gap: 8px; + min-width: 160px; + padding: 10px 18px !important; + border: 0; + text-decoration: none; + font-weight: 600; +} +.uc-vip-cta > i { + margin: 0 !important; + line-height: 1; +} +.uc-vip-points-link { + padding: 12px 16px; + gap: 12px; +} +.uc-vip-points-link a { + display: inline-flex; + align-items: center; + gap: 6px; + text-decoration: none; + white-space: nowrap; +} +.uc-vip-assets-entry { + gap: 12px; +} + +.jb-vip1 { + background: linear-gradient(25deg, #eabe7b 10%, #f5e3c7 70%, #edc788 100%); + color: #866127; + border: none; +} +.jb-vip2 { + background: linear-gradient(317deg, #4d4c4c 30%, #7b7b7b 70%, #5f5c5c 100%); + color: #ddd; + border: none; +} + +@media (max-width: 767px) { + .uc-vip-level-cards { + flex-direction: column; + } + .uc-vip-level-card { + flex: 1 1 auto; + } +} diff --git a/assets/js/core/theme.js b/assets/js/core/theme.js index 3e157930..1b207a4a 100644 --- a/assets/js/core/theme.js +++ b/assets/js/core/theme.js @@ -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"); diff --git a/header.php b/header.php index fcbba869..0bf37590 100644 --- a/header.php +++ b/header.php @@ -276,9 +276,10 @@ if (!empty($aksrt_bg_styles)) { ?> - + @@ -513,8 +514,9 @@ if (!empty($aksrt_bg_styles)) { diff --git a/inc/helpers/user-center-renderers/vip-tab.php b/inc/helpers/user-center-renderers/vip-tab.php index 22b2e232..83466c87 100644 --- a/inc/helpers/user-center-renderers/vip-tab.php +++ b/inc/helpers/user-center-renderers/vip-tab.php @@ -18,6 +18,72 @@ if (empty($vip_settings['enabled'])) { return; } +/** + * Normalize equity HTML/plain text into a proper