feat(nav): complete remaining zibll parity (search, i18n, senior menus, CSS)
- Remove obsolete dual-path nav CSS; add utilities + language dropdown styles - Wire header/mobile translate switcher from i18n config - Layout-2 inline search hot keywords panel; nav_folding on resize - NavMenuOptions JSON editors for graphic_card / multi_column_links - Section-navs zibll posts-nav-lists; page-navs enqueue; mobile article TOC box - SPA/PHP user-card publish type; rebuild admin assets
This commit is contained in:
1 parent
259dbdbe04
commit
fc50e57bc9
22 files changed
+580
-1994
No files matched your search
@@ -104,6 +104,7 @@ if (!function_exists('aksrt_get_menu_search')) :
|
||||
$type = (string) ($state['type'] ?? 'post');
|
||||
$cat_enabled = !empty($state['category_enabled']);
|
||||
$cat_id = (int) ($state['category_id'] ?? 0);
|
||||
$hots = is_array($ctx['search_hot_keywords'] ?? null) ? $ctx['search_hot_keywords'] : [];
|
||||
|
||||
echo '<form method="get" class="navbar-form navbar-left hover-show" action="' . esc_url(home_url('/')) . '" role="search" data-aksrt-search-form="inline">';
|
||||
echo '<div class="form-group relative dropdown">';
|
||||
@@ -112,9 +113,22 @@ if (!function_exists('aksrt_get_menu_search')) :
|
||||
echo '<input type="hidden" name="aksrt_category" value="' . esc_attr((string) $cat_id) . '">';
|
||||
}
|
||||
echo '<input type="text" class="form-control search-input focus-show" name="s" value="'
|
||||
. esc_attr(get_search_query()) . '" placeholder="' . esc_attr($placeholder) . '">';
|
||||
. esc_attr(get_search_query()) . '" placeholder="' . esc_attr($placeholder) . '" autocomplete="off">';
|
||||
echo '<div class="abs-right muted-3-color"><button type="submit" class="null" aria-label="'
|
||||
. esc_attr__('搜索', 'aksrt') . '"><i class="fas fa-search" aria-hidden="true"></i></button></div>';
|
||||
if ($hots) {
|
||||
echo '<div class="dropdown-menu hover-show-con navbar-inline-search-panel">';
|
||||
echo '<div class="muted-2-color em09 mb6">' . esc_html__('热门搜索', 'aksrt') . '</div>';
|
||||
echo '<div class="navbar-inline-search-hots">';
|
||||
foreach ($hots as $kw) {
|
||||
$kw = trim((string) $kw);
|
||||
if ($kw === '') {
|
||||
continue;
|
||||
}
|
||||
echo '<a class="but jb-sm" href="' . esc_url(home_url('/?s=' . rawurlencode($kw))) . '">' . esc_html($kw) . '</a> ';
|
||||
}
|
||||
echo '</div></div>';
|
||||
}
|
||||
echo '</div></form>';
|
||||
}
|
||||
endif;
|
||||
@@ -179,13 +193,25 @@ if (!function_exists('aksrt_header_user_box_html')) :
|
||||
}
|
||||
|
||||
if (!empty($ctx['can_publish'])) {
|
||||
$pub_text = class_exists('\AKSRT\Settings\Settings')
|
||||
? (string) (\AKSRT\Settings\Settings::get_all()['header_user_newposts_text'] ?? '')
|
||||
: '';
|
||||
$all = class_exists('\AKSRT\Settings\Settings') ? \AKSRT\Settings\Settings::get_all() : [];
|
||||
$pub_text = (string) ($all['header_user_newposts_text'] ?? '');
|
||||
if ($pub_text === '') {
|
||||
$pub_text = __('发布内容', 'aksrt');
|
||||
}
|
||||
$href .= '<a rel="nofollow" href="' . esc_url((string) $ctx['publish_url']) . '">';
|
||||
$pub_type = sanitize_key((string) ($all['header_user_newposts_btn'] ?? 'post'));
|
||||
$pub_url = (string) $ctx['publish_url'];
|
||||
if ($pub_type === 'topic' && function_exists('aksrt_get_forum_compose_url')) {
|
||||
$u = aksrt_get_forum_compose_url();
|
||||
if ($u) { $pub_url = $u; }
|
||||
} elseif ($pub_type === 'product') {
|
||||
if (function_exists('aksrt_get_product_edit_url')) {
|
||||
$u = (string) aksrt_get_product_edit_url();
|
||||
if ($u !== '') { $pub_url = $u; }
|
||||
} else {
|
||||
$pub_url = admin_url('post-new.php?post_type=aksrt_product');
|
||||
}
|
||||
}
|
||||
$href .= '<a rel="nofollow" href="' . esc_url($pub_url) . '">';
|
||||
$href .= '<div class="badg mb6 toggle-radius c-green"><i class="fas fa-pen" aria-hidden="true"></i></div>';
|
||||
$href .= '<div class="c-green">' . esc_html($pub_text) . '</div></a>';
|
||||
}
|
||||
@@ -284,6 +310,9 @@ if (!function_exists('aksrt_menu_button')) :
|
||||
$radius_but .= '<i class="fas fa-sun theme-icon-sun" aria-hidden="true" style="display:none"></i>';
|
||||
$radius_but .= '</a>';
|
||||
}
|
||||
if (function_exists('aksrt_get_translate_language_btn')) {
|
||||
$radius_but .= aksrt_get_translate_language_btn('ml10 pull-right');
|
||||
}
|
||||
if ($radius_but !== '') {
|
||||
$button .= '<div class="navbar-form navbar-right flex ac">' . $radius_but . '</div>';
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user