From 02246c7ec8d5742a1433332d3457424892d38bc3 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 3 Nov 2026 19:58:54 +0800 Subject: [PATCH] fix(nav): render the theme toggle with the outline sun/moon face MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The top-bar theme switch looked heavier and larger than the icons beside it. An earlier commit dropped the `far` modifier from fa-toggle-theme, which moved the glyphs to the Solid face. The reference's glyphs are the outline variants (FA4's sun-o / moon-o), and in FA5 those live in the Regular face — so the Solid replacement reads bolder and visually bigger at the same 1em size, while the neighbouring account icons stay on the lighter Regular-style SVG set. Restore `fa far fa-toggle-theme` on all three placements: desktop navbar, mobile header, and the floating rail. The .fa-toggle-theme::before/::after composite rules only handle positioning and the slide transition, so they are unaffected by the face swap. legacy-navigation-contract already asserts `fa far fa-toggle-theme` and passes again; full suite 999/1000 with the pre-existing frontend-lifecycle failure. Co-Authored-By: Claude Opus 5 (1M context) --- inc/helpers/header/jio-header-mobile.php | 3 ++- inc/helpers/header/jio-header-navbar.php | 4 +++- inc/helpers/jio-float-buttons.php | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/inc/helpers/header/jio-header-mobile.php b/inc/helpers/header/jio-header-mobile.php index cc6c8cb5..05a22c57 100644 --- a/inc/helpers/header/jio-header-mobile.php +++ b/inc/helpers/header/jio-header-mobile.php @@ -63,7 +63,8 @@ if (!function_exists('jio_nav_mobile_content')) : if (in_array('m_menu', (array) ($ctx['theme_positions'] ?? []), true)) { $top_btns .= ''; - $top_btns .= ''; + // 与桌面端一致:Regular 面才是参考主题的空心太阳/月亮。 + $top_btns .= ''; $top_btns .= ''; } if ('center' !== ($ctx['mobile_layout'] ?? 'center')) { diff --git a/inc/helpers/header/jio-header-navbar.php b/inc/helpers/header/jio-header-navbar.php index 53b71354..84bcca44 100644 --- a/inc/helpers/header/jio-header-navbar.php +++ b/inc/helpers/header/jio-header-navbar.php @@ -324,7 +324,9 @@ if (!function_exists('jio_menu_button')) : if (in_array('pc_nav', (array) ($ctx['theme_positions'] ?? []), true)) { $utility_buttons .= ''; - $utility_buttons .= ''; + // 参考主题的太阳/月亮是空心字形;FA5 对应 Regular 面(far), + // 用 Solid(fa)会变成实心并显得更大更粗。 + $utility_buttons .= ''; $utility_buttons .= ''; } if (function_exists('jio_get_translate_language_btn')) { diff --git a/inc/helpers/jio-float-buttons.php b/inc/helpers/jio-float-buttons.php index 619c36f2..8f6ab561 100644 --- a/inc/helpers/jio-float-buttons.php +++ b/inc/helpers/jio-float-buttons.php @@ -168,7 +168,7 @@ if (!function_exists('jio_float_right')) : switch ($type) { case 'theme_mode': - $btn .= ''; + $btn .= ''; break; case 'back_top':