顶导航点击小人弹出的用户信息浮层,从 AKSRT 定制结构改为与参考主题 zib_header_user_box() 逐行同构:头像链接包裹、钱包双瓷砖、会员条、签到、消息图标、统计徽章行全部改用参考主题遗留类,渲染交回 main.css(.sub-user-box 242px、.avatar-img 38px、.msg-news-icon、badge.top、.payvip-icon 深色渐变加 gem 水印、.vip-expdate-tag、.muted-box)。 头像改走 aksrt_get_avatar_box(用户ID, avatar-img, true, false),得到参考的 a 链接包裹 avatar-img 结构。消息图标改参考标记 msg-news-icon abs-right 加 toggle-radius msg-icon,未读徽章用 badge.top,avatar_dropdown 位置门控契约保留。管理端行在「后台管理」前插入「支付中心」,跳 admin.php?page=aksrt_pay,即参考主题「商城中心」槽位,图标 fa-credit-card。 钱包重写为参考双瓷砖:余额在前(c-blue-2 加 fa-money-bill-wave)、积分在后(c-yellow 加 fa-coins),分别按充值开关与积分总开关门控,两块皆关则不渲染,并保留 data-aksrt-wallet-value 与 data-aksrt-points-value 两个 JS 刷新钩子。会员条去掉 AKSRT 自创的 vipbg-v2 level-N 金色背景,改参考的 payvip-icon 加 badg jb-yellow vip-expdate-tag,到期文案按参考语义分为已过期、永久会员、裸日期三种。签到入口由 button 改为 a.but block c-yellow,并去掉随之失效的 compact 形参,data-signin 挂载与 wp_footer 验证码不变。统计行删掉文章徽章(本站不做帖子),图标由 SVG sprite 换 FA5+ 的 fa-comment-dots、fa-thumbs-up、fa-fire。 会员等级图标契约不动:aksrt_get_vip_icon 与 User\Level::get_badge_html 的调用与参数保持原样。 顺带清死代码:aksrt_header_user_badges_row 原本取到函数后直接返回空串,现在真正输出统计行;删掉 header-userbox.css 里整套 bespoke 规则与 vip-modal.css 的 vipbg-v2 死规则。 显式偏差:统计行链接保持扁平用户主页 URL(AKSRT 用户主页是干净 URL 加 JS tab,没有 query tab 路由);签到入口沿用积分签到总开关门控,不新增管理端可配置项。 public.css 与 public.min.css 用 tools/build-public-assets.mjs 重建:该 bundle 打包了 header-userbox.css 且作为依赖先于单模块入队,旧的 width 260px 会压过新源码、把卡片钉在 260px 而不是参考的 242px。 验证:node --test tests/**/*.test.cjs 573 项全通过;六个改动 PHP 文件 php -l 无语法错误;卡片用到的 FA5 token 逐个核对 5.15.4 全部命中。未做真实视觉效果验收。
248 lines
5.2 KiB
CSS
248 lines
5.2 KiB
CSS
/**
|
|
* Header account popover.
|
|
*
|
|
* The shared legacy navigation styles provide the popover shell, and every
|
|
* account row (avatar, VIP bar, check-in, wallet tiles, stats badges) renders
|
|
* through the reference legacy classes. This module only owns the navigation
|
|
* shell anchoring plus the account action-row geometry.
|
|
*/
|
|
|
|
/* The desktop action cluster owns one horizontal alignment context. */
|
|
.navbar-top .aksrt-navbar-actions {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 10px;
|
|
min-height: 50px;
|
|
margin-top: 0;
|
|
margin-bottom: 0;
|
|
padding: 0;
|
|
}
|
|
|
|
.navbar-top .aksrt-navbar-actions > *,
|
|
.navbar-top .aksrt-navbar-account,
|
|
.navbar-top .aksrt-navbar-account > li {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
flex: 0 0 auto;
|
|
}
|
|
|
|
.navbar-top .aksrt-navbar-account > li {
|
|
position: relative;
|
|
padding: 0;
|
|
overflow: visible;
|
|
}
|
|
|
|
.navbar-top .aksrt-navbar-account > li > .sub-menu {
|
|
top: calc(100% + 5px);
|
|
right: 0;
|
|
left: auto;
|
|
z-index: 1002;
|
|
margin: 0;
|
|
}
|
|
|
|
.navbar-top .aksrt-navbar-account {
|
|
gap: 4px;
|
|
min-height: 50px;
|
|
margin: 0;
|
|
}
|
|
|
|
.navbar-top .aksrt-navbar-account.navbar-text {
|
|
float: none;
|
|
}
|
|
|
|
.navbar-top .aksrt-navbar-actions .navbar-cta {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
gap: 4px;
|
|
min-height: 29px;
|
|
margin: 0;
|
|
padding: .3em 1em !important;
|
|
border-radius: var(--radius-btn, 4px);
|
|
font-size: .8em;
|
|
line-height: 1.44;
|
|
}
|
|
|
|
.navbar-top .aksrt-navbar-actions .navbar-cta.radius {
|
|
border-radius: 50px;
|
|
}
|
|
|
|
.navbar-top .aksrt-navbar-actions .navbar-cta > .icon {
|
|
width: 1.2em;
|
|
height: 1.2em;
|
|
flex: 0 0 auto;
|
|
}
|
|
|
|
.navbar-top .aksrt-nav-icon,
|
|
.navbar-top .aksrt-nav-avatar {
|
|
display: inline-flex !important;
|
|
align-items: center;
|
|
justify-content: center;
|
|
width: 34px;
|
|
height: 34px;
|
|
padding: 0 !important;
|
|
overflow: visible !important;
|
|
border: 0 !important;
|
|
border-radius: 0;
|
|
background: transparent !important;
|
|
box-shadow: none !important;
|
|
}
|
|
|
|
.navbar-top .aksrt-nav-icon .icon {
|
|
width: 1.2em;
|
|
height: 1.2em;
|
|
}
|
|
|
|
.navbar-top .aksrt-nav-avatar {
|
|
margin-top: 0;
|
|
}
|
|
|
|
.navbar-top .aksrt-nav-avatar .avatar {
|
|
display: block;
|
|
width: 29px;
|
|
height: 29px;
|
|
border-radius: 50%;
|
|
object-fit: cover;
|
|
}
|
|
|
|
.navbar-top .aksrt-navbar-actions .toggle-radius {
|
|
flex: 0 0 29px;
|
|
margin: 0;
|
|
vertical-align: middle;
|
|
}
|
|
|
|
.navbar-top .aksrt-navbar-language {
|
|
margin: 0;
|
|
}
|
|
|
|
/* Anchor the VIP preview to the full navigation row instead of relying on
|
|
* the absolute panel's static position beside the compact CTA. */
|
|
.navbar-top .aksrt-navbar-actions .navbar-vip-hover {
|
|
position: relative;
|
|
align-self: stretch;
|
|
align-items: center;
|
|
overflow: visible;
|
|
}
|
|
|
|
.navbar-top .aksrt-navbar-actions .navbar-vip-hover > .sub-vip-card {
|
|
top: 100%;
|
|
right: 0;
|
|
left: auto;
|
|
width: max-content;
|
|
max-width: calc(100vw - 24px);
|
|
margin: 0;
|
|
z-index: 1002;
|
|
}
|
|
|
|
/* Keep the drop-down search panel above a fixed header (z-index: 999). */
|
|
.navbar-search {
|
|
z-index: 1001;
|
|
opacity: 0;
|
|
transform: translate3d(0, -24px, 0);
|
|
transition: transform .24s ease, opacity .18s ease, visibility 0s linear .24s;
|
|
will-change: transform, opacity;
|
|
}
|
|
|
|
.navbar-search.show {
|
|
opacity: 1;
|
|
transform: translate3d(0, 0, 0);
|
|
transition-delay: 0s;
|
|
}
|
|
|
|
.navbar-search .line-form-input:focus,
|
|
.navbar-search .line-form-input:focus-visible {
|
|
outline: 0;
|
|
box-shadow: none;
|
|
}
|
|
|
|
.navbar-search .search-close-box {
|
|
display: flex;
|
|
justify-content: flex-end;
|
|
max-width: 660px;
|
|
margin: 16px auto 0;
|
|
}
|
|
|
|
.navbar-search .search-close-box > .but {
|
|
float: none;
|
|
}
|
|
|
|
.aksrt-header-userbox {
|
|
color: var(--color-ink-2);
|
|
}
|
|
|
|
/* Top-nav bell badge (the card itself uses the legacy badge.top element). */
|
|
.aksrt-nav-notification .aksrt-notification-badge {
|
|
position: absolute;
|
|
top: 2px;
|
|
right: 2px;
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
min-width: 16px;
|
|
height: 16px;
|
|
padding: 0 4px;
|
|
border: 2px solid var(--surface-1);
|
|
border-radius: 999px;
|
|
background: #e74c3c;
|
|
color: #fff;
|
|
font-size: 9px;
|
|
font-weight: 700;
|
|
line-height: 1;
|
|
}
|
|
|
|
/* Navigation links are globally capped at 50px. Account actions are taller
|
|
* icon tiles and must opt out or their labels overlap the following row. */
|
|
.navbar-top .aksrt-header-userbox .header-user-href {
|
|
align-items: flex-start;
|
|
gap: 4px;
|
|
}
|
|
|
|
.navbar-top .aksrt-header-userbox .header-user-href > a,
|
|
.aksrt-header-userbox .header-user-href > a {
|
|
display: flex;
|
|
flex: 1 1 0;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
min-width: 0;
|
|
max-height: none;
|
|
padding: 10px 2px 2px;
|
|
line-height: 1.35;
|
|
}
|
|
|
|
.aksrt-header-userbox .header-user-href > a:hover {
|
|
opacity: .75;
|
|
}
|
|
|
|
.aksrt-header-userbox .header-user-href .toggle-radius {
|
|
flex: 0 0 36px;
|
|
width: 36px;
|
|
height: 36px;
|
|
}
|
|
|
|
.aksrt-header-userbox .header-user-href > a > div:last-child {
|
|
max-width: 100%;
|
|
overflow: hidden;
|
|
font-size: 12px;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.mobile-navbar .aksrt-header-userbox {
|
|
width: 100%;
|
|
max-width: 400px;
|
|
margin-right: auto;
|
|
margin-left: auto;
|
|
}
|
|
|
|
@media (max-width: 360px) {
|
|
.aksrt-header-userbox .header-user-href {
|
|
gap: 2px;
|
|
}
|
|
|
|
.aksrt-header-userbox .header-user-href .toggle-radius {
|
|
flex-basis: 34px;
|
|
width: 34px;
|
|
height: 34px;
|
|
}
|
|
}
|