fix(frontend): align search and header components with reference
This commit is contained in:
1 parent
4c13ef478c
commit
542daca457
34 files changed
+803
-705
No files matched your search
@@ -214,7 +214,7 @@ if (!function_exists('aksrt_author_minicard')) :
|
||||
* @param string $class
|
||||
* @param bool $blur_bg
|
||||
*/
|
||||
function aksrt_author_minicard(int $user_id, string $class = '', bool $blur_bg = false): string {
|
||||
function aksrt_author_minicard(int $user_id, string $class = '', bool $blur_bg = false, string $highlight_query = ''): string {
|
||||
if ($user_id <= 0) {
|
||||
return '';
|
||||
}
|
||||
@@ -240,6 +240,7 @@ if (!function_exists('aksrt_author_minicard')) :
|
||||
'medal' => true,
|
||||
'auth' => true,
|
||||
'level' => true,
|
||||
'highlight_query' => $highlight_query,
|
||||
])
|
||||
: '<a href="' . esc_url($home) . '">' . esc_html($user->display_name) . '</a>';
|
||||
|
||||
@@ -248,20 +249,23 @@ if (!function_exists('aksrt_author_minicard')) :
|
||||
? aksrt_get_user_follow('focus-color px12 ml10 follow flex0 but', $user_id)
|
||||
: '';
|
||||
|
||||
$desc = function_exists('aksrt_get_user_description') ? aksrt_get_user_description($user_id) : trim((string) get_user_meta($user_id, 'description', true));
|
||||
|
||||
$blur = '';
|
||||
if ($blur_bg) {
|
||||
$blur = '<div class="abs-blur-bg blur"><img' . aksrt_get_lazy_attr('lazy_avatar', $avatar_url, '', aksrt_get_lazy_thumb('sm')) . ' alt=""></div>';
|
||||
}
|
||||
|
||||
$description = function_exists('aksrt_get_user_description') ? aksrt_get_user_description($user_id) : trim((string) get_user_meta($user_id, 'description', true));
|
||||
$description_html = $highlight_query !== '' && function_exists('aksrt_renderer_highlight_text')
|
||||
? aksrt_renderer_highlight_text($description, $highlight_query)
|
||||
: esc_html($description);
|
||||
|
||||
return '<div class="author-minicard radius8 relative-h ' . esc_attr($class) . '">'
|
||||
. $blur
|
||||
. '<ul class="list-inline relative">'
|
||||
. '<li>' . $avatar_box . '</li>'
|
||||
. '<li><dl>'
|
||||
. '<dt class="flex ac">' . $name . $follow . '</dt>'
|
||||
. '<dd class="mt6 em09 muted-color text-ellipsis">' . esc_html($desc) . '</dd>'
|
||||
. '<dd class="mt6 em09 muted-color text-ellipsis">' . $description_html . '</dd>'
|
||||
. '</dl></li>'
|
||||
. '</ul></div>';
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user