专用页对齐 content-shell,并删 page-header query-var 回退

archives/friends/newposts/posts-navs/categories 统一壳层与 page-header 契约,
主路径不再保留 aksrt_ph_* ambient 传参。
This commit is contained in:
kate522 committed 2026-07-09 23:05:06 +08:00
1 parent 9fd0735e97
commit 8849540fda
6 files changed
+228 -210

No files matched your search

+29 -20
View File
@@ -46,26 +46,31 @@ if ($page_title === '') {
}
?>
<main id="main-content" class="site-main content-shell" tabindex="-1">
<?php if (function_exists('aksrt_breadcrumbs')) {
aksrt_breadcrumbs();
} ?>
<?php
if (function_exists('aksrt_archive_open_shell')) {
aksrt_archive_open_shell([
'main_class' => 'site-main container content-shell content-shell--page',
'has_sidebar' => false,
'page_kind' => 'categories',
]);
}
?>
<div class="content-main content-main--page content-main--categories">
<?php if (function_exists('aksrt_breadcrumbs')) { aksrt_breadcrumbs(); } ?>
<?php
$cats_meta = sprintf(
/* translators: 1: total category count, 2: total published post count */
esc_html__('共 %1$d 个分类 · 共 %2$d 篇文章', 'aksrt'),
$total_cats,
$total_posts
);
get_template_part('templates/parts/page-header', null, [
'title' => esc_html($page_title),
'desc' => $cats_meta,
]);
?>
<header class="page-header aksrt-cats-header">
<h1 class="entry-title"><?php echo esc_html($page_title); ?></h1>
<p class="aksrt-cats-header__meta">
<?php
printf(
/* translators: 1: total category count, 2: total published post count */
esc_html__('共 %1$d 个分类 · 共 %2$d 篇文章', 'aksrt'),
$total_cats,
$total_posts
);
?>
</p>
</header>
<?php if (!empty($top_level)) : ?>
<?php if (!empty($top_level)) : ?>
<section class="aksrt-cats-grid" aria-label="<?php esc_attr_e('分类列表', 'aksrt'); ?>">
<?php foreach ($top_level as $cat) :
$cat_id = (int) $cat->term_id;
@@ -124,7 +129,11 @@ if ($page_title === '') {
<?php esc_html_e('返回首页', 'aksrt'); ?>
</a>
</p>
</main>
</div>
<?php
if (function_exists('aksrt_archive_close_shell')) {
aksrt_archive_close_shell(['has_sidebar' => false]);
}
get_footer();