diff --git a/assets/css/frontend/widget-batch3e.css b/assets/css/frontend/widget-batch3e.css index db8f5362..896e4303 100644 --- a/assets/css/frontend/widget-batch3e.css +++ b/assets/css/frontend/widget-batch3e.css @@ -11,18 +11,32 @@ text-align: center; } .aksrt-author-card__cover { - height: 84px; + height: 139px; + min-height: 139px; + max-height: 139px; background: linear-gradient(135deg, #93c5fd, #c4b5fd) center/cover no-repeat; } -.aksrt-author-card__body { padding: 0 14px 16px; } +.aksrt-author-card__body { + display: flex; + flex-direction: column; + align-items: center; + padding: 0 14px 16px; +} +.aksrt-author-card__body .user-content { + display: flex; + flex-direction: column; + align-items: center; + width: 100%; +} .aksrt-author-card__avatar { - display: inline-block; - margin-top: -36px; + display: flex; + flex: 0 0 auto; + margin: -38px auto 0; border-radius: 50%; overflow: hidden; border: 3px solid var(--surface-1, #fff); - width: 72px; - height: 72px; + width: 76px; + height: 76px; } .aksrt-author-card__avatar img { width: 100%; height: 100%; object-fit: cover; display: block; } .aksrt-author-card__name { diff --git a/assets/css/frontend/widget-batch5.css b/assets/css/frontend/widget-batch5.css index 9f0ee489..48804a55 100644 --- a/assets/css/frontend/widget-batch5.css +++ b/assets/css/frontend/widget-batch5.css @@ -808,19 +808,6 @@ color: inherit !important; } -.aksrt-author-card__badge { - display: inline-flex; - align-items: center; - gap: 4px; - margin-top: 8px; - padding: 2px 10px; - border-radius: 999px; - font-size: 12px; - background: #fef3c7; - color: #b45309; -} -.aksrt-author-card__badge img { border-radius: 50%; } - /* 徽章入口与弹窗样式统一由 assets/css/frontend/medal.css 提供。 */ /* Forum tab topics (batch6) */ diff --git a/src/Widgets/WidgetAuthorCard.php b/src/Widgets/WidgetAuthorCard.php index d86db1ab..881b3428 100644 --- a/src/Widgets/WidgetAuthorCard.php +++ b/src/Widgets/WidgetAuthorCard.php @@ -53,10 +53,7 @@ class WidgetAuthorCard extends \WP_Widget { if (!is_string($bio) || $bio === '') { $bio = (string) $user->description; } - $cover = (string) get_user_meta($author_id, 'aksrt_cover', true); - if ($cover === '') { - $cover = (string) get_user_meta($author_id, 'custom_avatar_cover', true); - } + $cover = (string) get_user_meta($author_id, 'aksrt_background_image', true); $post_count = count_user_posts($author_id, 'post', true); $followers = 0; @@ -84,23 +81,6 @@ class WidgetAuthorCard extends \WP_Widget { if ($bio !== '') { echo '
' . esc_html(wp_trim_words($bio, 28)) . '
'; } - if (class_exists('\AKSRT\User\Badges') && \AKSRT\User\Badges::public_display()) { - $wear = \AKSRT\User\Badges::get_wear($author_id); - if ($wear !== '') { - $map = \AKSRT\User\Badges::get_dictionary_map(); - if (isset($map[$wear])) { - $badge = $map[$wear]; - echo '
'; - if (!empty($badge['icon_url'])) { - echo ' '; - } else { - echo ' '; - } - echo esc_html((string) $badge['label']); - echo '
'; - } - } - } if ($show_stats) { echo '
'; echo '' . esc_html((string) $post_count) . '' . esc_html__('文章', 'aksrt') . '';