fix(user-center): restore page-owned dual-column sidebar layout

User center left nav (stats/services/commerce) stacked or hid after
content-layout lost its grid and the site float shell treated the
nested .sidebar as a widget column. Scope a CSS grid under
body.aksrt-user-center, neutralize site-layout float/hide, align the
drawer to ≤991.98, and drop the truncated #panel-credits selector.
This commit is contained in:
kate522 committed 2026-07-16 11:56:09 +08:00
1 parent a1d724d48e
commit c656c20c8b
3 files changed
+85 -23

No files matched your search

+59 -4
View File
@@ -25,6 +25,64 @@
padding: 0 0 40px;
}
/* ==================== 页面自有双栏(page-owned,非全站 float 壳) ==================== */
/* DOM: content first + aside second;桌面用 grid-area 把 aside 放左侧。 */
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;
}
/* 私有导航:中和 body.site-layout-1 .sidebar { display:none } 与 float 几何 */
body.aksrt-user-center .sidebar.page-owned.uc-sidebar {
float: none;
width: auto;
margin-left: 0;
margin-right: 0;
display: flex;
flex-direction: column;
gap: 12px;
box-sizing: border-box;
min-width: 0;
}
@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;
}
body.aksrt-user-center .aksrt-profile__layout > .uc-sidebar,
body.aksrt-user-center .aksrt-profile__layout > .aksrt-profile__aside {
grid-area: aside;
}
body.aksrt-user-center .sidebar.page-owned.uc-sidebar {
position: sticky;
top: calc(var(--nav-height, 60px) + 20px);
}
}
.uc-header__actions {
position: relative;
}
@@ -45,9 +103,8 @@
line-height: 1;
}
/* ==================== 左侧边栏 ==================== */
/* sticky / 双栏位置由 body.aksrt-user-center .sidebar.page-owned 负责;此处只定 chrome 布局 */
.uc-sidebar {
position: sticky;
top: 80px;
display: flex;
flex-direction: column;
gap: 12px;
@@ -304,5 +361,3 @@
padding-top: 18px;
border-top: 1px solid var(--color-line-soft, rgba(0,0,0,0.06));
}
.uc-content #panel-credits