fix(phase1): backfill pagination, fix card stacking, unify archive render

- Backfill aksrt_render_pagination() into inc/helpers/aksrt-template-tags.php
  (numbered + load_more/infinite branches, \AKSRT\Settings\Settings facade)
- post-card.css: drop display:block !important from base .posts-item so
  .posts-item.card inline-block 3-col grid wins; scope <posts> block forcing
- archive-resources.php: replace hand-written .posts-row.ajaxpager +
  get_template_part loop with aksrt_render_post_list() + aksrt_render_pagination()

Refs .specs/plans/zibll-widgets-1to1.md Phase 1 (US2/US3/US5)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Claude
2026-07-30 19:05:43 +08:00
parent 5061977b72
commit 98aeee3cc1
3 changed files with 139 additions and 13 deletions
+17 -11
View File
@@ -159,18 +159,24 @@ $has_filter = $current_orderby !== 'date' || $current_price !== 'all' || $price_
</nav>
<?php if (have_posts()) : ?>
<div class="posts-row ajaxpager tab-pane">
<?php
set_query_var('aksrt_post_card_layout', 'card');
while (have_posts()) :
the_post();
get_template_part('templates/parts/content', 'post-card');
endwhile;
set_query_var('aksrt_post_card_layout', '');
?>
</div>
<?php
$render_config = function_exists('aksrt_resolve_post_list_render_config')
? aksrt_resolve_post_list_render_config([
'context' => 'archive',
'overrides' => ['mode' => 'card'],
])
: ['context' => 'archive', 'mode' => 'card'];
<?php aksrt_render_pagination(); ?>
if (function_exists('aksrt_render_post_list')) {
aksrt_render_post_list(null, array_merge($render_config, ['wrapper_class' => 'content-stream__list']));
}
if (function_exists('aksrt_render_pagination')) {
aksrt_render_pagination(null, [
'query_context' => 'archive',
'render_config' => $render_config,
]);
}
?>
<?php else : ?>
<div class="no-results">
<p><?php esc_html_e('暂无资源。', 'aksrt'); ?></p>