Merge pull request 'fix(user-center): keep page-owned nav left of credits panel' (#184) from worktree-fix-profile-credits-sidebar into main
Reviewed-on: CYL/wordpress-theme-aksrt#184
This commit is contained in:
commit
59db0c0492
3 files changed
+28
-12
No files matched your search
@@ -57,8 +57,9 @@
|
|||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 覆盖 layout.css / sidebar.css 的 .sidebar { display:none } 与 .content-layout__aside hide */
|
/* 覆盖 layout.css 的 .content-layout__aside { display:none }(page-owned 私有导航不走全站 .sidebar) */
|
||||||
body.aksrt-user-center .sidebar.page-owned.uc-sidebar,
|
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 {
|
body.aksrt-user-center .content-layout__aside.page-owned {
|
||||||
display: flex;
|
display: flex;
|
||||||
float: none;
|
float: none;
|
||||||
@@ -67,7 +68,8 @@
|
|||||||
margin-right: 0;
|
margin-right: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
body.aksrt-user-center .sidebar.page-owned.uc-sidebar {
|
body.aksrt-user-center .uc-sidebar.page-owned,
|
||||||
|
body.aksrt-user-center .aksrt-profile__aside.page-owned {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
top: 0;
|
top: 0;
|
||||||
left: -280px;
|
left: -280px;
|
||||||
@@ -82,12 +84,14 @@
|
|||||||
gap: 0;
|
gap: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
body.aksrt-user-center .sidebar.page-owned.uc-sidebar.is-open {
|
body.aksrt-user-center .uc-sidebar.page-owned.is-open,
|
||||||
|
body.aksrt-user-center .aksrt-profile__aside.page-owned.is-open {
|
||||||
left: 0;
|
left: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 抽屉头部 */
|
/* 抽屉头部 */
|
||||||
body.aksrt-user-center .sidebar.page-owned.uc-sidebar::before {
|
body.aksrt-user-center .uc-sidebar.page-owned::before,
|
||||||
|
body.aksrt-user-center .aksrt-profile__aside.page-owned::before {
|
||||||
content: '';
|
content: '';
|
||||||
display: block;
|
display: block;
|
||||||
height: 100px;
|
height: 100px;
|
||||||
|
|||||||
@@ -26,7 +26,13 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* ==================== 页面自有双栏(page-owned,非全站 float 壳) ==================== */
|
/* ==================== 页面自有双栏(page-owned,非全站 float 壳) ==================== */
|
||||||
/* DOM: content first + aside second;桌面用 grid-area 把 aside 放左侧。 */
|
/* 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 {
|
body.aksrt-user-center .aksrt-profile__layout {
|
||||||
display: block;
|
display: block;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
@@ -43,8 +49,10 @@ body.aksrt-user-center.site-layout-3 .aksrt-profile__layout {
|
|||||||
margin-right: 0;
|
margin-right: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 私有导航:中和 body.site-layout-1 .sidebar { display:none } 与 float 几何 */
|
/* 私有导航:脱离全站 .sidebar float / site-layout-1 display:none */
|
||||||
body.aksrt-user-center .sidebar.page-owned.uc-sidebar {
|
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;
|
float: none;
|
||||||
width: auto;
|
width: auto;
|
||||||
margin-left: 0;
|
margin-left: 0;
|
||||||
@@ -54,6 +62,7 @@ body.aksrt-user-center .sidebar.page-owned.uc-sidebar {
|
|||||||
gap: 12px;
|
gap: 12px;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
min-width: 0;
|
min-width: 0;
|
||||||
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (min-width: 992px) {
|
@media (min-width: 992px) {
|
||||||
@@ -70,14 +79,17 @@ body.aksrt-user-center .sidebar.page-owned.uc-sidebar {
|
|||||||
grid-area: primary;
|
grid-area: primary;
|
||||||
min-width: 0;
|
min-width: 0;
|
||||||
width: auto;
|
width: auto;
|
||||||
|
max-width: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
body.aksrt-user-center .aksrt-profile__layout > .uc-sidebar,
|
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 > .aksrt-profile__aside,
|
||||||
|
body.aksrt-user-center .aksrt-profile__layout > .content-layout__aside.page-owned {
|
||||||
grid-area: aside;
|
grid-area: aside;
|
||||||
}
|
}
|
||||||
|
|
||||||
body.aksrt-user-center .sidebar.page-owned.uc-sidebar {
|
body.aksrt-user-center .uc-sidebar.page-owned,
|
||||||
|
body.aksrt-user-center .aksrt-profile__aside.page-owned {
|
||||||
position: sticky;
|
position: sticky;
|
||||||
top: calc(var(--nav-height, 60px) + 20px);
|
top: calc(var(--nav-height, 60px) + 20px);
|
||||||
}
|
}
|
||||||
@@ -103,7 +115,7 @@ body.aksrt-user-center .sidebar.page-owned.uc-sidebar {
|
|||||||
line-height: 1;
|
line-height: 1;
|
||||||
}
|
}
|
||||||
/* ==================== 左侧边栏 ==================== */
|
/* ==================== 左侧边栏 ==================== */
|
||||||
/* sticky / 双栏位置由 body.aksrt-user-center .sidebar.page-owned 负责;此处只定 chrome 布局 */
|
/* sticky / 双栏位置由 body.aksrt-user-center .uc-sidebar.page-owned 负责;此处只定 chrome 布局 */
|
||||||
.uc-sidebar {
|
.uc-sidebar {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ get_header();
|
|||||||
<?php get_template_part('templates/parts/user-center/account-modals', null, ['context' => $render_context]); ?>
|
<?php get_template_part('templates/parts/user-center/account-modals', null, ['context' => $render_context]); ?>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<aside class="content-layout__aside sidebar page-owned uc-sidebar aksrt-profile__aside" role="complementary" aria-label="<?php esc_attr_e('用户中心导航', 'aksrt'); ?>">
|
<aside class="content-layout__aside page-owned uc-sidebar aksrt-profile__aside" role="complementary" aria-label="<?php esc_attr_e('用户中心导航', 'aksrt'); ?>">
|
||||||
<?php get_template_part('templates/parts/user-center/sidebar', null, ['context' => $render_context]); ?>
|
<?php get_template_part('templates/parts/user-center/sidebar', null, ['context' => $render_context]); ?>
|
||||||
</aside>
|
</aside>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in new issue
Block a user