评论区硬切换实现小修复
This commit is contained in:
@@ -89,6 +89,13 @@
|
||||
|
||||
#postcomments .commentlist > .comment > .list-inline .author-box {
|
||||
align-items: start;
|
||||
/* 阻断外部作者卡片样式(如 single-post/author-actions 的 .author-box 卡片)
|
||||
渗入评论头部:legacy 中评论头部是无装饰的 flex 行。 */
|
||||
margin-bottom: 0;
|
||||
padding: 0;
|
||||
background: none;
|
||||
border-radius: 0;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
#postcomments .commentlist > .comment > .list-inline .comment-footer {
|
||||
|
||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
@@ -1147,14 +1147,8 @@ html.dark .post-drop-meta__item:hover {
|
||||
}
|
||||
|
||||
/* ===== Author Card — 对齐 legacy 卡片容器 ===== */
|
||||
.author-box {
|
||||
margin-bottom: 16px;
|
||||
padding: 18px;
|
||||
background: var(--surface-1, #fff);
|
||||
border: none;
|
||||
border-radius: var(--radius-2xl, 16px);
|
||||
box-shadow: var(--shadow-sm);
|
||||
}
|
||||
/* 原 .author-box 卡片规则已删除:全站仅评论区使用 .author-box(无装饰 flex 行,
|
||||
由 comments/layout.css 接管),文章作者条使用 .article-author-bar。 */
|
||||
|
||||
.single-metabox {
|
||||
display: flex;
|
||||
|
||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
@@ -88,6 +88,13 @@
|
||||
|
||||
#postcomments .commentlist > .comment > .list-inline .author-box {
|
||||
align-items: start;
|
||||
/* 阻断外部作者卡片样式(如 single-post/author-actions 的 .author-box 卡片)
|
||||
渗入评论头部:legacy 中评论头部是无装饰的 flex 行。 */
|
||||
margin-bottom: 0;
|
||||
padding: 0;
|
||||
background: none;
|
||||
border-radius: 0;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
#postcomments .commentlist > .comment > .list-inline .comment-footer {
|
||||
|
||||
@@ -407,14 +407,8 @@ html.dark .post-drop-meta__item:hover {
|
||||
}
|
||||
|
||||
/* ===== Author Card — 对齐 legacy 卡片容器 ===== */
|
||||
.author-box {
|
||||
margin-bottom: 16px;
|
||||
padding: 18px;
|
||||
background: var(--surface-1, #fff);
|
||||
border: none;
|
||||
border-radius: var(--radius-2xl, 16px);
|
||||
box-shadow: var(--shadow-sm);
|
||||
}
|
||||
/* 原 .author-box 卡片规则已删除:全站仅评论区使用 .author-box(无装饰 flex 行,
|
||||
由 comments/layout.css 接管),文章作者条使用 .article-author-bar。 */
|
||||
|
||||
.single-metabox {
|
||||
display: flex;
|
||||
|
||||
@@ -477,7 +477,7 @@ if (!function_exists('aksrt_comments_render_form')) :
|
||||
<div class="comt-avatar mb10">
|
||||
<?php echo get_avatar($current_user->ID, 60, '', '', ['class' => 'avatar']); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
|
||||
</div>
|
||||
<p class="text-ellipsis muted-2-color"><?php echo function_exists('aksrt_render_user_identity_chips') ? aksrt_render_user_identity_chips($current_user->ID, 'comment') : ''; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- chips 内部已转义。 ?><?php echo esc_html($current_user->display_name); ?></p>
|
||||
<p class="text-ellipsis muted-2-color"><?php echo function_exists('aksrt_render_vip_badge') ? aksrt_render_vip_badge($current_user->ID) : ''; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- vip 徽章内部已转义。 ?><?php echo esc_html($current_user->display_name); ?></p>
|
||||
<?php else : ?>
|
||||
<div class="comt-avatar mb10">
|
||||
<?php echo get_avatar(0, 60, '', '', ['class' => 'avatar']); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
|
||||
|
||||
@@ -123,14 +123,15 @@ if (!function_exists('aksrt_get_comment_city_badge_html')) :
|
||||
if (!aksrt_comment_city_enabled()) {
|
||||
return '';
|
||||
}
|
||||
if (function_exists('aksrt_get_geo_badge_html')) {
|
||||
return aksrt_get_geo_badge_html(
|
||||
aksrt_get_comment_addr($comment),
|
||||
aksrt_comment_city_type(),
|
||||
'badg badg-sm comment-city-badge'
|
||||
);
|
||||
// legacy 契约:无属地数据时不渲染徽章(不使用查询失败兜底文案)。
|
||||
$addr = aksrt_get_comment_addr($comment);
|
||||
$label = function_exists('aksrt_format_geo_label')
|
||||
? aksrt_format_geo_label(is_array($addr) ? $addr : [], aksrt_comment_city_type())
|
||||
: '';
|
||||
if ($label === '') {
|
||||
return '';
|
||||
}
|
||||
return '';
|
||||
return '<span class="badg badg-sm comment-city-badge aksrt-ip-geo-badge" title="' . esc_attr__('IP 属地', 'aksrt') . '">' . esc_html($label) . '</span>';
|
||||
}
|
||||
endif;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user