feat(frontend): adopt zibll site-layout-1/2/3 float dual-column system
Wire settings-driven sidebar visibility and body site-layout classes, replace content-layout CSS grid with Zibll float geometry, move sidebar DOM to content-wrap sibling across single/archive/page/home, and add post meta show_layout overrides.
This commit is contained in:
1 parent
232b6eb752
commit
12673fb819
15 files changed
+354
-168
No files matched your search
@@ -275,26 +275,19 @@ if (!function_exists('aksrt_archive_has_sidebar')) :
|
||||
/**
|
||||
* Resolve whether a stream page should show an aside.
|
||||
*
|
||||
* @param string $preferred Preferred sidebar id.
|
||||
* @param string $preferred Preferred sidebar id (compat only).
|
||||
* @param bool $enabled Page-level sidebar toggle.
|
||||
*/
|
||||
function aksrt_archive_has_sidebar(string $preferred = '', bool $enabled = true): bool {
|
||||
if (!$enabled || wp_is_mobile()) {
|
||||
// $preferred kept for call-site compat; visibility is settings/meta driven (zibll).
|
||||
unset($preferred);
|
||||
if (!$enabled) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if ($preferred !== '' && is_active_sidebar($preferred)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (function_exists('aksrt_is_show_sidebar')) {
|
||||
return aksrt_is_show_sidebar();
|
||||
}
|
||||
|
||||
$fallback = function_exists('aksrt_resolve_sidebar_id') ? aksrt_resolve_sidebar_id() : 'sidebar-blog';
|
||||
return is_active_sidebar($fallback)
|
||||
|| is_active_sidebar('all_sidebar_top')
|
||||
|| is_active_sidebar('all_sidebar_bottom');
|
||||
return !wp_is_mobile();
|
||||
}
|
||||
endif;
|
||||
|
||||
@@ -440,6 +433,7 @@ endif;
|
||||
if (!function_exists('aksrt_archive_close_shell')) :
|
||||
/**
|
||||
* Close a shared archive shell.
|
||||
* Sidebar is a sibling of .content-wrap (Zibll float dual-column).
|
||||
*
|
||||
* @param array<string,mixed> $args Shell args.
|
||||
*/
|
||||
@@ -450,11 +444,11 @@ if (!function_exists('aksrt_archive_close_shell')) :
|
||||
]);
|
||||
?>
|
||||
</div>
|
||||
<?php if (!empty($args['has_sidebar'])) : ?>
|
||||
<?php get_sidebar(); ?>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php if (!empty($args['has_sidebar'])) : ?>
|
||||
<?php get_sidebar(); ?>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
if (!empty($args['bottom_fluid']) && is_array($args['bottom_fluid'])) {
|
||||
aksrt_archive_render_widget_zone($args['bottom_fluid'], 'fluid-widget-wrap');
|
||||
|
||||
Reference in new issue
Block a user