Worktree/icon picker #30

Merged
kate522 merged 7 commits from worktree/icon-picker into main 2026-09-06 05:09:55 +00:00
2 changed files with 6 additions and 6 deletions
Showing only changes of commit d599bbccd9 - Show all commits
+4 -4
View File
@@ -157,7 +157,7 @@ if (!function_exists('aksrt_widget_hot_posts')) :
if ((string) $data['primary'] !== '') { if ((string) $data['primary'] !== '') {
$thumb = '<img' . aksrt_get_lazy_attr('lazy_posts_thumb', (string) $data['primary'], 'fit-cover radius8') . ' alt="' . esc_attr((string) $data['title']) . '">'; $thumb = '<img' . aksrt_get_lazy_attr('lazy_posts_thumb', (string) $data['primary'], 'fit-cover radius8') . ' alt="' . esc_attr((string) $data['title']) . '">';
} }
$time_ago = '<i class="fa fa-clock-o mr3" aria-hidden="true"></i>' . esc_html((string) $data['time_ago']); $time_ago = '<i class="fa fa-clock mr3" aria-hidden="true"></i>' . esc_html((string) $data['time_ago']);
$permalink = esc_url((string) $data['permalink']); $permalink = esc_url((string) $data['permalink']);
if ($i === 1) { if ($i === 1) {
@@ -214,7 +214,7 @@ if (!function_exists('aksrt_widget_term_aggregation')) :
} }
$href = esc_url((string) $href); $href = esc_url((string) $href);
$icon = '<i class="fa fa-folder-open-o mr6" aria-hidden="true"></i>'; $icon = '<i class="fa fa-folder-open mr6" aria-hidden="true"></i>';
$img = aksrt_widget_term_cover_url((int) $term->term_id, true); $img = aksrt_widget_term_cover_url((int) $term->term_id, true);
$img_html = aksrt_graphic_card([ $img_html = aksrt_graphic_card([
'class' => '', 'class' => '',
@@ -241,7 +241,7 @@ if (!function_exists('aksrt_widget_term_aggregation')) :
]; ];
$query = \AKSRT\WidgetSystem\PostQuery::build($query_args, 1, []); $query = \AKSRT\WidgetSystem\PostQuery::build($query_args, 1, []);
$meta = '<span class="px12 muted-3-color text-ellipsis"><i class="fa fa-file-text-o fa-fw" aria-hidden="true"></i>' . sprintf(esc_html__('%s篇文章', 'aksrt'), esc_html(aksrt_format_number(max(0, (int) $query->found_posts)))) . '</span>'; $meta = '<span class="px12 muted-3-color text-ellipsis"><i class="fa fa-file-alt fa-fw" aria-hidden="true"></i>' . sprintf(esc_html__('%s篇文章', 'aksrt'), esc_html(aksrt_format_number(max(0, (int) $query->found_posts)))) . '</span>';
$meta .= '<a class="but p2-10 px12 c-blue hide-sm shrink0"' . $target . ' href="' . $href . '"><i class="fa fa-angle-right" aria-hidden="true"></i>' . esc_html__('更多文章', 'aksrt') . '</a>'; $meta .= '<a class="but p2-10 px12 c-blue hide-sm shrink0"' . $target . ' href="' . $href . '"><i class="fa fa-angle-right" aria-hidden="true"></i>' . esc_html__('更多文章', 'aksrt') . '</a>';
$meta = '<div class="term-meta flex jsb ac">' . $meta . '</div>'; $meta = '<div class="term-meta flex jsb ac">' . $meta . '</div>';
@@ -271,7 +271,7 @@ if (!function_exists('aksrt_widget_term_aggregation')) :
break; break;
} }
if ($post_meta === '') { if ($post_meta === '') {
$post_meta = '<i class="fa fa-clock-o mr3" aria-hidden="true"></i>' . esc_html((string) $data['time_ago']); $post_meta = '<i class="fa fa-clock mr3" aria-hidden="true"></i>' . esc_html((string) $data['time_ago']);
} }
$posts_html .= '<div class="mt10 flex jsb ac">' . $title . '<div class="em09 muted-3-color flex0 ml10">' . $post_meta . '</div></div>'; $posts_html .= '<div class="mt10 flex jsb ac">' . $title . '<div class="em09 muted-3-color flex0 ml10">' . $post_meta . '</div></div>';
} }
@@ -125,7 +125,7 @@ final class ContentRenderer {
if (is_wp_error($href)) { if (is_wp_error($href)) {
continue; continue;
} }
$icon = '<i class="fa fa-folder-open-o mr6" aria-hidden="true"></i>'; $icon = '<i class="fa fa-folder-open mr6" aria-hidden="true"></i>';
$card = [ $card = [
'type' => (string) ($instance['type'] ?? 'style-1'), 'type' => (string) ($instance['type'] ?? 'style-1'),
'class' => 'mb10', 'class' => 'mb10',
@@ -143,7 +143,7 @@ final class ContentRenderer {
$card['text3'] = '<item data-toggle="tooltip" title="' . esc_attr(sprintf(__('共%d篇文章', 'aksrt'), $count)) . '">' . $icon . $count . '</item>'; $card['text3'] = '<item data-toggle="tooltip" title="' . esc_attr(sprintf(__('共%d篇文章', 'aksrt'), $count)) . '">' . $icon . $count . '</item>';
} elseif ($type === 'style-3') { } elseif ($type === 'style-3') {
$card['text1'] = $icon . $name; $card['text1'] = $icon . $name;
$card['text3'] = '<i class="fa mr6 fa-file-text-o" aria-hidden="true"></i>' . $count . __('篇文章', 'aksrt'); $card['text3'] = '<i class="fa mr6 fa-file-alt" aria-hidden="true"></i>' . $count . __('篇文章', 'aksrt');
} }
$attr = ''; $attr = '';