feat(frontend): align single post page 1:1 with Zibll
Restore Zibll float dual-column shell, fix single settings DTO key mapping, reorder article footer/actions, and match author bar, prev/next, title/body typography, and limit-height expand UX.
This commit is contained in:
+26
-32
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/**
|
||||
* Single post template — thin Zibll-style shell.
|
||||
* Single post template — Zibll-style shell.
|
||||
*
|
||||
* Composition lives in inc/helpers/aksrt-single.php.
|
||||
*
|
||||
@@ -10,7 +10,6 @@
|
||||
defined('ABSPATH') || exit;
|
||||
|
||||
wp_reset_postdata();
|
||||
get_header();
|
||||
|
||||
while (have_posts()) :
|
||||
the_post();
|
||||
@@ -21,13 +20,16 @@ while (have_posts()) :
|
||||
: ['show_aside' => false, 'settings' => []];
|
||||
|
||||
if (function_exists('aksrt_single_is_docs_page') && aksrt_single_is_docs_page($post_id)) {
|
||||
get_header();
|
||||
get_template_part('templates/pages/page-documentnav');
|
||||
get_footer();
|
||||
return;
|
||||
}
|
||||
|
||||
$settings = is_array($ctx['settings'] ?? null) ? $ctx['settings'] : [];
|
||||
$show_aside = !empty($ctx['show_aside']);
|
||||
$show_aside = !empty($ctx['show_aside']) && !wp_is_mobile();
|
||||
|
||||
get_header();
|
||||
?>
|
||||
|
||||
<?php if (!empty($settings['reading_progress'])) : ?>
|
||||
@@ -41,42 +43,34 @@ while (have_posts()) :
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<main id="main-content" role="main" class="site-main container content-shell content-shell--stream content-shell--single" tabindex="-1">
|
||||
<main role="main" class="container<?php echo $show_aside ? '' : ' container--no-sidebar'; ?>">
|
||||
<div class="content-wrap">
|
||||
<div class="content-layout<?php echo $show_aside ? '' : ' content-layout--no-sidebar'; ?>">
|
||||
<div class="content-layout__primary">
|
||||
<?php if (is_active_sidebar('single_top_content')) : ?>
|
||||
<div class="aksrt-single-widget-area aksrt-single-widget-area--top">
|
||||
<?php dynamic_sidebar('single_top_content'); ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php
|
||||
if (function_exists('aksrt_single')) {
|
||||
aksrt_single($ctx);
|
||||
}
|
||||
?>
|
||||
|
||||
<?php if (comments_open() || get_comments_number()) : ?>
|
||||
<div class="theme-box box-body radius8 main-shadow comments-card">
|
||||
<?php comments_template(); ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if (is_active_sidebar('single_bottom_content')) : ?>
|
||||
<div class="aksrt-single-widget-area aksrt-single-widget-area--bottom">
|
||||
<?php dynamic_sidebar('single_bottom_content'); ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<div class="content-layout">
|
||||
<?php if (is_active_sidebar('single_top_content')) : ?>
|
||||
<?php dynamic_sidebar('single_top_content'); ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php
|
||||
if (function_exists('aksrt_single_render_aside')) {
|
||||
aksrt_single_render_aside($ctx);
|
||||
if (function_exists('aksrt_single')) {
|
||||
aksrt_single($ctx);
|
||||
}
|
||||
?>
|
||||
|
||||
<?php if (comments_open() || get_comments_number()) : ?>
|
||||
<?php comments_template(); ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if (is_active_sidebar('single_bottom_content')) : ?>
|
||||
<?php dynamic_sidebar('single_bottom_content'); ?>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
if (function_exists('aksrt_single_render_aside')) {
|
||||
aksrt_single_render_aside($ctx);
|
||||
}
|
||||
?>
|
||||
</main>
|
||||
|
||||
<?php if (function_exists('dynamic_sidebar')) : ?>
|
||||
|
||||
Reference in New Issue
Block a user