fix(nav): restore reference theme toggle geometry and single binding
The top-bar theme switch was bound twice — core/theme.js attached a click handler to #theme-toggle-desktop while runtime/main.js delegated click on .toggle-theme, and both ship in main.min.js, so one press toggled twice and the button looked dead. Also realign the control with the reference: - Drop the far modifier from fa-toggle-theme so the sun/moon glyphs resolve against the Solid face at the reference weight instead of Regular. - Restore .toggle-radius .fa/.icon to the reference form (left/right 0 + auto margin only). The extra position/top/transform/size/flex block and the > i selector were overriding the shared abs-* centering rule. - Replace the per-ID bindings with one delegated listener so the floating rail, which carries no id, keeps working. - Remove dead theme.js queries for selectors no markup or stylesheet ships (#theme-toggle, #dropdown-theme-toggle, .theme-icon-moon/.theme-icon-sun, [data-action='toggle-theme'], .is-dark). Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
e30de6562c
commit
030baa511e
9 files changed
+19
-139
No files matched your search
@@ -168,7 +168,7 @@ if (!function_exists('jio_float_right')) :
|
||||
|
||||
switch ($type) {
|
||||
case 'theme_mode':
|
||||
$btn .= '<a' . $style . ' class="float-btn toggle-theme hover-show"' . jio_float_btn_tooltip_attr(__('切换主题', 'jio'), $is_mobile) . ' href="javascript:;"><i class="fa fas fa-toggle-theme"></i></a>';
|
||||
$btn .= '<a' . $style . ' class="float-btn toggle-theme hover-show"' . jio_float_btn_tooltip_attr(__('切换主题', 'jio'), $is_mobile) . ' href="javascript:;"><i class="fa fa-toggle-theme"></i></a>';
|
||||
break;
|
||||
|
||||
case 'back_top':
|
||||
|
||||
Reference in new issue
Block a user