fix(widgets): align user card presentation
This commit is contained in:
1 parent
d1d33e2671
commit
483313e396
2 files changed
+4
-31
No files matched your search
@@ -38,9 +38,9 @@
|
|||||||
position: relative;
|
position: relative;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 104px;
|
height: 139px;
|
||||||
min-height: 104px;
|
min-height: 139px;
|
||||||
max-height: 104px;
|
max-height: 139px;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0 !important;
|
padding: 0 !important;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
@@ -122,27 +122,6 @@
|
|||||||
height: 100%;
|
height: 100%;
|
||||||
object-fit: cover;
|
object-fit: cover;
|
||||||
}
|
}
|
||||||
.aksrt-user-card__avatar-wrap > .aksrt-vip-badge {
|
|
||||||
position: absolute;
|
|
||||||
right: -5px;
|
|
||||||
bottom: -3px;
|
|
||||||
z-index: 2;
|
|
||||||
display: inline-flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
width: 28px;
|
|
||||||
height: 28px;
|
|
||||||
max-width: none;
|
|
||||||
padding: 0;
|
|
||||||
line-height: 1;
|
|
||||||
}
|
|
||||||
.aksrt-user-card__avatar-wrap > .aksrt-vip-badge .aksrt-vip-badge__icon {
|
|
||||||
display: block;
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
max-width: 100%;
|
|
||||||
object-fit: contain;
|
|
||||||
}
|
|
||||||
.aksrt-user-card__name {
|
.aksrt-user-card__name {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|||||||
@@ -122,14 +122,11 @@ class WidgetUserCard extends \WP_Widget {
|
|||||||
$name_html = function_exists('aksrt_get_user_name')
|
$name_html = function_exists('aksrt_get_user_name')
|
||||||
? aksrt_get_user_name([
|
? aksrt_get_user_name([
|
||||||
'id' => $user_id,
|
'id' => $user_id,
|
||||||
'vip' => false,
|
'vip' => true,
|
||||||
'follow' => !$is_self,
|
'follow' => !$is_self,
|
||||||
'class' => 'aksrt-user-card__name-row',
|
'class' => 'aksrt-user-card__name-row',
|
||||||
])
|
])
|
||||||
: '<a href="' . esc_url($profile_url) . '">' . esc_html($user->display_name) . '</a>';
|
: '<a href="' . esc_url($profile_url) . '">' . esc_html($user->display_name) . '</a>';
|
||||||
$vip_badge = function_exists('aksrt_render_vip_badge')
|
|
||||||
? (string) aksrt_render_vip_badge($user_id, 'sm')
|
|
||||||
: '';
|
|
||||||
$checkin_btn = '';
|
$checkin_btn = '';
|
||||||
if ($show_checkin && $is_self && function_exists('aksrt_header_user_checkin_btn')) {
|
if ($show_checkin && $is_self && function_exists('aksrt_header_user_checkin_btn')) {
|
||||||
$checkin_btn = aksrt_header_user_checkin_btn($user_id, true);
|
$checkin_btn = aksrt_header_user_checkin_btn($user_id, true);
|
||||||
@@ -150,9 +147,6 @@ class WidgetUserCard extends \WP_Widget {
|
|||||||
$ph = get_template_directory_uri() . '/assets/img/placeholder.svg';
|
$ph = get_template_directory_uri() . '/assets/img/placeholder.svg';
|
||||||
echo '<a href="' . esc_url($profile_url) . '"><img class="aksrt-lazy lazyload" data-src="' . esc_url($avatar_url) . '" src="' . esc_url($ph) . '" alt="' . esc_attr($user->display_name) . '" loading="lazy" width="76" height="76" /></a>';
|
echo '<a href="' . esc_url($profile_url) . '"><img class="aksrt-lazy lazyload" data-src="' . esc_url($avatar_url) . '" src="' . esc_url($ph) . '" alt="' . esc_attr($user->display_name) . '" loading="lazy" width="76" height="76" /></a>';
|
||||||
echo '</div>';
|
echo '</div>';
|
||||||
if ($vip_badge !== '') {
|
|
||||||
echo $vip_badge; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
|
|
||||||
}
|
|
||||||
echo '</div>';
|
echo '</div>';
|
||||||
echo '<h4 class="aksrt-user-card__name user-name">' . $name_html . '</h4>'; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
|
echo '<h4 class="aksrt-user-card__name user-name">' . $name_html . '</h4>'; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
|
||||||
if ($bio !== '') {
|
if ($bio !== '') {
|
||||||
|
|||||||
Reference in new issue
Block a user