feat(navigation): hard-switch to Zibll navigation and Font Awesome 5

This commit is contained in:
kate522 committed 2026-08-18 20:46:21 +08:00
1 parent 3c3ddac8be
commit a0b84977a2
630 files changed
+101647 -11293

No files matched your search

+9 -17
View File
@@ -23,8 +23,7 @@ if (!function_exists('aksrt_nav_mobile_shell')) :
$touch_attr = '';
if ($align !== 'top') {
// mini-touch.js reads data-mini-touch; direction via data-touch-direction.
$touch_attr = ' data-mini-touch="mobile-nav" data-touch-direction="' . esc_attr($align) . '"';
$touch_attr = ' mini-touch="mobile-nav" touch-direction="' . esc_attr($align) . '"';
}
echo '<div class="mobile-header">';
@@ -41,9 +40,9 @@ if (!function_exists('aksrt_nav_mobile_shell')) :
: '<span class="navbar-logo-text">' . esc_html($brand_name) . '</span>';
echo '<div class="flex jsb ac mb20">';
echo '<div class="navbar-logo"><a href="' . esc_url(home_url('/')) . '">' . $logo_inner . '</a></div>'; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
echo '<div class="navbar-logo">' . $logo_inner . '</div>'; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
echo '<button type="button" data-toggle-class="mobile-navbar-show" data-target="body" class="close" aria-label="'
. esc_attr__('关闭菜单', 'aksrt') . '"><i class="fas fa-times" aria-hidden="true"></i></button>';
. esc_attr__('关闭菜单', 'aksrt') . '"><svg class="ic-close" aria-hidden="true"><use xlink:href="#icon-close"></use></svg></button>';
echo '</div>';
aksrt_nav_mobile_content($ctx, $m_layout);
@@ -72,13 +71,12 @@ if (!function_exists('aksrt_nav_mobile_content')) :
if (in_array('m_menu', (array) ($ctx['theme_positions'] ?? []), true)) {
$top_btns .= '<a href="javascript:;" class="toggle-theme toggle-radius" id="theme-toggle-mobile" title="'
. esc_attr__('切换亮暗色', 'aksrt') . '">';
$top_btns .= '<i class="fas fa-moon theme-icon-moon" aria-hidden="true"></i>';
$top_btns .= '<i class="fas fa-sun theme-icon-sun" aria-hidden="true"></i>';
$top_btns .= '<i class="fa fas fa-toggle-theme" aria-hidden="true"></i>';
$top_btns .= '</a>';
}
if ($m_layout !== 'center' && !empty($ctx['search_enabled'])) {
$top_btns .= '<a href="javascript:;" class="toggle-radius main-search-btn" data-toggle-class="show" data-target=".navbar-search" aria-label="'
. esc_attr__('打开搜索', 'aksrt') . '"><i class="fas fa-search" aria-hidden="true"></i></a>';
if ($m_layout !== 'center') {
$top_btns .= '<a href="javascript:;" class="toggle-radius main-search-btn" aria-label="'
. esc_attr__('打开搜索', 'aksrt') . '"><svg class="icon" aria-hidden="true"><use xlink:href="#icon-search"></use></svg></a>';
}
if (function_exists('aksrt_get_translate_language_btn')) {
$top_btns .= aksrt_get_translate_language_btn('pull-right');
@@ -89,11 +87,7 @@ if (!function_exists('aksrt_nav_mobile_content')) :
$location = has_nav_menu('mobile') ? 'mobile' : 'primary';
$walker = class_exists('\AKSRT\Frontend\NavWalker')
? new \AKSRT\Frontend\NavWalker(
function_exists('aksrt_get_menu_decoration_settings')
? aksrt_get_menu_decoration_settings()
: []
)
? new \AKSRT\Frontend\NavWalker()
: null;
$args = [
@@ -124,8 +118,6 @@ if (!function_exists('aksrt_nav_mobile_content')) :
}
// User box at bottom of drawer.
if (!empty($ctx['user_menu'])) {
echo aksrt_header_user_box_html($ctx); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
}
echo aksrt_header_user_box_html($ctx); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
}
endif;