feat(admin): rebuild page display settings

This commit is contained in:
kate522 committed 2026-08-19 00:07:13 +08:00
1 parent 09b1e8fd35
commit 480e2bf07e
117 files changed
+1815 -9081

No files matched your search

+5 -9
View File
@@ -12,7 +12,7 @@ if (!function_exists('aksrt_homepage_render_layout')) {
* Render the fixed homepage layout (Zibll latest-first content stream).
*
* Order (zibll-aligned):
* fluid top → main.container → top content → banner → tabs/list → bottom content → sidebar
* fluid top → main.container → top content → tabs/list → bottom content → sidebar
* → fluid bottom. Hero/header-slider is rendered from header.php, not here.
*/
function aksrt_homepage_render_layout(): void {
@@ -21,7 +21,6 @@ if (!function_exists('aksrt_homepage_render_layout')) {
$tab_configs = $show_tabs ? aksrt_homepage_get_tab_configs() : [];
$latest_contract = aksrt_homepage_get_latest_panel_contract();
$view_mode = (($latest_contract['render_config_array']['mode'] ?? 'list') === 'card') ? 'card' : 'list';
$banner_on = $show_tabs && aksrt_homepage_module_banner_enabled();
$main_list_enabled = !class_exists('\AKSRT\Settings\Settings') || \AKSRT\Settings\Settings::home_posts_list_enabled();
$list_title = class_exists('\AKSRT\Settings\Settings')
? \AKSRT\Settings\Settings::home_list_title()
@@ -42,9 +41,6 @@ if (!function_exists('aksrt_homepage_render_layout')) {
'aksrt-homepage__content-zone aksrt-homepage__content-zone--top'
);
if ($banner_on && function_exists('aksrt_homepage_render_section')) {
aksrt_homepage_render_section('banner');
}
?>
<?php if ($main_list_enabled) : ?>
@@ -54,7 +50,7 @@ if (!function_exists('aksrt_homepage_render_layout')) {
<ul class="list-inline scroll-x no-scrollbar aksrt-homepage__tab-list" role="tablist" data-aksrt-home-tabs style="width:100%;">
<li class="aksrt-homepage__tab-item is-active" role="presentation">
<button type="button" class="aksrt-homepage__tab-button" role="tab" aria-selected="true" data-home-tab-target="latest">
<?php echo esc_html($list_title !== '' ? $list_title : __('最新发布', 'aksrt')); ?>
<?php echo wp_kses_post($list_title !== '' ? $list_title : __('最新发布', 'aksrt')); ?>
</button>
</li>
<?php foreach ($tab_configs as $tab_cfg) : ?>
@@ -67,7 +63,7 @@ if (!function_exists('aksrt_homepage_render_layout')) {
data-home-tab-target="term-<?php echo (int) $tab_cfg['term_id']; ?>"
data-tab-orderby="<?php echo esc_attr($tab_cfg['orderby']); ?>"
>
<?php echo esc_html($tab_cfg['title']); ?>
<?php echo wp_kses_post($tab_cfg['title']); ?>
</button>
</li>
<?php endforeach; ?>
@@ -77,7 +73,7 @@ if (!function_exists('aksrt_homepage_render_layout')) {
<?php elseif ($current_page > 1) : ?>
<div class="box-body notop nobottom aksrt-homepage__titlebox">
<div class="title-theme">
<?php echo esc_html($list_title !== '' ? $list_title : __('最新发布', 'aksrt')); ?>
<?php echo wp_kses_post($list_title !== '' ? $list_title : __('最新发布', 'aksrt')); ?>
<small class="aksrt-homepage__page-indicator ml10">
<?php echo esc_html(sprintf(__('第 %d 页', 'aksrt'), $current_page)); ?>
</small>
@@ -85,7 +81,7 @@ if (!function_exists('aksrt_homepage_render_layout')) {
</div>
<?php elseif ($list_title !== '') : ?>
<div class="box-body notop nobottom aksrt-homepage__titlebox">
<div class="title-theme"><?php echo esc_html($list_title); ?></div>
<div class="title-theme"><?php echo wp_kses_post($list_title); ?></div>
</div>
<?php endif; ?>