feat(nav): deep-align menu_search panel, pill radius, senior media
- Layout-2 remote-box AJAX panel (history/hot/posts) via aksrt_menu_search - Live suggestions for post/topic/product; local history for guests - Publish radius switch (zibll bool pill) mapped to CSS radius class - Senior menu editor: WP media library image picker - Active menu underline + panel CSS; acceptance/contract updates
This commit is contained in:
1 parent
2a11a889c3
commit
159a12c481
14 files changed
+494
-117
No files matched your search
@@ -104,7 +104,14 @@ 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'] : [];
|
||||
|
||||
// zibll remote-box: panel HTML loaded via ajax action menu_search.
|
||||
$remote_url = add_query_arg(
|
||||
[
|
||||
'action' => 'aksrt_menu_search',
|
||||
],
|
||||
admin_url('admin-ajax.php')
|
||||
);
|
||||
|
||||
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">';
|
||||
@@ -116,19 +123,10 @@ if (!function_exists('aksrt_get_menu_search')) :
|
||||
. 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>';
|
||||
}
|
||||
// Remote panel mount (zibll remote-box / lazyload-action=ias).
|
||||
echo '<div class="aksrt-remote-box lazyload" remote-box="' . esc_url($remote_url) . '" lazyload-action="ias" data-aksrt-menu-search-remote="1">';
|
||||
echo '<i class="loading-spot"><i></i></i>';
|
||||
echo '</div>';
|
||||
echo '</div></form>';
|
||||
}
|
||||
endif;
|
||||
|
||||
Reference in new issue
Block a user