fix(layout): restore Zibll float dual-column so content no longer overlaps sidebar

Align main shells to main.container > .content-wrap + .sidebar siblings, drop
content-shell padding on dual-column hosts, and remove route flex overrides that
disabled the negative-margin sidebar math.
This commit is contained in:
2026-07-22 21:05:12 +08:00
parent 79bc4159f5
commit 7d33097209
15 changed files with 156 additions and 172 deletions
+23 -20
View File
@@ -19,32 +19,35 @@ get_header();
// Fallback: when homepage shell is unavailable, keep a standard archive loop.
?>
<?php
// Zibll dual-column: sidebar is a sibling of .content-wrap under main.container.
// Visibility is driven by body.site-layout-* (aksrt_is_show_sidebar), not widget presence.
$has_sidebar = function_exists('aksrt_is_show_sidebar')
? aksrt_is_show_sidebar()
: is_active_sidebar('sidebar-blog');
?>
<main id="main-content" class="site-main container" tabindex="-1">
<?php $has_sidebar = is_active_sidebar('sidebar-blog'); ?>
<div class="content-wrap">
<div class="content-layout<?php echo $has_sidebar ? '' : ' content-layout--no-sidebar'; ?>">
<div class="content-layout__primary">
<?php
$render_config = function_exists('aksrt_resolve_post_list_render_config')
? aksrt_resolve_post_list_render_config(['context' => 'archive'])
: ['context' => 'archive', 'mode' => 'list'];
?>
<div class="content-layout">
<?php
$render_config = function_exists('aksrt_resolve_post_list_render_config')
? aksrt_resolve_post_list_render_config(['context' => 'archive'])
: ['context' => 'archive', 'mode' => 'list'];
?>
<?php if (have_posts()) : ?>
<?php aksrt_render_post_list(null, $render_config); ?>
<?php aksrt_render_pagination(); ?>
<?php else : ?>
<div class="no-results">
<p><?php esc_html_e('暂无文章。', 'aksrt'); ?></p>
</div>
<?php endif; ?>
</div>
<?php if ($has_sidebar) : ?>
<?php get_sidebar(); ?>
<?php if (have_posts()) : ?>
<?php aksrt_render_post_list(null, $render_config); ?>
<?php aksrt_render_pagination(); ?>
<?php else : ?>
<div class="no-results">
<p><?php esc_html_e('暂无文章。', 'aksrt'); ?></p>
</div>
<?php endif; ?>
</div>
</div>
<?php if ($has_sidebar) : ?>
<?php get_sidebar(); ?>
<?php endif; ?>
</main>
<?php