用户中心 CSS 整包重命名:按 shell/credits/settings/responsive 职责拆分

废除 part-1..5 机械切片,重组成可维护的领域文件并修复历史拼接断点,index 同步改写。
This commit is contained in:
kate522 committed 2026-07-10 22:24:07 +08:00
1 parent 3ce5306efd
commit e97654aab3
7 files changed
+131 -107

No files matched your search

+308
View File
@@ -0,0 +1,308 @@
/**
* 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;
}
.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;
}
/* ==================== 左侧边栏 ==================== */
.uc-sidebar {
position: sticky;
top: 80px;
display: flex;
flex-direction: column;
gap: 12px;
}
.uc-sidebar__section {
background: var(--surface-1);
border-radius: var(--radius-lg, 10px);
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: translateY(-2px);
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(--radius-lg, 10px);
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));
}
.uc-content #panel-credits