fix(forum): correct sidebar nesting and duplicate widget card
- keep .sidebar a sibling of .content-wrap inside main.container so the theme's float math puts it in the right column - move fluid widget zones inside main on plate / post routes - drop the leftover .forum-home .jio-widget-box override that stacked a second card background on the user card - balance the compose page shell for guests and editors
This commit is contained in:
1 parent
ec5dfcd82f
commit
9e7ccc1ba4
6 files changed
+21
-20
No files matched your search
@@ -67,9 +67,6 @@
|
||||
.hide-type-drop .select-drop-box .badg.active{--this-bg:var(--focus-color);--this-color:#fff}
|
||||
.hide-type-drop textarea{margin-top:8px;width:100%}
|
||||
.jio-forum__captcha{margin-bottom:15px}
|
||||
.forum-home .jio-widget-box{clear:both;background-color:var(--main-bg-color);padding:15px;box-shadow:0 0 10px var(--main-shadow);border-radius:var(--main-radius);margin-bottom:20px}
|
||||
.forum-home .jio-widget-box .btn-block{display:block;width:100%;text-align:center}
|
||||
.forum-home .jio-widget-box .title-theme{font-size:15px;font-weight:600}
|
||||
.quick-posts-form .form-control{width:100%}
|
||||
.quick-posts-form select.form-control{width:auto;min-width:140px}
|
||||
.quick-posts-form .jio-forum__message:empty{display:none}
|
||||
|
||||
@@ -28,7 +28,8 @@ final class EditView {
|
||||
echo '<div class="jio-panel full-widget-sm editor-main-box" style="min-height:60vh">';
|
||||
if ($user_id <= 0) {
|
||||
echo jio_get_null('请先登录后再发布', 40, 'null-user.svg') . '<p class="text-center"><a class="but jb-blue padding-lg" href="' . esc_url(jio_get_login_url(Core::edit_url($edit_id))) . '"><i class="fa fas fa-sign-in-alt mr6"></i>登录</a></p>';
|
||||
echo '</div>';
|
||||
echo '</div>'; // editor-main-box
|
||||
echo '<div class="sidebar show-sidebar">';
|
||||
self::close();
|
||||
return;
|
||||
}
|
||||
@@ -179,7 +180,8 @@ final class EditView {
|
||||
}
|
||||
|
||||
private static function close(): void {
|
||||
echo '</div></div></div></form></main>';
|
||||
// content-layout, content-wrap, sidebar, container, form, main.
|
||||
echo '</div></div></div></div></form></main>';
|
||||
get_footer();
|
||||
}
|
||||
}
|
||||
@@ -17,9 +17,9 @@ final class HomeView {
|
||||
\Jio\WidgetSystem\WidgetAreas::render('forum_home_top_fluid', 'fluid-widget-wrap');
|
||||
echo '<div class="container"><div class="content-wrap"><div class="content-layout">';
|
||||
HomeTabs::render();
|
||||
echo '</div>';
|
||||
self::sidebar();
|
||||
echo '</div></div>';
|
||||
self::sidebar();
|
||||
echo '</div>';
|
||||
\Jio\WidgetSystem\WidgetAreas::render('forum_home_bottom_fluid', 'fluid-widget-wrap');
|
||||
if (get_current_user_id() > 0 && (Access::is_admin(get_current_user_id()) || jio_get_setting('jio_forum_user_plates', true))) {
|
||||
self::plate_dialog();
|
||||
|
||||
@@ -13,8 +13,7 @@ final class ListingView {
|
||||
self::term();
|
||||
return;
|
||||
}
|
||||
self::open($plate->post_title, 'plate', $plate);
|
||||
\Jio\WidgetSystem\WidgetAreas::render('forum_plate_top_fluid', 'fluid-widget-wrap');
|
||||
self::open('plate');
|
||||
echo Cards::plate_header($plate); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
|
||||
echo self::tab_bar($plate); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
|
||||
self::close('plate');
|
||||
@@ -24,12 +23,11 @@ final class ListingView {
|
||||
public static function term(): void {
|
||||
$term = get_queried_object();
|
||||
if (!$term instanceof \WP_Term) {
|
||||
self::open('论坛', 'term', null);
|
||||
self::open('term');
|
||||
self::close('term');
|
||||
return;
|
||||
}
|
||||
self::open($term->name, 'term', null, $term);
|
||||
\Jio\WidgetSystem\WidgetAreas::render('forum_term_top_fluid', 'fluid-widget-wrap');
|
||||
self::open('term');
|
||||
echo self::term_header($term); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
|
||||
echo self::tab_bar(null, $term); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
|
||||
self::close('term');
|
||||
@@ -41,15 +39,17 @@ final class ListingView {
|
||||
. '</div>';
|
||||
}
|
||||
|
||||
private static function open(string $title, string $context, ?\WP_Post $plate, ?\WP_Term $term = null): void {
|
||||
/** `main.container` holds `.content-wrap` and `.sidebar` as siblings; the float math depends on it. */
|
||||
private static function open(string $context): void {
|
||||
echo '<main id="forum" class="jio-forum forum-listing forum-listing--' . esc_attr($context) . '">';
|
||||
\Jio\WidgetSystem\WidgetAreas::render('forum_' . $context . '_top_fluid', 'fluid-widget-wrap');
|
||||
echo '<div class="container"><div class="content-wrap"><div class="content-layout">';
|
||||
}
|
||||
|
||||
private static function close(string $context): void {
|
||||
echo '</div>';
|
||||
self::sidebar($context);
|
||||
echo '</div></div>';
|
||||
self::sidebar($context);
|
||||
echo '</div>';
|
||||
\Jio\WidgetSystem\WidgetAreas::render('forum_' . $context . '_bottom_fluid', 'fluid-widget-wrap');
|
||||
echo '</main>';
|
||||
}
|
||||
|
||||
@@ -17,8 +17,9 @@ final class PostView {
|
||||
$user_id = get_current_user_id();
|
||||
$can_view = Access::can_view($user_id, $id);
|
||||
|
||||
echo '<main id="forum" class="jio-forum forum-post"><div class="container"><div class="content-wrap"><div class="content-layout">';
|
||||
echo '<main id="forum" class="jio-forum forum-post">';
|
||||
\Jio\WidgetSystem\WidgetAreas::render('forum_post_top_fluid', 'fluid-widget-wrap');
|
||||
echo '<div class="container"><div class="content-wrap"><div class="content-layout">';
|
||||
echo '<div class="fixed-wrap single-wrap">';
|
||||
echo self::fixed_actions($post); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
|
||||
echo '<div class="fixed-wrap-content">';
|
||||
@@ -37,8 +38,7 @@ final class PostView {
|
||||
}
|
||||
do_action('bbs_posts_page_content_bottom');
|
||||
echo '</div></div>';
|
||||
\Jio\WidgetSystem\WidgetAreas::render('forum_post_bottom_fluid', 'fluid-widget-wrap');
|
||||
echo '</div>';
|
||||
echo '</div></div>';
|
||||
if (jio_is_show_sidebar()) {
|
||||
echo '<div class="sidebar">';
|
||||
\Jio\WidgetSystem\WidgetAreas::render('all_sidebar_top');
|
||||
@@ -46,7 +46,9 @@ final class PostView {
|
||||
\Jio\WidgetSystem\WidgetAreas::render('all_sidebar_bottom');
|
||||
echo '</div>';
|
||||
}
|
||||
echo '</div></div></main>';
|
||||
echo '</div>';
|
||||
\Jio\WidgetSystem\WidgetAreas::render('forum_post_bottom_fluid', 'fluid-widget-wrap');
|
||||
echo '</main>';
|
||||
}
|
||||
|
||||
/** Desktop left rail: score group, favorite and share (reference `.single-fixed-btns`). */
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"generated_at": "2026-11-11T10:06:02+00:00",
|
||||
"generated_at": "2026-11-11T10:25:09+00:00",
|
||||
"errors": [],
|
||||
"warnings": [
|
||||
"customPage tools-update section 'tools/update' not in PHP schema (ok if pure operational page)",
|
||||
|
||||
Reference in new issue
Block a user