Drop bare .sidebar from the profile aside so site-layout float/hide no longer stacks stats/assets under content; harden page-owned grid + drawer selectors on uc-sidebar/page-owned only.
376 lines
8.6 KiB
CSS
376 lines
8.6 KiB
CSS
/**
|
||
* User Center — shell / sidebar / content base / drawer
|
||
*/
|
||
|
||
/**
|
||
* AKSRT User Center — 本人中心专属样式
|
||
*
|
||
* Zibll 风格两栏布局:左侧边栏 + 右侧内容区
|
||
* 仅在本人中心页面加载(body.aksrt-user-center)
|
||
*/
|
||
|
||
/* ==================== 用户中心容器 ==================== */
|
||
/* main 自身同时带 content-shell + aksrt-profile;宽度选择器应对准同一节点。 */
|
||
.aksrt-user-center .content-shell,
|
||
.aksrt-profile.content-shell,
|
||
.content-shell.aksrt-profile {
|
||
max-width: var(--container, 1440px);
|
||
width: 100%;
|
||
margin: 0 auto;
|
||
}
|
||
|
||
.user-center,
|
||
.aksrt-profile.content-shell {
|
||
width: 100%;
|
||
padding: 0 0 40px;
|
||
}
|
||
|
||
/* ==================== 页面自有双栏(page-owned,非全站 float 壳) ==================== */
|
||
/* DOM: content first + aside second;桌面用 grid-area 把 aside 放左侧。
|
||
* 不使用裸 .sidebar 类,避免 site-layout float / hide 规则误伤。 */
|
||
body.aksrt-user-center .content-wrap {
|
||
float: none;
|
||
width: 100%;
|
||
}
|
||
|
||
body.aksrt-user-center .aksrt-profile__layout {
|
||
display: block;
|
||
width: 100%;
|
||
margin-left: 0;
|
||
margin-right: 0;
|
||
min-width: 0;
|
||
}
|
||
|
||
/* 中和 site-layout-2/3 对 content-layout 的 margin 挖空 */
|
||
body.aksrt-user-center.site-layout-1 .aksrt-profile__layout,
|
||
body.aksrt-user-center.site-layout-2 .aksrt-profile__layout,
|
||
body.aksrt-user-center.site-layout-3 .aksrt-profile__layout {
|
||
margin-left: 0;
|
||
margin-right: 0;
|
||
}
|
||
|
||
/* 私有导航:脱离全站 .sidebar float / site-layout-1 display:none */
|
||
body.aksrt-user-center .uc-sidebar.page-owned,
|
||
body.aksrt-user-center .aksrt-profile__aside.page-owned,
|
||
body.aksrt-user-center .content-layout__aside.page-owned {
|
||
float: none;
|
||
width: auto;
|
||
margin-left: 0;
|
||
margin-right: 0;
|
||
display: flex;
|
||
flex-direction: column;
|
||
gap: 12px;
|
||
box-sizing: border-box;
|
||
min-width: 0;
|
||
position: relative;
|
||
}
|
||
|
||
@media (min-width: 992px) {
|
||
body.aksrt-user-center .aksrt-profile__layout {
|
||
display: grid;
|
||
grid-template-columns: var(--sidebar-width, 311px) minmax(0, 1fr);
|
||
grid-template-areas: "aside primary";
|
||
gap: 20px;
|
||
align-items: start;
|
||
}
|
||
|
||
body.aksrt-user-center .aksrt-profile__layout > .uc-content,
|
||
body.aksrt-user-center .aksrt-profile__layout > .content-layout__primary {
|
||
grid-area: primary;
|
||
min-width: 0;
|
||
width: auto;
|
||
max-width: none;
|
||
}
|
||
|
||
body.aksrt-user-center .aksrt-profile__layout > .uc-sidebar,
|
||
body.aksrt-user-center .aksrt-profile__layout > .aksrt-profile__aside,
|
||
body.aksrt-user-center .aksrt-profile__layout > .content-layout__aside.page-owned {
|
||
grid-area: aside;
|
||
}
|
||
|
||
body.aksrt-user-center .uc-sidebar.page-owned,
|
||
body.aksrt-user-center .aksrt-profile__aside.page-owned {
|
||
position: sticky;
|
||
top: calc(var(--nav-height, 60px) + 20px);
|
||
}
|
||
}
|
||
|
||
.uc-header__actions {
|
||
position: relative;
|
||
}
|
||
|
||
.uc-header__action-badge {
|
||
display: inline-flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
min-width: 18px;
|
||
height: 18px;
|
||
margin-left: 6px;
|
||
padding: 0 5px;
|
||
border-radius: 999px;
|
||
background: var(--color-error, #ef4444);
|
||
color: #fff;
|
||
font-size: 11px;
|
||
font-weight: 700;
|
||
line-height: 1;
|
||
}
|
||
/* ==================== 左侧边栏 ==================== */
|
||
/* sticky / 双栏位置由 body.aksrt-user-center .uc-sidebar.page-owned 负责;此处只定 chrome 布局 */
|
||
.uc-sidebar {
|
||
display: flex;
|
||
flex-direction: column;
|
||
gap: 12px;
|
||
}
|
||
|
||
.uc-sidebar__section {
|
||
background: var(--surface-1);
|
||
border-radius: var(--main-radius, var(--radius, 8px));
|
||
padding: 16px;
|
||
box-shadow: 0 1px 4px rgba(15, 23, 42, 0.04);
|
||
border: 1px solid var(--color-line-soft, transparent);
|
||
}
|
||
|
||
.uc-sidebar__title {
|
||
font-size: 12px;
|
||
font-weight: 600;
|
||
color: var(--color-ink-4);
|
||
margin-bottom: 12px;
|
||
text-transform: uppercase;
|
||
letter-spacing: 0.05em;
|
||
padding-bottom: 8px;
|
||
border-bottom: 1px solid var(--color-line-soft, rgba(0,0,0,0.06));
|
||
}
|
||
|
||
/* 数据统计 */
|
||
.uc-stats {
|
||
display: grid;
|
||
grid-template-columns: repeat(2, 1fr);
|
||
gap: 8px;
|
||
}
|
||
|
||
.uc-stats__item {
|
||
display: flex;
|
||
flex-direction: column;
|
||
align-items: center;
|
||
padding: 12px 6px;
|
||
border-radius: 8px;
|
||
background: var(--surface-2);
|
||
text-decoration: none;
|
||
transition: background-color 0.2s, transform 0.2s, box-shadow 0.2s;
|
||
}
|
||
|
||
.uc-stats__item:hover {
|
||
background: var(--color-primary-soft);
|
||
transform: none;
|
||
box-shadow: 0 4px 8px rgba(0,0,0,0.06);
|
||
}
|
||
|
||
.uc-stats__value {
|
||
font-size: 1.25rem;
|
||
font-weight: 700;
|
||
color: var(--color-primary);
|
||
line-height: 1.2;
|
||
font-variant-numeric: tabular-nums;
|
||
}
|
||
|
||
.uc-stats__label {
|
||
font-size: 11px;
|
||
color: var(--color-ink-4);
|
||
margin-top: 3px;
|
||
}
|
||
|
||
/* 侧栏按钮组 */
|
||
.uc-sidebar__buttons {
|
||
display: flex;
|
||
flex-direction: column;
|
||
gap: 2px;
|
||
}
|
||
|
||
.uc-sidebar__btn {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 10px;
|
||
width: 100%;
|
||
padding: 10px 12px;
|
||
border: none;
|
||
border-radius: 8px;
|
||
background: transparent;
|
||
color: var(--color-ink-2);
|
||
text-decoration: none;
|
||
font-size: 14px;
|
||
font-weight: 500;
|
||
cursor: pointer;
|
||
transition: background-color 0.15s, color 0.15s, box-shadow 0.15s;
|
||
text-align: left;
|
||
position: relative;
|
||
}
|
||
|
||
.uc-sidebar__btn::before {
|
||
content: '';
|
||
position: absolute;
|
||
left: 0;
|
||
top: 50%;
|
||
transform: translateY(-50%);
|
||
width: 3px;
|
||
height: 0;
|
||
background: var(--color-primary);
|
||
border-radius: 0 3px 3px 0;
|
||
transition: height 0.2s ease;
|
||
}
|
||
|
||
.uc-sidebar__btn:hover {
|
||
background: var(--surface-2);
|
||
color: var(--color-ink);
|
||
}
|
||
|
||
.uc-sidebar__btn.is-active {
|
||
background: var(--color-primary-soft);
|
||
color: var(--color-primary);
|
||
font-weight: 600;
|
||
}
|
||
|
||
.uc-sidebar__btn.is-active::before {
|
||
height: 20px;
|
||
}
|
||
|
||
.uc-sidebar__btn i {
|
||
width: 18px;
|
||
text-align: center;
|
||
font-size: 14px;
|
||
flex-shrink: 0;
|
||
opacity: 0.8;
|
||
}
|
||
|
||
.uc-sidebar__btn.is-active i {
|
||
opacity: 1;
|
||
}
|
||
|
||
.uc-sidebar__badge {
|
||
margin-left: auto;
|
||
display: inline-flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
min-width: 18px;
|
||
height: 18px;
|
||
padding: 0 5px;
|
||
border-radius: 100px;
|
||
background: var(--color-error);
|
||
color: #fff;
|
||
font-size: 11px;
|
||
font-weight: 600;
|
||
line-height: 1;
|
||
animation: badge-pulse 2s ease-in-out infinite;
|
||
}
|
||
|
||
@keyframes badge-pulse {
|
||
0%, 100% { transform: scale(1); }
|
||
50% { transform: scale(1.1); }
|
||
}
|
||
|
||
/* 移动端抽屉触发器 */
|
||
.uc-sidebar__drawer-trigger {
|
||
display: none;
|
||
position: fixed;
|
||
bottom: calc(80px + env(safe-area-inset-bottom, 0px));
|
||
right: calc(20px + env(safe-area-inset-right, 0px));
|
||
width: 50px;
|
||
height: 50px;
|
||
border-radius: 50%;
|
||
border: none;
|
||
background: var(--color-primary);
|
||
color: #fff;
|
||
font-size: 20px;
|
||
cursor: pointer;
|
||
box-shadow: 0 4px 16px rgba(0,0,0,0.25);
|
||
z-index: 100;
|
||
align-items: center;
|
||
justify-content: center;
|
||
transition: transform 0.2s, box-shadow 0.2s;
|
||
}
|
||
|
||
.uc-sidebar__drawer-trigger:hover {
|
||
transform: scale(1.02);
|
||
box-shadow: 0 6px 20px rgba(0,0,0,0.3);
|
||
}
|
||
|
||
.uc-sidebar__drawer-trigger:active {
|
||
transform: scale(0.92);
|
||
}
|
||
|
||
/* 抽屉遮罩 */
|
||
.uc-drawer-overlay {
|
||
display: none;
|
||
position: fixed;
|
||
inset: 0;
|
||
background: rgba(0,0,0,0.45);
|
||
backdrop-filter: blur(2px);
|
||
-webkit-backdrop-filter: blur(2px);
|
||
z-index: 200;
|
||
opacity: 0;
|
||
transition: opacity 0.3s;
|
||
}
|
||
|
||
.uc-drawer-overlay.is-visible {
|
||
display: block;
|
||
opacity: 1;
|
||
}
|
||
|
||
/* ==================== 右侧内容区 ==================== */
|
||
.uc-content {
|
||
min-width: 0;
|
||
width: 100%;
|
||
}
|
||
|
||
.uc-content .dashboard-panel {
|
||
background: var(--surface-1);
|
||
border-radius: var(--main-radius, var(--radius, 8px));
|
||
padding: 24px;
|
||
box-shadow: 0 1px 4px rgba(15, 23, 42, 0.04);
|
||
border: 1px solid var(--color-line-soft, transparent);
|
||
animation: panel-fade-in 0.25s ease;
|
||
}
|
||
|
||
@keyframes panel-fade-in {
|
||
from { opacity: 0; transform: translateY(6px); }
|
||
to { opacity: 1; transform: translateY(0); }
|
||
}
|
||
|
||
.uc-content .dashboard-panel.is-active {
|
||
display: block;
|
||
}
|
||
|
||
/* 面板内 widget-card 增强 */
|
||
.uc-content .widget-card {
|
||
border: 1px solid var(--color-line-soft, rgba(0,0,0,0.06));
|
||
border-radius: 10px;
|
||
padding: 20px;
|
||
margin-bottom: 16px;
|
||
background: var(--surface-1);
|
||
transition: box-shadow 0.2s;
|
||
}
|
||
|
||
.uc-content .widget-card:hover {
|
||
box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
|
||
}
|
||
|
||
.uc-content .dashboard-panel:not(#panel-settings) > .widget-card,
|
||
.uc-content #panel-profile .profile-form > .widget-card {
|
||
background: transparent;
|
||
border: 0;
|
||
border-radius: 0;
|
||
box-shadow: none;
|
||
margin-bottom: 0;
|
||
padding: 0;
|
||
}
|
||
|
||
.uc-content .dashboard-panel:not(#panel-settings) > .widget-card:hover,
|
||
.uc-content #panel-profile .profile-form > .widget-card:hover {
|
||
box-shadow: none;
|
||
}
|
||
|
||
.uc-content #panel-profile .profile-form > .widget-card + .widget-card {
|
||
margin-top: 18px;
|
||
padding-top: 18px;
|
||
border-top: 1px solid var(--color-line-soft, rgba(0,0,0,0.06));
|
||
}
|