fix(user-home): match reference cover metas with 人气值/点赞 pills

The public user homepage cover showed a single bottom-right 粉丝 pill,
which the reference theme does not render there — it shows 人气值 and 点赞
as a translucent pill group pinned to the cover's top-right corner.

- Cover metas: replace 粉丝 with 人气值 (zibsvg-hot) + 点赞 (zibsvg-like),
  summed over the user's published posts via aksrt_get_user_posts_meta_sum()
  and abbreviated with aksrt_cut_count(); each is zero-suppressed
  independently, matching zib_get_author_header_metas()
- Titles use the reference strings 人气值 N / 获得N个点赞 via
  data-toggle="tooltip"
- CSS: adopt .single-metabox.cover-meta semantics (one rgba(0,0,0,.3) pill
  at right:1em/top:1.6em, 14px, 6px item gaps, 3px icon margins) plus the
  reference's <=480px override; drop the per-stat bottom-right pills
- Drop the dead __stats / __stat / __contacts CSS blocks and the unused
  $tab_counts hero contract arg

Follower counts remain in the content tab bar (tab_counts['follow']).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
kate522andClaude Fable 5 committed 2026-10-03 14:32:45 +08:00
1 parent fa53a0f4f9
commit 7fc1ac98de
3 files changed
+54 -76

No files matched your search

+25 -64
View File
@@ -42,32 +42,33 @@
pointer-events: none;
}
/* Cover meta pills — legacy .single-metabox.cover-meta parity:
* 单个胶囊容器贴封面右上角,内含 人气值 / 点赞 计数值。 */
.aksrt-author-hero__cover-metas {
position: absolute;
right: 58px;
bottom: 12px;
right: 1em;
top: 1.6em;
z-index: 2;
display: flex;
display: inline-flex;
flex-wrap: wrap;
align-items: center;
gap: 10px;
padding: 2px 6px;
border-radius: 100px;
background: rgba(0, 0, 0, 0.3);
color: rgba(255, 255, 255, 0.8);
font-size: 14px;
}
.aksrt-author-hero__cover-meta {
display: inline-flex;
align-items: center;
gap: 6px;
padding: 4px 10px;
border-radius: 999px;
font-size: 12px;
font-weight: 600;
color: #fff;
background: rgba(0, 0, 0, 0.35);
backdrop-filter: blur(4px);
margin: 0 6px;
font-size: 13px;
}
.aksrt-author-hero__cover-meta i {
font-size: 11px;
opacity: 0.9;
.aksrt-author-hero__cover-meta .fa,
.aksrt-author-hero__cover-meta .icon {
margin-right: 3px;
}
.aksrt-author-hero__body {
@@ -120,43 +121,7 @@
max-width: 520px;
}
/* Body stats row removed for legacy author parity; counts live in tabs. */
.aksrt-author-hero__stats {
display: flex;
flex-wrap: wrap;
gap: 10px;
margin-top: 14px;
}
.aksrt-author-hero__stat {
display: inline-flex;
align-items: center;
gap: 6px;
min-height: 34px;
padding: 0 14px;
border-radius: var(--radius-pill);
background: var(--surface-2);
color: var(--color-ink-3);
font-size: 13px;
font-weight: 500;
}
.aksrt-author-hero__stat strong {
color: var(--color-ink);
font-size: 14px;
font-weight: 700;
}
.aksrt-author-hero__contacts {
margin-top: 10px;
}
.aksrt-author-hero__contacts .profile-social-links {
display: flex;
flex-wrap: wrap;
gap: 8px;
}
/* Counts live in the tab bar, not a hero body stats row (legacy parity). */
.aksrt-author-hero__actions {
flex-shrink: 0;
display: flex;
@@ -235,18 +200,6 @@
max-width: 100%;
}
.aksrt-author-hero__stats {
justify-content: center;
}
.aksrt-author-hero__contacts {
justify-content: center;
}
.aksrt-author-hero__contacts .profile-social-links {
justify-content: center;
}
.aksrt-author-hero__actions {
padding-top: 0;
justify-content: center;
@@ -258,6 +211,14 @@
padding-bottom: calc(20% + 60px);
}
.aksrt-author-hero__cover-metas {
font-size: 13px;
}
.aksrt-author-hero__cover-meta {
margin: 0 4px;
}
.aksrt-author-hero__body {
margin-top: -40px;
gap: 14px;